OZE_Main.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 00000298 08000000 08000000 00001000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 0002d050 080002a0 080002a0 000012a0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00004e1c 0802d2f0 0802d2f0 0002e2f0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM 00000008 0803210c 0803210c 0003310c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .init_array 00000004 08032114 08032114 00033114 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .fini_array 00000004 08032118 08032118 00033118 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .data 00000224 24000000 0803211c 00034000 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .bss 0002b044 24000224 08032340 00034224 2**2 ALLOC 8 ._user_heap_stack 00000600 2402b268 08032340 00034268 2**0 ALLOC 9 .lwip_sec 0001931b 2402b868 08032340 00034868 2**2 ALLOC 10 .ARM.attributes 0000002e 00000000 00000000 00034224 2**0 CONTENTS, READONLY 11 .debug_info 00052154 00000000 00000000 00034252 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 12 .debug_abbrev 0000b787 00000000 00000000 000863a6 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_aranges 00003858 00000000 00000000 00091b30 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_rnglists 00002d05 00000000 00000000 00095388 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_macro 0004f343 00000000 00000000 0009808d 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_line 00057dc9 00000000 00000000 000e73d0 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_str 0018eb25 00000000 00000000 0013f199 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .comment 00000043 00000000 00000000 002cdcbe 2**0 CONTENTS, READONLY 19 .debug_frame 0000fc64 00000000 00000000 002cdd04 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 20 .debug_line_str 00000064 00000000 00000000 002dd968 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 080002a0 <__do_global_dtors_aux>: 80002a0: b510 push {r4, lr} 80002a2: 4c05 ldr r4, [pc, #20] @ (80002b8 <__do_global_dtors_aux+0x18>) 80002a4: 7823 ldrb r3, [r4, #0] 80002a6: b933 cbnz r3, 80002b6 <__do_global_dtors_aux+0x16> 80002a8: 4b04 ldr r3, [pc, #16] @ (80002bc <__do_global_dtors_aux+0x1c>) 80002aa: b113 cbz r3, 80002b2 <__do_global_dtors_aux+0x12> 80002ac: 4804 ldr r0, [pc, #16] @ (80002c0 <__do_global_dtors_aux+0x20>) 80002ae: f3af 8000 nop.w 80002b2: 2301 movs r3, #1 80002b4: 7023 strb r3, [r4, #0] 80002b6: bd10 pop {r4, pc} 80002b8: 24000224 .word 0x24000224 80002bc: 00000000 .word 0x00000000 80002c0: 0802d2d8 .word 0x0802d2d8 080002c4 : 80002c4: b508 push {r3, lr} 80002c6: 4b03 ldr r3, [pc, #12] @ (80002d4 ) 80002c8: b11b cbz r3, 80002d2 80002ca: 4903 ldr r1, [pc, #12] @ (80002d8 ) 80002cc: 4803 ldr r0, [pc, #12] @ (80002dc ) 80002ce: f3af 8000 nop.w 80002d2: bd08 pop {r3, pc} 80002d4: 00000000 .word 0x00000000 80002d8: 24000228 .word 0x24000228 80002dc: 0802d2d8 .word 0x0802d2d8 080002e0 : 80002e0: f810 2b01 ldrb.w r2, [r0], #1 80002e4: f811 3b01 ldrb.w r3, [r1], #1 80002e8: 2a01 cmp r2, #1 80002ea: bf28 it cs 80002ec: 429a cmpcs r2, r3 80002ee: d0f7 beq.n 80002e0 80002f0: 1ad0 subs r0, r2, r3 80002f2: 4770 bx lr ... 08000300 : 8000300: f001 01ff and.w r1, r1, #255 @ 0xff 8000304: 2a10 cmp r2, #16 8000306: db2b blt.n 8000360 8000308: f010 0f07 tst.w r0, #7 800030c: d008 beq.n 8000320 800030e: f810 3b01 ldrb.w r3, [r0], #1 8000312: 3a01 subs r2, #1 8000314: 428b cmp r3, r1 8000316: d02d beq.n 8000374 8000318: f010 0f07 tst.w r0, #7 800031c: b342 cbz r2, 8000370 800031e: d1f6 bne.n 800030e 8000320: b4f0 push {r4, r5, r6, r7} 8000322: ea41 2101 orr.w r1, r1, r1, lsl #8 8000326: ea41 4101 orr.w r1, r1, r1, lsl #16 800032a: f022 0407 bic.w r4, r2, #7 800032e: f07f 0700 mvns.w r7, #0 8000332: 2300 movs r3, #0 8000334: e8f0 5602 ldrd r5, r6, [r0], #8 8000338: 3c08 subs r4, #8 800033a: ea85 0501 eor.w r5, r5, r1 800033e: ea86 0601 eor.w r6, r6, r1 8000342: fa85 f547 uadd8 r5, r5, r7 8000346: faa3 f587 sel r5, r3, r7 800034a: fa86 f647 uadd8 r6, r6, r7 800034e: faa5 f687 sel r6, r5, r7 8000352: b98e cbnz r6, 8000378 8000354: d1ee bne.n 8000334 8000356: bcf0 pop {r4, r5, r6, r7} 8000358: f001 01ff and.w r1, r1, #255 @ 0xff 800035c: f002 0207 and.w r2, r2, #7 8000360: b132 cbz r2, 8000370 8000362: f810 3b01 ldrb.w r3, [r0], #1 8000366: 3a01 subs r2, #1 8000368: ea83 0301 eor.w r3, r3, r1 800036c: b113 cbz r3, 8000374 800036e: d1f8 bne.n 8000362 8000370: 2000 movs r0, #0 8000372: 4770 bx lr 8000374: 3801 subs r0, #1 8000376: 4770 bx lr 8000378: 2d00 cmp r5, #0 800037a: bf06 itte eq 800037c: 4635 moveq r5, r6 800037e: 3803 subeq r0, #3 8000380: 3807 subne r0, #7 8000382: f015 0f01 tst.w r5, #1 8000386: d107 bne.n 8000398 8000388: 3001 adds r0, #1 800038a: f415 7f80 tst.w r5, #256 @ 0x100 800038e: bf02 ittt eq 8000390: 3001 addeq r0, #1 8000392: f415 3fc0 tsteq.w r5, #98304 @ 0x18000 8000396: 3001 addeq r0, #1 8000398: bcf0 pop {r4, r5, r6, r7} 800039a: 3801 subs r0, #1 800039c: 4770 bx lr 800039e: bf00 nop 080003a0 : 80003a0: 4603 mov r3, r0 80003a2: f813 2b01 ldrb.w r2, [r3], #1 80003a6: 2a00 cmp r2, #0 80003a8: d1fb bne.n 80003a2 80003aa: 1a18 subs r0, r3, r0 80003ac: 3801 subs r0, #1 80003ae: 4770 bx lr 080003b0 <__aeabi_drsub>: 80003b0: f081 4100 eor.w r1, r1, #2147483648 @ 0x80000000 80003b4: e002 b.n 80003bc <__adddf3> 80003b6: bf00 nop 080003b8 <__aeabi_dsub>: 80003b8: f083 4300 eor.w r3, r3, #2147483648 @ 0x80000000 080003bc <__adddf3>: 80003bc: b530 push {r4, r5, lr} 80003be: ea4f 0441 mov.w r4, r1, lsl #1 80003c2: ea4f 0543 mov.w r5, r3, lsl #1 80003c6: ea94 0f05 teq r4, r5 80003ca: bf08 it eq 80003cc: ea90 0f02 teqeq r0, r2 80003d0: bf1f itttt ne 80003d2: ea54 0c00 orrsne.w ip, r4, r0 80003d6: ea55 0c02 orrsne.w ip, r5, r2 80003da: ea7f 5c64 mvnsne.w ip, r4, asr #21 80003de: ea7f 5c65 mvnsne.w ip, r5, asr #21 80003e2: f000 80e2 beq.w 80005aa <__adddf3+0x1ee> 80003e6: ea4f 5454 mov.w r4, r4, lsr #21 80003ea: ebd4 5555 rsbs r5, r4, r5, lsr #21 80003ee: bfb8 it lt 80003f0: 426d neglt r5, r5 80003f2: dd0c ble.n 800040e <__adddf3+0x52> 80003f4: 442c add r4, r5 80003f6: ea80 0202 eor.w r2, r0, r2 80003fa: ea81 0303 eor.w r3, r1, r3 80003fe: ea82 0000 eor.w r0, r2, r0 8000402: ea83 0101 eor.w r1, r3, r1 8000406: ea80 0202 eor.w r2, r0, r2 800040a: ea81 0303 eor.w r3, r1, r3 800040e: 2d36 cmp r5, #54 @ 0x36 8000410: bf88 it hi 8000412: bd30 pophi {r4, r5, pc} 8000414: f011 4f00 tst.w r1, #2147483648 @ 0x80000000 8000418: ea4f 3101 mov.w r1, r1, lsl #12 800041c: f44f 1c80 mov.w ip, #1048576 @ 0x100000 8000420: ea4c 3111 orr.w r1, ip, r1, lsr #12 8000424: d002 beq.n 800042c <__adddf3+0x70> 8000426: 4240 negs r0, r0 8000428: eb61 0141 sbc.w r1, r1, r1, lsl #1 800042c: f013 4f00 tst.w r3, #2147483648 @ 0x80000000 8000430: ea4f 3303 mov.w r3, r3, lsl #12 8000434: ea4c 3313 orr.w r3, ip, r3, lsr #12 8000438: d002 beq.n 8000440 <__adddf3+0x84> 800043a: 4252 negs r2, r2 800043c: eb63 0343 sbc.w r3, r3, r3, lsl #1 8000440: ea94 0f05 teq r4, r5 8000444: f000 80a7 beq.w 8000596 <__adddf3+0x1da> 8000448: f1a4 0401 sub.w r4, r4, #1 800044c: f1d5 0e20 rsbs lr, r5, #32 8000450: db0d blt.n 800046e <__adddf3+0xb2> 8000452: fa02 fc0e lsl.w ip, r2, lr 8000456: fa22 f205 lsr.w r2, r2, r5 800045a: 1880 adds r0, r0, r2 800045c: f141 0100 adc.w r1, r1, #0 8000460: fa03 f20e lsl.w r2, r3, lr 8000464: 1880 adds r0, r0, r2 8000466: fa43 f305 asr.w r3, r3, r5 800046a: 4159 adcs r1, r3 800046c: e00e b.n 800048c <__adddf3+0xd0> 800046e: f1a5 0520 sub.w r5, r5, #32 8000472: f10e 0e20 add.w lr, lr, #32 8000476: 2a01 cmp r2, #1 8000478: fa03 fc0e lsl.w ip, r3, lr 800047c: bf28 it cs 800047e: f04c 0c02 orrcs.w ip, ip, #2 8000482: fa43 f305 asr.w r3, r3, r5 8000486: 18c0 adds r0, r0, r3 8000488: eb51 71e3 adcs.w r1, r1, r3, asr #31 800048c: f001 4500 and.w r5, r1, #2147483648 @ 0x80000000 8000490: d507 bpl.n 80004a2 <__adddf3+0xe6> 8000492: f04f 0e00 mov.w lr, #0 8000496: f1dc 0c00 rsbs ip, ip, #0 800049a: eb7e 0000 sbcs.w r0, lr, r0 800049e: eb6e 0101 sbc.w r1, lr, r1 80004a2: f5b1 1f80 cmp.w r1, #1048576 @ 0x100000 80004a6: d31b bcc.n 80004e0 <__adddf3+0x124> 80004a8: f5b1 1f00 cmp.w r1, #2097152 @ 0x200000 80004ac: d30c bcc.n 80004c8 <__adddf3+0x10c> 80004ae: 0849 lsrs r1, r1, #1 80004b0: ea5f 0030 movs.w r0, r0, rrx 80004b4: ea4f 0c3c mov.w ip, ip, rrx 80004b8: f104 0401 add.w r4, r4, #1 80004bc: ea4f 5244 mov.w r2, r4, lsl #21 80004c0: f512 0f80 cmn.w r2, #4194304 @ 0x400000 80004c4: f080 809a bcs.w 80005fc <__adddf3+0x240> 80004c8: f1bc 4f00 cmp.w ip, #2147483648 @ 0x80000000 80004cc: bf08 it eq 80004ce: ea5f 0c50 movseq.w ip, r0, lsr #1 80004d2: f150 0000 adcs.w r0, r0, #0 80004d6: eb41 5104 adc.w r1, r1, r4, lsl #20 80004da: ea41 0105 orr.w r1, r1, r5 80004de: bd30 pop {r4, r5, pc} 80004e0: ea5f 0c4c movs.w ip, ip, lsl #1 80004e4: 4140 adcs r0, r0 80004e6: eb41 0101 adc.w r1, r1, r1 80004ea: 3c01 subs r4, #1 80004ec: bf28 it cs 80004ee: f5b1 1f80 cmpcs.w r1, #1048576 @ 0x100000 80004f2: d2e9 bcs.n 80004c8 <__adddf3+0x10c> 80004f4: f091 0f00 teq r1, #0 80004f8: bf04 itt eq 80004fa: 4601 moveq r1, r0 80004fc: 2000 moveq r0, #0 80004fe: fab1 f381 clz r3, r1 8000502: bf08 it eq 8000504: 3320 addeq r3, #32 8000506: f1a3 030b sub.w r3, r3, #11 800050a: f1b3 0220 subs.w r2, r3, #32 800050e: da0c bge.n 800052a <__adddf3+0x16e> 8000510: 320c adds r2, #12 8000512: dd08 ble.n 8000526 <__adddf3+0x16a> 8000514: f102 0c14 add.w ip, r2, #20 8000518: f1c2 020c rsb r2, r2, #12 800051c: fa01 f00c lsl.w r0, r1, ip 8000520: fa21 f102 lsr.w r1, r1, r2 8000524: e00c b.n 8000540 <__adddf3+0x184> 8000526: f102 0214 add.w r2, r2, #20 800052a: bfd8 it le 800052c: f1c2 0c20 rsble ip, r2, #32 8000530: fa01 f102 lsl.w r1, r1, r2 8000534: fa20 fc0c lsr.w ip, r0, ip 8000538: bfdc itt le 800053a: ea41 010c orrle.w r1, r1, ip 800053e: 4090 lslle r0, r2 8000540: 1ae4 subs r4, r4, r3 8000542: bfa2 ittt ge 8000544: eb01 5104 addge.w r1, r1, r4, lsl #20 8000548: 4329 orrge r1, r5 800054a: bd30 popge {r4, r5, pc} 800054c: ea6f 0404 mvn.w r4, r4 8000550: 3c1f subs r4, #31 8000552: da1c bge.n 800058e <__adddf3+0x1d2> 8000554: 340c adds r4, #12 8000556: dc0e bgt.n 8000576 <__adddf3+0x1ba> 8000558: f104 0414 add.w r4, r4, #20 800055c: f1c4 0220 rsb r2, r4, #32 8000560: fa20 f004 lsr.w r0, r0, r4 8000564: fa01 f302 lsl.w r3, r1, r2 8000568: ea40 0003 orr.w r0, r0, r3 800056c: fa21 f304 lsr.w r3, r1, r4 8000570: ea45 0103 orr.w r1, r5, r3 8000574: bd30 pop {r4, r5, pc} 8000576: f1c4 040c rsb r4, r4, #12 800057a: f1c4 0220 rsb r2, r4, #32 800057e: fa20 f002 lsr.w r0, r0, r2 8000582: fa01 f304 lsl.w r3, r1, r4 8000586: ea40 0003 orr.w r0, r0, r3 800058a: 4629 mov r1, r5 800058c: bd30 pop {r4, r5, pc} 800058e: fa21 f004 lsr.w r0, r1, r4 8000592: 4629 mov r1, r5 8000594: bd30 pop {r4, r5, pc} 8000596: f094 0f00 teq r4, #0 800059a: f483 1380 eor.w r3, r3, #1048576 @ 0x100000 800059e: bf06 itte eq 80005a0: f481 1180 eoreq.w r1, r1, #1048576 @ 0x100000 80005a4: 3401 addeq r4, #1 80005a6: 3d01 subne r5, #1 80005a8: e74e b.n 8000448 <__adddf3+0x8c> 80005aa: ea7f 5c64 mvns.w ip, r4, asr #21 80005ae: bf18 it ne 80005b0: ea7f 5c65 mvnsne.w ip, r5, asr #21 80005b4: d029 beq.n 800060a <__adddf3+0x24e> 80005b6: ea94 0f05 teq r4, r5 80005ba: bf08 it eq 80005bc: ea90 0f02 teqeq r0, r2 80005c0: d005 beq.n 80005ce <__adddf3+0x212> 80005c2: ea54 0c00 orrs.w ip, r4, r0 80005c6: bf04 itt eq 80005c8: 4619 moveq r1, r3 80005ca: 4610 moveq r0, r2 80005cc: bd30 pop {r4, r5, pc} 80005ce: ea91 0f03 teq r1, r3 80005d2: bf1e ittt ne 80005d4: 2100 movne r1, #0 80005d6: 2000 movne r0, #0 80005d8: bd30 popne {r4, r5, pc} 80005da: ea5f 5c54 movs.w ip, r4, lsr #21 80005de: d105 bne.n 80005ec <__adddf3+0x230> 80005e0: 0040 lsls r0, r0, #1 80005e2: 4149 adcs r1, r1 80005e4: bf28 it cs 80005e6: f041 4100 orrcs.w r1, r1, #2147483648 @ 0x80000000 80005ea: bd30 pop {r4, r5, pc} 80005ec: f514 0480 adds.w r4, r4, #4194304 @ 0x400000 80005f0: bf3c itt cc 80005f2: f501 1180 addcc.w r1, r1, #1048576 @ 0x100000 80005f6: bd30 popcc {r4, r5, pc} 80005f8: f001 4500 and.w r5, r1, #2147483648 @ 0x80000000 80005fc: f045 41fe orr.w r1, r5, #2130706432 @ 0x7f000000 8000600: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000 8000604: f04f 0000 mov.w r0, #0 8000608: bd30 pop {r4, r5, pc} 800060a: ea7f 5c64 mvns.w ip, r4, asr #21 800060e: bf1a itte ne 8000610: 4619 movne r1, r3 8000612: 4610 movne r0, r2 8000614: ea7f 5c65 mvnseq.w ip, r5, asr #21 8000618: bf1c itt ne 800061a: 460b movne r3, r1 800061c: 4602 movne r2, r0 800061e: ea50 3401 orrs.w r4, r0, r1, lsl #12 8000622: bf06 itte eq 8000624: ea52 3503 orrseq.w r5, r2, r3, lsl #12 8000628: ea91 0f03 teqeq r1, r3 800062c: f441 2100 orrne.w r1, r1, #524288 @ 0x80000 8000630: bd30 pop {r4, r5, pc} 8000632: bf00 nop 08000634 <__aeabi_ui2d>: 8000634: f090 0f00 teq r0, #0 8000638: bf04 itt eq 800063a: 2100 moveq r1, #0 800063c: 4770 bxeq lr 800063e: b530 push {r4, r5, lr} 8000640: f44f 6480 mov.w r4, #1024 @ 0x400 8000644: f104 0432 add.w r4, r4, #50 @ 0x32 8000648: f04f 0500 mov.w r5, #0 800064c: f04f 0100 mov.w r1, #0 8000650: e750 b.n 80004f4 <__adddf3+0x138> 8000652: bf00 nop 08000654 <__aeabi_i2d>: 8000654: f090 0f00 teq r0, #0 8000658: bf04 itt eq 800065a: 2100 moveq r1, #0 800065c: 4770 bxeq lr 800065e: b530 push {r4, r5, lr} 8000660: f44f 6480 mov.w r4, #1024 @ 0x400 8000664: f104 0432 add.w r4, r4, #50 @ 0x32 8000668: f010 4500 ands.w r5, r0, #2147483648 @ 0x80000000 800066c: bf48 it mi 800066e: 4240 negmi r0, r0 8000670: f04f 0100 mov.w r1, #0 8000674: e73e b.n 80004f4 <__adddf3+0x138> 8000676: bf00 nop 08000678 <__aeabi_f2d>: 8000678: 0042 lsls r2, r0, #1 800067a: ea4f 01e2 mov.w r1, r2, asr #3 800067e: ea4f 0131 mov.w r1, r1, rrx 8000682: ea4f 7002 mov.w r0, r2, lsl #28 8000686: bf1f itttt ne 8000688: f012 437f andsne.w r3, r2, #4278190080 @ 0xff000000 800068c: f093 4f7f teqne r3, #4278190080 @ 0xff000000 8000690: f081 5160 eorne.w r1, r1, #939524096 @ 0x38000000 8000694: 4770 bxne lr 8000696: f032 427f bics.w r2, r2, #4278190080 @ 0xff000000 800069a: bf08 it eq 800069c: 4770 bxeq lr 800069e: f093 4f7f teq r3, #4278190080 @ 0xff000000 80006a2: bf04 itt eq 80006a4: f441 2100 orreq.w r1, r1, #524288 @ 0x80000 80006a8: 4770 bxeq lr 80006aa: b530 push {r4, r5, lr} 80006ac: f44f 7460 mov.w r4, #896 @ 0x380 80006b0: f001 4500 and.w r5, r1, #2147483648 @ 0x80000000 80006b4: f021 4100 bic.w r1, r1, #2147483648 @ 0x80000000 80006b8: e71c b.n 80004f4 <__adddf3+0x138> 80006ba: bf00 nop 080006bc <__aeabi_ul2d>: 80006bc: ea50 0201 orrs.w r2, r0, r1 80006c0: bf08 it eq 80006c2: 4770 bxeq lr 80006c4: b530 push {r4, r5, lr} 80006c6: f04f 0500 mov.w r5, #0 80006ca: e00a b.n 80006e2 <__aeabi_l2d+0x16> 080006cc <__aeabi_l2d>: 80006cc: ea50 0201 orrs.w r2, r0, r1 80006d0: bf08 it eq 80006d2: 4770 bxeq lr 80006d4: b530 push {r4, r5, lr} 80006d6: f011 4500 ands.w r5, r1, #2147483648 @ 0x80000000 80006da: d502 bpl.n 80006e2 <__aeabi_l2d+0x16> 80006dc: 4240 negs r0, r0 80006de: eb61 0141 sbc.w r1, r1, r1, lsl #1 80006e2: f44f 6480 mov.w r4, #1024 @ 0x400 80006e6: f104 0432 add.w r4, r4, #50 @ 0x32 80006ea: ea5f 5c91 movs.w ip, r1, lsr #22 80006ee: f43f aed8 beq.w 80004a2 <__adddf3+0xe6> 80006f2: f04f 0203 mov.w r2, #3 80006f6: ea5f 0cdc movs.w ip, ip, lsr #3 80006fa: bf18 it ne 80006fc: 3203 addne r2, #3 80006fe: ea5f 0cdc movs.w ip, ip, lsr #3 8000702: bf18 it ne 8000704: 3203 addne r2, #3 8000706: eb02 02dc add.w r2, r2, ip, lsr #3 800070a: f1c2 0320 rsb r3, r2, #32 800070e: fa00 fc03 lsl.w ip, r0, r3 8000712: fa20 f002 lsr.w r0, r0, r2 8000716: fa01 fe03 lsl.w lr, r1, r3 800071a: ea40 000e orr.w r0, r0, lr 800071e: fa21 f102 lsr.w r1, r1, r2 8000722: 4414 add r4, r2 8000724: e6bd b.n 80004a2 <__adddf3+0xe6> 8000726: bf00 nop 08000728 <__aeabi_uldivmod>: 8000728: b953 cbnz r3, 8000740 <__aeabi_uldivmod+0x18> 800072a: b94a cbnz r2, 8000740 <__aeabi_uldivmod+0x18> 800072c: 2900 cmp r1, #0 800072e: bf08 it eq 8000730: 2800 cmpeq r0, #0 8000732: bf1c itt ne 8000734: f04f 31ff movne.w r1, #4294967295 @ 0xffffffff 8000738: f04f 30ff movne.w r0, #4294967295 @ 0xffffffff 800073c: f000 b9a2 b.w 8000a84 <__aeabi_idiv0> 8000740: f1ad 0c08 sub.w ip, sp, #8 8000744: e96d ce04 strd ip, lr, [sp, #-16]! 8000748: f000 f83e bl 80007c8 <__udivmoddi4> 800074c: f8dd e004 ldr.w lr, [sp, #4] 8000750: e9dd 2302 ldrd r2, r3, [sp, #8] 8000754: b004 add sp, #16 8000756: 4770 bx lr 08000758 <__aeabi_d2lz>: 8000758: b508 push {r3, lr} 800075a: 4602 mov r2, r0 800075c: 460b mov r3, r1 800075e: ec43 2b17 vmov d7, r2, r3 8000762: eeb5 7bc0 vcmpe.f64 d7, #0.0 8000766: eef1 fa10 vmrs APSR_nzcv, fpscr 800076a: d403 bmi.n 8000774 <__aeabi_d2lz+0x1c> 800076c: e8bd 4008 ldmia.w sp!, {r3, lr} 8000770: f000 b80a b.w 8000788 <__aeabi_d2ulz> 8000774: eeb1 7b47 vneg.f64 d7, d7 8000778: ec51 0b17 vmov r0, r1, d7 800077c: f000 f804 bl 8000788 <__aeabi_d2ulz> 8000780: 4240 negs r0, r0 8000782: eb61 0141 sbc.w r1, r1, r1, lsl #1 8000786: bd08 pop {r3, pc} 08000788 <__aeabi_d2ulz>: 8000788: ed9f 6b0b vldr d6, [pc, #44] @ 80007b8 <__aeabi_d2ulz+0x30> 800078c: ec41 0b17 vmov d7, r0, r1 8000790: ed9f 5b0b vldr d5, [pc, #44] @ 80007c0 <__aeabi_d2ulz+0x38> 8000794: ee27 6b06 vmul.f64 d6, d7, d6 8000798: eebc 6bc6 vcvt.u32.f64 s12, d6 800079c: eeb8 4b46 vcvt.f64.u32 d4, s12 80007a0: eea4 7b45 vfms.f64 d7, d4, d5 80007a4: eefc 7bc7 vcvt.u32.f64 s15, d7 80007a8: ee16 1a10 vmov r1, s12 80007ac: ee17 0a90 vmov r0, s15 80007b0: 4770 bx lr 80007b2: bf00 nop 80007b4: f3af 8000 nop.w 80007b8: 00000000 .word 0x00000000 80007bc: 3df00000 .word 0x3df00000 80007c0: 00000000 .word 0x00000000 80007c4: 41f00000 .word 0x41f00000 080007c8 <__udivmoddi4>: 80007c8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 80007cc: 9d08 ldr r5, [sp, #32] 80007ce: 460c mov r4, r1 80007d0: 2b00 cmp r3, #0 80007d2: d14e bne.n 8000872 <__udivmoddi4+0xaa> 80007d4: 4694 mov ip, r2 80007d6: 458c cmp ip, r1 80007d8: 4686 mov lr, r0 80007da: fab2 f282 clz r2, r2 80007de: d962 bls.n 80008a6 <__udivmoddi4+0xde> 80007e0: b14a cbz r2, 80007f6 <__udivmoddi4+0x2e> 80007e2: f1c2 0320 rsb r3, r2, #32 80007e6: 4091 lsls r1, r2 80007e8: fa20 f303 lsr.w r3, r0, r3 80007ec: fa0c fc02 lsl.w ip, ip, r2 80007f0: 4319 orrs r1, r3 80007f2: fa00 fe02 lsl.w lr, r0, r2 80007f6: ea4f 471c mov.w r7, ip, lsr #16 80007fa: fa1f f68c uxth.w r6, ip 80007fe: fbb1 f4f7 udiv r4, r1, r7 8000802: ea4f 431e mov.w r3, lr, lsr #16 8000806: fb07 1114 mls r1, r7, r4, r1 800080a: ea43 4301 orr.w r3, r3, r1, lsl #16 800080e: fb04 f106 mul.w r1, r4, r6 8000812: 4299 cmp r1, r3 8000814: d90a bls.n 800082c <__udivmoddi4+0x64> 8000816: eb1c 0303 adds.w r3, ip, r3 800081a: f104 30ff add.w r0, r4, #4294967295 @ 0xffffffff 800081e: f080 8112 bcs.w 8000a46 <__udivmoddi4+0x27e> 8000822: 4299 cmp r1, r3 8000824: f240 810f bls.w 8000a46 <__udivmoddi4+0x27e> 8000828: 3c02 subs r4, #2 800082a: 4463 add r3, ip 800082c: 1a59 subs r1, r3, r1 800082e: fa1f f38e uxth.w r3, lr 8000832: fbb1 f0f7 udiv r0, r1, r7 8000836: fb07 1110 mls r1, r7, r0, r1 800083a: ea43 4301 orr.w r3, r3, r1, lsl #16 800083e: fb00 f606 mul.w r6, r0, r6 8000842: 429e cmp r6, r3 8000844: d90a bls.n 800085c <__udivmoddi4+0x94> 8000846: eb1c 0303 adds.w r3, ip, r3 800084a: f100 31ff add.w r1, r0, #4294967295 @ 0xffffffff 800084e: f080 80fc bcs.w 8000a4a <__udivmoddi4+0x282> 8000852: 429e cmp r6, r3 8000854: f240 80f9 bls.w 8000a4a <__udivmoddi4+0x282> 8000858: 4463 add r3, ip 800085a: 3802 subs r0, #2 800085c: 1b9b subs r3, r3, r6 800085e: ea40 4004 orr.w r0, r0, r4, lsl #16 8000862: 2100 movs r1, #0 8000864: b11d cbz r5, 800086e <__udivmoddi4+0xa6> 8000866: 40d3 lsrs r3, r2 8000868: 2200 movs r2, #0 800086a: e9c5 3200 strd r3, r2, [r5] 800086e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8000872: 428b cmp r3, r1 8000874: d905 bls.n 8000882 <__udivmoddi4+0xba> 8000876: b10d cbz r5, 800087c <__udivmoddi4+0xb4> 8000878: e9c5 0100 strd r0, r1, [r5] 800087c: 2100 movs r1, #0 800087e: 4608 mov r0, r1 8000880: e7f5 b.n 800086e <__udivmoddi4+0xa6> 8000882: fab3 f183 clz r1, r3 8000886: 2900 cmp r1, #0 8000888: d146 bne.n 8000918 <__udivmoddi4+0x150> 800088a: 42a3 cmp r3, r4 800088c: d302 bcc.n 8000894 <__udivmoddi4+0xcc> 800088e: 4290 cmp r0, r2 8000890: f0c0 80f0 bcc.w 8000a74 <__udivmoddi4+0x2ac> 8000894: 1a86 subs r6, r0, r2 8000896: eb64 0303 sbc.w r3, r4, r3 800089a: 2001 movs r0, #1 800089c: 2d00 cmp r5, #0 800089e: d0e6 beq.n 800086e <__udivmoddi4+0xa6> 80008a0: e9c5 6300 strd r6, r3, [r5] 80008a4: e7e3 b.n 800086e <__udivmoddi4+0xa6> 80008a6: 2a00 cmp r2, #0 80008a8: f040 8090 bne.w 80009cc <__udivmoddi4+0x204> 80008ac: eba1 040c sub.w r4, r1, ip 80008b0: ea4f 481c mov.w r8, ip, lsr #16 80008b4: fa1f f78c uxth.w r7, ip 80008b8: 2101 movs r1, #1 80008ba: fbb4 f6f8 udiv r6, r4, r8 80008be: ea4f 431e mov.w r3, lr, lsr #16 80008c2: fb08 4416 mls r4, r8, r6, r4 80008c6: ea43 4304 orr.w r3, r3, r4, lsl #16 80008ca: fb07 f006 mul.w r0, r7, r6 80008ce: 4298 cmp r0, r3 80008d0: d908 bls.n 80008e4 <__udivmoddi4+0x11c> 80008d2: eb1c 0303 adds.w r3, ip, r3 80008d6: f106 34ff add.w r4, r6, #4294967295 @ 0xffffffff 80008da: d202 bcs.n 80008e2 <__udivmoddi4+0x11a> 80008dc: 4298 cmp r0, r3 80008de: f200 80cd bhi.w 8000a7c <__udivmoddi4+0x2b4> 80008e2: 4626 mov r6, r4 80008e4: 1a1c subs r4, r3, r0 80008e6: fa1f f38e uxth.w r3, lr 80008ea: fbb4 f0f8 udiv r0, r4, r8 80008ee: fb08 4410 mls r4, r8, r0, r4 80008f2: ea43 4304 orr.w r3, r3, r4, lsl #16 80008f6: fb00 f707 mul.w r7, r0, r7 80008fa: 429f cmp r7, r3 80008fc: d908 bls.n 8000910 <__udivmoddi4+0x148> 80008fe: eb1c 0303 adds.w r3, ip, r3 8000902: f100 34ff add.w r4, r0, #4294967295 @ 0xffffffff 8000906: d202 bcs.n 800090e <__udivmoddi4+0x146> 8000908: 429f cmp r7, r3 800090a: f200 80b0 bhi.w 8000a6e <__udivmoddi4+0x2a6> 800090e: 4620 mov r0, r4 8000910: 1bdb subs r3, r3, r7 8000912: ea40 4006 orr.w r0, r0, r6, lsl #16 8000916: e7a5 b.n 8000864 <__udivmoddi4+0x9c> 8000918: f1c1 0620 rsb r6, r1, #32 800091c: 408b lsls r3, r1 800091e: fa22 f706 lsr.w r7, r2, r6 8000922: 431f orrs r7, r3 8000924: fa20 fc06 lsr.w ip, r0, r6 8000928: fa04 f301 lsl.w r3, r4, r1 800092c: ea43 030c orr.w r3, r3, ip 8000930: 40f4 lsrs r4, r6 8000932: fa00 f801 lsl.w r8, r0, r1 8000936: 0c38 lsrs r0, r7, #16 8000938: ea4f 4913 mov.w r9, r3, lsr #16 800093c: fbb4 fef0 udiv lr, r4, r0 8000940: fa1f fc87 uxth.w ip, r7 8000944: fb00 441e mls r4, r0, lr, r4 8000948: ea49 4404 orr.w r4, r9, r4, lsl #16 800094c: fb0e f90c mul.w r9, lr, ip 8000950: 45a1 cmp r9, r4 8000952: fa02 f201 lsl.w r2, r2, r1 8000956: d90a bls.n 800096e <__udivmoddi4+0x1a6> 8000958: 193c adds r4, r7, r4 800095a: f10e 3aff add.w sl, lr, #4294967295 @ 0xffffffff 800095e: f080 8084 bcs.w 8000a6a <__udivmoddi4+0x2a2> 8000962: 45a1 cmp r9, r4 8000964: f240 8081 bls.w 8000a6a <__udivmoddi4+0x2a2> 8000968: f1ae 0e02 sub.w lr, lr, #2 800096c: 443c add r4, r7 800096e: eba4 0409 sub.w r4, r4, r9 8000972: fa1f f983 uxth.w r9, r3 8000976: fbb4 f3f0 udiv r3, r4, r0 800097a: fb00 4413 mls r4, r0, r3, r4 800097e: ea49 4404 orr.w r4, r9, r4, lsl #16 8000982: fb03 fc0c mul.w ip, r3, ip 8000986: 45a4 cmp ip, r4 8000988: d907 bls.n 800099a <__udivmoddi4+0x1d2> 800098a: 193c adds r4, r7, r4 800098c: f103 30ff add.w r0, r3, #4294967295 @ 0xffffffff 8000990: d267 bcs.n 8000a62 <__udivmoddi4+0x29a> 8000992: 45a4 cmp ip, r4 8000994: d965 bls.n 8000a62 <__udivmoddi4+0x29a> 8000996: 3b02 subs r3, #2 8000998: 443c add r4, r7 800099a: ea43 400e orr.w r0, r3, lr, lsl #16 800099e: fba0 9302 umull r9, r3, r0, r2 80009a2: eba4 040c sub.w r4, r4, ip 80009a6: 429c cmp r4, r3 80009a8: 46ce mov lr, r9 80009aa: 469c mov ip, r3 80009ac: d351 bcc.n 8000a52 <__udivmoddi4+0x28a> 80009ae: d04e beq.n 8000a4e <__udivmoddi4+0x286> 80009b0: b155 cbz r5, 80009c8 <__udivmoddi4+0x200> 80009b2: ebb8 030e subs.w r3, r8, lr 80009b6: eb64 040c sbc.w r4, r4, ip 80009ba: fa04 f606 lsl.w r6, r4, r6 80009be: 40cb lsrs r3, r1 80009c0: 431e orrs r6, r3 80009c2: 40cc lsrs r4, r1 80009c4: e9c5 6400 strd r6, r4, [r5] 80009c8: 2100 movs r1, #0 80009ca: e750 b.n 800086e <__udivmoddi4+0xa6> 80009cc: f1c2 0320 rsb r3, r2, #32 80009d0: fa20 f103 lsr.w r1, r0, r3 80009d4: fa0c fc02 lsl.w ip, ip, r2 80009d8: fa24 f303 lsr.w r3, r4, r3 80009dc: 4094 lsls r4, r2 80009de: 430c orrs r4, r1 80009e0: ea4f 481c mov.w r8, ip, lsr #16 80009e4: fa00 fe02 lsl.w lr, r0, r2 80009e8: fa1f f78c uxth.w r7, ip 80009ec: fbb3 f0f8 udiv r0, r3, r8 80009f0: fb08 3110 mls r1, r8, r0, r3 80009f4: 0c23 lsrs r3, r4, #16 80009f6: ea43 4301 orr.w r3, r3, r1, lsl #16 80009fa: fb00 f107 mul.w r1, r0, r7 80009fe: 4299 cmp r1, r3 8000a00: d908 bls.n 8000a14 <__udivmoddi4+0x24c> 8000a02: eb1c 0303 adds.w r3, ip, r3 8000a06: f100 36ff add.w r6, r0, #4294967295 @ 0xffffffff 8000a0a: d22c bcs.n 8000a66 <__udivmoddi4+0x29e> 8000a0c: 4299 cmp r1, r3 8000a0e: d92a bls.n 8000a66 <__udivmoddi4+0x29e> 8000a10: 3802 subs r0, #2 8000a12: 4463 add r3, ip 8000a14: 1a5b subs r3, r3, r1 8000a16: b2a4 uxth r4, r4 8000a18: fbb3 f1f8 udiv r1, r3, r8 8000a1c: fb08 3311 mls r3, r8, r1, r3 8000a20: ea44 4403 orr.w r4, r4, r3, lsl #16 8000a24: fb01 f307 mul.w r3, r1, r7 8000a28: 42a3 cmp r3, r4 8000a2a: d908 bls.n 8000a3e <__udivmoddi4+0x276> 8000a2c: eb1c 0404 adds.w r4, ip, r4 8000a30: f101 36ff add.w r6, r1, #4294967295 @ 0xffffffff 8000a34: d213 bcs.n 8000a5e <__udivmoddi4+0x296> 8000a36: 42a3 cmp r3, r4 8000a38: d911 bls.n 8000a5e <__udivmoddi4+0x296> 8000a3a: 3902 subs r1, #2 8000a3c: 4464 add r4, ip 8000a3e: 1ae4 subs r4, r4, r3 8000a40: ea41 4100 orr.w r1, r1, r0, lsl #16 8000a44: e739 b.n 80008ba <__udivmoddi4+0xf2> 8000a46: 4604 mov r4, r0 8000a48: e6f0 b.n 800082c <__udivmoddi4+0x64> 8000a4a: 4608 mov r0, r1 8000a4c: e706 b.n 800085c <__udivmoddi4+0x94> 8000a4e: 45c8 cmp r8, r9 8000a50: d2ae bcs.n 80009b0 <__udivmoddi4+0x1e8> 8000a52: ebb9 0e02 subs.w lr, r9, r2 8000a56: eb63 0c07 sbc.w ip, r3, r7 8000a5a: 3801 subs r0, #1 8000a5c: e7a8 b.n 80009b0 <__udivmoddi4+0x1e8> 8000a5e: 4631 mov r1, r6 8000a60: e7ed b.n 8000a3e <__udivmoddi4+0x276> 8000a62: 4603 mov r3, r0 8000a64: e799 b.n 800099a <__udivmoddi4+0x1d2> 8000a66: 4630 mov r0, r6 8000a68: e7d4 b.n 8000a14 <__udivmoddi4+0x24c> 8000a6a: 46d6 mov lr, sl 8000a6c: e77f b.n 800096e <__udivmoddi4+0x1a6> 8000a6e: 4463 add r3, ip 8000a70: 3802 subs r0, #2 8000a72: e74d b.n 8000910 <__udivmoddi4+0x148> 8000a74: 4606 mov r6, r0 8000a76: 4623 mov r3, r4 8000a78: 4608 mov r0, r1 8000a7a: e70f b.n 800089c <__udivmoddi4+0xd4> 8000a7c: 3e02 subs r6, #2 8000a7e: 4463 add r3, ip 8000a80: e730 b.n 80008e4 <__udivmoddi4+0x11c> 8000a82: bf00 nop 08000a84 <__aeabi_idiv0>: 8000a84: 4770 bx lr 8000a86: bf00 nop 08000a88 : return version; } /* Case insensitive string comparison, doesn't consider two NULL pointers equal though */ static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2) { 8000a88: b480 push {r7} 8000a8a: b085 sub sp, #20 8000a8c: af00 add r7, sp, #0 8000a8e: 6078 str r0, [r7, #4] 8000a90: 6039 str r1, [r7, #0] if ((string1 == NULL) || (string2 == NULL)) 8000a92: 687b ldr r3, [r7, #4] 8000a94: 2b00 cmp r3, #0 8000a96: d002 beq.n 8000a9e 8000a98: 683b ldr r3, [r7, #0] 8000a9a: 2b00 cmp r3, #0 8000a9c: d101 bne.n 8000aa2 { return 1; 8000a9e: 2301 movs r3, #1 8000aa0: e056 b.n 8000b50 } if (string1 == string2) 8000aa2: 687a ldr r2, [r7, #4] 8000aa4: 683b ldr r3, [r7, #0] 8000aa6: 429a cmp r2, r3 8000aa8: d10d bne.n 8000ac6 { return 0; 8000aaa: 2300 movs r3, #0 8000aac: e050 b.n 8000b50 } for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++) { if (*string1 == '\0') 8000aae: 687b ldr r3, [r7, #4] 8000ab0: 781b ldrb r3, [r3, #0] 8000ab2: 2b00 cmp r3, #0 8000ab4: d101 bne.n 8000aba { return 0; 8000ab6: 2300 movs r3, #0 8000ab8: e04a b.n 8000b50 for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++) 8000aba: 687b ldr r3, [r7, #4] 8000abc: 3301 adds r3, #1 8000abe: 607b str r3, [r7, #4] 8000ac0: 683b ldr r3, [r7, #0] 8000ac2: 3301 adds r3, #1 8000ac4: 603b str r3, [r7, #0] 8000ac6: 687b ldr r3, [r7, #4] 8000ac8: 781b ldrb r3, [r3, #0] 8000aca: 73fb strb r3, [r7, #15] 8000acc: 7bfb ldrb r3, [r7, #15] 8000ace: 3301 adds r3, #1 8000ad0: 4a22 ldr r2, [pc, #136] @ (8000b5c ) 8000ad2: 4413 add r3, r2 8000ad4: 781b ldrb r3, [r3, #0] 8000ad6: f003 0303 and.w r3, r3, #3 8000ada: 2b01 cmp r3, #1 8000adc: d103 bne.n 8000ae6 8000ade: 7bfb ldrb r3, [r7, #15] 8000ae0: f103 0220 add.w r2, r3, #32 8000ae4: e000 b.n 8000ae8 8000ae6: 7bfa ldrb r2, [r7, #15] 8000ae8: 683b ldr r3, [r7, #0] 8000aea: 781b ldrb r3, [r3, #0] 8000aec: 73bb strb r3, [r7, #14] 8000aee: 7bbb ldrb r3, [r7, #14] 8000af0: 3301 adds r3, #1 8000af2: 491a ldr r1, [pc, #104] @ (8000b5c ) 8000af4: 440b add r3, r1 8000af6: 781b ldrb r3, [r3, #0] 8000af8: f003 0303 and.w r3, r3, #3 8000afc: 2b01 cmp r3, #1 8000afe: d102 bne.n 8000b06 8000b00: 7bbb ldrb r3, [r7, #14] 8000b02: 3320 adds r3, #32 8000b04: e000 b.n 8000b08 8000b06: 7bbb ldrb r3, [r7, #14] 8000b08: 429a cmp r2, r3 8000b0a: d0d0 beq.n 8000aae } } return tolower(*string1) - tolower(*string2); 8000b0c: 687b ldr r3, [r7, #4] 8000b0e: 781b ldrb r3, [r3, #0] 8000b10: 737b strb r3, [r7, #13] 8000b12: 7b7b ldrb r3, [r7, #13] 8000b14: 3301 adds r3, #1 8000b16: 4a11 ldr r2, [pc, #68] @ (8000b5c ) 8000b18: 4413 add r3, r2 8000b1a: 781b ldrb r3, [r3, #0] 8000b1c: f003 0303 and.w r3, r3, #3 8000b20: 2b01 cmp r3, #1 8000b22: d103 bne.n 8000b2c 8000b24: 7b7b ldrb r3, [r7, #13] 8000b26: f103 0220 add.w r2, r3, #32 8000b2a: e000 b.n 8000b2e 8000b2c: 7b7a ldrb r2, [r7, #13] 8000b2e: 683b ldr r3, [r7, #0] 8000b30: 781b ldrb r3, [r3, #0] 8000b32: 733b strb r3, [r7, #12] 8000b34: 7b3b ldrb r3, [r7, #12] 8000b36: 3301 adds r3, #1 8000b38: 4908 ldr r1, [pc, #32] @ (8000b5c ) 8000b3a: 440b add r3, r1 8000b3c: 781b ldrb r3, [r3, #0] 8000b3e: f003 0303 and.w r3, r3, #3 8000b42: 2b01 cmp r3, #1 8000b44: d102 bne.n 8000b4c 8000b46: 7b3b ldrb r3, [r7, #12] 8000b48: 3320 adds r3, #32 8000b4a: e000 b.n 8000b4e 8000b4c: 7b3b ldrb r3, [r7, #12] 8000b4e: 1ad3 subs r3, r2, r3 } 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 8000b5c: 08031d50 .word 0x08031d50 08000b60 : } } /* Internal constructor. */ static cJSON *cJSON_New_Item(const internal_hooks * const hooks) { 8000b60: b580 push {r7, lr} 8000b62: b084 sub sp, #16 8000b64: af00 add r7, sp, #0 8000b66: 6078 str r0, [r7, #4] cJSON* node = (cJSON*)hooks->allocate(sizeof(cJSON)); 8000b68: 687b ldr r3, [r7, #4] 8000b6a: 681b ldr r3, [r3, #0] 8000b6c: 2028 movs r0, #40 @ 0x28 8000b6e: 4798 blx r3 8000b70: 60f8 str r0, [r7, #12] if (node) 8000b72: 68fb ldr r3, [r7, #12] 8000b74: 2b00 cmp r3, #0 8000b76: d004 beq.n 8000b82 { memset(node, '\0', sizeof(cJSON)); 8000b78: 2228 movs r2, #40 @ 0x28 8000b7a: 2100 movs r1, #0 8000b7c: 68f8 ldr r0, [r7, #12] 8000b7e: f02a f807 bl 802ab90 } return node; 8000b82: 68fb ldr r3, [r7, #12] } 8000b84: 4618 mov r0, r3 8000b86: 3710 adds r7, #16 8000b88: 46bd mov sp, r7 8000b8a: bd80 pop {r7, pc} 08000b8c : /* Delete a cJSON structure. */ CJSON_PUBLIC(void) cJSON_Delete(cJSON *item) { 8000b8c: b580 push {r7, lr} 8000b8e: b084 sub sp, #16 8000b90: af00 add r7, sp, #0 8000b92: 6078 str r0, [r7, #4] cJSON *next = NULL; 8000b94: 2300 movs r3, #0 8000b96: 60fb str r3, [r7, #12] while (item != NULL) 8000b98: e03d b.n 8000c16 { next = item->next; 8000b9a: 687b ldr r3, [r7, #4] 8000b9c: 681b ldr r3, [r3, #0] 8000b9e: 60fb str r3, [r7, #12] if (!(item->type & cJSON_IsReference) && (item->child != NULL)) 8000ba0: 687b ldr r3, [r7, #4] 8000ba2: 68db ldr r3, [r3, #12] 8000ba4: f403 7380 and.w r3, r3, #256 @ 0x100 8000ba8: 2b00 cmp r3, #0 8000baa: d108 bne.n 8000bbe 8000bac: 687b ldr r3, [r7, #4] 8000bae: 689b ldr r3, [r3, #8] 8000bb0: 2b00 cmp r3, #0 8000bb2: d004 beq.n 8000bbe { cJSON_Delete(item->child); 8000bb4: 687b ldr r3, [r7, #4] 8000bb6: 689b ldr r3, [r3, #8] 8000bb8: 4618 mov r0, r3 8000bba: f7ff ffe7 bl 8000b8c } if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL)) 8000bbe: 687b ldr r3, [r7, #4] 8000bc0: 68db ldr r3, [r3, #12] 8000bc2: f403 7380 and.w r3, r3, #256 @ 0x100 8000bc6: 2b00 cmp r3, #0 8000bc8: d10c bne.n 8000be4 8000bca: 687b ldr r3, [r7, #4] 8000bcc: 691b ldr r3, [r3, #16] 8000bce: 2b00 cmp r3, #0 8000bd0: d008 beq.n 8000be4 { global_hooks.deallocate(item->valuestring); 8000bd2: 4b15 ldr r3, [pc, #84] @ (8000c28 ) 8000bd4: 685b ldr r3, [r3, #4] 8000bd6: 687a ldr r2, [r7, #4] 8000bd8: 6912 ldr r2, [r2, #16] 8000bda: 4610 mov r0, r2 8000bdc: 4798 blx r3 item->valuestring = NULL; 8000bde: 687b ldr r3, [r7, #4] 8000be0: 2200 movs r2, #0 8000be2: 611a str r2, [r3, #16] } if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) 8000be4: 687b ldr r3, [r7, #4] 8000be6: 68db ldr r3, [r3, #12] 8000be8: f403 7300 and.w r3, r3, #512 @ 0x200 8000bec: 2b00 cmp r3, #0 8000bee: d10c bne.n 8000c0a 8000bf0: 687b ldr r3, [r7, #4] 8000bf2: 6a1b ldr r3, [r3, #32] 8000bf4: 2b00 cmp r3, #0 8000bf6: d008 beq.n 8000c0a { global_hooks.deallocate(item->string); 8000bf8: 4b0b ldr r3, [pc, #44] @ (8000c28 ) 8000bfa: 685b ldr r3, [r3, #4] 8000bfc: 687a ldr r2, [r7, #4] 8000bfe: 6a12 ldr r2, [r2, #32] 8000c00: 4610 mov r0, r2 8000c02: 4798 blx r3 item->string = NULL; 8000c04: 687b ldr r3, [r7, #4] 8000c06: 2200 movs r2, #0 8000c08: 621a str r2, [r3, #32] } global_hooks.deallocate(item); 8000c0a: 4b07 ldr r3, [pc, #28] @ (8000c28 ) 8000c0c: 685b ldr r3, [r3, #4] 8000c0e: 6878 ldr r0, [r7, #4] 8000c10: 4798 blx r3 item = next; 8000c12: 68fb ldr r3, [r7, #12] 8000c14: 607b str r3, [r7, #4] while (item != NULL) 8000c16: 687b ldr r3, [r7, #4] 8000c18: 2b00 cmp r3, #0 8000c1a: d1be bne.n 8000b9a } } 8000c1c: bf00 nop 8000c1e: bf00 nop 8000c20: 3710 adds r7, #16 8000c22: 46bd mov sp, r7 8000c24: bd80 pop {r7, pc} 8000c26: bf00 nop 8000c28: 24000000 .word 0x24000000 08000c2c : /* get the decimal point character of the current locale */ static unsigned char get_decimal_point(void) { 8000c2c: b480 push {r7} 8000c2e: af00 add r7, sp, #0 #ifdef ENABLE_LOCALES struct lconv *lconv = localeconv(); return (unsigned char) lconv->decimal_point[0]; #else return '.'; 8000c30: 232e movs r3, #46 @ 0x2e #endif } 8000c32: 4618 mov r0, r3 8000c34: 46bd mov sp, r7 8000c36: f85d 7b04 ldr.w r7, [sp], #4 8000c3a: 4770 bx lr 8000c3c: 0000 movs r0, r0 ... 08000c40 : /* get a pointer to the buffer at the position */ #define buffer_at_offset(buffer) ((buffer)->content + (buffer)->offset) /* Parse the input text to generate a number, and populate the result into item. */ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_buffer) { 8000c40: b580 push {r7, lr} 8000c42: b098 sub sp, #96 @ 0x60 8000c44: af00 add r7, sp, #0 8000c46: 6078 str r0, [r7, #4] 8000c48: 6039 str r1, [r7, #0] double number = 0; 8000c4a: f04f 0200 mov.w r2, #0 8000c4e: f04f 0300 mov.w r3, #0 8000c52: e9c7 2314 strd r2, r3, [r7, #80] @ 0x50 unsigned char *after_end = NULL; 8000c56: 2300 movs r3, #0 8000c58: 64bb str r3, [r7, #72] @ 0x48 unsigned char number_c_string[64]; unsigned char decimal_point = get_decimal_point(); 8000c5a: f7ff ffe7 bl 8000c2c 8000c5e: 4603 mov r3, r0 8000c60: f887 304f strb.w r3, [r7, #79] @ 0x4f size_t i = 0; 8000c64: 2300 movs r3, #0 8000c66: 65fb str r3, [r7, #92] @ 0x5c if ((input_buffer == NULL) || (input_buffer->content == NULL)) 8000c68: 683b ldr r3, [r7, #0] 8000c6a: 2b00 cmp r3, #0 8000c6c: d003 beq.n 8000c76 8000c6e: 683b ldr r3, [r7, #0] 8000c70: 681b ldr r3, [r3, #0] 8000c72: 2b00 cmp r3, #0 8000c74: d101 bne.n 8000c7a { return false; 8000c76: 2300 movs r3, #0 8000c78: e09f b.n 8000dba } /* copy the number into a temporary buffer and replace '.' with the decimal point * of the current locale (for strtod) * This also takes care of '\0' not necessarily being available for marking the end of the input */ for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++) 8000c7a: 2300 movs r3, #0 8000c7c: 65fb str r3, [r7, #92] @ 0x5c 8000c7e: e03d b.n 8000cfc { switch (buffer_at_offset(input_buffer)[i]) 8000c80: 683b ldr r3, [r7, #0] 8000c82: 681a ldr r2, [r3, #0] 8000c84: 683b ldr r3, [r7, #0] 8000c86: 6899 ldr r1, [r3, #8] 8000c88: 6dfb ldr r3, [r7, #92] @ 0x5c 8000c8a: 440b add r3, r1 8000c8c: 4413 add r3, r2 8000c8e: 781b ldrb r3, [r3, #0] 8000c90: 2b45 cmp r3, #69 @ 0x45 8000c92: dc17 bgt.n 8000cc4 8000c94: 2b2b cmp r3, #43 @ 0x2b 8000c96: db40 blt.n 8000d1a 8000c98: 3b2b subs r3, #43 @ 0x2b 8000c9a: 2201 movs r2, #1 8000c9c: 409a lsls r2, r3 8000c9e: 4b4e ldr r3, [pc, #312] @ (8000dd8 ) 8000ca0: 4013 ands r3, r2 8000ca2: 2b00 cmp r3, #0 8000ca4: bf14 ite ne 8000ca6: 2301 movne r3, #1 8000ca8: 2300 moveq r3, #0 8000caa: b2db uxtb r3, r3 8000cac: 2b00 cmp r3, #0 8000cae: d10b bne.n 8000cc8 8000cb0: f002 0308 and.w r3, r2, #8 8000cb4: 2b00 cmp r3, #0 8000cb6: bf14 ite ne 8000cb8: 2301 movne r3, #1 8000cba: 2300 moveq r3, #0 8000cbc: b2db uxtb r3, r3 8000cbe: 2b00 cmp r3, #0 8000cc0: d111 bne.n 8000ce6 case '.': number_c_string[i] = decimal_point; break; default: goto loop_end; 8000cc2: e02a b.n 8000d1a switch (buffer_at_offset(input_buffer)[i]) 8000cc4: 2b65 cmp r3, #101 @ 0x65 8000cc6: d128 bne.n 8000d1a number_c_string[i] = buffer_at_offset(input_buffer)[i]; 8000cc8: 683b ldr r3, [r7, #0] 8000cca: 681a ldr r2, [r3, #0] 8000ccc: 683b ldr r3, [r7, #0] 8000cce: 6899 ldr r1, [r3, #8] 8000cd0: 6dfb ldr r3, [r7, #92] @ 0x5c 8000cd2: 440b add r3, r1 8000cd4: 4413 add r3, r2 8000cd6: 7819 ldrb r1, [r3, #0] 8000cd8: f107 0208 add.w r2, r7, #8 8000cdc: 6dfb ldr r3, [r7, #92] @ 0x5c 8000cde: 4413 add r3, r2 8000ce0: 460a mov r2, r1 8000ce2: 701a strb r2, [r3, #0] break; 8000ce4: e007 b.n 8000cf6 number_c_string[i] = decimal_point; 8000ce6: f107 0208 add.w r2, r7, #8 8000cea: 6dfb ldr r3, [r7, #92] @ 0x5c 8000cec: 4413 add r3, r2 8000cee: f897 204f ldrb.w r2, [r7, #79] @ 0x4f 8000cf2: 701a strb r2, [r3, #0] break; 8000cf4: bf00 nop for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++) 8000cf6: 6dfb ldr r3, [r7, #92] @ 0x5c 8000cf8: 3301 adds r3, #1 8000cfa: 65fb str r3, [r7, #92] @ 0x5c 8000cfc: 6dfb ldr r3, [r7, #92] @ 0x5c 8000cfe: 2b3e cmp r3, #62 @ 0x3e 8000d00: d80d bhi.n 8000d1e 8000d02: 683b ldr r3, [r7, #0] 8000d04: 2b00 cmp r3, #0 8000d06: d00a beq.n 8000d1e 8000d08: 683b ldr r3, [r7, #0] 8000d0a: 689a ldr r2, [r3, #8] 8000d0c: 6dfb ldr r3, [r7, #92] @ 0x5c 8000d0e: 441a add r2, r3 8000d10: 683b ldr r3, [r7, #0] 8000d12: 685b ldr r3, [r3, #4] 8000d14: 429a cmp r2, r3 8000d16: d3b3 bcc.n 8000c80 } } loop_end: 8000d18: e001 b.n 8000d1e goto loop_end; 8000d1a: bf00 nop 8000d1c: e000 b.n 8000d20 loop_end: 8000d1e: bf00 nop number_c_string[i] = '\0'; 8000d20: f107 0208 add.w r2, r7, #8 8000d24: 6dfb ldr r3, [r7, #92] @ 0x5c 8000d26: 4413 add r3, r2 8000d28: 2200 movs r2, #0 8000d2a: 701a strb r2, [r3, #0] number = strtod((const char*)number_c_string, (char**)&after_end); 8000d2c: f107 0248 add.w r2, r7, #72 @ 0x48 8000d30: f107 0308 add.w r3, r7, #8 8000d34: 4611 mov r1, r2 8000d36: 4618 mov r0, r3 8000d38: f029 f894 bl 8029e64 8000d3c: ed87 0b14 vstr d0, [r7, #80] @ 0x50 if (number_c_string == after_end) 8000d40: 6cba ldr r2, [r7, #72] @ 0x48 8000d42: f107 0308 add.w r3, r7, #8 8000d46: 429a cmp r2, r3 8000d48: d101 bne.n 8000d4e { return false; /* parse_error */ 8000d4a: 2300 movs r3, #0 8000d4c: e035 b.n 8000dba } item->valuedouble = number; 8000d4e: 6879 ldr r1, [r7, #4] 8000d50: e9d7 2314 ldrd r2, r3, [r7, #80] @ 0x50 8000d54: e9c1 2306 strd r2, r3, [r1, #24] /* use saturation in case of overflow */ if (number >= INT_MAX) 8000d58: ed97 7b14 vldr d7, [r7, #80] @ 0x50 8000d5c: ed9f 6b1a vldr d6, [pc, #104] @ 8000dc8 8000d60: eeb4 7bc6 vcmpe.f64 d7, d6 8000d64: eef1 fa10 vmrs APSR_nzcv, fpscr 8000d68: db04 blt.n 8000d74 { item->valueint = INT_MAX; 8000d6a: 687b ldr r3, [r7, #4] 8000d6c: f06f 4200 mvn.w r2, #2147483648 @ 0x80000000 8000d70: 615a str r2, [r3, #20] 8000d72: e015 b.n 8000da0 } else if (number <= (double)INT_MIN) 8000d74: ed97 7b14 vldr d7, [r7, #80] @ 0x50 8000d78: ed9f 6b15 vldr d6, [pc, #84] @ 8000dd0 8000d7c: eeb4 7bc6 vcmpe.f64 d7, d6 8000d80: eef1 fa10 vmrs APSR_nzcv, fpscr 8000d84: d804 bhi.n 8000d90 { item->valueint = INT_MIN; 8000d86: 687b ldr r3, [r7, #4] 8000d88: f04f 4200 mov.w r2, #2147483648 @ 0x80000000 8000d8c: 615a str r2, [r3, #20] 8000d8e: e007 b.n 8000da0 } else { item->valueint = (int)number; 8000d90: ed97 7b14 vldr d7, [r7, #80] @ 0x50 8000d94: eefd 7bc7 vcvt.s32.f64 s15, d7 8000d98: ee17 2a90 vmov r2, s15 8000d9c: 687b ldr r3, [r7, #4] 8000d9e: 615a str r2, [r3, #20] } item->type = cJSON_Number; 8000da0: 687b ldr r3, [r7, #4] 8000da2: 2208 movs r2, #8 8000da4: 60da str r2, [r3, #12] input_buffer->offset += (size_t)(after_end - number_c_string); 8000da6: 683b ldr r3, [r7, #0] 8000da8: 689b ldr r3, [r3, #8] 8000daa: 6cb9 ldr r1, [r7, #72] @ 0x48 8000dac: f107 0208 add.w r2, r7, #8 8000db0: 1a8a subs r2, r1, r2 8000db2: 441a add r2, r3 8000db4: 683b ldr r3, [r7, #0] 8000db6: 609a str r2, [r3, #8] return true; 8000db8: 2301 movs r3, #1 } 8000dba: 4618 mov r0, r3 8000dbc: 3760 adds r7, #96 @ 0x60 8000dbe: 46bd mov sp, r7 8000dc0: bd80 pop {r7, pc} 8000dc2: bf00 nop 8000dc4: f3af 8000 nop.w 8000dc8: ffc00000 .word 0xffc00000 8000dcc: 41dfffff .word 0x41dfffff 8000dd0: 00000000 .word 0x00000000 8000dd4: c1e00000 .word 0xc1e00000 8000dd8: 04007fe5 .word 0x04007fe5 08000ddc : return true; } /* parse 4 digit hexadecimal number */ static unsigned parse_hex4(const unsigned char * const input) { 8000ddc: b480 push {r7} 8000dde: b085 sub sp, #20 8000de0: af00 add r7, sp, #0 8000de2: 6078 str r0, [r7, #4] unsigned int h = 0; 8000de4: 2300 movs r3, #0 8000de6: 60fb str r3, [r7, #12] size_t i = 0; 8000de8: 2300 movs r3, #0 8000dea: 60bb str r3, [r7, #8] for (i = 0; i < 4; i++) 8000dec: 2300 movs r3, #0 8000dee: 60bb str r3, [r7, #8] 8000df0: e04c b.n 8000e8c { /* parse digit */ if ((input[i] >= '0') && (input[i] <= '9')) 8000df2: 687a ldr r2, [r7, #4] 8000df4: 68bb ldr r3, [r7, #8] 8000df6: 4413 add r3, r2 8000df8: 781b ldrb r3, [r3, #0] 8000dfa: 2b2f cmp r3, #47 @ 0x2f 8000dfc: d90f bls.n 8000e1e 8000dfe: 687a ldr r2, [r7, #4] 8000e00: 68bb ldr r3, [r7, #8] 8000e02: 4413 add r3, r2 8000e04: 781b ldrb r3, [r3, #0] 8000e06: 2b39 cmp r3, #57 @ 0x39 8000e08: d809 bhi.n 8000e1e { h += (unsigned int) input[i] - '0'; 8000e0a: 687a ldr r2, [r7, #4] 8000e0c: 68bb ldr r3, [r7, #8] 8000e0e: 4413 add r3, r2 8000e10: 781b ldrb r3, [r3, #0] 8000e12: 461a mov r2, r3 8000e14: 68fb ldr r3, [r7, #12] 8000e16: 4413 add r3, r2 8000e18: 3b30 subs r3, #48 @ 0x30 8000e1a: 60fb str r3, [r7, #12] 8000e1c: e02d b.n 8000e7a } else if ((input[i] >= 'A') && (input[i] <= 'F')) 8000e1e: 687a ldr r2, [r7, #4] 8000e20: 68bb ldr r3, [r7, #8] 8000e22: 4413 add r3, r2 8000e24: 781b ldrb r3, [r3, #0] 8000e26: 2b40 cmp r3, #64 @ 0x40 8000e28: d90f bls.n 8000e4a 8000e2a: 687a ldr r2, [r7, #4] 8000e2c: 68bb ldr r3, [r7, #8] 8000e2e: 4413 add r3, r2 8000e30: 781b ldrb r3, [r3, #0] 8000e32: 2b46 cmp r3, #70 @ 0x46 8000e34: d809 bhi.n 8000e4a { h += (unsigned int) 10 + input[i] - 'A'; 8000e36: 687a ldr r2, [r7, #4] 8000e38: 68bb ldr r3, [r7, #8] 8000e3a: 4413 add r3, r2 8000e3c: 781b ldrb r3, [r3, #0] 8000e3e: 461a mov r2, r3 8000e40: 68fb ldr r3, [r7, #12] 8000e42: 4413 add r3, r2 8000e44: 3b37 subs r3, #55 @ 0x37 8000e46: 60fb str r3, [r7, #12] 8000e48: e017 b.n 8000e7a } else if ((input[i] >= 'a') && (input[i] <= 'f')) 8000e4a: 687a ldr r2, [r7, #4] 8000e4c: 68bb ldr r3, [r7, #8] 8000e4e: 4413 add r3, r2 8000e50: 781b ldrb r3, [r3, #0] 8000e52: 2b60 cmp r3, #96 @ 0x60 8000e54: d90f bls.n 8000e76 8000e56: 687a ldr r2, [r7, #4] 8000e58: 68bb ldr r3, [r7, #8] 8000e5a: 4413 add r3, r2 8000e5c: 781b ldrb r3, [r3, #0] 8000e5e: 2b66 cmp r3, #102 @ 0x66 8000e60: d809 bhi.n 8000e76 { h += (unsigned int) 10 + input[i] - 'a'; 8000e62: 687a ldr r2, [r7, #4] 8000e64: 68bb ldr r3, [r7, #8] 8000e66: 4413 add r3, r2 8000e68: 781b ldrb r3, [r3, #0] 8000e6a: 461a mov r2, r3 8000e6c: 68fb ldr r3, [r7, #12] 8000e6e: 4413 add r3, r2 8000e70: 3b57 subs r3, #87 @ 0x57 8000e72: 60fb str r3, [r7, #12] 8000e74: e001 b.n 8000e7a } else /* invalid */ { return 0; 8000e76: 2300 movs r3, #0 8000e78: e00c b.n 8000e94 } if (i < 3) 8000e7a: 68bb ldr r3, [r7, #8] 8000e7c: 2b02 cmp r3, #2 8000e7e: d802 bhi.n 8000e86 { /* shift left to make place for the next nibble */ h = h << 4; 8000e80: 68fb ldr r3, [r7, #12] 8000e82: 011b lsls r3, r3, #4 8000e84: 60fb str r3, [r7, #12] for (i = 0; i < 4; i++) 8000e86: 68bb ldr r3, [r7, #8] 8000e88: 3301 adds r3, #1 8000e8a: 60bb str r3, [r7, #8] 8000e8c: 68bb ldr r3, [r7, #8] 8000e8e: 2b03 cmp r3, #3 8000e90: d9af bls.n 8000df2 } } return h; 8000e92: 68fb ldr r3, [r7, #12] } 8000e94: 4618 mov r0, r3 8000e96: 3714 adds r7, #20 8000e98: 46bd mov sp, r7 8000e9a: f85d 7b04 ldr.w r7, [sp], #4 8000e9e: 4770 bx lr 08000ea0 : /* converts a UTF-16 literal to UTF-8 * A literal can be one or two sequences of the form \uXXXX */ static unsigned char utf16_literal_to_utf8(const unsigned char * const input_pointer, const unsigned char * const input_end, unsigned char **output_pointer) { 8000ea0: b580 push {r7, lr} 8000ea2: b08a sub sp, #40 @ 0x28 8000ea4: af00 add r7, sp, #0 8000ea6: 60f8 str r0, [r7, #12] 8000ea8: 60b9 str r1, [r7, #8] 8000eaa: 607a str r2, [r7, #4] long unsigned int codepoint = 0; 8000eac: 2300 movs r3, #0 8000eae: 627b str r3, [r7, #36] @ 0x24 unsigned int first_code = 0; 8000eb0: 2300 movs r3, #0 8000eb2: 61fb str r3, [r7, #28] const unsigned char *first_sequence = input_pointer; 8000eb4: 68fb ldr r3, [r7, #12] 8000eb6: 61bb str r3, [r7, #24] unsigned char utf8_length = 0; 8000eb8: 2300 movs r3, #0 8000eba: f887 3023 strb.w r3, [r7, #35] @ 0x23 unsigned char utf8_position = 0; 8000ebe: 2300 movs r3, #0 8000ec0: f887 3022 strb.w r3, [r7, #34] @ 0x22 unsigned char sequence_length = 0; 8000ec4: 2300 movs r3, #0 8000ec6: f887 3021 strb.w r3, [r7, #33] @ 0x21 unsigned char first_byte_mark = 0; 8000eca: 2300 movs r3, #0 8000ecc: f887 3020 strb.w r3, [r7, #32] if ((input_end - first_sequence) < 6) 8000ed0: 68ba ldr r2, [r7, #8] 8000ed2: 69bb ldr r3, [r7, #24] 8000ed4: 1ad3 subs r3, r2, r3 8000ed6: 2b05 cmp r3, #5 8000ed8: f340 80b7 ble.w 800104a /* input ends unexpectedly */ goto fail; } /* get the first utf16 sequence */ first_code = parse_hex4(first_sequence + 2); 8000edc: 69bb ldr r3, [r7, #24] 8000ede: 3302 adds r3, #2 8000ee0: 4618 mov r0, r3 8000ee2: f7ff ff7b bl 8000ddc 8000ee6: 61f8 str r0, [r7, #28] /* check that the code is valid */ if (((first_code >= 0xDC00) && (first_code <= 0xDFFF))) 8000ee8: 69fb ldr r3, [r7, #28] 8000eea: f5b3 4f5c cmp.w r3, #56320 @ 0xdc00 8000eee: d304 bcc.n 8000efa 8000ef0: 69fb ldr r3, [r7, #28] 8000ef2: f5b3 4f60 cmp.w r3, #57344 @ 0xe000 8000ef6: f0c0 80aa bcc.w 800104e { goto fail; } /* UTF16 surrogate pair */ if ((first_code >= 0xD800) && (first_code <= 0xDBFF)) 8000efa: 69fb ldr r3, [r7, #28] 8000efc: f5b3 4f58 cmp.w r3, #55296 @ 0xd800 8000f00: d337 bcc.n 8000f72 8000f02: 69fb ldr r3, [r7, #28] 8000f04: f5b3 4f5c cmp.w r3, #56320 @ 0xdc00 8000f08: d233 bcs.n 8000f72 { const unsigned char *second_sequence = first_sequence + 6; 8000f0a: 69bb ldr r3, [r7, #24] 8000f0c: 3306 adds r3, #6 8000f0e: 617b str r3, [r7, #20] unsigned int second_code = 0; 8000f10: 2300 movs r3, #0 8000f12: 613b str r3, [r7, #16] sequence_length = 12; /* \uXXXX\uXXXX */ 8000f14: 230c movs r3, #12 8000f16: f887 3021 strb.w r3, [r7, #33] @ 0x21 if ((input_end - second_sequence) < 6) 8000f1a: 68ba ldr r2, [r7, #8] 8000f1c: 697b ldr r3, [r7, #20] 8000f1e: 1ad3 subs r3, r2, r3 8000f20: 2b05 cmp r3, #5 8000f22: f340 8096 ble.w 8001052 { /* input ends unexpectedly */ goto fail; } if ((second_sequence[0] != '\\') || (second_sequence[1] != 'u')) 8000f26: 697b ldr r3, [r7, #20] 8000f28: 781b ldrb r3, [r3, #0] 8000f2a: 2b5c cmp r3, #92 @ 0x5c 8000f2c: f040 8093 bne.w 8001056 8000f30: 697b ldr r3, [r7, #20] 8000f32: 3301 adds r3, #1 8000f34: 781b ldrb r3, [r3, #0] 8000f36: 2b75 cmp r3, #117 @ 0x75 8000f38: f040 808d bne.w 8001056 /* missing second half of the surrogate pair */ goto fail; } /* get the second utf16 sequence */ second_code = parse_hex4(second_sequence + 2); 8000f3c: 697b ldr r3, [r7, #20] 8000f3e: 3302 adds r3, #2 8000f40: 4618 mov r0, r3 8000f42: f7ff ff4b bl 8000ddc 8000f46: 6138 str r0, [r7, #16] /* check that the code is valid */ if ((second_code < 0xDC00) || (second_code > 0xDFFF)) 8000f48: 693b ldr r3, [r7, #16] 8000f4a: f5b3 4f5c cmp.w r3, #56320 @ 0xdc00 8000f4e: f0c0 8084 bcc.w 800105a 8000f52: 693b ldr r3, [r7, #16] 8000f54: f5b3 4f60 cmp.w r3, #57344 @ 0xe000 8000f58: d27f bcs.n 800105a goto fail; } /* calculate the unicode codepoint from the surrogate pair */ codepoint = 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF)); 8000f5a: 69fb ldr r3, [r7, #28] 8000f5c: 029a lsls r2, r3, #10 8000f5e: 4b43 ldr r3, [pc, #268] @ (800106c ) 8000f60: 4013 ands r3, r2 8000f62: 693a ldr r2, [r7, #16] 8000f64: f3c2 0209 ubfx r2, r2, #0, #10 8000f68: 4313 orrs r3, r2 8000f6a: f503 3380 add.w r3, r3, #65536 @ 0x10000 8000f6e: 627b str r3, [r7, #36] @ 0x24 { 8000f70: e004 b.n 8000f7c } else { sequence_length = 6; /* \uXXXX */ 8000f72: 2306 movs r3, #6 8000f74: f887 3021 strb.w r3, [r7, #33] @ 0x21 codepoint = first_code; 8000f78: 69fb ldr r3, [r7, #28] 8000f7a: 627b str r3, [r7, #36] @ 0x24 } /* encode as UTF-8 * takes at maximum 4 bytes to encode: * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ if (codepoint < 0x80) 8000f7c: 6a7b ldr r3, [r7, #36] @ 0x24 8000f7e: 2b7f cmp r3, #127 @ 0x7f 8000f80: d803 bhi.n 8000f8a { /* normal ascii, encoding 0xxxxxxx */ utf8_length = 1; 8000f82: 2301 movs r3, #1 8000f84: f887 3023 strb.w r3, [r7, #35] @ 0x23 8000f88: e01f b.n 8000fca } else if (codepoint < 0x800) 8000f8a: 6a7b ldr r3, [r7, #36] @ 0x24 8000f8c: f5b3 6f00 cmp.w r3, #2048 @ 0x800 8000f90: d206 bcs.n 8000fa0 { /* two bytes, encoding 110xxxxx 10xxxxxx */ utf8_length = 2; 8000f92: 2302 movs r3, #2 8000f94: f887 3023 strb.w r3, [r7, #35] @ 0x23 first_byte_mark = 0xC0; /* 11000000 */ 8000f98: 23c0 movs r3, #192 @ 0xc0 8000f9a: f887 3020 strb.w r3, [r7, #32] 8000f9e: e014 b.n 8000fca } else if (codepoint < 0x10000) 8000fa0: 6a7b ldr r3, [r7, #36] @ 0x24 8000fa2: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8000fa6: d206 bcs.n 8000fb6 { /* three bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx */ utf8_length = 3; 8000fa8: 2303 movs r3, #3 8000faa: f887 3023 strb.w r3, [r7, #35] @ 0x23 first_byte_mark = 0xE0; /* 11100000 */ 8000fae: 23e0 movs r3, #224 @ 0xe0 8000fb0: f887 3020 strb.w r3, [r7, #32] 8000fb4: e009 b.n 8000fca } else if (codepoint <= 0x10FFFF) 8000fb6: 6a7b ldr r3, [r7, #36] @ 0x24 8000fb8: f5b3 1f88 cmp.w r3, #1114112 @ 0x110000 8000fbc: d24f bcs.n 800105e { /* four bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx 10xxxxxx */ utf8_length = 4; 8000fbe: 2304 movs r3, #4 8000fc0: f887 3023 strb.w r3, [r7, #35] @ 0x23 first_byte_mark = 0xF0; /* 11110000 */ 8000fc4: 23f0 movs r3, #240 @ 0xf0 8000fc6: f887 3020 strb.w r3, [r7, #32] /* invalid unicode codepoint */ goto fail; } /* encode as utf8 */ for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--) 8000fca: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8000fce: 3b01 subs r3, #1 8000fd0: f887 3022 strb.w r3, [r7, #34] @ 0x22 8000fd4: e015 b.n 8001002 { /* 10xxxxxx */ (*output_pointer)[utf8_position] = (unsigned char)((codepoint | 0x80) & 0xBF); 8000fd6: 6a7b ldr r3, [r7, #36] @ 0x24 8000fd8: b2db uxtb r3, r3 8000fda: f003 033f and.w r3, r3, #63 @ 0x3f 8000fde: b2da uxtb r2, r3 8000fe0: 687b ldr r3, [r7, #4] 8000fe2: 6819 ldr r1, [r3, #0] 8000fe4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8000fe8: 440b add r3, r1 8000fea: f062 027f orn r2, r2, #127 @ 0x7f 8000fee: b2d2 uxtb r2, r2 8000ff0: 701a strb r2, [r3, #0] codepoint >>= 6; 8000ff2: 6a7b ldr r3, [r7, #36] @ 0x24 8000ff4: 099b lsrs r3, r3, #6 8000ff6: 627b str r3, [r7, #36] @ 0x24 for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--) 8000ff8: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8000ffc: 3b01 subs r3, #1 8000ffe: f887 3022 strb.w r3, [r7, #34] @ 0x22 8001002: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8001006: 2b00 cmp r3, #0 8001008: d1e5 bne.n 8000fd6 } /* encode first byte */ if (utf8_length > 1) 800100a: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 800100e: 2b01 cmp r3, #1 8001010: d909 bls.n 8001026 { (*output_pointer)[0] = (unsigned char)((codepoint | first_byte_mark) & 0xFF); 8001012: 6a7b ldr r3, [r7, #36] @ 0x24 8001014: b2d9 uxtb r1, r3 8001016: 687b ldr r3, [r7, #4] 8001018: 681b ldr r3, [r3, #0] 800101a: f897 2020 ldrb.w r2, [r7, #32] 800101e: 430a orrs r2, r1 8001020: b2d2 uxtb r2, r2 8001022: 701a strb r2, [r3, #0] 8001024: e007 b.n 8001036 } else { (*output_pointer)[0] = (unsigned char)(codepoint & 0x7F); 8001026: 6a7b ldr r3, [r7, #36] @ 0x24 8001028: b2da uxtb r2, r3 800102a: 687b ldr r3, [r7, #4] 800102c: 681b ldr r3, [r3, #0] 800102e: f002 027f and.w r2, r2, #127 @ 0x7f 8001032: b2d2 uxtb r2, r2 8001034: 701a strb r2, [r3, #0] } *output_pointer += utf8_length; 8001036: 687b ldr r3, [r7, #4] 8001038: 681a ldr r2, [r3, #0] 800103a: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 800103e: 441a add r2, r3 8001040: 687b ldr r3, [r7, #4] 8001042: 601a str r2, [r3, #0] return sequence_length; 8001044: f897 3021 ldrb.w r3, [r7, #33] @ 0x21 8001048: e00b b.n 8001062 goto fail; 800104a: bf00 nop 800104c: e008 b.n 8001060 goto fail; 800104e: bf00 nop 8001050: e006 b.n 8001060 goto fail; 8001052: bf00 nop 8001054: e004 b.n 8001060 goto fail; 8001056: bf00 nop 8001058: e002 b.n 8001060 goto fail; 800105a: bf00 nop 800105c: e000 b.n 8001060 goto fail; 800105e: bf00 nop fail: return 0; 8001060: 2300 movs r3, #0 } 8001062: 4618 mov r0, r3 8001064: 3728 adds r7, #40 @ 0x28 8001066: 46bd mov sp, r7 8001068: bd80 pop {r7, pc} 800106a: bf00 nop 800106c: 000ffc00 .word 0x000ffc00 08001070 : /* Parse the input text into an unescaped cinput, and populate item. */ static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_buffer) { 8001070: b580 push {r7, lr} 8001072: b08a sub sp, #40 @ 0x28 8001074: af00 add r7, sp, #0 8001076: 6078 str r0, [r7, #4] 8001078: 6039 str r1, [r7, #0] const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1; 800107a: 683b ldr r3, [r7, #0] 800107c: 681a ldr r2, [r3, #0] 800107e: 683b ldr r3, [r7, #0] 8001080: 689b ldr r3, [r3, #8] 8001082: 3301 adds r3, #1 8001084: 4413 add r3, r2 8001086: 627b str r3, [r7, #36] @ 0x24 const unsigned char *input_end = buffer_at_offset(input_buffer) + 1; 8001088: 683b ldr r3, [r7, #0] 800108a: 681a ldr r2, [r3, #0] 800108c: 683b ldr r3, [r7, #0] 800108e: 689b ldr r3, [r3, #8] 8001090: 3301 adds r3, #1 8001092: 4413 add r3, r2 8001094: 623b str r3, [r7, #32] unsigned char *output_pointer = NULL; 8001096: 2300 movs r3, #0 8001098: 60fb str r3, [r7, #12] unsigned char *output = NULL; 800109a: 2300 movs r3, #0 800109c: 61fb str r3, [r7, #28] /* not a string */ if (buffer_at_offset(input_buffer)[0] != '\"') 800109e: 683b ldr r3, [r7, #0] 80010a0: 681a ldr r2, [r3, #0] 80010a2: 683b ldr r3, [r7, #0] 80010a4: 689b ldr r3, [r3, #8] 80010a6: 4413 add r3, r2 80010a8: 781b ldrb r3, [r3, #0] 80010aa: 2b22 cmp r3, #34 @ 0x22 80010ac: f040 8103 bne.w 80012b6 goto fail; } { /* calculate approximate size of the output (overestimate) */ size_t allocation_length = 0; 80010b0: 2300 movs r3, #0 80010b2: 613b str r3, [r7, #16] size_t skipped_bytes = 0; 80010b4: 2300 movs r3, #0 80010b6: 61bb str r3, [r7, #24] while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"')) 80010b8: e017 b.n 80010ea { /* is escape sequence */ if (input_end[0] == '\\') 80010ba: 6a3b ldr r3, [r7, #32] 80010bc: 781b ldrb r3, [r3, #0] 80010be: 2b5c cmp r3, #92 @ 0x5c 80010c0: d110 bne.n 80010e4 { if ((size_t)(input_end + 1 - input_buffer->content) >= input_buffer->length) 80010c2: 6a3b ldr r3, [r7, #32] 80010c4: 1c5a adds r2, r3, #1 80010c6: 683b ldr r3, [r7, #0] 80010c8: 681b ldr r3, [r3, #0] 80010ca: 1ad3 subs r3, r2, r3 80010cc: 461a mov r2, r3 80010ce: 683b ldr r3, [r7, #0] 80010d0: 685b ldr r3, [r3, #4] 80010d2: 429a cmp r2, r3 80010d4: f080 80f1 bcs.w 80012ba { /* prevent buffer overflow when last input character is a backslash */ goto fail; } skipped_bytes++; 80010d8: 69bb ldr r3, [r7, #24] 80010da: 3301 adds r3, #1 80010dc: 61bb str r3, [r7, #24] input_end++; 80010de: 6a3b ldr r3, [r7, #32] 80010e0: 3301 adds r3, #1 80010e2: 623b str r3, [r7, #32] } input_end++; 80010e4: 6a3b ldr r3, [r7, #32] 80010e6: 3301 adds r3, #1 80010e8: 623b str r3, [r7, #32] while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"')) 80010ea: 683b ldr r3, [r7, #0] 80010ec: 681b ldr r3, [r3, #0] 80010ee: 6a3a ldr r2, [r7, #32] 80010f0: 1ad3 subs r3, r2, r3 80010f2: 461a mov r2, r3 80010f4: 683b ldr r3, [r7, #0] 80010f6: 685b ldr r3, [r3, #4] 80010f8: 429a cmp r2, r3 80010fa: d203 bcs.n 8001104 80010fc: 6a3b ldr r3, [r7, #32] 80010fe: 781b ldrb r3, [r3, #0] 8001100: 2b22 cmp r3, #34 @ 0x22 8001102: d1da bne.n 80010ba } if (((size_t)(input_end - input_buffer->content) >= input_buffer->length) || (*input_end != '\"')) 8001104: 683b ldr r3, [r7, #0] 8001106: 681b ldr r3, [r3, #0] 8001108: 6a3a ldr r2, [r7, #32] 800110a: 1ad3 subs r3, r2, r3 800110c: 461a mov r2, r3 800110e: 683b ldr r3, [r7, #0] 8001110: 685b ldr r3, [r3, #4] 8001112: 429a cmp r2, r3 8001114: f080 80d3 bcs.w 80012be 8001118: 6a3b ldr r3, [r7, #32] 800111a: 781b ldrb r3, [r3, #0] 800111c: 2b22 cmp r3, #34 @ 0x22 800111e: f040 80ce bne.w 80012be { goto fail; /* string ended unexpectedly */ } /* This is at most how much we need for the output */ allocation_length = (size_t) (input_end - buffer_at_offset(input_buffer)) - skipped_bytes; 8001122: 683b ldr r3, [r7, #0] 8001124: 681a ldr r2, [r3, #0] 8001126: 683b ldr r3, [r7, #0] 8001128: 689b ldr r3, [r3, #8] 800112a: 4413 add r3, r2 800112c: 6a3a ldr r2, [r7, #32] 800112e: 1ad3 subs r3, r2, r3 8001130: 461a mov r2, r3 8001132: 69bb ldr r3, [r7, #24] 8001134: 1ad3 subs r3, r2, r3 8001136: 613b str r3, [r7, #16] output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof("")); 8001138: 683b ldr r3, [r7, #0] 800113a: 691b ldr r3, [r3, #16] 800113c: 693a ldr r2, [r7, #16] 800113e: 3201 adds r2, #1 8001140: 4610 mov r0, r2 8001142: 4798 blx r3 8001144: 61f8 str r0, [r7, #28] if (output == NULL) 8001146: 69fb ldr r3, [r7, #28] 8001148: 2b00 cmp r3, #0 800114a: f000 80ba beq.w 80012c2 { goto fail; /* allocation failure */ } } output_pointer = output; 800114e: 69fb ldr r3, [r7, #28] 8001150: 60fb str r3, [r7, #12] /* loop through the string literal */ while (input_pointer < input_end) 8001152: e094 b.n 800127e { if (*input_pointer != '\\') 8001154: 6a7b ldr r3, [r7, #36] @ 0x24 8001156: 781b ldrb r3, [r3, #0] 8001158: 2b5c cmp r3, #92 @ 0x5c 800115a: d008 beq.n 800116e { *output_pointer++ = *input_pointer++; 800115c: 6a7a ldr r2, [r7, #36] @ 0x24 800115e: 1c53 adds r3, r2, #1 8001160: 627b str r3, [r7, #36] @ 0x24 8001162: 68fb ldr r3, [r7, #12] 8001164: 1c59 adds r1, r3, #1 8001166: 60f9 str r1, [r7, #12] 8001168: 7812 ldrb r2, [r2, #0] 800116a: 701a strb r2, [r3, #0] 800116c: e087 b.n 800127e } /* escape sequence */ else { unsigned char sequence_length = 2; 800116e: 2302 movs r3, #2 8001170: 75fb strb r3, [r7, #23] if ((input_end - input_pointer) < 1) 8001172: 6a3a ldr r2, [r7, #32] 8001174: 6a7b ldr r3, [r7, #36] @ 0x24 8001176: 1ad3 subs r3, r2, r3 8001178: 2b00 cmp r3, #0 800117a: f340 80a4 ble.w 80012c6 { goto fail; } switch (input_pointer[1]) 800117e: 6a7b ldr r3, [r7, #36] @ 0x24 8001180: 3301 adds r3, #1 8001182: 781b ldrb r3, [r3, #0] 8001184: 2b75 cmp r3, #117 @ 0x75 8001186: f300 80a0 bgt.w 80012ca 800118a: 2b5c cmp r3, #92 @ 0x5c 800118c: da04 bge.n 8001198 800118e: 2b22 cmp r3, #34 @ 0x22 8001190: d05c beq.n 800124c 8001192: 2b2f cmp r3, #47 @ 0x2f 8001194: d05a beq.n 800124c goto fail; } break; default: goto fail; 8001196: e098 b.n 80012ca switch (input_pointer[1]) 8001198: 3b5c subs r3, #92 @ 0x5c 800119a: 2b19 cmp r3, #25 800119c: f200 8095 bhi.w 80012ca 80011a0: a201 add r2, pc, #4 @ (adr r2, 80011a8 ) 80011a2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80011a6: bf00 nop 80011a8: 0800124d .word 0x0800124d 80011ac: 080012cb .word 0x080012cb 80011b0: 080012cb .word 0x080012cb 80011b4: 080012cb .word 0x080012cb 80011b8: 080012cb .word 0x080012cb 80011bc: 080012cb .word 0x080012cb 80011c0: 08001211 .word 0x08001211 80011c4: 080012cb .word 0x080012cb 80011c8: 080012cb .word 0x080012cb 80011cc: 080012cb .word 0x080012cb 80011d0: 0800121d .word 0x0800121d 80011d4: 080012cb .word 0x080012cb 80011d8: 080012cb .word 0x080012cb 80011dc: 080012cb .word 0x080012cb 80011e0: 080012cb .word 0x080012cb 80011e4: 080012cb .word 0x080012cb 80011e8: 080012cb .word 0x080012cb 80011ec: 080012cb .word 0x080012cb 80011f0: 08001229 .word 0x08001229 80011f4: 080012cb .word 0x080012cb 80011f8: 080012cb .word 0x080012cb 80011fc: 080012cb .word 0x080012cb 8001200: 08001235 .word 0x08001235 8001204: 080012cb .word 0x080012cb 8001208: 08001241 .word 0x08001241 800120c: 0800125d .word 0x0800125d *output_pointer++ = '\b'; 8001210: 68fb ldr r3, [r7, #12] 8001212: 1c5a adds r2, r3, #1 8001214: 60fa str r2, [r7, #12] 8001216: 2208 movs r2, #8 8001218: 701a strb r2, [r3, #0] break; 800121a: e02c b.n 8001276 *output_pointer++ = '\f'; 800121c: 68fb ldr r3, [r7, #12] 800121e: 1c5a adds r2, r3, #1 8001220: 60fa str r2, [r7, #12] 8001222: 220c movs r2, #12 8001224: 701a strb r2, [r3, #0] break; 8001226: e026 b.n 8001276 *output_pointer++ = '\n'; 8001228: 68fb ldr r3, [r7, #12] 800122a: 1c5a adds r2, r3, #1 800122c: 60fa str r2, [r7, #12] 800122e: 220a movs r2, #10 8001230: 701a strb r2, [r3, #0] break; 8001232: e020 b.n 8001276 *output_pointer++ = '\r'; 8001234: 68fb ldr r3, [r7, #12] 8001236: 1c5a adds r2, r3, #1 8001238: 60fa str r2, [r7, #12] 800123a: 220d movs r2, #13 800123c: 701a strb r2, [r3, #0] break; 800123e: e01a b.n 8001276 *output_pointer++ = '\t'; 8001240: 68fb ldr r3, [r7, #12] 8001242: 1c5a adds r2, r3, #1 8001244: 60fa str r2, [r7, #12] 8001246: 2209 movs r2, #9 8001248: 701a strb r2, [r3, #0] break; 800124a: e014 b.n 8001276 *output_pointer++ = input_pointer[1]; 800124c: 6a7b ldr r3, [r7, #36] @ 0x24 800124e: 1c5a adds r2, r3, #1 8001250: 68fb ldr r3, [r7, #12] 8001252: 1c59 adds r1, r3, #1 8001254: 60f9 str r1, [r7, #12] 8001256: 7812 ldrb r2, [r2, #0] 8001258: 701a strb r2, [r3, #0] break; 800125a: e00c b.n 8001276 sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer); 800125c: f107 030c add.w r3, r7, #12 8001260: 461a mov r2, r3 8001262: 6a39 ldr r1, [r7, #32] 8001264: 6a78 ldr r0, [r7, #36] @ 0x24 8001266: f7ff fe1b bl 8000ea0 800126a: 4603 mov r3, r0 800126c: 75fb strb r3, [r7, #23] if (sequence_length == 0) 800126e: 7dfb ldrb r3, [r7, #23] 8001270: 2b00 cmp r3, #0 8001272: d02c beq.n 80012ce break; 8001274: bf00 nop } input_pointer += sequence_length; 8001276: 7dfb ldrb r3, [r7, #23] 8001278: 6a7a ldr r2, [r7, #36] @ 0x24 800127a: 4413 add r3, r2 800127c: 627b str r3, [r7, #36] @ 0x24 while (input_pointer < input_end) 800127e: 6a7a ldr r2, [r7, #36] @ 0x24 8001280: 6a3b ldr r3, [r7, #32] 8001282: 429a cmp r2, r3 8001284: f4ff af66 bcc.w 8001154 } } /* zero terminate the output */ *output_pointer = '\0'; 8001288: 68fb ldr r3, [r7, #12] 800128a: 2200 movs r2, #0 800128c: 701a strb r2, [r3, #0] item->type = cJSON_String; 800128e: 687b ldr r3, [r7, #4] 8001290: 2210 movs r2, #16 8001292: 60da str r2, [r3, #12] item->valuestring = (char*)output; 8001294: 687b ldr r3, [r7, #4] 8001296: 69fa ldr r2, [r7, #28] 8001298: 611a str r2, [r3, #16] input_buffer->offset = (size_t) (input_end - input_buffer->content); 800129a: 683b ldr r3, [r7, #0] 800129c: 681b ldr r3, [r3, #0] 800129e: 6a3a ldr r2, [r7, #32] 80012a0: 1ad3 subs r3, r2, r3 80012a2: 461a mov r2, r3 80012a4: 683b ldr r3, [r7, #0] 80012a6: 609a str r2, [r3, #8] input_buffer->offset++; 80012a8: 683b ldr r3, [r7, #0] 80012aa: 689b ldr r3, [r3, #8] 80012ac: 1c5a adds r2, r3, #1 80012ae: 683b ldr r3, [r7, #0] 80012b0: 609a str r2, [r3, #8] return true; 80012b2: 2301 movs r3, #1 80012b4: e020 b.n 80012f8 goto fail; 80012b6: bf00 nop 80012b8: e00a b.n 80012d0 goto fail; 80012ba: bf00 nop 80012bc: e008 b.n 80012d0 goto fail; /* string ended unexpectedly */ 80012be: bf00 nop 80012c0: e006 b.n 80012d0 goto fail; /* allocation failure */ 80012c2: bf00 nop 80012c4: e004 b.n 80012d0 goto fail; 80012c6: bf00 nop 80012c8: e002 b.n 80012d0 goto fail; 80012ca: bf00 nop 80012cc: e000 b.n 80012d0 goto fail; 80012ce: bf00 nop fail: if (output != NULL) 80012d0: 69fb ldr r3, [r7, #28] 80012d2: 2b00 cmp r3, #0 80012d4: d005 beq.n 80012e2 { input_buffer->hooks.deallocate(output); 80012d6: 683b ldr r3, [r7, #0] 80012d8: 695b ldr r3, [r3, #20] 80012da: 69f8 ldr r0, [r7, #28] 80012dc: 4798 blx r3 output = NULL; 80012de: 2300 movs r3, #0 80012e0: 61fb str r3, [r7, #28] } if (input_pointer != NULL) 80012e2: 6a7b ldr r3, [r7, #36] @ 0x24 80012e4: 2b00 cmp r3, #0 80012e6: d006 beq.n 80012f6 { input_buffer->offset = (size_t)(input_pointer - input_buffer->content); 80012e8: 683b ldr r3, [r7, #0] 80012ea: 681b ldr r3, [r3, #0] 80012ec: 6a7a ldr r2, [r7, #36] @ 0x24 80012ee: 1ad3 subs r3, r2, r3 80012f0: 461a mov r2, r3 80012f2: 683b ldr r3, [r7, #0] 80012f4: 609a str r2, [r3, #8] } return false; 80012f6: 2300 movs r3, #0 } 80012f8: 4618 mov r0, r3 80012fa: 3728 adds r7, #40 @ 0x28 80012fc: 46bd mov sp, r7 80012fe: bd80 pop {r7, pc} 08001300 : static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer); static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer); /* Utility to jump whitespace and cr/lf */ static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer) { 8001300: b480 push {r7} 8001302: b083 sub sp, #12 8001304: af00 add r7, sp, #0 8001306: 6078 str r0, [r7, #4] if ((buffer == NULL) || (buffer->content == NULL)) 8001308: 687b ldr r3, [r7, #4] 800130a: 2b00 cmp r3, #0 800130c: d003 beq.n 8001316 800130e: 687b ldr r3, [r7, #4] 8001310: 681b ldr r3, [r3, #0] 8001312: 2b00 cmp r3, #0 8001314: d101 bne.n 800131a { return NULL; 8001316: 2300 movs r3, #0 8001318: e02c b.n 8001374 } if (cannot_access_at_index(buffer, 0)) 800131a: 687b ldr r3, [r7, #4] 800131c: 2b00 cmp r3, #0 800131e: d005 beq.n 800132c 8001320: 687b ldr r3, [r7, #4] 8001322: 689a ldr r2, [r3, #8] 8001324: 687b ldr r3, [r7, #4] 8001326: 685b ldr r3, [r3, #4] 8001328: 429a cmp r2, r3 800132a: d306 bcc.n 800133a { return buffer; 800132c: 687b ldr r3, [r7, #4] 800132e: e021 b.n 8001374 } while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) { buffer->offset++; 8001330: 687b ldr r3, [r7, #4] 8001332: 689b ldr r3, [r3, #8] 8001334: 1c5a adds r2, r3, #1 8001336: 687b ldr r3, [r7, #4] 8001338: 609a str r2, [r3, #8] while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) 800133a: 687b ldr r3, [r7, #4] 800133c: 2b00 cmp r3, #0 800133e: d00d beq.n 800135c 8001340: 687b ldr r3, [r7, #4] 8001342: 689a ldr r2, [r3, #8] 8001344: 687b ldr r3, [r7, #4] 8001346: 685b ldr r3, [r3, #4] 8001348: 429a cmp r2, r3 800134a: d207 bcs.n 800135c 800134c: 687b ldr r3, [r7, #4] 800134e: 681a ldr r2, [r3, #0] 8001350: 687b ldr r3, [r7, #4] 8001352: 689b ldr r3, [r3, #8] 8001354: 4413 add r3, r2 8001356: 781b ldrb r3, [r3, #0] 8001358: 2b20 cmp r3, #32 800135a: d9e9 bls.n 8001330 } if (buffer->offset == buffer->length) 800135c: 687b ldr r3, [r7, #4] 800135e: 689a ldr r2, [r3, #8] 8001360: 687b ldr r3, [r7, #4] 8001362: 685b ldr r3, [r3, #4] 8001364: 429a cmp r2, r3 8001366: d104 bne.n 8001372 { buffer->offset--; 8001368: 687b ldr r3, [r7, #4] 800136a: 689b ldr r3, [r3, #8] 800136c: 1e5a subs r2, r3, #1 800136e: 687b ldr r3, [r7, #4] 8001370: 609a str r2, [r3, #8] } return buffer; 8001372: 687b ldr r3, [r7, #4] } 8001374: 4618 mov r0, r3 8001376: 370c adds r7, #12 8001378: 46bd mov sp, r7 800137a: f85d 7b04 ldr.w r7, [sp], #4 800137e: 4770 bx lr 08001380 : /* skip the UTF-8 BOM (byte order mark) if it is at the beginning of a buffer */ static parse_buffer *skip_utf8_bom(parse_buffer * const buffer) { 8001380: b580 push {r7, lr} 8001382: b082 sub sp, #8 8001384: af00 add r7, sp, #0 8001386: 6078 str r0, [r7, #4] if ((buffer == NULL) || (buffer->content == NULL) || (buffer->offset != 0)) 8001388: 687b ldr r3, [r7, #4] 800138a: 2b00 cmp r3, #0 800138c: d007 beq.n 800139e 800138e: 687b ldr r3, [r7, #4] 8001390: 681b ldr r3, [r3, #0] 8001392: 2b00 cmp r3, #0 8001394: d003 beq.n 800139e 8001396: 687b ldr r3, [r7, #4] 8001398: 689b ldr r3, [r3, #8] 800139a: 2b00 cmp r3, #0 800139c: d001 beq.n 80013a2 { return NULL; 800139e: 2300 movs r3, #0 80013a0: e01c b.n 80013dc } if (can_access_at_index(buffer, 4) && (strncmp((const char*)buffer_at_offset(buffer), "\xEF\xBB\xBF", 3) == 0)) 80013a2: 687b ldr r3, [r7, #4] 80013a4: 2b00 cmp r3, #0 80013a6: d018 beq.n 80013da 80013a8: 687b ldr r3, [r7, #4] 80013aa: 689b ldr r3, [r3, #8] 80013ac: 1d1a adds r2, r3, #4 80013ae: 687b ldr r3, [r7, #4] 80013b0: 685b ldr r3, [r3, #4] 80013b2: 429a cmp r2, r3 80013b4: d211 bcs.n 80013da 80013b6: 687b ldr r3, [r7, #4] 80013b8: 681a ldr r2, [r3, #0] 80013ba: 687b ldr r3, [r7, #4] 80013bc: 689b ldr r3, [r3, #8] 80013be: 4413 add r3, r2 80013c0: 2203 movs r2, #3 80013c2: 4908 ldr r1, [pc, #32] @ (80013e4 ) 80013c4: 4618 mov r0, r3 80013c6: f029 fbeb bl 802aba0 80013ca: 4603 mov r3, r0 80013cc: 2b00 cmp r3, #0 80013ce: d104 bne.n 80013da { buffer->offset += 3; 80013d0: 687b ldr r3, [r7, #4] 80013d2: 689b ldr r3, [r3, #8] 80013d4: 1cda adds r2, r3, #3 80013d6: 687b ldr r3, [r7, #4] 80013d8: 609a str r2, [r3, #8] } return buffer; 80013da: 687b ldr r3, [r7, #4] } 80013dc: 4618 mov r0, r3 80013de: 3708 adds r7, #8 80013e0: 46bd mov sp, r7 80013e2: bd80 pop {r7, pc} 80013e4: 0802d328 .word 0x0802d328 080013e8 : CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated) { 80013e8: b580 push {r7, lr} 80013ea: b086 sub sp, #24 80013ec: af00 add r7, sp, #0 80013ee: 60f8 str r0, [r7, #12] 80013f0: 60b9 str r1, [r7, #8] 80013f2: 607a str r2, [r7, #4] size_t buffer_length; if (NULL == value) 80013f4: 68fb ldr r3, [r7, #12] 80013f6: 2b00 cmp r3, #0 80013f8: d101 bne.n 80013fe { return NULL; 80013fa: 2300 movs r3, #0 80013fc: e00c b.n 8001418 } /* Adding null character size due to require_null_terminated. */ buffer_length = strlen(value) + sizeof(""); 80013fe: 68f8 ldr r0, [r7, #12] 8001400: f7fe ffce bl 80003a0 8001404: 4603 mov r3, r0 8001406: 3301 adds r3, #1 8001408: 617b str r3, [r7, #20] return cJSON_ParseWithLengthOpts(value, buffer_length, return_parse_end, require_null_terminated); 800140a: 687b ldr r3, [r7, #4] 800140c: 68ba ldr r2, [r7, #8] 800140e: 6979 ldr r1, [r7, #20] 8001410: 68f8 ldr r0, [r7, #12] 8001412: f000 f805 bl 8001420 8001416: 4603 mov r3, r0 } 8001418: 4618 mov r0, r3 800141a: 3718 adds r7, #24 800141c: 46bd mov sp, r7 800141e: bd80 pop {r7, pc} 08001420 : /* Parse an object - create a new root, and populate. */ CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_bool require_null_terminated) { 8001420: b580 push {r7, lr} 8001422: b08e sub sp, #56 @ 0x38 8001424: af00 add r7, sp, #0 8001426: 60f8 str r0, [r7, #12] 8001428: 60b9 str r1, [r7, #8] 800142a: 607a str r2, [r7, #4] 800142c: 603b str r3, [r7, #0] parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } }; 800142e: f107 0318 add.w r3, r7, #24 8001432: 2200 movs r2, #0 8001434: 601a str r2, [r3, #0] 8001436: 605a str r2, [r3, #4] 8001438: 609a str r2, [r3, #8] 800143a: 60da str r2, [r3, #12] 800143c: 611a str r2, [r3, #16] 800143e: 615a str r2, [r3, #20] 8001440: 619a str r2, [r3, #24] cJSON *item = NULL; 8001442: 2300 movs r3, #0 8001444: 637b str r3, [r7, #52] @ 0x34 /* reset error position */ global_error.json = NULL; 8001446: 4b41 ldr r3, [pc, #260] @ (800154c ) 8001448: 2200 movs r2, #0 800144a: 601a str r2, [r3, #0] global_error.position = 0; 800144c: 4b3f ldr r3, [pc, #252] @ (800154c ) 800144e: 2200 movs r2, #0 8001450: 605a str r2, [r3, #4] if (value == NULL || 0 == buffer_length) 8001452: 68fb ldr r3, [r7, #12] 8001454: 2b00 cmp r3, #0 8001456: d042 beq.n 80014de 8001458: 68bb ldr r3, [r7, #8] 800145a: 2b00 cmp r3, #0 800145c: d03f beq.n 80014de { goto fail; } buffer.content = (const unsigned char*)value; 800145e: 68fb ldr r3, [r7, #12] 8001460: 61bb str r3, [r7, #24] buffer.length = buffer_length; 8001462: 68bb ldr r3, [r7, #8] 8001464: 61fb str r3, [r7, #28] buffer.offset = 0; 8001466: 2300 movs r3, #0 8001468: 623b str r3, [r7, #32] buffer.hooks = global_hooks; 800146a: 4a39 ldr r2, [pc, #228] @ (8001550 ) 800146c: f107 0328 add.w r3, r7, #40 @ 0x28 8001470: ca07 ldmia r2, {r0, r1, r2} 8001472: e883 0007 stmia.w r3, {r0, r1, r2} item = cJSON_New_Item(&global_hooks); 8001476: 4836 ldr r0, [pc, #216] @ (8001550 ) 8001478: f7ff fb72 bl 8000b60 800147c: 6378 str r0, [r7, #52] @ 0x34 if (item == NULL) /* memory fail */ 800147e: 6b7b ldr r3, [r7, #52] @ 0x34 8001480: 2b00 cmp r3, #0 8001482: d02e beq.n 80014e2 { goto fail; } if (!parse_value(item, buffer_skip_whitespace(skip_utf8_bom(&buffer)))) 8001484: f107 0318 add.w r3, r7, #24 8001488: 4618 mov r0, r3 800148a: f7ff ff79 bl 8001380 800148e: 4603 mov r3, r0 8001490: 4618 mov r0, r3 8001492: f7ff ff35 bl 8001300 8001496: 4603 mov r3, r0 8001498: 4619 mov r1, r3 800149a: 6b78 ldr r0, [r7, #52] @ 0x34 800149c: f000 f868 bl 8001570 80014a0: 4603 mov r3, r0 80014a2: 2b00 cmp r3, #0 80014a4: d01f beq.n 80014e6 /* parse failure. ep is set. */ goto fail; } /* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */ if (require_null_terminated) 80014a6: 683b ldr r3, [r7, #0] 80014a8: 2b00 cmp r3, #0 80014aa: d00e beq.n 80014ca { buffer_skip_whitespace(&buffer); 80014ac: f107 0318 add.w r3, r7, #24 80014b0: 4618 mov r0, r3 80014b2: f7ff ff25 bl 8001300 if ((buffer.offset >= buffer.length) || buffer_at_offset(&buffer)[0] != '\0') 80014b6: 6a3a ldr r2, [r7, #32] 80014b8: 69fb ldr r3, [r7, #28] 80014ba: 429a cmp r2, r3 80014bc: d215 bcs.n 80014ea 80014be: 69ba ldr r2, [r7, #24] 80014c0: 6a3b ldr r3, [r7, #32] 80014c2: 4413 add r3, r2 80014c4: 781b ldrb r3, [r3, #0] 80014c6: 2b00 cmp r3, #0 80014c8: d10f bne.n 80014ea { goto fail; } } if (return_parse_end) 80014ca: 687b ldr r3, [r7, #4] 80014cc: 2b00 cmp r3, #0 80014ce: d004 beq.n 80014da { *return_parse_end = (const char*)buffer_at_offset(&buffer); 80014d0: 69ba ldr r2, [r7, #24] 80014d2: 6a3b ldr r3, [r7, #32] 80014d4: 441a add r2, r3 80014d6: 687b ldr r3, [r7, #4] 80014d8: 601a str r2, [r3, #0] } return item; 80014da: 6b7b ldr r3, [r7, #52] @ 0x34 80014dc: e031 b.n 8001542 goto fail; 80014de: bf00 nop 80014e0: e004 b.n 80014ec goto fail; 80014e2: bf00 nop 80014e4: e002 b.n 80014ec goto fail; 80014e6: bf00 nop 80014e8: e000 b.n 80014ec goto fail; 80014ea: bf00 nop fail: if (item != NULL) 80014ec: 6b7b ldr r3, [r7, #52] @ 0x34 80014ee: 2b00 cmp r3, #0 80014f0: d002 beq.n 80014f8 { cJSON_Delete(item); 80014f2: 6b78 ldr r0, [r7, #52] @ 0x34 80014f4: f7ff fb4a bl 8000b8c } if (value != NULL) 80014f8: 68fb ldr r3, [r7, #12] 80014fa: 2b00 cmp r3, #0 80014fc: d020 beq.n 8001540 { error local_error; local_error.json = (const unsigned char*)value; 80014fe: 68fb ldr r3, [r7, #12] 8001500: 613b str r3, [r7, #16] local_error.position = 0; 8001502: 2300 movs r3, #0 8001504: 617b str r3, [r7, #20] if (buffer.offset < buffer.length) 8001506: 6a3a ldr r2, [r7, #32] 8001508: 69fb ldr r3, [r7, #28] 800150a: 429a cmp r2, r3 800150c: d202 bcs.n 8001514 { local_error.position = buffer.offset; 800150e: 6a3b ldr r3, [r7, #32] 8001510: 617b str r3, [r7, #20] 8001512: e005 b.n 8001520 } else if (buffer.length > 0) 8001514: 69fb ldr r3, [r7, #28] 8001516: 2b00 cmp r3, #0 8001518: d002 beq.n 8001520 { local_error.position = buffer.length - 1; 800151a: 69fb ldr r3, [r7, #28] 800151c: 3b01 subs r3, #1 800151e: 617b str r3, [r7, #20] } if (return_parse_end != NULL) 8001520: 687b ldr r3, [r7, #4] 8001522: 2b00 cmp r3, #0 8001524: d004 beq.n 8001530 { *return_parse_end = (const char*)local_error.json + local_error.position; 8001526: 693a ldr r2, [r7, #16] 8001528: 697b ldr r3, [r7, #20] 800152a: 441a add r2, r3 800152c: 687b ldr r3, [r7, #4] 800152e: 601a str r2, [r3, #0] } global_error = local_error; 8001530: 4b06 ldr r3, [pc, #24] @ (800154c ) 8001532: 461a mov r2, r3 8001534: f107 0310 add.w r3, r7, #16 8001538: e893 0003 ldmia.w r3, {r0, r1} 800153c: e882 0003 stmia.w r2, {r0, r1} } return NULL; 8001540: 2300 movs r3, #0 } 8001542: 4618 mov r0, r3 8001544: 3738 adds r7, #56 @ 0x38 8001546: 46bd mov sp, r7 8001548: bd80 pop {r7, pc} 800154a: bf00 nop 800154c: 24000240 .word 0x24000240 8001550: 24000000 .word 0x24000000 08001554 : /* Default options for cJSON_Parse */ CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value) { 8001554: b580 push {r7, lr} 8001556: b082 sub sp, #8 8001558: af00 add r7, sp, #0 800155a: 6078 str r0, [r7, #4] return cJSON_ParseWithOpts(value, 0, 0); 800155c: 2200 movs r2, #0 800155e: 2100 movs r1, #0 8001560: 6878 ldr r0, [r7, #4] 8001562: f7ff ff41 bl 80013e8 8001566: 4603 mov r3, r0 } 8001568: 4618 mov r0, r3 800156a: 3708 adds r7, #8 800156c: 46bd mov sp, r7 800156e: bd80 pop {r7, pc} 08001570 : return print_value(item, &p); } /* Parser core - when encountering text, process appropriately. */ static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) { 8001570: b580 push {r7, lr} 8001572: b082 sub sp, #8 8001574: af00 add r7, sp, #0 8001576: 6078 str r0, [r7, #4] 8001578: 6039 str r1, [r7, #0] if ((input_buffer == NULL) || (input_buffer->content == NULL)) 800157a: 683b ldr r3, [r7, #0] 800157c: 2b00 cmp r3, #0 800157e: d003 beq.n 8001588 8001580: 683b ldr r3, [r7, #0] 8001582: 681b ldr r3, [r3, #0] 8001584: 2b00 cmp r3, #0 8001586: d101 bne.n 800158c { return false; /* no input */ 8001588: 2300 movs r3, #0 800158a: e0d2 b.n 8001732 } /* parse the different types of values */ /* null */ if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0)) 800158c: 683b ldr r3, [r7, #0] 800158e: 2b00 cmp r3, #0 8001590: d01d beq.n 80015ce 8001592: 683b ldr r3, [r7, #0] 8001594: 689b ldr r3, [r3, #8] 8001596: 1d1a adds r2, r3, #4 8001598: 683b ldr r3, [r7, #0] 800159a: 685b ldr r3, [r3, #4] 800159c: 429a cmp r2, r3 800159e: d816 bhi.n 80015ce 80015a0: 683b ldr r3, [r7, #0] 80015a2: 681a ldr r2, [r3, #0] 80015a4: 683b ldr r3, [r7, #0] 80015a6: 689b ldr r3, [r3, #8] 80015a8: 4413 add r3, r2 80015aa: 2204 movs r2, #4 80015ac: 4963 ldr r1, [pc, #396] @ (800173c ) 80015ae: 4618 mov r0, r3 80015b0: f029 faf6 bl 802aba0 80015b4: 4603 mov r3, r0 80015b6: 2b00 cmp r3, #0 80015b8: d109 bne.n 80015ce { item->type = cJSON_NULL; 80015ba: 687b ldr r3, [r7, #4] 80015bc: 2204 movs r2, #4 80015be: 60da str r2, [r3, #12] input_buffer->offset += 4; 80015c0: 683b ldr r3, [r7, #0] 80015c2: 689b ldr r3, [r3, #8] 80015c4: 1d1a adds r2, r3, #4 80015c6: 683b ldr r3, [r7, #0] 80015c8: 609a str r2, [r3, #8] return true; 80015ca: 2301 movs r3, #1 80015cc: e0b1 b.n 8001732 } /* false */ if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5) == 0)) 80015ce: 683b ldr r3, [r7, #0] 80015d0: 2b00 cmp r3, #0 80015d2: d01d beq.n 8001610 80015d4: 683b ldr r3, [r7, #0] 80015d6: 689b ldr r3, [r3, #8] 80015d8: 1d5a adds r2, r3, #5 80015da: 683b ldr r3, [r7, #0] 80015dc: 685b ldr r3, [r3, #4] 80015de: 429a cmp r2, r3 80015e0: d816 bhi.n 8001610 80015e2: 683b ldr r3, [r7, #0] 80015e4: 681a ldr r2, [r3, #0] 80015e6: 683b ldr r3, [r7, #0] 80015e8: 689b ldr r3, [r3, #8] 80015ea: 4413 add r3, r2 80015ec: 2205 movs r2, #5 80015ee: 4954 ldr r1, [pc, #336] @ (8001740 ) 80015f0: 4618 mov r0, r3 80015f2: f029 fad5 bl 802aba0 80015f6: 4603 mov r3, r0 80015f8: 2b00 cmp r3, #0 80015fa: d109 bne.n 8001610 { item->type = cJSON_False; 80015fc: 687b ldr r3, [r7, #4] 80015fe: 2201 movs r2, #1 8001600: 60da str r2, [r3, #12] input_buffer->offset += 5; 8001602: 683b ldr r3, [r7, #0] 8001604: 689b ldr r3, [r3, #8] 8001606: 1d5a adds r2, r3, #5 8001608: 683b ldr r3, [r7, #0] 800160a: 609a str r2, [r3, #8] return true; 800160c: 2301 movs r3, #1 800160e: e090 b.n 8001732 } /* true */ if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "true", 4) == 0)) 8001610: 683b ldr r3, [r7, #0] 8001612: 2b00 cmp r3, #0 8001614: d020 beq.n 8001658 8001616: 683b ldr r3, [r7, #0] 8001618: 689b ldr r3, [r3, #8] 800161a: 1d1a adds r2, r3, #4 800161c: 683b ldr r3, [r7, #0] 800161e: 685b ldr r3, [r3, #4] 8001620: 429a cmp r2, r3 8001622: d819 bhi.n 8001658 8001624: 683b ldr r3, [r7, #0] 8001626: 681a ldr r2, [r3, #0] 8001628: 683b ldr r3, [r7, #0] 800162a: 689b ldr r3, [r3, #8] 800162c: 4413 add r3, r2 800162e: 2204 movs r2, #4 8001630: 4944 ldr r1, [pc, #272] @ (8001744 ) 8001632: 4618 mov r0, r3 8001634: f029 fab4 bl 802aba0 8001638: 4603 mov r3, r0 800163a: 2b00 cmp r3, #0 800163c: d10c bne.n 8001658 { item->type = cJSON_True; 800163e: 687b ldr r3, [r7, #4] 8001640: 2202 movs r2, #2 8001642: 60da str r2, [r3, #12] item->valueint = 1; 8001644: 687b ldr r3, [r7, #4] 8001646: 2201 movs r2, #1 8001648: 615a str r2, [r3, #20] input_buffer->offset += 4; 800164a: 683b ldr r3, [r7, #0] 800164c: 689b ldr r3, [r3, #8] 800164e: 1d1a adds r2, r3, #4 8001650: 683b ldr r3, [r7, #0] 8001652: 609a str r2, [r3, #8] return true; 8001654: 2301 movs r3, #1 8001656: e06c b.n 8001732 } /* string */ if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '\"')) 8001658: 683b ldr r3, [r7, #0] 800165a: 2b00 cmp r3, #0 800165c: d013 beq.n 8001686 800165e: 683b ldr r3, [r7, #0] 8001660: 689a ldr r2, [r3, #8] 8001662: 683b ldr r3, [r7, #0] 8001664: 685b ldr r3, [r3, #4] 8001666: 429a cmp r2, r3 8001668: d20d bcs.n 8001686 800166a: 683b ldr r3, [r7, #0] 800166c: 681a ldr r2, [r3, #0] 800166e: 683b ldr r3, [r7, #0] 8001670: 689b ldr r3, [r3, #8] 8001672: 4413 add r3, r2 8001674: 781b ldrb r3, [r3, #0] 8001676: 2b22 cmp r3, #34 @ 0x22 8001678: d105 bne.n 8001686 { return parse_string(item, input_buffer); 800167a: 6839 ldr r1, [r7, #0] 800167c: 6878 ldr r0, [r7, #4] 800167e: f7ff fcf7 bl 8001070 8001682: 4603 mov r3, r0 8001684: e055 b.n 8001732 } /* number */ if (can_access_at_index(input_buffer, 0) && ((buffer_at_offset(input_buffer)[0] == '-') || ((buffer_at_offset(input_buffer)[0] >= '0') && (buffer_at_offset(input_buffer)[0] <= '9')))) 8001686: 683b ldr r3, [r7, #0] 8001688: 2b00 cmp r3, #0 800168a: d023 beq.n 80016d4 800168c: 683b ldr r3, [r7, #0] 800168e: 689a ldr r2, [r3, #8] 8001690: 683b ldr r3, [r7, #0] 8001692: 685b ldr r3, [r3, #4] 8001694: 429a cmp r2, r3 8001696: d21d bcs.n 80016d4 8001698: 683b ldr r3, [r7, #0] 800169a: 681a ldr r2, [r3, #0] 800169c: 683b ldr r3, [r7, #0] 800169e: 689b ldr r3, [r3, #8] 80016a0: 4413 add r3, r2 80016a2: 781b ldrb r3, [r3, #0] 80016a4: 2b2d cmp r3, #45 @ 0x2d 80016a6: d00f beq.n 80016c8 80016a8: 683b ldr r3, [r7, #0] 80016aa: 681a ldr r2, [r3, #0] 80016ac: 683b ldr r3, [r7, #0] 80016ae: 689b ldr r3, [r3, #8] 80016b0: 4413 add r3, r2 80016b2: 781b ldrb r3, [r3, #0] 80016b4: 2b2f cmp r3, #47 @ 0x2f 80016b6: d90d bls.n 80016d4 80016b8: 683b ldr r3, [r7, #0] 80016ba: 681a ldr r2, [r3, #0] 80016bc: 683b ldr r3, [r7, #0] 80016be: 689b ldr r3, [r3, #8] 80016c0: 4413 add r3, r2 80016c2: 781b ldrb r3, [r3, #0] 80016c4: 2b39 cmp r3, #57 @ 0x39 80016c6: d805 bhi.n 80016d4 { return parse_number(item, input_buffer); 80016c8: 6839 ldr r1, [r7, #0] 80016ca: 6878 ldr r0, [r7, #4] 80016cc: f7ff fab8 bl 8000c40 80016d0: 4603 mov r3, r0 80016d2: e02e b.n 8001732 } /* array */ if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '[')) 80016d4: 683b ldr r3, [r7, #0] 80016d6: 2b00 cmp r3, #0 80016d8: d013 beq.n 8001702 80016da: 683b ldr r3, [r7, #0] 80016dc: 689a ldr r2, [r3, #8] 80016de: 683b ldr r3, [r7, #0] 80016e0: 685b ldr r3, [r3, #4] 80016e2: 429a cmp r2, r3 80016e4: d20d bcs.n 8001702 80016e6: 683b ldr r3, [r7, #0] 80016e8: 681a ldr r2, [r3, #0] 80016ea: 683b ldr r3, [r7, #0] 80016ec: 689b ldr r3, [r3, #8] 80016ee: 4413 add r3, r2 80016f0: 781b ldrb r3, [r3, #0] 80016f2: 2b5b cmp r3, #91 @ 0x5b 80016f4: d105 bne.n 8001702 { return parse_array(item, input_buffer); 80016f6: 6839 ldr r1, [r7, #0] 80016f8: 6878 ldr r0, [r7, #4] 80016fa: f000 f825 bl 8001748 80016fe: 4603 mov r3, r0 8001700: e017 b.n 8001732 } /* object */ if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '{')) 8001702: 683b ldr r3, [r7, #0] 8001704: 2b00 cmp r3, #0 8001706: d013 beq.n 8001730 8001708: 683b ldr r3, [r7, #0] 800170a: 689a ldr r2, [r3, #8] 800170c: 683b ldr r3, [r7, #0] 800170e: 685b ldr r3, [r3, #4] 8001710: 429a cmp r2, r3 8001712: d20d bcs.n 8001730 8001714: 683b ldr r3, [r7, #0] 8001716: 681a ldr r2, [r3, #0] 8001718: 683b ldr r3, [r7, #0] 800171a: 689b ldr r3, [r3, #8] 800171c: 4413 add r3, r2 800171e: 781b ldrb r3, [r3, #0] 8001720: 2b7b cmp r3, #123 @ 0x7b 8001722: d105 bne.n 8001730 { return parse_object(item, input_buffer); 8001724: 6839 ldr r1, [r7, #0] 8001726: 6878 ldr r0, [r7, #4] 8001728: f000 f8d2 bl 80018d0 800172c: 4603 mov r3, r0 800172e: e000 b.n 8001732 } return false; 8001730: 2300 movs r3, #0 } 8001732: 4618 mov r0, r3 8001734: 3708 adds r7, #8 8001736: 46bd mov sp, r7 8001738: bd80 pop {r7, pc} 800173a: bf00 nop 800173c: 0802d2fc .word 0x0802d2fc 8001740: 0802d32c .word 0x0802d32c 8001744: 0802d334 .word 0x0802d334 08001748 : } } /* Build an array from input text. */ static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer) { 8001748: b580 push {r7, lr} 800174a: b086 sub sp, #24 800174c: af00 add r7, sp, #0 800174e: 6078 str r0, [r7, #4] 8001750: 6039 str r1, [r7, #0] cJSON *head = NULL; /* head of the linked list */ 8001752: 2300 movs r3, #0 8001754: 617b str r3, [r7, #20] cJSON *current_item = NULL; 8001756: 2300 movs r3, #0 8001758: 613b str r3, [r7, #16] if (input_buffer->depth >= CJSON_NESTING_LIMIT) 800175a: 683b ldr r3, [r7, #0] 800175c: 68db ldr r3, [r3, #12] 800175e: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8001762: d301 bcc.n 8001768 { return false; /* to deeply nested */ 8001764: 2300 movs r3, #0 8001766: e0af b.n 80018c8 } input_buffer->depth++; 8001768: 683b ldr r3, [r7, #0] 800176a: 68db ldr r3, [r3, #12] 800176c: 1c5a adds r2, r3, #1 800176e: 683b ldr r3, [r7, #0] 8001770: 60da str r2, [r3, #12] if (buffer_at_offset(input_buffer)[0] != '[') 8001772: 683b ldr r3, [r7, #0] 8001774: 681a ldr r2, [r3, #0] 8001776: 683b ldr r3, [r7, #0] 8001778: 689b ldr r3, [r3, #8] 800177a: 4413 add r3, r2 800177c: 781b ldrb r3, [r3, #0] 800177e: 2b5b cmp r3, #91 @ 0x5b 8001780: f040 8094 bne.w 80018ac { /* not an array */ goto fail; } input_buffer->offset++; 8001784: 683b ldr r3, [r7, #0] 8001786: 689b ldr r3, [r3, #8] 8001788: 1c5a adds r2, r3, #1 800178a: 683b ldr r3, [r7, #0] 800178c: 609a str r2, [r3, #8] buffer_skip_whitespace(input_buffer); 800178e: 6838 ldr r0, [r7, #0] 8001790: f7ff fdb6 bl 8001300 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ']')) 8001794: 683b ldr r3, [r7, #0] 8001796: 2b00 cmp r3, #0 8001798: d00d beq.n 80017b6 800179a: 683b ldr r3, [r7, #0] 800179c: 689a ldr r2, [r3, #8] 800179e: 683b ldr r3, [r7, #0] 80017a0: 685b ldr r3, [r3, #4] 80017a2: 429a cmp r2, r3 80017a4: d207 bcs.n 80017b6 80017a6: 683b ldr r3, [r7, #0] 80017a8: 681a ldr r2, [r3, #0] 80017aa: 683b ldr r3, [r7, #0] 80017ac: 689b ldr r3, [r3, #8] 80017ae: 4413 add r3, r2 80017b0: 781b ldrb r3, [r3, #0] 80017b2: 2b5d cmp r3, #93 @ 0x5d 80017b4: d061 beq.n 800187a /* empty array */ goto success; } /* check if we skipped to the end of the buffer */ if (cannot_access_at_index(input_buffer, 0)) 80017b6: 683b ldr r3, [r7, #0] 80017b8: 2b00 cmp r3, #0 80017ba: d005 beq.n 80017c8 80017bc: 683b ldr r3, [r7, #0] 80017be: 689a ldr r2, [r3, #8] 80017c0: 683b ldr r3, [r7, #0] 80017c2: 685b ldr r3, [r3, #4] 80017c4: 429a cmp r2, r3 80017c6: d305 bcc.n 80017d4 { input_buffer->offset--; 80017c8: 683b ldr r3, [r7, #0] 80017ca: 689b ldr r3, [r3, #8] 80017cc: 1e5a subs r2, r3, #1 80017ce: 683b ldr r3, [r7, #0] 80017d0: 609a str r2, [r3, #8] goto fail; 80017d2: e072 b.n 80018ba } /* step back to character in front of the first element */ input_buffer->offset--; 80017d4: 683b ldr r3, [r7, #0] 80017d6: 689b ldr r3, [r3, #8] 80017d8: 1e5a subs r2, r3, #1 80017da: 683b ldr r3, [r7, #0] 80017dc: 609a str r2, [r3, #8] /* loop through the comma separated array elements */ do { /* allocate next item */ cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); 80017de: 683b ldr r3, [r7, #0] 80017e0: 3310 adds r3, #16 80017e2: 4618 mov r0, r3 80017e4: f7ff f9bc bl 8000b60 80017e8: 60f8 str r0, [r7, #12] if (new_item == NULL) 80017ea: 68fb ldr r3, [r7, #12] 80017ec: 2b00 cmp r3, #0 80017ee: d05f beq.n 80018b0 { goto fail; /* allocation failure */ } /* attach next item to list */ if (head == NULL) 80017f0: 697b ldr r3, [r7, #20] 80017f2: 2b00 cmp r3, #0 80017f4: d104 bne.n 8001800 { /* start the linked list */ current_item = head = new_item; 80017f6: 68fb ldr r3, [r7, #12] 80017f8: 617b str r3, [r7, #20] 80017fa: 697b ldr r3, [r7, #20] 80017fc: 613b str r3, [r7, #16] 80017fe: e007 b.n 8001810 } else { /* add to the end and advance */ current_item->next = new_item; 8001800: 693b ldr r3, [r7, #16] 8001802: 68fa ldr r2, [r7, #12] 8001804: 601a str r2, [r3, #0] new_item->prev = current_item; 8001806: 68fb ldr r3, [r7, #12] 8001808: 693a ldr r2, [r7, #16] 800180a: 605a str r2, [r3, #4] current_item = new_item; 800180c: 68fb ldr r3, [r7, #12] 800180e: 613b str r3, [r7, #16] } /* parse next value */ input_buffer->offset++; 8001810: 683b ldr r3, [r7, #0] 8001812: 689b ldr r3, [r3, #8] 8001814: 1c5a adds r2, r3, #1 8001816: 683b ldr r3, [r7, #0] 8001818: 609a str r2, [r3, #8] buffer_skip_whitespace(input_buffer); 800181a: 6838 ldr r0, [r7, #0] 800181c: f7ff fd70 bl 8001300 if (!parse_value(current_item, input_buffer)) 8001820: 6839 ldr r1, [r7, #0] 8001822: 6938 ldr r0, [r7, #16] 8001824: f7ff fea4 bl 8001570 8001828: 4603 mov r3, r0 800182a: 2b00 cmp r3, #0 800182c: d042 beq.n 80018b4 { goto fail; /* failed to parse value */ } buffer_skip_whitespace(input_buffer); 800182e: 6838 ldr r0, [r7, #0] 8001830: f7ff fd66 bl 8001300 } while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); 8001834: 683b ldr r3, [r7, #0] 8001836: 2b00 cmp r3, #0 8001838: d00d beq.n 8001856 800183a: 683b ldr r3, [r7, #0] 800183c: 689a ldr r2, [r3, #8] 800183e: 683b ldr r3, [r7, #0] 8001840: 685b ldr r3, [r3, #4] 8001842: 429a cmp r2, r3 8001844: d207 bcs.n 8001856 8001846: 683b ldr r3, [r7, #0] 8001848: 681a ldr r2, [r3, #0] 800184a: 683b ldr r3, [r7, #0] 800184c: 689b ldr r3, [r3, #8] 800184e: 4413 add r3, r2 8001850: 781b ldrb r3, [r3, #0] 8001852: 2b2c cmp r3, #44 @ 0x2c 8001854: d0c3 beq.n 80017de if (cannot_access_at_index(input_buffer, 0) || buffer_at_offset(input_buffer)[0] != ']') 8001856: 683b ldr r3, [r7, #0] 8001858: 2b00 cmp r3, #0 800185a: d02d beq.n 80018b8 800185c: 683b ldr r3, [r7, #0] 800185e: 689a ldr r2, [r3, #8] 8001860: 683b ldr r3, [r7, #0] 8001862: 685b ldr r3, [r3, #4] 8001864: 429a cmp r2, r3 8001866: d227 bcs.n 80018b8 8001868: 683b ldr r3, [r7, #0] 800186a: 681a ldr r2, [r3, #0] 800186c: 683b ldr r3, [r7, #0] 800186e: 689b ldr r3, [r3, #8] 8001870: 4413 add r3, r2 8001872: 781b ldrb r3, [r3, #0] 8001874: 2b5d cmp r3, #93 @ 0x5d 8001876: d11f bne.n 80018b8 { goto fail; /* expected end of array */ } success: 8001878: e000 b.n 800187c goto success; 800187a: bf00 nop input_buffer->depth--; 800187c: 683b ldr r3, [r7, #0] 800187e: 68db ldr r3, [r3, #12] 8001880: 1e5a subs r2, r3, #1 8001882: 683b ldr r3, [r7, #0] 8001884: 60da str r2, [r3, #12] if (head != NULL) { 8001886: 697b ldr r3, [r7, #20] 8001888: 2b00 cmp r3, #0 800188a: d002 beq.n 8001892 head->prev = current_item; 800188c: 697b ldr r3, [r7, #20] 800188e: 693a ldr r2, [r7, #16] 8001890: 605a str r2, [r3, #4] } item->type = cJSON_Array; 8001892: 687b ldr r3, [r7, #4] 8001894: 2220 movs r2, #32 8001896: 60da str r2, [r3, #12] item->child = head; 8001898: 687b ldr r3, [r7, #4] 800189a: 697a ldr r2, [r7, #20] 800189c: 609a str r2, [r3, #8] input_buffer->offset++; 800189e: 683b ldr r3, [r7, #0] 80018a0: 689b ldr r3, [r3, #8] 80018a2: 1c5a adds r2, r3, #1 80018a4: 683b ldr r3, [r7, #0] 80018a6: 609a str r2, [r3, #8] return true; 80018a8: 2301 movs r3, #1 80018aa: e00d b.n 80018c8 goto fail; 80018ac: bf00 nop 80018ae: e004 b.n 80018ba goto fail; /* allocation failure */ 80018b0: bf00 nop 80018b2: e002 b.n 80018ba goto fail; /* failed to parse value */ 80018b4: bf00 nop 80018b6: e000 b.n 80018ba goto fail; /* expected end of array */ 80018b8: bf00 nop fail: if (head != NULL) 80018ba: 697b ldr r3, [r7, #20] 80018bc: 2b00 cmp r3, #0 80018be: d002 beq.n 80018c6 { cJSON_Delete(head); 80018c0: 6978 ldr r0, [r7, #20] 80018c2: f7ff f963 bl 8000b8c } return false; 80018c6: 2300 movs r3, #0 } 80018c8: 4618 mov r0, r3 80018ca: 3718 adds r7, #24 80018cc: 46bd mov sp, r7 80018ce: bd80 pop {r7, pc} 080018d0 : return true; } /* Build an object from the text. */ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer) { 80018d0: b580 push {r7, lr} 80018d2: b086 sub sp, #24 80018d4: af00 add r7, sp, #0 80018d6: 6078 str r0, [r7, #4] 80018d8: 6039 str r1, [r7, #0] cJSON *head = NULL; /* linked list head */ 80018da: 2300 movs r3, #0 80018dc: 617b str r3, [r7, #20] cJSON *current_item = NULL; 80018de: 2300 movs r3, #0 80018e0: 613b str r3, [r7, #16] if (input_buffer->depth >= CJSON_NESTING_LIMIT) 80018e2: 683b ldr r3, [r7, #0] 80018e4: 68db ldr r3, [r3, #12] 80018e6: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 80018ea: d301 bcc.n 80018f0 { return false; /* to deeply nested */ 80018ec: 2300 movs r3, #0 80018ee: e0f7 b.n 8001ae0 } input_buffer->depth++; 80018f0: 683b ldr r3, [r7, #0] 80018f2: 68db ldr r3, [r3, #12] 80018f4: 1c5a adds r2, r3, #1 80018f6: 683b ldr r3, [r7, #0] 80018f8: 60da str r2, [r3, #12] if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '{')) 80018fa: 683b ldr r3, [r7, #0] 80018fc: 2b00 cmp r3, #0 80018fe: f000 80db beq.w 8001ab8 8001902: 683b ldr r3, [r7, #0] 8001904: 689a ldr r2, [r3, #8] 8001906: 683b ldr r3, [r7, #0] 8001908: 685b ldr r3, [r3, #4] 800190a: 429a cmp r2, r3 800190c: f080 80d4 bcs.w 8001ab8 8001910: 683b ldr r3, [r7, #0] 8001912: 681a ldr r2, [r3, #0] 8001914: 683b ldr r3, [r7, #0] 8001916: 689b ldr r3, [r3, #8] 8001918: 4413 add r3, r2 800191a: 781b ldrb r3, [r3, #0] 800191c: 2b7b cmp r3, #123 @ 0x7b 800191e: f040 80cb bne.w 8001ab8 { goto fail; /* not an object */ } input_buffer->offset++; 8001922: 683b ldr r3, [r7, #0] 8001924: 689b ldr r3, [r3, #8] 8001926: 1c5a adds r2, r3, #1 8001928: 683b ldr r3, [r7, #0] 800192a: 609a str r2, [r3, #8] buffer_skip_whitespace(input_buffer); 800192c: 6838 ldr r0, [r7, #0] 800192e: f7ff fce7 bl 8001300 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '}')) 8001932: 683b ldr r3, [r7, #0] 8001934: 2b00 cmp r3, #0 8001936: d00e beq.n 8001956 8001938: 683b ldr r3, [r7, #0] 800193a: 689a ldr r2, [r3, #8] 800193c: 683b ldr r3, [r7, #0] 800193e: 685b ldr r3, [r3, #4] 8001940: 429a cmp r2, r3 8001942: d208 bcs.n 8001956 8001944: 683b ldr r3, [r7, #0] 8001946: 681a ldr r2, [r3, #0] 8001948: 683b ldr r3, [r7, #0] 800194a: 689b ldr r3, [r3, #8] 800194c: 4413 add r3, r2 800194e: 781b ldrb r3, [r3, #0] 8001950: 2b7d cmp r3, #125 @ 0x7d 8001952: f000 8098 beq.w 8001a86 { goto success; /* empty object */ } /* check if we skipped to the end of the buffer */ if (cannot_access_at_index(input_buffer, 0)) 8001956: 683b ldr r3, [r7, #0] 8001958: 2b00 cmp r3, #0 800195a: d005 beq.n 8001968 800195c: 683b ldr r3, [r7, #0] 800195e: 689a ldr r2, [r3, #8] 8001960: 683b ldr r3, [r7, #0] 8001962: 685b ldr r3, [r3, #4] 8001964: 429a cmp r2, r3 8001966: d305 bcc.n 8001974 { input_buffer->offset--; 8001968: 683b ldr r3, [r7, #0] 800196a: 689b ldr r3, [r3, #8] 800196c: 1e5a subs r2, r3, #1 800196e: 683b ldr r3, [r7, #0] 8001970: 609a str r2, [r3, #8] goto fail; 8001972: e0ae b.n 8001ad2 } /* step back to character in front of the first element */ input_buffer->offset--; 8001974: 683b ldr r3, [r7, #0] 8001976: 689b ldr r3, [r3, #8] 8001978: 1e5a subs r2, r3, #1 800197a: 683b ldr r3, [r7, #0] 800197c: 609a str r2, [r3, #8] /* loop through the comma separated array elements */ do { /* allocate next item */ cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); 800197e: 683b ldr r3, [r7, #0] 8001980: 3310 adds r3, #16 8001982: 4618 mov r0, r3 8001984: f7ff f8ec bl 8000b60 8001988: 60f8 str r0, [r7, #12] if (new_item == NULL) 800198a: 68fb ldr r3, [r7, #12] 800198c: 2b00 cmp r3, #0 800198e: f000 8095 beq.w 8001abc { goto fail; /* allocation failure */ } /* attach next item to list */ if (head == NULL) 8001992: 697b ldr r3, [r7, #20] 8001994: 2b00 cmp r3, #0 8001996: d104 bne.n 80019a2 { /* start the linked list */ current_item = head = new_item; 8001998: 68fb ldr r3, [r7, #12] 800199a: 617b str r3, [r7, #20] 800199c: 697b ldr r3, [r7, #20] 800199e: 613b str r3, [r7, #16] 80019a0: e007 b.n 80019b2 } else { /* add to the end and advance */ current_item->next = new_item; 80019a2: 693b ldr r3, [r7, #16] 80019a4: 68fa ldr r2, [r7, #12] 80019a6: 601a str r2, [r3, #0] new_item->prev = current_item; 80019a8: 68fb ldr r3, [r7, #12] 80019aa: 693a ldr r2, [r7, #16] 80019ac: 605a str r2, [r3, #4] current_item = new_item; 80019ae: 68fb ldr r3, [r7, #12] 80019b0: 613b str r3, [r7, #16] } if (cannot_access_at_index(input_buffer, 1)) 80019b2: 683b ldr r3, [r7, #0] 80019b4: 2b00 cmp r3, #0 80019b6: f000 8083 beq.w 8001ac0 80019ba: 683b ldr r3, [r7, #0] 80019bc: 689b ldr r3, [r3, #8] 80019be: 1c5a adds r2, r3, #1 80019c0: 683b ldr r3, [r7, #0] 80019c2: 685b ldr r3, [r3, #4] 80019c4: 429a cmp r2, r3 80019c6: d27b bcs.n 8001ac0 { goto fail; /* nothing comes after the comma */ } /* parse the name of the child */ input_buffer->offset++; 80019c8: 683b ldr r3, [r7, #0] 80019ca: 689b ldr r3, [r3, #8] 80019cc: 1c5a adds r2, r3, #1 80019ce: 683b ldr r3, [r7, #0] 80019d0: 609a str r2, [r3, #8] buffer_skip_whitespace(input_buffer); 80019d2: 6838 ldr r0, [r7, #0] 80019d4: f7ff fc94 bl 8001300 if (!parse_string(current_item, input_buffer)) 80019d8: 6839 ldr r1, [r7, #0] 80019da: 6938 ldr r0, [r7, #16] 80019dc: f7ff fb48 bl 8001070 80019e0: 4603 mov r3, r0 80019e2: 2b00 cmp r3, #0 80019e4: d06e beq.n 8001ac4 { goto fail; /* failed to parse name */ } buffer_skip_whitespace(input_buffer); 80019e6: 6838 ldr r0, [r7, #0] 80019e8: f7ff fc8a bl 8001300 /* swap valuestring and string, because we parsed the name */ current_item->string = current_item->valuestring; 80019ec: 693b ldr r3, [r7, #16] 80019ee: 691a ldr r2, [r3, #16] 80019f0: 693b ldr r3, [r7, #16] 80019f2: 621a str r2, [r3, #32] current_item->valuestring = NULL; 80019f4: 693b ldr r3, [r7, #16] 80019f6: 2200 movs r2, #0 80019f8: 611a str r2, [r3, #16] if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != ':')) 80019fa: 683b ldr r3, [r7, #0] 80019fc: 2b00 cmp r3, #0 80019fe: d063 beq.n 8001ac8 8001a00: 683b ldr r3, [r7, #0] 8001a02: 689a ldr r2, [r3, #8] 8001a04: 683b ldr r3, [r7, #0] 8001a06: 685b ldr r3, [r3, #4] 8001a08: 429a cmp r2, r3 8001a0a: d25d bcs.n 8001ac8 8001a0c: 683b ldr r3, [r7, #0] 8001a0e: 681a ldr r2, [r3, #0] 8001a10: 683b ldr r3, [r7, #0] 8001a12: 689b ldr r3, [r3, #8] 8001a14: 4413 add r3, r2 8001a16: 781b ldrb r3, [r3, #0] 8001a18: 2b3a cmp r3, #58 @ 0x3a 8001a1a: d155 bne.n 8001ac8 { goto fail; /* invalid object */ } /* parse the value */ input_buffer->offset++; 8001a1c: 683b ldr r3, [r7, #0] 8001a1e: 689b ldr r3, [r3, #8] 8001a20: 1c5a adds r2, r3, #1 8001a22: 683b ldr r3, [r7, #0] 8001a24: 609a str r2, [r3, #8] buffer_skip_whitespace(input_buffer); 8001a26: 6838 ldr r0, [r7, #0] 8001a28: f7ff fc6a bl 8001300 if (!parse_value(current_item, input_buffer)) 8001a2c: 6839 ldr r1, [r7, #0] 8001a2e: 6938 ldr r0, [r7, #16] 8001a30: f7ff fd9e bl 8001570 8001a34: 4603 mov r3, r0 8001a36: 2b00 cmp r3, #0 8001a38: d048 beq.n 8001acc { goto fail; /* failed to parse value */ } buffer_skip_whitespace(input_buffer); 8001a3a: 6838 ldr r0, [r7, #0] 8001a3c: f7ff fc60 bl 8001300 } while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); 8001a40: 683b ldr r3, [r7, #0] 8001a42: 2b00 cmp r3, #0 8001a44: d00d beq.n 8001a62 8001a46: 683b ldr r3, [r7, #0] 8001a48: 689a ldr r2, [r3, #8] 8001a4a: 683b ldr r3, [r7, #0] 8001a4c: 685b ldr r3, [r3, #4] 8001a4e: 429a cmp r2, r3 8001a50: d207 bcs.n 8001a62 8001a52: 683b ldr r3, [r7, #0] 8001a54: 681a ldr r2, [r3, #0] 8001a56: 683b ldr r3, [r7, #0] 8001a58: 689b ldr r3, [r3, #8] 8001a5a: 4413 add r3, r2 8001a5c: 781b ldrb r3, [r3, #0] 8001a5e: 2b2c cmp r3, #44 @ 0x2c 8001a60: d08d beq.n 800197e if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '}')) 8001a62: 683b ldr r3, [r7, #0] 8001a64: 2b00 cmp r3, #0 8001a66: d033 beq.n 8001ad0 8001a68: 683b ldr r3, [r7, #0] 8001a6a: 689a ldr r2, [r3, #8] 8001a6c: 683b ldr r3, [r7, #0] 8001a6e: 685b ldr r3, [r3, #4] 8001a70: 429a cmp r2, r3 8001a72: d22d bcs.n 8001ad0 8001a74: 683b ldr r3, [r7, #0] 8001a76: 681a ldr r2, [r3, #0] 8001a78: 683b ldr r3, [r7, #0] 8001a7a: 689b ldr r3, [r3, #8] 8001a7c: 4413 add r3, r2 8001a7e: 781b ldrb r3, [r3, #0] 8001a80: 2b7d cmp r3, #125 @ 0x7d 8001a82: d125 bne.n 8001ad0 { goto fail; /* expected end of object */ } success: 8001a84: e000 b.n 8001a88 goto success; /* empty object */ 8001a86: bf00 nop input_buffer->depth--; 8001a88: 683b ldr r3, [r7, #0] 8001a8a: 68db ldr r3, [r3, #12] 8001a8c: 1e5a subs r2, r3, #1 8001a8e: 683b ldr r3, [r7, #0] 8001a90: 60da str r2, [r3, #12] if (head != NULL) { 8001a92: 697b ldr r3, [r7, #20] 8001a94: 2b00 cmp r3, #0 8001a96: d002 beq.n 8001a9e head->prev = current_item; 8001a98: 697b ldr r3, [r7, #20] 8001a9a: 693a ldr r2, [r7, #16] 8001a9c: 605a str r2, [r3, #4] } item->type = cJSON_Object; 8001a9e: 687b ldr r3, [r7, #4] 8001aa0: 2240 movs r2, #64 @ 0x40 8001aa2: 60da str r2, [r3, #12] item->child = head; 8001aa4: 687b ldr r3, [r7, #4] 8001aa6: 697a ldr r2, [r7, #20] 8001aa8: 609a str r2, [r3, #8] input_buffer->offset++; 8001aaa: 683b ldr r3, [r7, #0] 8001aac: 689b ldr r3, [r3, #8] 8001aae: 1c5a adds r2, r3, #1 8001ab0: 683b ldr r3, [r7, #0] 8001ab2: 609a str r2, [r3, #8] return true; 8001ab4: 2301 movs r3, #1 8001ab6: e013 b.n 8001ae0 goto fail; /* not an object */ 8001ab8: bf00 nop 8001aba: e00a b.n 8001ad2 goto fail; /* allocation failure */ 8001abc: bf00 nop 8001abe: e008 b.n 8001ad2 goto fail; /* nothing comes after the comma */ 8001ac0: bf00 nop 8001ac2: e006 b.n 8001ad2 goto fail; /* failed to parse name */ 8001ac4: bf00 nop 8001ac6: e004 b.n 8001ad2 goto fail; /* invalid object */ 8001ac8: bf00 nop 8001aca: e002 b.n 8001ad2 goto fail; /* failed to parse value */ 8001acc: bf00 nop 8001ace: e000 b.n 8001ad2 goto fail; /* expected end of object */ 8001ad0: bf00 nop fail: if (head != NULL) 8001ad2: 697b ldr r3, [r7, #20] 8001ad4: 2b00 cmp r3, #0 8001ad6: d002 beq.n 8001ade { cJSON_Delete(head); 8001ad8: 6978 ldr r0, [r7, #20] 8001ada: f7ff f857 bl 8000b8c } return false; 8001ade: 2300 movs r3, #0 } 8001ae0: 4618 mov r0, r3 8001ae2: 3718 adds r7, #24 8001ae4: 46bd mov sp, r7 8001ae6: bd80 pop {r7, pc} 08001ae8 : return true; } /* Get Array size/item / object item. */ CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array) { 8001ae8: b480 push {r7} 8001aea: b085 sub sp, #20 8001aec: af00 add r7, sp, #0 8001aee: 6078 str r0, [r7, #4] cJSON *child = NULL; 8001af0: 2300 movs r3, #0 8001af2: 60fb str r3, [r7, #12] size_t size = 0; 8001af4: 2300 movs r3, #0 8001af6: 60bb str r3, [r7, #8] if (array == NULL) 8001af8: 687b ldr r3, [r7, #4] 8001afa: 2b00 cmp r3, #0 8001afc: d101 bne.n 8001b02 { return 0; 8001afe: 2300 movs r3, #0 8001b00: e00d b.n 8001b1e } child = array->child; 8001b02: 687b ldr r3, [r7, #4] 8001b04: 689b ldr r3, [r3, #8] 8001b06: 60fb str r3, [r7, #12] while(child != NULL) 8001b08: e005 b.n 8001b16 { size++; 8001b0a: 68bb ldr r3, [r7, #8] 8001b0c: 3301 adds r3, #1 8001b0e: 60bb str r3, [r7, #8] child = child->next; 8001b10: 68fb ldr r3, [r7, #12] 8001b12: 681b ldr r3, [r3, #0] 8001b14: 60fb str r3, [r7, #12] while(child != NULL) 8001b16: 68fb ldr r3, [r7, #12] 8001b18: 2b00 cmp r3, #0 8001b1a: d1f6 bne.n 8001b0a } /* FIXME: Can overflow here. Cannot be fixed without breaking the API */ return (int)size; 8001b1c: 68bb ldr r3, [r7, #8] } 8001b1e: 4618 mov r0, r3 8001b20: 3714 adds r7, #20 8001b22: 46bd mov sp, r7 8001b24: f85d 7b04 ldr.w r7, [sp], #4 8001b28: 4770 bx lr 08001b2a : static cJSON* get_array_item(const cJSON *array, size_t index) { 8001b2a: b480 push {r7} 8001b2c: b085 sub sp, #20 8001b2e: af00 add r7, sp, #0 8001b30: 6078 str r0, [r7, #4] 8001b32: 6039 str r1, [r7, #0] cJSON *current_child = NULL; 8001b34: 2300 movs r3, #0 8001b36: 60fb str r3, [r7, #12] if (array == NULL) 8001b38: 687b ldr r3, [r7, #4] 8001b3a: 2b00 cmp r3, #0 8001b3c: d101 bne.n 8001b42 { return NULL; 8001b3e: 2300 movs r3, #0 8001b40: e010 b.n 8001b64 } current_child = array->child; 8001b42: 687b ldr r3, [r7, #4] 8001b44: 689b ldr r3, [r3, #8] 8001b46: 60fb str r3, [r7, #12] while ((current_child != NULL) && (index > 0)) 8001b48: e005 b.n 8001b56 { index--; 8001b4a: 683b ldr r3, [r7, #0] 8001b4c: 3b01 subs r3, #1 8001b4e: 603b str r3, [r7, #0] current_child = current_child->next; 8001b50: 68fb ldr r3, [r7, #12] 8001b52: 681b ldr r3, [r3, #0] 8001b54: 60fb str r3, [r7, #12] while ((current_child != NULL) && (index > 0)) 8001b56: 68fb ldr r3, [r7, #12] 8001b58: 2b00 cmp r3, #0 8001b5a: d002 beq.n 8001b62 8001b5c: 683b ldr r3, [r7, #0] 8001b5e: 2b00 cmp r3, #0 8001b60: d1f3 bne.n 8001b4a } return current_child; 8001b62: 68fb ldr r3, [r7, #12] } 8001b64: 4618 mov r0, r3 8001b66: 3714 adds r7, #20 8001b68: 46bd mov sp, r7 8001b6a: f85d 7b04 ldr.w r7, [sp], #4 8001b6e: 4770 bx lr 08001b70 : CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) { 8001b70: b580 push {r7, lr} 8001b72: b082 sub sp, #8 8001b74: af00 add r7, sp, #0 8001b76: 6078 str r0, [r7, #4] 8001b78: 6039 str r1, [r7, #0] if (index < 0) 8001b7a: 683b ldr r3, [r7, #0] 8001b7c: 2b00 cmp r3, #0 8001b7e: da01 bge.n 8001b84 { return NULL; 8001b80: 2300 movs r3, #0 8001b82: e005 b.n 8001b90 } return get_array_item(array, (size_t)index); 8001b84: 683b ldr r3, [r7, #0] 8001b86: 4619 mov r1, r3 8001b88: 6878 ldr r0, [r7, #4] 8001b8a: f7ff ffce bl 8001b2a 8001b8e: 4603 mov r3, r0 } 8001b90: 4618 mov r0, r3 8001b92: 3708 adds r7, #8 8001b94: 46bd mov sp, r7 8001b96: bd80 pop {r7, pc} 08001b98 : static cJSON *get_object_item(const cJSON * const object, const char * const name, const cJSON_bool case_sensitive) { 8001b98: b580 push {r7, lr} 8001b9a: b086 sub sp, #24 8001b9c: af00 add r7, sp, #0 8001b9e: 60f8 str r0, [r7, #12] 8001ba0: 60b9 str r1, [r7, #8] 8001ba2: 607a str r2, [r7, #4] cJSON *current_element = NULL; 8001ba4: 2300 movs r3, #0 8001ba6: 617b str r3, [r7, #20] if ((object == NULL) || (name == NULL)) 8001ba8: 68fb ldr r3, [r7, #12] 8001baa: 2b00 cmp r3, #0 8001bac: d002 beq.n 8001bb4 8001bae: 68bb ldr r3, [r7, #8] 8001bb0: 2b00 cmp r3, #0 8001bb2: d101 bne.n 8001bb8 { return NULL; 8001bb4: 2300 movs r3, #0 8001bb6: e033 b.n 8001c20 } current_element = object->child; 8001bb8: 68fb ldr r3, [r7, #12] 8001bba: 689b ldr r3, [r3, #8] 8001bbc: 617b str r3, [r7, #20] if (case_sensitive) 8001bbe: 687b ldr r3, [r7, #4] 8001bc0: 2b00 cmp r3, #0 8001bc2: d017 beq.n 8001bf4 { while ((current_element != NULL) && (current_element->string != NULL) && (strcmp(name, current_element->string) != 0)) 8001bc4: e002 b.n 8001bcc { current_element = current_element->next; 8001bc6: 697b ldr r3, [r7, #20] 8001bc8: 681b ldr r3, [r3, #0] 8001bca: 617b str r3, [r7, #20] while ((current_element != NULL) && (current_element->string != NULL) && (strcmp(name, current_element->string) != 0)) 8001bcc: 697b ldr r3, [r7, #20] 8001bce: 2b00 cmp r3, #0 8001bd0: d01c beq.n 8001c0c 8001bd2: 697b ldr r3, [r7, #20] 8001bd4: 6a1b ldr r3, [r3, #32] 8001bd6: 2b00 cmp r3, #0 8001bd8: d018 beq.n 8001c0c 8001bda: 697b ldr r3, [r7, #20] 8001bdc: 6a1b ldr r3, [r3, #32] 8001bde: 4619 mov r1, r3 8001be0: 68b8 ldr r0, [r7, #8] 8001be2: f7fe fb7d bl 80002e0 8001be6: 4603 mov r3, r0 8001be8: 2b00 cmp r3, #0 8001bea: d1ec bne.n 8001bc6 8001bec: e00e b.n 8001c0c } else { while ((current_element != NULL) && (case_insensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0)) { current_element = current_element->next; 8001bee: 697b ldr r3, [r7, #20] 8001bf0: 681b ldr r3, [r3, #0] 8001bf2: 617b str r3, [r7, #20] while ((current_element != NULL) && (case_insensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0)) 8001bf4: 697b ldr r3, [r7, #20] 8001bf6: 2b00 cmp r3, #0 8001bf8: d008 beq.n 8001c0c 8001bfa: 697b ldr r3, [r7, #20] 8001bfc: 6a1b ldr r3, [r3, #32] 8001bfe: 4619 mov r1, r3 8001c00: 68b8 ldr r0, [r7, #8] 8001c02: f7fe ff41 bl 8000a88 8001c06: 4603 mov r3, r0 8001c08: 2b00 cmp r3, #0 8001c0a: d1f0 bne.n 8001bee } } if ((current_element == NULL) || (current_element->string == NULL)) { 8001c0c: 697b ldr r3, [r7, #20] 8001c0e: 2b00 cmp r3, #0 8001c10: d003 beq.n 8001c1a 8001c12: 697b ldr r3, [r7, #20] 8001c14: 6a1b ldr r3, [r3, #32] 8001c16: 2b00 cmp r3, #0 8001c18: d101 bne.n 8001c1e return NULL; 8001c1a: 2300 movs r3, #0 8001c1c: e000 b.n 8001c20 } return current_element; 8001c1e: 697b ldr r3, [r7, #20] } 8001c20: 4618 mov r0, r3 8001c22: 3718 adds r7, #24 8001c24: 46bd mov sp, r7 8001c26: bd80 pop {r7, pc} 08001c28 : { return get_object_item(object, string, false); } CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string) { 8001c28: b580 push {r7, lr} 8001c2a: b082 sub sp, #8 8001c2c: af00 add r7, sp, #0 8001c2e: 6078 str r0, [r7, #4] 8001c30: 6039 str r1, [r7, #0] return get_object_item(object, string, true); 8001c32: 2201 movs r2, #1 8001c34: 6839 ldr r1, [r7, #0] 8001c36: 6878 ldr r0, [r7, #4] 8001c38: f7ff ffae bl 8001b98 8001c3c: 4603 mov r3, r0 } 8001c3e: 4618 mov r0, r3 8001c40: 3708 adds r7, #8 8001c42: 46bd mov sp, r7 8001c44: bd80 pop {r7, pc} 08001c46 : return (item->type & 0xFF) == cJSON_NULL; } CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item) { 8001c46: b480 push {r7} 8001c48: b083 sub sp, #12 8001c4a: af00 add r7, sp, #0 8001c4c: 6078 str r0, [r7, #4] if (item == NULL) 8001c4e: 687b ldr r3, [r7, #4] 8001c50: 2b00 cmp r3, #0 8001c52: d101 bne.n 8001c58 { return false; 8001c54: 2300 movs r3, #0 8001c56: e007 b.n 8001c68 } return (item->type & 0xFF) == cJSON_Number; 8001c58: 687b ldr r3, [r7, #4] 8001c5a: 68db ldr r3, [r3, #12] 8001c5c: b2db uxtb r3, r3 8001c5e: 2b08 cmp r3, #8 8001c60: bf0c ite eq 8001c62: 2301 moveq r3, #1 8001c64: 2300 movne r3, #0 8001c66: b2db uxtb r3, r3 } 8001c68: 4618 mov r0, r3 8001c6a: 370c adds r7, #12 8001c6c: 46bd mov sp, r7 8001c6e: f85d 7b04 ldr.w r7, [sp], #4 8001c72: 4770 bx lr 08001c74 : return (item->type & 0xFF) == cJSON_String; } CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item) { 8001c74: b480 push {r7} 8001c76: b083 sub sp, #12 8001c78: af00 add r7, sp, #0 8001c7a: 6078 str r0, [r7, #4] if (item == NULL) 8001c7c: 687b ldr r3, [r7, #4] 8001c7e: 2b00 cmp r3, #0 8001c80: d101 bne.n 8001c86 { return false; 8001c82: 2300 movs r3, #0 8001c84: e007 b.n 8001c96 } return (item->type & 0xFF) == cJSON_Array; 8001c86: 687b ldr r3, [r7, #4] 8001c88: 68db ldr r3, [r3, #12] 8001c8a: b2db uxtb r3, r3 8001c8c: 2b20 cmp r3, #32 8001c8e: bf0c ite eq 8001c90: 2301 moveq r3, #1 8001c92: 2300 movne r3, #0 8001c94: b2db uxtb r3, r3 } 8001c96: 4618 mov r0, r3 8001c98: 370c adds r7, #12 8001c9a: 46bd mov sp, r7 8001c9c: f85d 7b04 ldr.w r7, [sp], #4 8001ca0: 4770 bx lr 08001ca2 : /* Hook prototypes */ void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName); /* USER CODE BEGIN 4 */ void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName) { 8001ca2: b480 push {r7} 8001ca4: b083 sub sp, #12 8001ca6: af00 add r7, sp, #0 8001ca8: 6078 str r0, [r7, #4] 8001caa: 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. */ } 8001cac: bf00 nop 8001cae: 370c adds r7, #12 8001cb0: 46bd mov sp, r7 8001cb2: f85d 7b04 ldr.w r7, [sp], #4 8001cb6: 4770 bx lr 08001cb8 <__NVIC_SystemReset>: /** \brief System Reset \details Initiates a system reset request to reset the MCU. */ __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) { 8001cb8: b480 push {r7} 8001cba: af00 add r7, sp, #0 \details Acts as a special kind of Data Memory Barrier. It completes when all explicit memory accesses before this instruction complete. */ __STATIC_FORCEINLINE void __DSB(void) { __ASM volatile ("dsb 0xF":::"memory"); 8001cbc: f3bf 8f4f dsb sy } 8001cc0: bf00 nop __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 8001cc2: 4b06 ldr r3, [pc, #24] @ (8001cdc <__NVIC_SystemReset+0x24>) 8001cc4: 68db ldr r3, [r3, #12] 8001cc6: f403 62e0 and.w r2, r3, #1792 @ 0x700 SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8001cca: 4904 ldr r1, [pc, #16] @ (8001cdc <__NVIC_SystemReset+0x24>) 8001ccc: 4b04 ldr r3, [pc, #16] @ (8001ce0 <__NVIC_SystemReset+0x28>) 8001cce: 4313 orrs r3, r2 8001cd0: 60cb str r3, [r1, #12] __ASM volatile ("dsb 0xF":::"memory"); 8001cd2: f3bf 8f4f dsb sy } 8001cd6: bf00 nop SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ __DSB(); /* Ensure completion of memory access */ for(;;) /* wait until reset */ { __NOP(); 8001cd8: bf00 nop 8001cda: e7fd b.n 8001cd8 <__NVIC_SystemReset+0x20> 8001cdc: e000ed00 .word 0xe000ed00 8001ce0: 05fa0004 .word 0x05fa0004 08001ce4 <__io_putchar>: //{ // printf("DMA callback\n"); //} int __io_putchar(int ch) { 8001ce4: b580 push {r7, lr} 8001ce6: b082 sub sp, #8 8001ce8: af00 add r7, sp, #0 8001cea: 6078 str r0, [r7, #4] #ifdef UART_TASK_LOGS HAL_UART_Transmit(&huart8, (uint8_t *)&ch, 1, 0xFFFF); // Use UART8 as debug interface 8001cec: 1d39 adds r1, r7, #4 8001cee: f64f 73ff movw r3, #65535 @ 0xffff 8001cf2: 2201 movs r2, #1 8001cf4: 4803 ldr r0, [pc, #12] @ (8001d04 <__io_putchar+0x20>) 8001cf6: f00b fdc5 bl 800d884 // ITM_SendChar(ch); // Use SWV as debug interface #endif return ch; 8001cfa: 687b ldr r3, [r7, #4] } 8001cfc: 4618 mov r0, r3 8001cfe: 3708 adds r7, #8 8001d00: 46bd mov sp, r7 8001d02: bd80 pop {r7, pc} 8001d04: 24000280 .word 0x24000280 08001d08
: /** * @brief The application entry point. * @retval int */ int main(void) { 8001d08: b580 push {r7, lr} 8001d0a: b084 sub sp, #16 8001d0c: af00 add r7, sp, #0 /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/ MPU_Config(); 8001d0e: f000 fc69 bl 80025e4 \details Turns on I-Cache */ __STATIC_FORCEINLINE void SCB_EnableICache (void) { #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001d12: 4b5e ldr r3, [pc, #376] @ (8001e8c ) 8001d14: 695b ldr r3, [r3, #20] 8001d16: f403 3300 and.w r3, r3, #131072 @ 0x20000 8001d1a: 2b00 cmp r3, #0 8001d1c: d11b bne.n 8001d56 __ASM volatile ("dsb 0xF":::"memory"); 8001d1e: f3bf 8f4f dsb sy } 8001d22: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d24: f3bf 8f6f isb sy } 8001d28: bf00 nop __DSB(); __ISB(); SCB->ICIALLU = 0UL; /* invalidate I-Cache */ 8001d2a: 4b58 ldr r3, [pc, #352] @ (8001e8c ) 8001d2c: 2200 movs r2, #0 8001d2e: f8c3 2250 str.w r2, [r3, #592] @ 0x250 __ASM volatile ("dsb 0xF":::"memory"); 8001d32: f3bf 8f4f dsb sy } 8001d36: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d38: f3bf 8f6f isb sy } 8001d3c: bf00 nop __DSB(); __ISB(); SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ 8001d3e: 4b53 ldr r3, [pc, #332] @ (8001e8c ) 8001d40: 695b ldr r3, [r3, #20] 8001d42: 4a52 ldr r2, [pc, #328] @ (8001e8c ) 8001d44: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8001d48: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001d4a: f3bf 8f4f dsb sy } 8001d4e: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d50: f3bf 8f6f isb sy } 8001d54: e000 b.n 8001d58 if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001d56: bf00 nop #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) uint32_t ccsidr; uint32_t sets; uint32_t ways; if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001d58: 4b4c ldr r3, [pc, #304] @ (8001e8c ) 8001d5a: 695b ldr r3, [r3, #20] 8001d5c: f403 3380 and.w r3, r3, #65536 @ 0x10000 8001d60: 2b00 cmp r3, #0 8001d62: d138 bne.n 8001dd6 SCB->CSSELR = 0U; /* select Level 1 data cache */ 8001d64: 4b49 ldr r3, [pc, #292] @ (8001e8c ) 8001d66: 2200 movs r2, #0 8001d68: f8c3 2084 str.w r2, [r3, #132] @ 0x84 __ASM volatile ("dsb 0xF":::"memory"); 8001d6c: f3bf 8f4f dsb sy } 8001d70: bf00 nop __DSB(); ccsidr = SCB->CCSIDR; 8001d72: 4b46 ldr r3, [pc, #280] @ (8001e8c ) 8001d74: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 8001d78: 60fb str r3, [r7, #12] /* invalidate D-Cache */ sets = (uint32_t)(CCSIDR_SETS(ccsidr)); 8001d7a: 68fb ldr r3, [r7, #12] 8001d7c: 0b5b lsrs r3, r3, #13 8001d7e: f3c3 030e ubfx r3, r3, #0, #15 8001d82: 60bb str r3, [r7, #8] do { ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); 8001d84: 68fb ldr r3, [r7, #12] 8001d86: 08db lsrs r3, r3, #3 8001d88: f3c3 0309 ubfx r3, r3, #0, #10 8001d8c: 607b str r3, [r7, #4] do { SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001d8e: 68bb ldr r3, [r7, #8] 8001d90: 015a lsls r2, r3, #5 8001d92: f643 73e0 movw r3, #16352 @ 0x3fe0 8001d96: 4013 ands r3, r2 ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); 8001d98: 687a ldr r2, [r7, #4] 8001d9a: 0792 lsls r2, r2, #30 SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001d9c: 493b ldr r1, [pc, #236] @ (8001e8c ) 8001d9e: 4313 orrs r3, r2 8001da0: f8c1 3260 str.w r3, [r1, #608] @ 0x260 #if defined ( __CC_ARM ) __schedule_barrier(); #endif } while (ways-- != 0U); 8001da4: 687b ldr r3, [r7, #4] 8001da6: 1e5a subs r2, r3, #1 8001da8: 607a str r2, [r7, #4] 8001daa: 2b00 cmp r3, #0 8001dac: d1ef bne.n 8001d8e } while(sets-- != 0U); 8001dae: 68bb ldr r3, [r7, #8] 8001db0: 1e5a subs r2, r3, #1 8001db2: 60ba str r2, [r7, #8] 8001db4: 2b00 cmp r3, #0 8001db6: d1e5 bne.n 8001d84 __ASM volatile ("dsb 0xF":::"memory"); 8001db8: f3bf 8f4f dsb sy } 8001dbc: bf00 nop __DSB(); SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ 8001dbe: 4b33 ldr r3, [pc, #204] @ (8001e8c ) 8001dc0: 695b ldr r3, [r3, #20] 8001dc2: 4a32 ldr r2, [pc, #200] @ (8001e8c ) 8001dc4: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8001dc8: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001dca: f3bf 8f4f dsb sy } 8001dce: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001dd0: f3bf 8f6f isb sy } 8001dd4: e000 b.n 8001dd8 if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001dd6: bf00 nop SCB_EnableDCache(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 8001dd8: f003 fc9a bl 8005710 /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8001ddc: f000 f87a bl 8001ed4 /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 8001de0: f000 fae8 bl 80023b4 MX_DMA_Init(); 8001de4: f000 fabe bl 8002364 MX_UART8_Init(); 8001de8: f000 f930 bl 800204c MX_CRC_Init(); 8001dec: f000 f8ee bl 8001fcc MX_RNG_Init(); 8001df0: f000 f916 bl 8002020 MX_USART1_UART_Init(); 8001df4: f000 f976 bl 80020e4 MX_USART2_UART_Init(); 8001df8: f000 f9c4 bl 8002184 MX_USART3_UART_Init(); 8001dfc: f000 fa12 bl 8002224 MX_USART6_UART_Init(); 8001e00: f000 fa60 bl 80022c4 // HAL_DMA_RegisterCallback(&hdma_uart8_rx, HAL_DMA_XFER_CPLT_CB_ID, dmaCallback); /* USER CODE END 2 */ /* Init scheduler */ osKernelInitialize(); 8001e04: f00f fa36 bl 8011274 /* USER CODE BEGIN RTOS_MUTEX */ /* add mutexes, ... */ resMeasurementsMutex = osMutexNew (NULL); 8001e08: 2000 movs r0, #0 8001e0a: f00f fc42 bl 8011692 8001e0e: 4603 mov r3, r0 8001e10: 4a1f ldr r2, [pc, #124] @ (8001e90 ) 8001e12: 6013 str r3, [r2, #0] sensorsInfoMutex = osMutexNew (NULL); 8001e14: 2000 movs r0, #0 8001e16: f00f fc3c bl 8011692 8001e1a: 4603 mov r3, r0 8001e1c: 4a1d ldr r2, [pc, #116] @ (8001e94 ) 8001e1e: 6013 str r3, [r2, #0] /* add semaphores, ... */ /* USER CODE END RTOS_SEMAPHORES */ /* Create the timer(s) */ /* creation of relay1Timer */ relay1TimerHandle = osTimerNew(relay1TimerCallback, osTimerOnce, NULL, &relay1Timer_attributes); 8001e20: 4b1d ldr r3, [pc, #116] @ (8001e98 ) 8001e22: 2200 movs r2, #0 8001e24: 2100 movs r1, #0 8001e26: 481d ldr r0, [pc, #116] @ (8001e9c ) 8001e28: f00f fb52 bl 80114d0 8001e2c: 4603 mov r3, r0 8001e2e: 4a1c ldr r2, [pc, #112] @ (8001ea0 ) 8001e30: 6013 str r3, [r2, #0] /* creation of relay2Timer */ relay2TimerHandle = osTimerNew(relay2TimerCallback, osTimerOnce, NULL, &relay2Timer_attributes); 8001e32: 4b1c ldr r3, [pc, #112] @ (8001ea4 ) 8001e34: 2200 movs r2, #0 8001e36: 2100 movs r1, #0 8001e38: 481b ldr r0, [pc, #108] @ (8001ea8 ) 8001e3a: f00f fb49 bl 80114d0 8001e3e: 4603 mov r3, r0 8001e40: 4a1a ldr r2, [pc, #104] @ (8001eac ) 8001e42: 6013 str r3, [r2, #0] /* creation of relay3Timer */ relay3TimerHandle = osTimerNew(relay3TimerCallback, osTimerOnce, NULL, &relay3Timer_attributes); 8001e44: 4b1a ldr r3, [pc, #104] @ (8001eb0 ) 8001e46: 2200 movs r2, #0 8001e48: 2100 movs r1, #0 8001e4a: 481a ldr r0, [pc, #104] @ (8001eb4 ) 8001e4c: f00f fb40 bl 80114d0 8001e50: 4603 mov r3, r0 8001e52: 4a19 ldr r2, [pc, #100] @ (8001eb8 ) 8001e54: 6013 str r3, [r2, #0] /* creation of relay4Timer */ relay4TimerHandle = osTimerNew(relay4TimerCallback, osTimerOnce, NULL, &relay4Timer_attributes); 8001e56: 4b19 ldr r3, [pc, #100] @ (8001ebc ) 8001e58: 2200 movs r2, #0 8001e5a: 2100 movs r1, #0 8001e5c: 4818 ldr r0, [pc, #96] @ (8001ec0 ) 8001e5e: f00f fb37 bl 80114d0 8001e62: 4603 mov r3, r0 8001e64: 4a17 ldr r2, [pc, #92] @ (8001ec4 ) 8001e66: 6013 str r3, [r2, #0] /* add queues, ... */ /* USER CODE END RTOS_QUEUES */ /* Create the thread(s) */ /* creation of defaultTask */ defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes); 8001e68: 4a17 ldr r2, [pc, #92] @ (8001ec8 ) 8001e6a: 2100 movs r1, #0 8001e6c: 4817 ldr r0, [pc, #92] @ (8001ecc ) 8001e6e: f00f fa60 bl 8011332 8001e72: 4603 mov r3, r0 8001e74: 4a16 ldr r2, [pc, #88] @ (8001ed0 ) 8001e76: 6013 str r3, [r2, #0] /* USER CODE BEGIN RTOS_THREADS */ /* add threads, ... */ mqtt_cli_init(); 8001e78: f001 fbb2 bl 80035e0 // Uart8TasksInit(); UartTasksInit(); 8001e7c: f002 fad8 bl 8004430 #ifdef USER_MOCKS MockMeasurmetsTaskInit(); #else MeasurmentsReqSchedulerTaskInit(); 8001e80: f003 fa8c bl 800539c /* USER CODE BEGIN RTOS_EVENTS */ /* add events, ... */ /* USER CODE END RTOS_EVENTS */ /* Start scheduler */ osKernelStart(); 8001e84: f00f fa1a bl 80112bc /* We should never get here as control is now taken by the scheduler */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) 8001e88: bf00 nop 8001e8a: e7fd b.n 8001e88 8001e8c: e000ed00 .word 0xe000ed00 8001e90: 24002248 .word 0x24002248 8001e94: 2400224c .word 0x2400224c 8001e98: 080319b4 .word 0x080319b4 8001e9c: 08002565 .word 0x08002565 8001ea0: 24000658 .word 0x24000658 8001ea4: 080319c4 .word 0x080319c4 8001ea8: 08002585 .word 0x08002585 8001eac: 24000688 .word 0x24000688 8001eb0: 080319d4 .word 0x080319d4 8001eb4: 080025a5 .word 0x080025a5 8001eb8: 240006b8 .word 0x240006b8 8001ebc: 080319e4 .word 0x080319e4 8001ec0: 080025c5 .word 0x080025c5 8001ec4: 240006e8 .word 0x240006e8 8001ec8: 08031990 .word 0x08031990 8001ecc: 0800254d .word 0x0800254d 8001ed0: 24000654 .word 0x24000654 08001ed4 : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8001ed4: b580 push {r7, lr} 8001ed6: b09c sub sp, #112 @ 0x70 8001ed8: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8001eda: f107 0324 add.w r3, r7, #36 @ 0x24 8001ede: 224c movs r2, #76 @ 0x4c 8001ee0: 2100 movs r1, #0 8001ee2: 4618 mov r0, r3 8001ee4: f028 fe54 bl 802ab90 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8001ee8: 1d3b adds r3, r7, #4 8001eea: 2220 movs r2, #32 8001eec: 2100 movs r1, #0 8001eee: 4618 mov r0, r3 8001ef0: f028 fe4e bl 802ab90 /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); 8001ef4: 2002 movs r0, #2 8001ef6: f008 f9f7 bl 800a2e8 /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); 8001efa: 2300 movs r3, #0 8001efc: 603b str r3, [r7, #0] 8001efe: 4b31 ldr r3, [pc, #196] @ (8001fc4 ) 8001f00: 6adb ldr r3, [r3, #44] @ 0x2c 8001f02: 4a30 ldr r2, [pc, #192] @ (8001fc4 ) 8001f04: f023 0301 bic.w r3, r3, #1 8001f08: 62d3 str r3, [r2, #44] @ 0x2c 8001f0a: 4b2e ldr r3, [pc, #184] @ (8001fc4 ) 8001f0c: 6adb ldr r3, [r3, #44] @ 0x2c 8001f0e: f003 0301 and.w r3, r3, #1 8001f12: 603b str r3, [r7, #0] 8001f14: 4b2c ldr r3, [pc, #176] @ (8001fc8 ) 8001f16: 699b ldr r3, [r3, #24] 8001f18: 4a2b ldr r2, [pc, #172] @ (8001fc8 ) 8001f1a: f443 4340 orr.w r3, r3, #49152 @ 0xc000 8001f1e: 6193 str r3, [r2, #24] 8001f20: 4b29 ldr r3, [pc, #164] @ (8001fc8 ) 8001f22: 699b ldr r3, [r3, #24] 8001f24: f403 4340 and.w r3, r3, #49152 @ 0xc000 8001f28: 603b str r3, [r7, #0] 8001f2a: 683b ldr r3, [r7, #0] while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} 8001f2c: bf00 nop 8001f2e: 4b26 ldr r3, [pc, #152] @ (8001fc8 ) 8001f30: 699b ldr r3, [r3, #24] 8001f32: f403 5300 and.w r3, r3, #8192 @ 0x2000 8001f36: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 8001f3a: d1f8 bne.n 8001f2e /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSE; 8001f3c: 2321 movs r3, #33 @ 0x21 8001f3e: 627b str r3, [r7, #36] @ 0x24 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 8001f40: f44f 3380 mov.w r3, #65536 @ 0x10000 8001f44: 62bb str r3, [r7, #40] @ 0x28 RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 8001f46: 2301 movs r3, #1 8001f48: 63fb str r3, [r7, #60] @ 0x3c RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 8001f4a: 2302 movs r3, #2 8001f4c: 64bb str r3, [r7, #72] @ 0x48 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 8001f4e: 2302 movs r3, #2 8001f50: 64fb str r3, [r7, #76] @ 0x4c RCC_OscInitStruct.PLL.PLLM = 5; 8001f52: 2305 movs r3, #5 8001f54: 653b str r3, [r7, #80] @ 0x50 RCC_OscInitStruct.PLL.PLLN = 160; 8001f56: 23a0 movs r3, #160 @ 0xa0 8001f58: 657b str r3, [r7, #84] @ 0x54 RCC_OscInitStruct.PLL.PLLP = 2; 8001f5a: 2302 movs r3, #2 8001f5c: 65bb str r3, [r7, #88] @ 0x58 RCC_OscInitStruct.PLL.PLLQ = 2; 8001f5e: 2302 movs r3, #2 8001f60: 65fb str r3, [r7, #92] @ 0x5c RCC_OscInitStruct.PLL.PLLR = 2; 8001f62: 2302 movs r3, #2 8001f64: 663b str r3, [r7, #96] @ 0x60 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; 8001f66: 2308 movs r3, #8 8001f68: 667b str r3, [r7, #100] @ 0x64 RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; 8001f6a: 2300 movs r3, #0 8001f6c: 66bb str r3, [r7, #104] @ 0x68 RCC_OscInitStruct.PLL.PLLFRACN = 0; 8001f6e: 2300 movs r3, #0 8001f70: 66fb str r3, [r7, #108] @ 0x6c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 8001f72: f107 0324 add.w r3, r7, #36 @ 0x24 8001f76: 4618 mov r0, r3 8001f78: f008 fa76 bl 800a468 8001f7c: 4603 mov r3, r0 8001f7e: 2b00 cmp r3, #0 8001f80: d001 beq.n 8001f86 { Error_Handler(); 8001f82: f000 fb9f bl 80026c4 } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 8001f86: 233f movs r3, #63 @ 0x3f 8001f88: 607b str r3, [r7, #4] |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 |RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 8001f8a: 2303 movs r3, #3 8001f8c: 60bb str r3, [r7, #8] RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; 8001f8e: 2300 movs r3, #0 8001f90: 60fb str r3, [r7, #12] RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; 8001f92: 2308 movs r3, #8 8001f94: 613b str r3, [r7, #16] RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; 8001f96: 2340 movs r3, #64 @ 0x40 8001f98: 617b str r3, [r7, #20] RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; 8001f9a: 2340 movs r3, #64 @ 0x40 8001f9c: 61bb str r3, [r7, #24] RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; 8001f9e: f44f 6380 mov.w r3, #1024 @ 0x400 8001fa2: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; 8001fa4: 2340 movs r3, #64 @ 0x40 8001fa6: 623b str r3, [r7, #32] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) 8001fa8: 1d3b adds r3, r7, #4 8001faa: 2102 movs r1, #2 8001fac: 4618 mov r0, r3 8001fae: f008 feb5 bl 800ad1c 8001fb2: 4603 mov r3, r0 8001fb4: 2b00 cmp r3, #0 8001fb6: d001 beq.n 8001fbc { Error_Handler(); 8001fb8: f000 fb84 bl 80026c4 } } 8001fbc: bf00 nop 8001fbe: 3770 adds r7, #112 @ 0x70 8001fc0: 46bd mov sp, r7 8001fc2: bd80 pop {r7, pc} 8001fc4: 58000400 .word 0x58000400 8001fc8: 58024800 .word 0x58024800 08001fcc : * @brief CRC Initialization Function * @param None * @retval None */ static void MX_CRC_Init(void) { 8001fcc: b580 push {r7, lr} 8001fce: 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; 8001fd0: 4b11 ldr r3, [pc, #68] @ (8002018 ) 8001fd2: 4a12 ldr r2, [pc, #72] @ (800201c ) 8001fd4: 601a str r2, [r3, #0] hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_DISABLE; 8001fd6: 4b10 ldr r3, [pc, #64] @ (8002018 ) 8001fd8: 2201 movs r2, #1 8001fda: 711a strb r2, [r3, #4] hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE; 8001fdc: 4b0e ldr r3, [pc, #56] @ (8002018 ) 8001fde: 2200 movs r2, #0 8001fe0: 715a strb r2, [r3, #5] hcrc.Init.GeneratingPolynomial = 4129; 8001fe2: 4b0d ldr r3, [pc, #52] @ (8002018 ) 8001fe4: f241 0221 movw r2, #4129 @ 0x1021 8001fe8: 609a str r2, [r3, #8] hcrc.Init.CRCLength = CRC_POLYLENGTH_16B; 8001fea: 4b0b ldr r3, [pc, #44] @ (8002018 ) 8001fec: 2208 movs r2, #8 8001fee: 60da str r2, [r3, #12] hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE; 8001ff0: 4b09 ldr r3, [pc, #36] @ (8002018 ) 8001ff2: 2200 movs r2, #0 8001ff4: 615a str r2, [r3, #20] hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE; 8001ff6: 4b08 ldr r3, [pc, #32] @ (8002018 ) 8001ff8: 2200 movs r2, #0 8001ffa: 619a str r2, [r3, #24] hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES; 8001ffc: 4b06 ldr r3, [pc, #24] @ (8002018 ) 8001ffe: 2201 movs r2, #1 8002000: 621a str r2, [r3, #32] if (HAL_CRC_Init(&hcrc) != HAL_OK) 8002002: 4805 ldr r0, [pc, #20] @ (8002018 ) 8002004: f003 fd7c bl 8005b00 8002008: 4603 mov r3, r0 800200a: 2b00 cmp r3, #0 800200c: d001 beq.n 8002012 { Error_Handler(); 800200e: f000 fb59 bl 80026c4 } /* USER CODE BEGIN CRC_Init 2 */ /* USER CODE END CRC_Init 2 */ } 8002012: bf00 nop 8002014: bd80 pop {r7, pc} 8002016: bf00 nop 8002018: 24000248 .word 0x24000248 800201c: 58024c00 .word 0x58024c00 08002020 : * @brief RNG Initialization Function * @param None * @retval None */ static void MX_RNG_Init(void) { 8002020: b580 push {r7, lr} 8002022: 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; 8002024: 4b07 ldr r3, [pc, #28] @ (8002044 ) 8002026: 4a08 ldr r2, [pc, #32] @ (8002048 ) 8002028: 601a str r2, [r3, #0] hrng.Init.ClockErrorDetection = RNG_CED_ENABLE; 800202a: 4b06 ldr r3, [pc, #24] @ (8002044 ) 800202c: 2200 movs r2, #0 800202e: 605a str r2, [r3, #4] if (HAL_RNG_Init(&hrng) != HAL_OK) 8002030: 4804 ldr r0, [pc, #16] @ (8002044 ) 8002032: f00b f851 bl 800d0d8 8002036: 4603 mov r3, r0 8002038: 2b00 cmp r3, #0 800203a: d001 beq.n 8002040 { Error_Handler(); 800203c: f000 fb42 bl 80026c4 } /* USER CODE BEGIN RNG_Init 2 */ /* USER CODE END RNG_Init 2 */ } 8002040: bf00 nop 8002042: bd80 pop {r7, pc} 8002044: 2400026c .word 0x2400026c 8002048: 48021800 .word 0x48021800 0800204c : * @brief UART8 Initialization Function * @param None * @retval None */ static void MX_UART8_Init(void) { 800204c: b580 push {r7, lr} 800204e: af00 add r7, sp, #0 /* USER CODE END UART8_Init 0 */ /* USER CODE BEGIN UART8_Init 1 */ /* USER CODE END UART8_Init 1 */ huart8.Instance = UART8; 8002050: 4b22 ldr r3, [pc, #136] @ (80020dc ) 8002052: 4a23 ldr r2, [pc, #140] @ (80020e0 ) 8002054: 601a str r2, [r3, #0] huart8.Init.BaudRate = 115200; 8002056: 4b21 ldr r3, [pc, #132] @ (80020dc ) 8002058: f44f 32e1 mov.w r2, #115200 @ 0x1c200 800205c: 605a str r2, [r3, #4] huart8.Init.WordLength = UART_WORDLENGTH_8B; 800205e: 4b1f ldr r3, [pc, #124] @ (80020dc ) 8002060: 2200 movs r2, #0 8002062: 609a str r2, [r3, #8] huart8.Init.StopBits = UART_STOPBITS_1; 8002064: 4b1d ldr r3, [pc, #116] @ (80020dc ) 8002066: 2200 movs r2, #0 8002068: 60da str r2, [r3, #12] huart8.Init.Parity = UART_PARITY_NONE; 800206a: 4b1c ldr r3, [pc, #112] @ (80020dc ) 800206c: 2200 movs r2, #0 800206e: 611a str r2, [r3, #16] huart8.Init.Mode = UART_MODE_TX_RX; 8002070: 4b1a ldr r3, [pc, #104] @ (80020dc ) 8002072: 220c movs r2, #12 8002074: 615a str r2, [r3, #20] huart8.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002076: 4b19 ldr r3, [pc, #100] @ (80020dc ) 8002078: 2200 movs r2, #0 800207a: 619a str r2, [r3, #24] huart8.Init.OverSampling = UART_OVERSAMPLING_16; 800207c: 4b17 ldr r3, [pc, #92] @ (80020dc ) 800207e: 2200 movs r2, #0 8002080: 61da str r2, [r3, #28] huart8.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8002082: 4b16 ldr r3, [pc, #88] @ (80020dc ) 8002084: 2200 movs r2, #0 8002086: 621a str r2, [r3, #32] huart8.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002088: 4b14 ldr r3, [pc, #80] @ (80020dc ) 800208a: 2200 movs r2, #0 800208c: 625a str r2, [r3, #36] @ 0x24 huart8.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; 800208e: 4b13 ldr r3, [pc, #76] @ (80020dc ) 8002090: 2200 movs r2, #0 8002092: 629a str r2, [r3, #40] @ 0x28 if (HAL_UART_Init(&huart8) != HAL_OK) 8002094: 4811 ldr r0, [pc, #68] @ (80020dc ) 8002096: f00b fba5 bl 800d7e4 800209a: 4603 mov r3, r0 800209c: 2b00 cmp r3, #0 800209e: d001 beq.n 80020a4 { Error_Handler(); 80020a0: f000 fb10 bl 80026c4 } if (HAL_UARTEx_SetTxFifoThreshold(&huart8, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 80020a4: 2100 movs r1, #0 80020a6: 480d ldr r0, [pc, #52] @ (80020dc ) 80020a8: f00e f8d3 bl 8010252 80020ac: 4603 mov r3, r0 80020ae: 2b00 cmp r3, #0 80020b0: d001 beq.n 80020b6 { Error_Handler(); 80020b2: f000 fb07 bl 80026c4 } if (HAL_UARTEx_SetRxFifoThreshold(&huart8, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 80020b6: 2100 movs r1, #0 80020b8: 4808 ldr r0, [pc, #32] @ (80020dc ) 80020ba: f00e f908 bl 80102ce 80020be: 4603 mov r3, r0 80020c0: 2b00 cmp r3, #0 80020c2: d001 beq.n 80020c8 { Error_Handler(); 80020c4: f000 fafe bl 80026c4 } if (HAL_UARTEx_DisableFifoMode(&huart8) != HAL_OK) 80020c8: 4804 ldr r0, [pc, #16] @ (80020dc ) 80020ca: f00e f889 bl 80101e0 80020ce: 4603 mov r3, r0 80020d0: 2b00 cmp r3, #0 80020d2: d001 beq.n 80020d8 { Error_Handler(); 80020d4: f000 faf6 bl 80026c4 } /* USER CODE BEGIN UART8_Init 2 */ /* USER CODE END UART8_Init 2 */ } 80020d8: bf00 nop 80020da: bd80 pop {r7, pc} 80020dc: 24000280 .word 0x24000280 80020e0: 40007c00 .word 0x40007c00 080020e4 : * @brief USART1 Initialization Function * @param None * @retval None */ static void MX_USART1_UART_Init(void) { 80020e4: b580 push {r7, lr} 80020e6: 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; 80020e8: 4b24 ldr r3, [pc, #144] @ (800217c ) 80020ea: 4a25 ldr r2, [pc, #148] @ (8002180 ) 80020ec: 601a str r2, [r3, #0] huart1.Init.BaudRate = 115200; 80020ee: 4b23 ldr r3, [pc, #140] @ (800217c ) 80020f0: f44f 32e1 mov.w r2, #115200 @ 0x1c200 80020f4: 605a str r2, [r3, #4] huart1.Init.WordLength = UART_WORDLENGTH_8B; 80020f6: 4b21 ldr r3, [pc, #132] @ (800217c ) 80020f8: 2200 movs r2, #0 80020fa: 609a str r2, [r3, #8] huart1.Init.StopBits = UART_STOPBITS_1; 80020fc: 4b1f ldr r3, [pc, #124] @ (800217c ) 80020fe: 2200 movs r2, #0 8002100: 60da str r2, [r3, #12] huart1.Init.Parity = UART_PARITY_NONE; 8002102: 4b1e ldr r3, [pc, #120] @ (800217c ) 8002104: 2200 movs r2, #0 8002106: 611a str r2, [r3, #16] huart1.Init.Mode = UART_MODE_TX_RX; 8002108: 4b1c ldr r3, [pc, #112] @ (800217c ) 800210a: 220c movs r2, #12 800210c: 615a str r2, [r3, #20] huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; 800210e: 4b1b ldr r3, [pc, #108] @ (800217c ) 8002110: 2200 movs r2, #0 8002112: 619a str r2, [r3, #24] huart1.Init.OverSampling = UART_OVERSAMPLING_16; 8002114: 4b19 ldr r3, [pc, #100] @ (800217c ) 8002116: 2200 movs r2, #0 8002118: 61da str r2, [r3, #28] huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 800211a: 4b18 ldr r3, [pc, #96] @ (800217c ) 800211c: 2200 movs r2, #0 800211e: 621a str r2, [r3, #32] huart1.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002120: 4b16 ldr r3, [pc, #88] @ (800217c ) 8002122: 2200 movs r2, #0 8002124: 625a str r2, [r3, #36] @ 0x24 huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 8002126: 4b15 ldr r3, [pc, #84] @ (800217c ) 8002128: 2201 movs r2, #1 800212a: 629a str r2, [r3, #40] @ 0x28 huart1.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 800212c: 4b13 ldr r3, [pc, #76] @ (800217c ) 800212e: f44f 3200 mov.w r2, #131072 @ 0x20000 8002132: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart1) != HAL_OK) 8002134: 4811 ldr r0, [pc, #68] @ (800217c ) 8002136: f00b fb55 bl 800d7e4 800213a: 4603 mov r3, r0 800213c: 2b00 cmp r3, #0 800213e: d001 beq.n 8002144 { Error_Handler(); 8002140: f000 fac0 bl 80026c4 } if (HAL_UARTEx_SetTxFifoThreshold(&huart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002144: 2100 movs r1, #0 8002146: 480d ldr r0, [pc, #52] @ (800217c ) 8002148: f00e f883 bl 8010252 800214c: 4603 mov r3, r0 800214e: 2b00 cmp r3, #0 8002150: d001 beq.n 8002156 { Error_Handler(); 8002152: f000 fab7 bl 80026c4 } if (HAL_UARTEx_SetRxFifoThreshold(&huart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 8002156: 2100 movs r1, #0 8002158: 4808 ldr r0, [pc, #32] @ (800217c ) 800215a: f00e f8b8 bl 80102ce 800215e: 4603 mov r3, r0 8002160: 2b00 cmp r3, #0 8002162: d001 beq.n 8002168 { Error_Handler(); 8002164: f000 faae bl 80026c4 } if (HAL_UARTEx_DisableFifoMode(&huart1) != HAL_OK) 8002168: 4804 ldr r0, [pc, #16] @ (800217c ) 800216a: f00e f839 bl 80101e0 800216e: 4603 mov r3, r0 8002170: 2b00 cmp r3, #0 8002172: d001 beq.n 8002178 { Error_Handler(); 8002174: f000 faa6 bl 80026c4 } /* USER CODE BEGIN USART1_Init 2 */ /* USER CODE END USART1_Init 2 */ } 8002178: bf00 nop 800217a: bd80 pop {r7, pc} 800217c: 24000314 .word 0x24000314 8002180: 40011000 .word 0x40011000 08002184 : * @brief USART2 Initialization Function * @param None * @retval None */ static void MX_USART2_UART_Init(void) { 8002184: b580 push {r7, lr} 8002186: af00 add r7, sp, #0 /* USER CODE END USART2_Init 0 */ /* USER CODE BEGIN USART2_Init 1 */ /* USER CODE END USART2_Init 1 */ huart2.Instance = USART2; 8002188: 4b24 ldr r3, [pc, #144] @ (800221c ) 800218a: 4a25 ldr r2, [pc, #148] @ (8002220 ) 800218c: 601a str r2, [r3, #0] huart2.Init.BaudRate = 115200; 800218e: 4b23 ldr r3, [pc, #140] @ (800221c ) 8002190: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8002194: 605a str r2, [r3, #4] huart2.Init.WordLength = UART_WORDLENGTH_8B; 8002196: 4b21 ldr r3, [pc, #132] @ (800221c ) 8002198: 2200 movs r2, #0 800219a: 609a str r2, [r3, #8] huart2.Init.StopBits = UART_STOPBITS_1; 800219c: 4b1f ldr r3, [pc, #124] @ (800221c ) 800219e: 2200 movs r2, #0 80021a0: 60da str r2, [r3, #12] huart2.Init.Parity = UART_PARITY_NONE; 80021a2: 4b1e ldr r3, [pc, #120] @ (800221c ) 80021a4: 2200 movs r2, #0 80021a6: 611a str r2, [r3, #16] huart2.Init.Mode = UART_MODE_TX_RX; 80021a8: 4b1c ldr r3, [pc, #112] @ (800221c ) 80021aa: 220c movs r2, #12 80021ac: 615a str r2, [r3, #20] huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; 80021ae: 4b1b ldr r3, [pc, #108] @ (800221c ) 80021b0: 2200 movs r2, #0 80021b2: 619a str r2, [r3, #24] huart2.Init.OverSampling = UART_OVERSAMPLING_16; 80021b4: 4b19 ldr r3, [pc, #100] @ (800221c ) 80021b6: 2200 movs r2, #0 80021b8: 61da str r2, [r3, #28] huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 80021ba: 4b18 ldr r3, [pc, #96] @ (800221c ) 80021bc: 2200 movs r2, #0 80021be: 621a str r2, [r3, #32] huart2.Init.ClockPrescaler = UART_PRESCALER_DIV1; 80021c0: 4b16 ldr r3, [pc, #88] @ (800221c ) 80021c2: 2200 movs r2, #0 80021c4: 625a str r2, [r3, #36] @ 0x24 huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 80021c6: 4b15 ldr r3, [pc, #84] @ (800221c ) 80021c8: 2201 movs r2, #1 80021ca: 629a str r2, [r3, #40] @ 0x28 huart2.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 80021cc: 4b13 ldr r3, [pc, #76] @ (800221c ) 80021ce: f44f 3200 mov.w r2, #131072 @ 0x20000 80021d2: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart2) != HAL_OK) 80021d4: 4811 ldr r0, [pc, #68] @ (800221c ) 80021d6: f00b fb05 bl 800d7e4 80021da: 4603 mov r3, r0 80021dc: 2b00 cmp r3, #0 80021de: d001 beq.n 80021e4 { Error_Handler(); 80021e0: f000 fa70 bl 80026c4 } if (HAL_UARTEx_SetTxFifoThreshold(&huart2, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 80021e4: 2100 movs r1, #0 80021e6: 480d ldr r0, [pc, #52] @ (800221c ) 80021e8: f00e f833 bl 8010252 80021ec: 4603 mov r3, r0 80021ee: 2b00 cmp r3, #0 80021f0: d001 beq.n 80021f6 { Error_Handler(); 80021f2: f000 fa67 bl 80026c4 } if (HAL_UARTEx_SetRxFifoThreshold(&huart2, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 80021f6: 2100 movs r1, #0 80021f8: 4808 ldr r0, [pc, #32] @ (800221c ) 80021fa: f00e f868 bl 80102ce 80021fe: 4603 mov r3, r0 8002200: 2b00 cmp r3, #0 8002202: d001 beq.n 8002208 { Error_Handler(); 8002204: f000 fa5e bl 80026c4 } if (HAL_UARTEx_DisableFifoMode(&huart2) != HAL_OK) 8002208: 4804 ldr r0, [pc, #16] @ (800221c ) 800220a: f00d ffe9 bl 80101e0 800220e: 4603 mov r3, r0 8002210: 2b00 cmp r3, #0 8002212: d001 beq.n 8002218 { Error_Handler(); 8002214: f000 fa56 bl 80026c4 } /* USER CODE BEGIN USART2_Init 2 */ /* USER CODE END USART2_Init 2 */ } 8002218: bf00 nop 800221a: bd80 pop {r7, pc} 800221c: 240003a8 .word 0x240003a8 8002220: 40004400 .word 0x40004400 08002224 : * @brief USART3 Initialization Function * @param None * @retval None */ static void MX_USART3_UART_Init(void) { 8002224: b580 push {r7, lr} 8002226: af00 add r7, sp, #0 /* USER CODE END USART3_Init 0 */ /* USER CODE BEGIN USART3_Init 1 */ /* USER CODE END USART3_Init 1 */ huart3.Instance = USART3; 8002228: 4b24 ldr r3, [pc, #144] @ (80022bc ) 800222a: 4a25 ldr r2, [pc, #148] @ (80022c0 ) 800222c: 601a str r2, [r3, #0] huart3.Init.BaudRate = 115200; 800222e: 4b23 ldr r3, [pc, #140] @ (80022bc ) 8002230: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8002234: 605a str r2, [r3, #4] huart3.Init.WordLength = UART_WORDLENGTH_8B; 8002236: 4b21 ldr r3, [pc, #132] @ (80022bc ) 8002238: 2200 movs r2, #0 800223a: 609a str r2, [r3, #8] huart3.Init.StopBits = UART_STOPBITS_1; 800223c: 4b1f ldr r3, [pc, #124] @ (80022bc ) 800223e: 2200 movs r2, #0 8002240: 60da str r2, [r3, #12] huart3.Init.Parity = UART_PARITY_NONE; 8002242: 4b1e ldr r3, [pc, #120] @ (80022bc ) 8002244: 2200 movs r2, #0 8002246: 611a str r2, [r3, #16] huart3.Init.Mode = UART_MODE_TX_RX; 8002248: 4b1c ldr r3, [pc, #112] @ (80022bc ) 800224a: 220c movs r2, #12 800224c: 615a str r2, [r3, #20] huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; 800224e: 4b1b ldr r3, [pc, #108] @ (80022bc ) 8002250: 2200 movs r2, #0 8002252: 619a str r2, [r3, #24] huart3.Init.OverSampling = UART_OVERSAMPLING_16; 8002254: 4b19 ldr r3, [pc, #100] @ (80022bc ) 8002256: 2200 movs r2, #0 8002258: 61da str r2, [r3, #28] huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 800225a: 4b18 ldr r3, [pc, #96] @ (80022bc ) 800225c: 2200 movs r2, #0 800225e: 621a str r2, [r3, #32] huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002260: 4b16 ldr r3, [pc, #88] @ (80022bc ) 8002262: 2200 movs r2, #0 8002264: 625a str r2, [r3, #36] @ 0x24 huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 8002266: 4b15 ldr r3, [pc, #84] @ (80022bc ) 8002268: 2201 movs r2, #1 800226a: 629a str r2, [r3, #40] @ 0x28 huart3.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 800226c: 4b13 ldr r3, [pc, #76] @ (80022bc ) 800226e: f44f 3200 mov.w r2, #131072 @ 0x20000 8002272: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart3) != HAL_OK) 8002274: 4811 ldr r0, [pc, #68] @ (80022bc ) 8002276: f00b fab5 bl 800d7e4 800227a: 4603 mov r3, r0 800227c: 2b00 cmp r3, #0 800227e: d001 beq.n 8002284 { Error_Handler(); 8002280: f000 fa20 bl 80026c4 } if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002284: 2100 movs r1, #0 8002286: 480d ldr r0, [pc, #52] @ (80022bc ) 8002288: f00d ffe3 bl 8010252 800228c: 4603 mov r3, r0 800228e: 2b00 cmp r3, #0 8002290: d001 beq.n 8002296 { Error_Handler(); 8002292: f000 fa17 bl 80026c4 } if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 8002296: 2100 movs r1, #0 8002298: 4808 ldr r0, [pc, #32] @ (80022bc ) 800229a: f00e f818 bl 80102ce 800229e: 4603 mov r3, r0 80022a0: 2b00 cmp r3, #0 80022a2: d001 beq.n 80022a8 { Error_Handler(); 80022a4: f000 fa0e bl 80026c4 } if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK) 80022a8: 4804 ldr r0, [pc, #16] @ (80022bc ) 80022aa: f00d ff99 bl 80101e0 80022ae: 4603 mov r3, r0 80022b0: 2b00 cmp r3, #0 80022b2: d001 beq.n 80022b8 { Error_Handler(); 80022b4: f000 fa06 bl 80026c4 } /* USER CODE BEGIN USART3_Init 2 */ /* USER CODE END USART3_Init 2 */ } 80022b8: bf00 nop 80022ba: bd80 pop {r7, pc} 80022bc: 2400043c .word 0x2400043c 80022c0: 40004800 .word 0x40004800 080022c4 : * @brief USART6 Initialization Function * @param None * @retval None */ static void MX_USART6_UART_Init(void) { 80022c4: b580 push {r7, lr} 80022c6: 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; 80022c8: 4b24 ldr r3, [pc, #144] @ (800235c ) 80022ca: 4a25 ldr r2, [pc, #148] @ (8002360 ) 80022cc: 601a str r2, [r3, #0] huart6.Init.BaudRate = 115200; 80022ce: 4b23 ldr r3, [pc, #140] @ (800235c ) 80022d0: f44f 32e1 mov.w r2, #115200 @ 0x1c200 80022d4: 605a str r2, [r3, #4] huart6.Init.WordLength = UART_WORDLENGTH_8B; 80022d6: 4b21 ldr r3, [pc, #132] @ (800235c ) 80022d8: 2200 movs r2, #0 80022da: 609a str r2, [r3, #8] huart6.Init.StopBits = UART_STOPBITS_1; 80022dc: 4b1f ldr r3, [pc, #124] @ (800235c ) 80022de: 2200 movs r2, #0 80022e0: 60da str r2, [r3, #12] huart6.Init.Parity = UART_PARITY_NONE; 80022e2: 4b1e ldr r3, [pc, #120] @ (800235c ) 80022e4: 2200 movs r2, #0 80022e6: 611a str r2, [r3, #16] huart6.Init.Mode = UART_MODE_TX_RX; 80022e8: 4b1c ldr r3, [pc, #112] @ (800235c ) 80022ea: 220c movs r2, #12 80022ec: 615a str r2, [r3, #20] huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE; 80022ee: 4b1b ldr r3, [pc, #108] @ (800235c ) 80022f0: 2200 movs r2, #0 80022f2: 619a str r2, [r3, #24] huart6.Init.OverSampling = UART_OVERSAMPLING_16; 80022f4: 4b19 ldr r3, [pc, #100] @ (800235c ) 80022f6: 2200 movs r2, #0 80022f8: 61da str r2, [r3, #28] huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 80022fa: 4b18 ldr r3, [pc, #96] @ (800235c ) 80022fc: 2200 movs r2, #0 80022fe: 621a str r2, [r3, #32] huart6.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002300: 4b16 ldr r3, [pc, #88] @ (800235c ) 8002302: 2200 movs r2, #0 8002304: 625a str r2, [r3, #36] @ 0x24 huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 8002306: 4b15 ldr r3, [pc, #84] @ (800235c ) 8002308: 2201 movs r2, #1 800230a: 629a str r2, [r3, #40] @ 0x28 huart6.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 800230c: 4b13 ldr r3, [pc, #76] @ (800235c ) 800230e: f44f 3200 mov.w r2, #131072 @ 0x20000 8002312: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart6) != HAL_OK) 8002314: 4811 ldr r0, [pc, #68] @ (800235c ) 8002316: f00b fa65 bl 800d7e4 800231a: 4603 mov r3, r0 800231c: 2b00 cmp r3, #0 800231e: d001 beq.n 8002324 { Error_Handler(); 8002320: f000 f9d0 bl 80026c4 } if (HAL_UARTEx_SetTxFifoThreshold(&huart6, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002324: 2100 movs r1, #0 8002326: 480d ldr r0, [pc, #52] @ (800235c ) 8002328: f00d ff93 bl 8010252 800232c: 4603 mov r3, r0 800232e: 2b00 cmp r3, #0 8002330: d001 beq.n 8002336 { Error_Handler(); 8002332: f000 f9c7 bl 80026c4 } if (HAL_UARTEx_SetRxFifoThreshold(&huart6, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 8002336: 2100 movs r1, #0 8002338: 4808 ldr r0, [pc, #32] @ (800235c ) 800233a: f00d ffc8 bl 80102ce 800233e: 4603 mov r3, r0 8002340: 2b00 cmp r3, #0 8002342: d001 beq.n 8002348 { Error_Handler(); 8002344: f000 f9be bl 80026c4 } if (HAL_UARTEx_DisableFifoMode(&huart6) != HAL_OK) 8002348: 4804 ldr r0, [pc, #16] @ (800235c ) 800234a: f00d ff49 bl 80101e0 800234e: 4603 mov r3, r0 8002350: 2b00 cmp r3, #0 8002352: d001 beq.n 8002358 { Error_Handler(); 8002354: f000 f9b6 bl 80026c4 } /* USER CODE BEGIN USART6_Init 2 */ /* USER CODE END USART6_Init 2 */ } 8002358: bf00 nop 800235a: bd80 pop {r7, pc} 800235c: 240004d0 .word 0x240004d0 8002360: 40011400 .word 0x40011400 08002364 : /** * Enable DMA controller clock */ static void MX_DMA_Init(void) { 8002364: b580 push {r7, lr} 8002366: b082 sub sp, #8 8002368: af00 add r7, sp, #0 /* DMA controller clock enable */ __HAL_RCC_DMA2_CLK_ENABLE(); 800236a: 4b11 ldr r3, [pc, #68] @ (80023b0 ) 800236c: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8002370: 4a0f ldr r2, [pc, #60] @ (80023b0 ) 8002372: f043 0302 orr.w r3, r3, #2 8002376: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 800237a: 4b0d ldr r3, [pc, #52] @ (80023b0 ) 800237c: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8002380: f003 0302 and.w r3, r3, #2 8002384: 607b str r3, [r7, #4] 8002386: 687b ldr r3, [r7, #4] /* DMA interrupt init */ /* DMA2_Stream6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 5, 0); 8002388: 2200 movs r2, #0 800238a: 2105 movs r1, #5 800238c: 2045 movs r0, #69 @ 0x45 800238e: f003 fb17 bl 80059c0 HAL_NVIC_EnableIRQ(DMA2_Stream6_IRQn); 8002392: 2045 movs r0, #69 @ 0x45 8002394: f003 fb2e bl 80059f4 /* DMA2_Stream7_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream7_IRQn, 5, 0); 8002398: 2200 movs r2, #0 800239a: 2105 movs r1, #5 800239c: 2046 movs r0, #70 @ 0x46 800239e: f003 fb0f bl 80059c0 HAL_NVIC_EnableIRQ(DMA2_Stream7_IRQn); 80023a2: 2046 movs r0, #70 @ 0x46 80023a4: f003 fb26 bl 80059f4 } 80023a8: bf00 nop 80023aa: 3708 adds r7, #8 80023ac: 46bd mov sp, r7 80023ae: bd80 pop {r7, pc} 80023b0: 58024400 .word 0x58024400 080023b4 : * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 80023b4: b580 push {r7, lr} 80023b6: b08c sub sp, #48 @ 0x30 80023b8: af00 add r7, sp, #0 GPIO_InitTypeDef GPIO_InitStruct = {0}; 80023ba: f107 031c add.w r3, r7, #28 80023be: 2200 movs r2, #0 80023c0: 601a str r2, [r3, #0] 80023c2: 605a str r2, [r3, #4] 80023c4: 609a str r2, [r3, #8] 80023c6: 60da str r2, [r3, #12] 80023c8: 611a str r2, [r3, #16] /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOE_CLK_ENABLE(); 80023ca: 4b5d ldr r3, [pc, #372] @ (8002540 ) 80023cc: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80023d0: 4a5b ldr r2, [pc, #364] @ (8002540 ) 80023d2: f043 0310 orr.w r3, r3, #16 80023d6: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80023da: 4b59 ldr r3, [pc, #356] @ (8002540 ) 80023dc: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80023e0: f003 0310 and.w r3, r3, #16 80023e4: 61bb str r3, [r7, #24] 80023e6: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOH_CLK_ENABLE(); 80023e8: 4b55 ldr r3, [pc, #340] @ (8002540 ) 80023ea: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80023ee: 4a54 ldr r2, [pc, #336] @ (8002540 ) 80023f0: f043 0380 orr.w r3, r3, #128 @ 0x80 80023f4: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80023f8: 4b51 ldr r3, [pc, #324] @ (8002540 ) 80023fa: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80023fe: f003 0380 and.w r3, r3, #128 @ 0x80 8002402: 617b str r3, [r7, #20] 8002404: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOC_CLK_ENABLE(); 8002406: 4b4e ldr r3, [pc, #312] @ (8002540 ) 8002408: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800240c: 4a4c ldr r2, [pc, #304] @ (8002540 ) 800240e: f043 0304 orr.w r3, r3, #4 8002412: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002416: 4b4a ldr r3, [pc, #296] @ (8002540 ) 8002418: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800241c: f003 0304 and.w r3, r3, #4 8002420: 613b str r3, [r7, #16] 8002422: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOA_CLK_ENABLE(); 8002424: 4b46 ldr r3, [pc, #280] @ (8002540 ) 8002426: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800242a: 4a45 ldr r2, [pc, #276] @ (8002540 ) 800242c: f043 0301 orr.w r3, r3, #1 8002430: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002434: 4b42 ldr r3, [pc, #264] @ (8002540 ) 8002436: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800243a: f003 0301 and.w r3, r3, #1 800243e: 60fb str r3, [r7, #12] 8002440: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOB_CLK_ENABLE(); 8002442: 4b3f ldr r3, [pc, #252] @ (8002540 ) 8002444: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002448: 4a3d ldr r2, [pc, #244] @ (8002540 ) 800244a: f043 0302 orr.w r3, r3, #2 800244e: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002452: 4b3b ldr r3, [pc, #236] @ (8002540 ) 8002454: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002458: f003 0302 and.w r3, r3, #2 800245c: 60bb str r3, [r7, #8] 800245e: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOD_CLK_ENABLE(); 8002460: 4b37 ldr r3, [pc, #220] @ (8002540 ) 8002462: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002466: 4a36 ldr r2, [pc, #216] @ (8002540 ) 8002468: f043 0308 orr.w r3, r3, #8 800246c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8002470: 4b33 ldr r3, [pc, #204] @ (8002540 ) 8002472: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002476: f003 0308 and.w r3, r3, #8 800247a: 607b str r3, [r7, #4] 800247c: 687b ldr r3, [r7, #4] /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, GPIO_PIN_RESET); 800247e: 2200 movs r2, #0 8002480: 213c movs r1, #60 @ 0x3c 8002482: 4830 ldr r0, [pc, #192] @ (8002544 ) 8002484: f007 fe8c bl 800a1a0 /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14, GPIO_PIN_RESET); 8002488: 2200 movs r2, #0 800248a: f44f 41f0 mov.w r1, #30720 @ 0x7800 800248e: 482e ldr r0, [pc, #184] @ (8002548 ) 8002490: f007 fe86 bl 800a1a0 /*Configure GPIO pins : PE2 PE3 PE4 PE5 */ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5; 8002494: 233c movs r3, #60 @ 0x3c 8002496: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 8002498: 2301 movs r3, #1 800249a: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 800249c: 2300 movs r3, #0 800249e: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 80024a0: 2300 movs r3, #0 80024a2: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 80024a4: f107 031c add.w r3, r7, #28 80024a8: 4619 mov r1, r3 80024aa: 4826 ldr r0, [pc, #152] @ (8002544 ) 80024ac: f007 fcb0 bl 8009e10 /*Configure GPIO pins : PD11 PD12 PD13 PD14 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14; 80024b0: f44f 43f0 mov.w r3, #30720 @ 0x7800 80024b4: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 80024b6: 2301 movs r3, #1 80024b8: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 80024ba: 2300 movs r3, #0 80024bc: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 80024be: 2300 movs r3, #0 80024c0: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 80024c2: f107 031c add.w r3, r7, #28 80024c6: 4619 mov r1, r3 80024c8: 481f ldr r0, [pc, #124] @ (8002548 ) 80024ca: f007 fca1 bl 8009e10 /*Configure GPIO pins : PD1 PD2 PD4 */ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_4; 80024ce: 2316 movs r3, #22 80024d0: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_INPUT; 80024d2: 2300 movs r3, #0 80024d4: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 80024d6: 2300 movs r3, #0 80024d8: 627b str r3, [r7, #36] @ 0x24 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 80024da: f107 031c add.w r3, r7, #28 80024de: 4619 mov r1, r3 80024e0: 4819 ldr r0, [pc, #100] @ (8002548 ) 80024e2: f007 fc95 bl 8009e10 /* USER CODE BEGIN MX_GPIO_Init_2 */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, GPIO_PIN_RESET); 80024e6: 2200 movs r2, #0 80024e8: 213c movs r1, #60 @ 0x3c 80024ea: 4816 ldr r0, [pc, #88] @ (8002544 ) 80024ec: f007 fe58 bl 800a1a0 GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 80024f0: f44f 4340 mov.w r3, #49152 @ 0xc000 80024f4: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 80024f6: 2301 movs r3, #1 80024f8: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_PULLUP; 80024fa: 2301 movs r3, #1 80024fc: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 80024fe: 2300 movs r3, #0 8002500: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 8002502: f107 031c add.w r3, r7, #28 8002506: 4619 mov r1, r3 8002508: 480e ldr r0, [pc, #56] @ (8002544 ) 800250a: f007 fc81 bl 8009e10 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_RESET); 800250e: 2200 movs r2, #0 8002510: f44f 4180 mov.w r1, #16384 @ 0x4000 8002514: 480b ldr r0, [pc, #44] @ (8002544 ) 8002516: f007 fe43 bl 800a1a0 HAL_Delay(100); 800251a: 2064 movs r0, #100 @ 0x64 800251c: f003 f954 bl 80057c8 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_SET); 8002520: 2201 movs r2, #1 8002522: f44f 4180 mov.w r1, #16384 @ 0x4000 8002526: 4807 ldr r0, [pc, #28] @ (8002544 ) 8002528: f007 fe3a bl 800a1a0 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_15, GPIO_PIN_SET); 800252c: 2201 movs r2, #1 800252e: f44f 4100 mov.w r1, #32768 @ 0x8000 8002532: 4804 ldr r0, [pc, #16] @ (8002544 ) 8002534: f007 fe34 bl 800a1a0 /* USER CODE END MX_GPIO_Init_2 */ } 8002538: bf00 nop 800253a: 3730 adds r7, #48 @ 0x30 800253c: 46bd mov sp, r7 800253e: bd80 pop {r7, pc} 8002540: 58024400 .word 0x58024400 8002544: 58021000 .word 0x58021000 8002548: 58020c00 .word 0x58020c00 0800254c : * @param argument: Not used * @retval None */ /* USER CODE END Header_StartDefaultTask */ void StartDefaultTask(void *argument) { 800254c: b580 push {r7, lr} 800254e: b082 sub sp, #8 8002550: af00 add r7, sp, #0 8002552: 6078 str r0, [r7, #4] /* init code for LWIP */ MX_LWIP_Init(); 8002554: f00d ffb8 bl 80104c8 /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { osDelay(pdMS_TO_TICKS(1000)); 8002558: f44f 707a mov.w r0, #1000 @ 0x3e8 800255c: f00e ff87 bl 801146e 8002560: e7fa b.n 8002558 ... 08002564 : /* USER CODE END 5 */ } /* relay1TimerCallback function */ void relay1TimerCallback(void *argument) { 8002564: b580 push {r7, lr} 8002566: b082 sub sp, #8 8002568: af00 add r7, sp, #0 800256a: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay1TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); 800256c: 2200 movs r2, #0 800256e: 2120 movs r1, #32 8002570: 4803 ldr r0, [pc, #12] @ (8002580 ) 8002572: f007 fe15 bl 800a1a0 /* USER CODE END relay1TimerCallback */ } 8002576: bf00 nop 8002578: 3708 adds r7, #8 800257a: 46bd mov sp, r7 800257c: bd80 pop {r7, pc} 800257e: bf00 nop 8002580: 58021000 .word 0x58021000 08002584 : /* relay2TimerCallback function */ void relay2TimerCallback(void *argument) { 8002584: b580 push {r7, lr} 8002586: b082 sub sp, #8 8002588: af00 add r7, sp, #0 800258a: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay2TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); 800258c: 2200 movs r2, #0 800258e: 2108 movs r1, #8 8002590: 4803 ldr r0, [pc, #12] @ (80025a0 ) 8002592: f007 fe05 bl 800a1a0 /* USER CODE END relay2TimerCallback */ } 8002596: bf00 nop 8002598: 3708 adds r7, #8 800259a: 46bd mov sp, r7 800259c: bd80 pop {r7, pc} 800259e: bf00 nop 80025a0: 58021000 .word 0x58021000 080025a4 : /* relay3TimerCallback function */ void relay3TimerCallback(void *argument) { 80025a4: b580 push {r7, lr} 80025a6: b082 sub sp, #8 80025a8: af00 add r7, sp, #0 80025aa: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay3TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); 80025ac: 2200 movs r2, #0 80025ae: 2110 movs r1, #16 80025b0: 4803 ldr r0, [pc, #12] @ (80025c0 ) 80025b2: f007 fdf5 bl 800a1a0 /* USER CODE END relay3TimerCallback */ } 80025b6: bf00 nop 80025b8: 3708 adds r7, #8 80025ba: 46bd mov sp, r7 80025bc: bd80 pop {r7, pc} 80025be: bf00 nop 80025c0: 58021000 .word 0x58021000 080025c4 : /* relay4TimerCallback function */ void relay4TimerCallback(void *argument) { 80025c4: b580 push {r7, lr} 80025c6: b082 sub sp, #8 80025c8: af00 add r7, sp, #0 80025ca: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay4TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); 80025cc: 2200 movs r2, #0 80025ce: 2104 movs r1, #4 80025d0: 4803 ldr r0, [pc, #12] @ (80025e0 ) 80025d2: f007 fde5 bl 800a1a0 /* USER CODE END relay4TimerCallback */ } 80025d6: bf00 nop 80025d8: 3708 adds r7, #8 80025da: 46bd mov sp, r7 80025dc: bd80 pop {r7, pc} 80025de: bf00 nop 80025e0: 58021000 .word 0x58021000 080025e4 : /* MPU Configuration */ void MPU_Config(void) { 80025e4: b580 push {r7, lr} 80025e6: b084 sub sp, #16 80025e8: af00 add r7, sp, #0 MPU_Region_InitTypeDef MPU_InitStruct = {0}; 80025ea: 463b mov r3, r7 80025ec: 2200 movs r2, #0 80025ee: 601a str r2, [r3, #0] 80025f0: 605a str r2, [r3, #4] 80025f2: 609a str r2, [r3, #8] 80025f4: 60da str r2, [r3, #12] /* Disables the MPU */ HAL_MPU_Disable(); 80025f6: f003 fa0b bl 8005a10 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; 80025fa: 2301 movs r3, #1 80025fc: 703b strb r3, [r7, #0] MPU_InitStruct.Number = MPU_REGION_NUMBER0; 80025fe: 2300 movs r3, #0 8002600: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x0; 8002602: 2300 movs r3, #0 8002604: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; 8002606: 231f movs r3, #31 8002608: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x87; 800260a: 2387 movs r3, #135 @ 0x87 800260c: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 800260e: 2300 movs r3, #0 8002610: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; 8002612: 2300 movs r3, #0 8002614: 72fb strb r3, [r7, #11] MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; 8002616: 2301 movs r3, #1 8002618: 733b strb r3, [r7, #12] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 800261a: 2301 movs r3, #1 800261c: 737b strb r3, [r7, #13] MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; 800261e: 2300 movs r3, #0 8002620: 73bb strb r3, [r7, #14] MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; 8002622: 2300 movs r3, #0 8002624: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 8002626: 463b mov r3, r7 8002628: 4618 mov r0, r3 800262a: f003 fa29 bl 8005a80 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; 800262e: 2301 movs r3, #1 8002630: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24020000; 8002632: 4b13 ldr r3, [pc, #76] @ (8002680 ) 8002634: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_128KB; 8002636: 2310 movs r3, #16 8002638: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x0; 800263a: 2300 movs r3, #0 800263c: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; 800263e: 2301 movs r3, #1 8002640: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; 8002642: 2303 movs r3, #3 8002644: 72fb strb r3, [r7, #11] MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; 8002646: 2300 movs r3, #0 8002648: 737b strb r3, [r7, #13] HAL_MPU_ConfigRegion(&MPU_InitStruct); 800264a: 463b mov r3, r7 800264c: 4618 mov r0, r3 800264e: f003 fa17 bl 8005a80 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; 8002652: 2302 movs r3, #2 8002654: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24040000; 8002656: 4b0b ldr r3, [pc, #44] @ (8002684 ) 8002658: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_512B; 800265a: 2308 movs r3, #8 800265c: 723b strb r3, [r7, #8] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 800265e: 2300 movs r3, #0 8002660: 72bb strb r3, [r7, #10] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 8002662: 2301 movs r3, #1 8002664: 737b strb r3, [r7, #13] MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; 8002666: 2301 movs r3, #1 8002668: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 800266a: 463b mov r3, r7 800266c: 4618 mov r0, r3 800266e: f003 fa07 bl 8005a80 /* Enables the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); 8002672: 2004 movs r0, #4 8002674: f003 f9e4 bl 8005a40 } 8002678: bf00 nop 800267a: 3710 adds r7, #16 800267c: 46bd mov sp, r7 800267e: bd80 pop {r7, pc} 8002680: 24020000 .word 0x24020000 8002684: 24040000 .word 0x24040000 08002688 : * a global variable "uwTick" used as application time base. * @param htim : TIM handle * @retval None */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { 8002688: b580 push {r7, lr} 800268a: b082 sub sp, #8 800268c: af00 add r7, sp, #0 800268e: 6078 str r0, [r7, #4] /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ if (htim->Instance == TIM6) { 8002690: 687b ldr r3, [r7, #4] 8002692: 681b ldr r3, [r3, #0] 8002694: 4a09 ldr r2, [pc, #36] @ (80026bc ) 8002696: 4293 cmp r3, r2 8002698: d101 bne.n 800269e HAL_IncTick(); 800269a: f003 f875 bl 8005788 } /* USER CODE BEGIN Callback 1 */ if (htim->Instance == TIM6) { 800269e: 687b ldr r3, [r7, #4] 80026a0: 681b ldr r3, [r3, #0] 80026a2: 4a06 ldr r2, [pc, #24] @ (80026bc ) 80026a4: 4293 cmp r3, r2 80026a6: d104 bne.n 80026b2 MilliTimer++; 80026a8: 4b05 ldr r3, [pc, #20] @ (80026c0 ) 80026aa: 681b ldr r3, [r3, #0] 80026ac: 3301 adds r3, #1 80026ae: 4a04 ldr r2, [pc, #16] @ (80026c0 ) 80026b0: 6013 str r3, [r2, #0] } /* USER CODE END Callback 1 */ } 80026b2: bf00 nop 80026b4: 3708 adds r7, #8 80026b6: 46bd mov sp, r7 80026b8: bd80 pop {r7, pc} 80026ba: bf00 nop 80026bc: 40001000 .word 0x40001000 80026c0: 2402b114 .word 0x2402b114 080026c4 : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 80026c4: b580 push {r7, lr} 80026c6: af00 add r7, sp, #0 __ASM volatile ("cpsid i" : : : "memory"); 80026c8: b672 cpsid i } 80026ca: bf00 nop /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); NVIC_SystemReset(); 80026cc: f7ff faf4 bl 8001cb8 <__NVIC_SystemReset> 080026d0 <__NVIC_SystemReset>: { 80026d0: b480 push {r7} 80026d2: af00 add r7, sp, #0 __ASM volatile ("dsb 0xF":::"memory"); 80026d4: f3bf 8f4f dsb sy } 80026d8: bf00 nop (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 80026da: 4b06 ldr r3, [pc, #24] @ (80026f4 <__NVIC_SystemReset+0x24>) 80026dc: 68db ldr r3, [r3, #12] 80026de: f403 62e0 and.w r2, r3, #1792 @ 0x700 SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 80026e2: 4904 ldr r1, [pc, #16] @ (80026f4 <__NVIC_SystemReset+0x24>) 80026e4: 4b04 ldr r3, [pc, #16] @ (80026f8 <__NVIC_SystemReset+0x28>) 80026e6: 4313 orrs r3, r2 80026e8: 60cb str r3, [r1, #12] __ASM volatile ("dsb 0xF":::"memory"); 80026ea: f3bf 8f4f dsb sy } 80026ee: bf00 nop __NOP(); 80026f0: bf00 nop 80026f2: e7fd b.n 80026f0 <__NVIC_SystemReset+0x20> 80026f4: e000ed00 .word 0xe000ed00 80026f8: 05fa0004 .word 0x05fa0004 080026fc : void MqttClientSubTask (void* argument); // mqtt client subscribe task function void MqttClientPubTask (void* argument); // mqtt client publish task function uint32_t MqttConnectBroker (void); // mqtt broker connect function void MqttMessageArrived (MessageData* msg); // mqtt message callback function void MqttClientSubTask (void* argument) { 80026fc: b580 push {r7, lr} 80026fe: b082 sub sp, #8 8002700: af00 add r7, sp, #0 8002702: 6078 str r0, [r7, #4] while (1) { // waiting for valid ip address if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) // system has no valid ip address 8002704: 4b16 ldr r3, [pc, #88] @ (8002760 ) 8002706: 685b ldr r3, [r3, #4] 8002708: 2b00 cmp r3, #0 800270a: d007 beq.n 800271c 800270c: 4b14 ldr r3, [pc, #80] @ (8002760 ) 800270e: 689b ldr r3, [r3, #8] 8002710: 2b00 cmp r3, #0 8002712: d003 beq.n 800271c 8002714: 4b12 ldr r3, [pc, #72] @ (8002760 ) 8002716: 68db ldr r3, [r3, #12] 8002718: 2b00 cmp r3, #0 800271a: d104 bne.n 8002726 { osDelay (pdMS_TO_TICKS (1000)); 800271c: f44f 707a mov.w r0, #1000 @ 0x3e8 8002720: f00e fea5 bl 801146e continue; 8002724: e003 b.n 800272e } else { printf ("DHCP/Static IP O.K.\n"); 8002726: 480f ldr r0, [pc, #60] @ (8002764 ) 8002728: f028 f908 bl 802a93c break; 800272c: e000 b.n 8002730 if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) // system has no valid ip address 800272e: e7e9 b.n 8002704 } } while (1) { if (!mqttClient.isconnected) { 8002730: 4b0d ldr r3, [pc, #52] @ (8002768 ) 8002732: 6a1b ldr r3, [r3, #32] 8002734: 2b00 cmp r3, #0 8002736: d109 bne.n 800274c // try to connect to the broker if (MqttConnectBroker () != MQTT_SUCCESS) { 8002738: f000 fb92 bl 8002e60 800273c: 4603 mov r3, r0 800273e: 2b00 cmp r3, #0 8002740: d0f6 beq.n 8002730 osDelay (pdMS_TO_TICKS (1000)); 8002742: f44f 707a mov.w r0, #1000 @ 0x3e8 8002746: f00e fe92 bl 801146e 800274a: e7f1 b.n 8002730 } } else { MQTTYield (&mqttClient, 500); // handle timer 800274c: f44f 71fa mov.w r1, #500 @ 0x1f4 8002750: 4805 ldr r0, [pc, #20] @ (8002768 ) 8002752: f025 f9f5 bl 8027b40 osDelay (pdMS_TO_TICKS (100)); 8002756: 2064 movs r0, #100 @ 0x64 8002758: f00e fe89 bl 801146e if (!mqttClient.isconnected) { 800275c: e7e8 b.n 8002730 800275e: bf00 nop 8002760: 24002254 .word 0x24002254 8002764: 0802d4d8 .word 0x0802d4d8 8002768: 24000730 .word 0x24000730 0800276c : } } } void MqttClientPubTask (void* argument) { 800276c: b590 push {r4, r7, lr} 800276e: f5ad 7d19 sub.w sp, sp, #612 @ 0x264 8002772: af04 add r7, sp, #16 8002774: f507 7314 add.w r3, r7, #592 @ 0x250 8002778: f5a3 7313 sub.w r3, r3, #588 @ 0x24c 800277c: 6018 str r0, [r3, #0] char messageBuffer[512] = { 0x00 }; 800277e: f507 7314 add.w r3, r7, #592 @ 0x250 8002782: f5a3 7305 sub.w r3, r3, #532 @ 0x214 8002786: 2200 movs r2, #0 8002788: 601a str r2, [r3, #0] 800278a: 3304 adds r3, #4 800278c: f44f 72fe mov.w r2, #508 @ 0x1fc 8002790: 2100 movs r1, #0 8002792: 4618 mov r0, r3 8002794: f028 f9fc bl 802ab90 char topicTextBuffer[32] = { 0x00 }; 8002798: f507 7314 add.w r3, r7, #592 @ 0x250 800279c: f5a3 730d sub.w r3, r3, #564 @ 0x234 80027a0: 2200 movs r2, #0 80027a2: 601a str r2, [r3, #0] 80027a4: 3304 adds r3, #4 80027a6: 2200 movs r2, #0 80027a8: 601a str r2, [r3, #0] 80027aa: 605a str r2, [r3, #4] 80027ac: 609a str r2, [r3, #8] 80027ae: 60da str r2, [r3, #12] 80027b0: 611a str r2, [r3, #16] 80027b2: 615a str r2, [r3, #20] 80027b4: 619a str r2, [r3, #24] uint32_t bytesInBuffer = 0; 80027b6: 2300 movs r3, #0 80027b8: f8c7 3248 str.w r3, [r7, #584] @ 0x248 uint8_t boardNumber = 0; 80027bc: 2300 movs r3, #0 80027be: f887 324f strb.w r3, [r7, #591] @ 0x24f MQTTMessage message; while (1) { if (mqttClient.isconnected) { 80027c2: 4b93 ldr r3, [pc, #588] @ (8002a10 ) 80027c4: 6a1b ldr r3, [r3, #32] 80027c6: 2b00 cmp r3, #0 80027c8: f000 833d beq.w 8002e46 if (is_link_up ()) { 80027cc: f00d fe6c bl 80104a8 80027d0: 4603 mov r3, r0 80027d2: 2b00 cmp r3, #0 80027d4: f000 8337 beq.w 8002e46 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 80027d8: 2300 movs r3, #0 80027da: f887 324f strb.w r3, [r7, #591] @ 0x24f 80027de: e10e b.n 80029fe osMutexAcquire (resMeasurementsMutex, osWaitForever); 80027e0: 4b8c ldr r3, [pc, #560] @ (8002a14 ) 80027e2: 681b ldr r3, [r3, #0] 80027e4: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80027e8: 4618 mov r0, r3 80027ea: f00e ffd8 bl 801179e RESMeasurements* resMeas = &resMeasurements[boardNumber]; 80027ee: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 80027f2: 4613 mov r3, r2 80027f4: 011b lsls r3, r3, #4 80027f6: 1a9b subs r3, r3, r2 80027f8: 009b lsls r3, r3, #2 80027fa: 4a87 ldr r2, [pc, #540] @ (8002a18 ) 80027fc: 4413 add r3, r2 80027fe: f8c7 323c str.w r3, [r7, #572] @ 0x23c sprintf (topicTextBuffer, "RESmeasurments/%d", boardNumber + 1); 8002802: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002806: 1c5a adds r2, r3, #1 8002808: f107 031c add.w r3, r7, #28 800280c: 4983 ldr r1, [pc, #524] @ (8002a1c ) 800280e: 4618 mov r0, r3 8002810: f028 f89c bl 802a94c bytesInBuffer = sprintf (messageBuffer, "{\"voltageRMS\":[%.2f, %.2f, %.2f], ", resMeas->voltageRMS[0], resMeas->voltageRMS[1], resMeas->voltageRMS[2]); 8002814: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002818: edd3 7a00 vldr s15, [r3] 800281c: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002820: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002824: edd3 7a01 vldr s15, [r3, #4] 8002828: eeb7 7ae7 vcvt.f64.f32 d7, s15 800282c: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002830: edd3 6a02 vldr s13, [r3, #8] 8002834: eeb7 6ae6 vcvt.f64.f32 d6, s13 8002838: f107 003c add.w r0, r7, #60 @ 0x3c 800283c: ed8d 6b02 vstr d6, [sp, #8] 8002840: ed8d 7b00 vstr d7, [sp] 8002844: ec53 2b15 vmov r2, r3, d5 8002848: 4975 ldr r1, [pc, #468] @ (8002a20 ) 800284a: f028 f87f bl 802a94c 800284e: 4603 mov r3, r0 8002850: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"voltagePeak\":[%.2f, %.2f, %.2f], ", resMeas->voltagePeak[0], resMeas->voltagePeak[1], resMeas->voltagePeak[2]); 8002854: f107 023c add.w r2, r7, #60 @ 0x3c 8002858: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 800285c: 18d0 adds r0, r2, r3 800285e: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002862: edd3 7a03 vldr s15, [r3, #12] 8002866: eeb7 5ae7 vcvt.f64.f32 d5, s15 800286a: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800286e: edd3 7a04 vldr s15, [r3, #16] 8002872: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002876: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800287a: edd3 6a05 vldr s13, [r3, #20] 800287e: eeb7 6ae6 vcvt.f64.f32 d6, s13 8002882: ed8d 6b02 vstr d6, [sp, #8] 8002886: ed8d 7b00 vstr d7, [sp] 800288a: ec53 2b15 vmov r2, r3, d5 800288e: 4965 ldr r1, [pc, #404] @ (8002a24 ) 8002890: f028 f85c bl 802a94c 8002894: 4603 mov r3, r0 8002896: 461a mov r2, r3 8002898: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 800289c: 4413 add r3, r2 800289e: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"currentRMS\":[%.3f, %.3f, %.3f], ", resMeas->currentRMS[0], resMeas->currentRMS[1], resMeas->currentRMS[2]); 80028a2: f107 023c add.w r2, r7, #60 @ 0x3c 80028a6: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80028aa: 18d0 adds r0, r2, r3 80028ac: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028b0: edd3 7a06 vldr s15, [r3, #24] 80028b4: eeb7 5ae7 vcvt.f64.f32 d5, s15 80028b8: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028bc: edd3 7a07 vldr s15, [r3, #28] 80028c0: eeb7 7ae7 vcvt.f64.f32 d7, s15 80028c4: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028c8: edd3 6a08 vldr s13, [r3, #32] 80028cc: eeb7 6ae6 vcvt.f64.f32 d6, s13 80028d0: ed8d 6b02 vstr d6, [sp, #8] 80028d4: ed8d 7b00 vstr d7, [sp] 80028d8: ec53 2b15 vmov r2, r3, d5 80028dc: 4952 ldr r1, [pc, #328] @ (8002a28 ) 80028de: f028 f835 bl 802a94c 80028e2: 4603 mov r3, r0 80028e4: 461a mov r2, r3 80028e6: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80028ea: 4413 add r3, r2 80028ec: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"currentPeak\":[%.3f, %.3f, %.3f], ", resMeas->currentPeak[0], resMeas->currentPeak[1], resMeas->currentPeak[2]); 80028f0: f107 023c add.w r2, r7, #60 @ 0x3c 80028f4: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80028f8: 18d0 adds r0, r2, r3 80028fa: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028fe: edd3 7a09 vldr s15, [r3, #36] @ 0x24 8002902: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002906: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800290a: edd3 7a0a vldr s15, [r3, #40] @ 0x28 800290e: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002912: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002916: edd3 6a0b vldr s13, [r3, #44] @ 0x2c 800291a: eeb7 6ae6 vcvt.f64.f32 d6, s13 800291e: ed8d 6b02 vstr d6, [sp, #8] 8002922: ed8d 7b00 vstr d7, [sp] 8002926: ec53 2b15 vmov r2, r3, d5 800292a: 4940 ldr r1, [pc, #256] @ (8002a2c ) 800292c: f028 f80e bl 802a94c 8002930: 4603 mov r3, r0 8002932: 461a mov r2, r3 8002934: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002938: 4413 add r3, r2 800293a: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"power\":[%.2f, %.2f, %.2f], ", resMeas->power[0], resMeas->power[1], resMeas->power[2]); 800293e: f107 023c add.w r2, r7, #60 @ 0x3c 8002942: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002946: 18d0 adds r0, r2, r3 8002948: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800294c: edd3 7a0c vldr s15, [r3, #48] @ 0x30 8002950: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002954: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002958: edd3 7a0d vldr s15, [r3, #52] @ 0x34 800295c: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002960: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002964: edd3 6a0e vldr s13, [r3, #56] @ 0x38 8002968: eeb7 6ae6 vcvt.f64.f32 d6, s13 800296c: ed8d 6b02 vstr d6, [sp, #8] 8002970: ed8d 7b00 vstr d7, [sp] 8002974: ec53 2b15 vmov r2, r3, d5 8002978: 492d ldr r1, [pc, #180] @ (8002a30 ) 800297a: f027 ffe7 bl 802a94c 800297e: 4603 mov r3, r0 8002980: 461a mov r2, r3 8002982: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002986: 4413 add r3, r2 8002988: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"lastSeen\": %ld}", slaveLastSeen[boardNumber]); 800298c: f107 023c add.w r2, r7, #60 @ 0x3c 8002990: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002994: 18d0 adds r0, r2, r3 8002996: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 800299a: 4a26 ldr r2, [pc, #152] @ (8002a34 ) 800299c: f852 3023 ldr.w r3, [r2, r3, lsl #2] 80029a0: 461a mov r2, r3 80029a2: 4925 ldr r1, [pc, #148] @ (8002a38 ) 80029a4: f027 ffd2 bl 802a94c 80029a8: 4603 mov r3, r0 80029aa: 461a mov r2, r3 80029ac: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80029b0: 4413 add r3, r2 80029b2: f8c7 3248 str.w r3, [r7, #584] @ 0x248 osMutexRelease (resMeasurementsMutex); 80029b6: 4b17 ldr r3, [pc, #92] @ (8002a14 ) 80029b8: 681b ldr r3, [r3, #0] 80029ba: 4618 mov r0, r3 80029bc: f00e ff3a bl 8011834 message.payload = (void*)messageBuffer; 80029c0: f507 7314 add.w r3, r7, #592 @ 0x250 80029c4: f5a3 7311 sub.w r3, r3, #580 @ 0x244 80029c8: f107 023c add.w r2, r7, #60 @ 0x3c 80029cc: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 80029ce: f107 033c add.w r3, r7, #60 @ 0x3c 80029d2: 4618 mov r0, r3 80029d4: f7fd fce4 bl 80003a0 80029d8: 4602 mov r2, r0 80029da: f507 7314 add.w r3, r7, #592 @ 0x250 80029de: f5a3 7311 sub.w r3, r3, #580 @ 0x244 80029e2: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 80029e4: f107 020c add.w r2, r7, #12 80029e8: f107 031c add.w r3, r7, #28 80029ec: 4619 mov r1, r3 80029ee: 4808 ldr r0, [pc, #32] @ (8002a10 ) 80029f0: f025 fac5 bl 8027f7e for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 80029f4: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 80029f8: 3301 adds r3, #1 80029fa: f887 324f strb.w r3, [r7, #591] @ 0x24f 80029fe: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a02: 2b03 cmp r3, #3 8002a04: f67f aeec bls.w 80027e0 } for (boardNumber = 0; boardNumber < SLAVES_COUNT + 1; boardNumber++) { 8002a08: 2300 movs r3, #0 8002a0a: f887 324f strb.w r3, [r7, #591] @ 0x24f 8002a0e: e215 b.n 8002e3c 8002a10: 24000730 .word 0x24000730 8002a14: 24002248 .word 0x24002248 8002a18: 24002088 .word 0x24002088 8002a1c: 0802d4ec .word 0x0802d4ec 8002a20: 0802d500 .word 0x0802d500 8002a24: 0802d524 .word 0x0802d524 8002a28: 0802d548 .word 0x0802d548 8002a2c: 0802d56c .word 0x0802d56c 8002a30: 0802d590 .word 0x0802d590 8002a34: 24002238 .word 0x24002238 8002a38: 0802d5b0 .word 0x0802d5b0 if (boardNumber > 0) { 8002a3c: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a40: 2b00 cmp r3, #0 8002a42: f000 81b3 beq.w 8002dac osMutexAcquire (sensorsInfoMutex, osWaitForever); 8002a46: 4bc5 ldr r3, [pc, #788] @ (8002d5c ) 8002a48: 681b ldr r3, [r3, #0] 8002a4a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8002a4e: 4618 mov r0, r3 8002a50: f00e fea5 bl 801179e SesnorsInfo* sensors = &sensorsInfo[boardNumber - 1]; 8002a54: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a58: 1e5a subs r2, r3, #1 8002a5a: 4613 mov r3, r2 8002a5c: 005b lsls r3, r3, #1 8002a5e: 4413 add r3, r2 8002a60: 011b lsls r3, r3, #4 8002a62: 4abf ldr r2, [pc, #764] @ (8002d60 ) 8002a64: 4413 add r3, r2 8002a66: f8c7 3240 str.w r3, [r7, #576] @ 0x240 sprintf (topicTextBuffer, "Sensors/%d", boardNumber); 8002a6a: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 8002a6e: f107 031c add.w r3, r7, #28 8002a72: 49bc ldr r1, [pc, #752] @ (8002d64 ) 8002a74: 4618 mov r0, r3 8002a76: f027 ff69 bl 802a94c bytesInBuffer = sprintf (messageBuffer, "{\"pvTemperature\":[%.1f, %.1f], ", sensors->pvTemperature[0], sensors->pvTemperature[1]); 8002a7a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a7e: edd3 7a00 vldr s15, [r3] 8002a82: eeb7 6ae7 vcvt.f64.f32 d6, s15 8002a86: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002a8a: edd3 7a01 vldr s15, [r3, #4] 8002a8e: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002a92: f107 003c add.w r0, r7, #60 @ 0x3c 8002a96: ed8d 7b00 vstr d7, [sp] 8002a9a: ec53 2b16 vmov r2, r3, d6 8002a9e: 49b2 ldr r1, [pc, #712] @ (8002d68 ) 8002aa0: f027 ff54 bl 802a94c 8002aa4: 4603 mov r3, r0 8002aa6: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"fanVoltage\":%.2f, ", sensors->fanVoltage); 8002aaa: f107 023c add.w r2, r7, #60 @ 0x3c 8002aae: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ab2: 18d0 adds r0, r2, r3 8002ab4: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ab8: edd3 7a02 vldr s15, [r3, #8] 8002abc: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002ac0: ec53 2b17 vmov r2, r3, d7 8002ac4: 49a9 ldr r1, [pc, #676] @ (8002d6c ) 8002ac6: f027 ff41 bl 802a94c 8002aca: 4603 mov r3, r0 8002acc: 461a mov r2, r3 8002ace: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ad2: 4413 add r3, r2 8002ad4: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"pvEncoderX\":%.2f, ", sensors->pvEncoderX); 8002ad8: f107 023c add.w r2, r7, #60 @ 0x3c 8002adc: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ae0: 18d0 adds r0, r2, r3 8002ae2: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ae6: edd3 7a03 vldr s15, [r3, #12] 8002aea: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002aee: ec53 2b17 vmov r2, r3, d7 8002af2: 499f ldr r1, [pc, #636] @ (8002d70 ) 8002af4: f027 ff2a bl 802a94c 8002af8: 4603 mov r3, r0 8002afa: 461a mov r2, r3 8002afc: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b00: 4413 add r3, r2 8002b02: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"pvEncoderY\":%.2f, ", sensors->pvEncoderY); 8002b06: f107 023c add.w r2, r7, #60 @ 0x3c 8002b0a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b0e: 18d0 adds r0, r2, r3 8002b10: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b14: edd3 7a04 vldr s15, [r3, #16] 8002b18: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002b1c: ec53 2b17 vmov r2, r3, d7 8002b20: 4994 ldr r1, [pc, #592] @ (8002d74 ) 8002b22: f027 ff13 bl 802a94c 8002b26: 4603 mov r3, r0 8002b28: 461a mov r2, r3 8002b2a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b2e: 4413 add r3, r2 8002b30: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXStatus\":%d, ", sensors->motorXStatus); 8002b34: f107 023c add.w r2, r7, #60 @ 0x3c 8002b38: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b3c: 18d0 adds r0, r2, r3 8002b3e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b42: 7d1b ldrb r3, [r3, #20] 8002b44: 461a mov r2, r3 8002b46: 498c ldr r1, [pc, #560] @ (8002d78 ) 8002b48: f027 ff00 bl 802a94c 8002b4c: 4603 mov r3, r0 8002b4e: 461a mov r2, r3 8002b50: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b54: 4413 add r3, r2 8002b56: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYStatus\":%d, ", sensors->motorYStatus); 8002b5a: f107 023c add.w r2, r7, #60 @ 0x3c 8002b5e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b62: 18d0 adds r0, r2, r3 8002b64: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b68: 7d5b ldrb r3, [r3, #21] 8002b6a: 461a mov r2, r3 8002b6c: 4983 ldr r1, [pc, #524] @ (8002d7c ) 8002b6e: f027 feed bl 802a94c 8002b72: 4603 mov r3, r0 8002b74: 461a mov r2, r3 8002b76: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b7a: 4413 add r3, r2 8002b7c: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXAveCurrent\":%.3f, ", sensors->motorXAveCurrent); 8002b80: f107 023c add.w r2, r7, #60 @ 0x3c 8002b84: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b88: 18d0 adds r0, r2, r3 8002b8a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b8e: edd3 7a06 vldr s15, [r3, #24] 8002b92: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002b96: ec53 2b17 vmov r2, r3, d7 8002b9a: 4979 ldr r1, [pc, #484] @ (8002d80 ) 8002b9c: f027 fed6 bl 802a94c 8002ba0: 4603 mov r3, r0 8002ba2: 461a mov r2, r3 8002ba4: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ba8: 4413 add r3, r2 8002baa: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYAveCurrent\":%.3f, ", sensors->motorYAveCurrent); 8002bae: f107 023c add.w r2, r7, #60 @ 0x3c 8002bb2: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002bb6: 18d0 adds r0, r2, r3 8002bb8: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002bbc: edd3 7a07 vldr s15, [r3, #28] 8002bc0: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002bc4: ec53 2b17 vmov r2, r3, d7 8002bc8: 496e ldr r1, [pc, #440] @ (8002d84 ) 8002bca: f027 febf bl 802a94c 8002bce: 4603 mov r3, r0 8002bd0: 461a mov r2, r3 8002bd2: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002bd6: 4413 add r3, r2 8002bd8: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXPeakCurrent\":%.3f, ", sensors->motorXPeakCurrent); 8002bdc: f107 023c add.w r2, r7, #60 @ 0x3c 8002be0: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002be4: 18d0 adds r0, r2, r3 8002be6: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002bea: edd3 7a08 vldr s15, [r3, #32] 8002bee: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002bf2: ec53 2b17 vmov r2, r3, d7 8002bf6: 4964 ldr r1, [pc, #400] @ (8002d88 ) 8002bf8: f027 fea8 bl 802a94c 8002bfc: 4603 mov r3, r0 8002bfe: 461a mov r2, r3 8002c00: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c04: 4413 add r3, r2 8002c06: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYPeakCurrent\":%.3f, ", sensors->motorYPeakCurrent); 8002c0a: f107 023c add.w r2, r7, #60 @ 0x3c 8002c0e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c12: 18d0 adds r0, r2, r3 8002c14: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c18: edd3 7a09 vldr s15, [r3, #36] @ 0x24 8002c1c: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002c20: ec53 2b17 vmov r2, r3, d7 8002c24: 4959 ldr r1, [pc, #356] @ (8002d8c ) 8002c26: f027 fe91 bl 802a94c 8002c2a: 4603 mov r3, r0 8002c2c: 461a mov r2, r3 8002c2e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c32: 4413 add r3, r2 8002c34: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchUp\":%d, ", sensors->limitXSwitchUp); 8002c38: f107 023c add.w r2, r7, #60 @ 0x3c 8002c3c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c40: 18d0 adds r0, r2, r3 8002c42: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c46: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8002c4a: 461a mov r2, r3 8002c4c: 4950 ldr r1, [pc, #320] @ (8002d90 ) 8002c4e: f027 fe7d bl 802a94c 8002c52: 4603 mov r3, r0 8002c54: 461a mov r2, r3 8002c56: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c5a: 4413 add r3, r2 8002c5c: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchDown\":%d, ", sensors->limitXSwitchDown); 8002c60: f107 023c add.w r2, r7, #60 @ 0x3c 8002c64: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c68: 18d0 adds r0, r2, r3 8002c6a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c6e: f893 3029 ldrb.w r3, [r3, #41] @ 0x29 8002c72: 461a mov r2, r3 8002c74: 4947 ldr r1, [pc, #284] @ (8002d94 ) 8002c76: f027 fe69 bl 802a94c 8002c7a: 4603 mov r3, r0 8002c7c: 461a mov r2, r3 8002c7e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c82: 4413 add r3, r2 8002c84: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchCenter\":%d, ", sensors->limitXSwitchCenter); 8002c88: f107 023c add.w r2, r7, #60 @ 0x3c 8002c8c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c90: 18d0 adds r0, r2, r3 8002c92: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c96: f893 302a ldrb.w r3, [r3, #42] @ 0x2a 8002c9a: 461a mov r2, r3 8002c9c: 493e ldr r1, [pc, #248] @ (8002d98 ) 8002c9e: f027 fe55 bl 802a94c 8002ca2: 4603 mov r3, r0 8002ca4: 461a mov r2, r3 8002ca6: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002caa: 4413 add r3, r2 8002cac: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchUp\":%d, ", sensors->limitYSwitchUp); 8002cb0: f107 023c add.w r2, r7, #60 @ 0x3c 8002cb4: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002cb8: 18d0 adds r0, r2, r3 8002cba: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002cbe: f893 302b ldrb.w r3, [r3, #43] @ 0x2b 8002cc2: 461a mov r2, r3 8002cc4: 4935 ldr r1, [pc, #212] @ (8002d9c ) 8002cc6: f027 fe41 bl 802a94c 8002cca: 4603 mov r3, r0 8002ccc: 461a mov r2, r3 8002cce: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002cd2: 4413 add r3, r2 8002cd4: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchDown\":%d, ", sensors->limitYSwitchDown); 8002cd8: f107 023c add.w r2, r7, #60 @ 0x3c 8002cdc: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ce0: 18d0 adds r0, r2, r3 8002ce2: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ce6: f893 302c ldrb.w r3, [r3, #44] @ 0x2c 8002cea: 461a mov r2, r3 8002cec: 492c ldr r1, [pc, #176] @ (8002da0 ) 8002cee: f027 fe2d bl 802a94c 8002cf2: 4603 mov r3, r0 8002cf4: 461a mov r2, r3 8002cf6: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002cfa: 4413 add r3, r2 8002cfc: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchCenter\":%d, ", sensors->limitYSwitchCenter); 8002d00: f107 023c add.w r2, r7, #60 @ 0x3c 8002d04: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d08: 18d0 adds r0, r2, r3 8002d0a: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d0e: f893 302d ldrb.w r3, [r3, #45] @ 0x2d 8002d12: 461a mov r2, r3 8002d14: 4923 ldr r1, [pc, #140] @ (8002da4 ) 8002d16: f027 fe19 bl 802a94c 8002d1a: 4603 mov r3, r0 8002d1c: 461a mov r2, r3 8002d1e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d22: 4413 add r3, r2 8002d24: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"powerSupplyFailMask\":%d}", sensors->powerSupplyFailMask); 8002d28: f107 023c add.w r2, r7, #60 @ 0x3c 8002d2c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d30: 18d0 adds r0, r2, r3 8002d32: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d36: f893 302e ldrb.w r3, [r3, #46] @ 0x2e 8002d3a: 461a mov r2, r3 8002d3c: 491a ldr r1, [pc, #104] @ (8002da8 ) 8002d3e: f027 fe05 bl 802a94c 8002d42: 4603 mov r3, r0 8002d44: 461a mov r2, r3 8002d46: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d4a: 4413 add r3, r2 8002d4c: f8c7 3248 str.w r3, [r7, #584] @ 0x248 osMutexRelease (sensorsInfoMutex); 8002d50: 4b02 ldr r3, [pc, #8] @ (8002d5c ) 8002d52: 681b ldr r3, [r3, #0] 8002d54: 4618 mov r0, r3 8002d56: f00e fd6d bl 8011834 8002d5a: e050 b.n 8002dfe 8002d5c: 2400224c .word 0x2400224c 8002d60: 24002178 .word 0x24002178 8002d64: 0802d5c4 .word 0x0802d5c4 8002d68: 0802d5d0 .word 0x0802d5d0 8002d6c: 0802d5f0 .word 0x0802d5f0 8002d70: 0802d604 .word 0x0802d604 8002d74: 0802d618 .word 0x0802d618 8002d78: 0802d62c .word 0x0802d62c 8002d7c: 0802d640 .word 0x0802d640 8002d80: 0802d654 .word 0x0802d654 8002d84: 0802d670 .word 0x0802d670 8002d88: 0802d68c .word 0x0802d68c 8002d8c: 0802d6a8 .word 0x0802d6a8 8002d90: 0802d6c4 .word 0x0802d6c4 8002d94: 0802d6dc .word 0x0802d6dc 8002d98: 0802d6f4 .word 0x0802d6f4 8002d9c: 0802d710 .word 0x0802d710 8002da0: 0802d728 .word 0x0802d728 8002da4: 0802d740 .word 0x0802d740 8002da8: 0802d75c .word 0x0802d75c } else { sprintf (topicTextBuffer, "Sensors/%d", boardNumber); 8002dac: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 8002db0: f107 031c add.w r3, r7, #28 8002db4: 4926 ldr r1, [pc, #152] @ (8002e50 ) 8002db6: 4618 mov r0, r3 8002db8: f027 fdc8 bl 802a94c uint8_t mainBoardPowerSupplyFailMask = ~((HAL_GPIO_ReadPin (GPIOD, GPIO_PIN_4) << 1) | HAL_GPIO_ReadPin (GPIOD, GPIO_PIN_2)) & 0x3; 8002dbc: 2110 movs r1, #16 8002dbe: 4825 ldr r0, [pc, #148] @ (8002e54 ) 8002dc0: f007 f9d6 bl 800a170 8002dc4: 4603 mov r3, r0 8002dc6: 005b lsls r3, r3, #1 8002dc8: b25c sxtb r4, r3 8002dca: 2104 movs r1, #4 8002dcc: 4821 ldr r0, [pc, #132] @ (8002e54 ) 8002dce: f007 f9cf bl 800a170 8002dd2: 4603 mov r3, r0 8002dd4: b25b sxtb r3, r3 8002dd6: 4323 orrs r3, r4 8002dd8: b25b sxtb r3, r3 8002dda: 43db mvns r3, r3 8002ddc: b25b sxtb r3, r3 8002dde: b2db uxtb r3, r3 8002de0: f003 0303 and.w r3, r3, #3 8002de4: f887 3247 strb.w r3, [r7, #583] @ 0x247 bytesInBuffer = sprintf (messageBuffer, "{\"powerSupplyFailMask\":%d}", mainBoardPowerSupplyFailMask); 8002de8: f897 2247 ldrb.w r2, [r7, #583] @ 0x247 8002dec: f107 033c add.w r3, r7, #60 @ 0x3c 8002df0: 4919 ldr r1, [pc, #100] @ (8002e58 ) 8002df2: 4618 mov r0, r3 8002df4: f027 fdaa bl 802a94c 8002df8: 4603 mov r3, r0 8002dfa: f8c7 3248 str.w r3, [r7, #584] @ 0x248 } message.payload = (void*)messageBuffer; 8002dfe: f507 7314 add.w r3, r7, #592 @ 0x250 8002e02: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002e06: f107 023c add.w r2, r7, #60 @ 0x3c 8002e0a: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 8002e0c: f107 033c add.w r3, r7, #60 @ 0x3c 8002e10: 4618 mov r0, r3 8002e12: f7fd fac5 bl 80003a0 8002e16: 4602 mov r2, r0 8002e18: f507 7314 add.w r3, r7, #592 @ 0x250 8002e1c: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002e20: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 8002e22: f107 020c add.w r2, r7, #12 8002e26: f107 031c add.w r3, r7, #28 8002e2a: 4619 mov r1, r3 8002e2c: 480b ldr r0, [pc, #44] @ (8002e5c ) 8002e2e: f025 f8a6 bl 8027f7e for (boardNumber = 0; boardNumber < SLAVES_COUNT + 1; boardNumber++) { 8002e32: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002e36: 3301 adds r3, #1 8002e38: f887 324f strb.w r3, [r7, #591] @ 0x24f 8002e3c: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002e40: 2b04 cmp r3, #4 8002e42: f67f adfb bls.w 8002a3c } } } osDelay (pdMS_TO_TICKS (1000)); 8002e46: f44f 707a mov.w r0, #1000 @ 0x3e8 8002e4a: f00e fb10 bl 801146e if (mqttClient.isconnected) { 8002e4e: e4b8 b.n 80027c2 8002e50: 0802d5c4 .word 0x0802d5c4 8002e54: 58020c00 .word 0x58020c00 8002e58: 0802d778 .word 0x0802d778 8002e5c: 24000730 .word 0x24000730 08002e60 : } } uint32_t MqttConnectBroker () { 8002e60: b580 push {r7, lr} 8002e62: b09c sub sp, #112 @ 0x70 8002e64: af04 add r7, sp, #16 uint8_t boardNumber = 0; 8002e66: 2300 movs r3, #0 8002e68: f887 305f strb.w r3, [r7, #95] @ 0x5f int ret; NewNetwork (&net); 8002e6c: 4839 ldr r0, [pc, #228] @ (8002f54 ) 8002e6e: f025 f9bf bl 80281f0 ret = ConnectNetwork (&net, BROKER_IP, MQTT_PORT); 8002e72: f240 725b movw r2, #1883 @ 0x75b 8002e76: 4938 ldr r1, [pc, #224] @ (8002f58 ) 8002e78: 4836 ldr r0, [pc, #216] @ (8002f54 ) 8002e7a: f025 f9d5 bl 8028228 8002e7e: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002e80: 6dbb ldr r3, [r7, #88] @ 0x58 8002e82: 2b00 cmp r3, #0 8002e84: d005 beq.n 8002e92 printf ("ConnectNetwork failed.\n"); 8002e86: 4835 ldr r0, [pc, #212] @ (8002f5c ) 8002e88: f027 fd58 bl 802a93c return -1; 8002e8c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8002e90: e05c b.n 8002f4c } MQTTClientInit (&mqttClient, &net, 1000, sndBuffer, sizeof (sndBuffer), rcvBuffer, sizeof (rcvBuffer)); 8002e92: f44f 6380 mov.w r3, #1024 @ 0x400 8002e96: 9302 str r3, [sp, #8] 8002e98: 4b31 ldr r3, [pc, #196] @ (8002f60 ) 8002e9a: 9301 str r3, [sp, #4] 8002e9c: f44f 6380 mov.w r3, #1024 @ 0x400 8002ea0: 9300 str r3, [sp, #0] 8002ea2: 4b30 ldr r3, [pc, #192] @ (8002f64 ) 8002ea4: f44f 727a mov.w r2, #1000 @ 0x3e8 8002ea8: 492a ldr r1, [pc, #168] @ (8002f54 ) 8002eaa: 482f ldr r0, [pc, #188] @ (8002f68 ) 8002eac: f024 fada bl 8027464 MQTTPacket_connectData data = MQTTPacket_connectData_initializer; 8002eb0: 4a2e ldr r2, [pc, #184] @ (8002f6c ) 8002eb2: 463b mov r3, r7 8002eb4: 4611 mov r1, r2 8002eb6: 2258 movs r2, #88 @ 0x58 8002eb8: 4618 mov r0, r3 8002eba: f027 ff60 bl 802ad7e data.willFlag = 0; 8002ebe: 2300 movs r3, #0 8002ec0: 76fb strb r3, [r7, #27] data.MQTTVersion = 3; 8002ec2: 2303 movs r3, #3 8002ec4: 723b strb r3, [r7, #8] data.clientID.cstring = "test_user1"; 8002ec6: 4b2a ldr r3, [pc, #168] @ (8002f70 ) 8002ec8: 60fb str r3, [r7, #12] data.username.cstring = "test_user1"; 8002eca: 4b29 ldr r3, [pc, #164] @ (8002f70 ) 8002ecc: 643b str r3, [r7, #64] @ 0x40 data.password.cstring = "1234"; 8002ece: 4b29 ldr r3, [pc, #164] @ (8002f74 ) 8002ed0: 64fb str r3, [r7, #76] @ 0x4c data.keepAliveInterval = 100; 8002ed2: 2364 movs r3, #100 @ 0x64 8002ed4: 833b strh r3, [r7, #24] data.cleansession = 1; 8002ed6: 2301 movs r3, #1 8002ed8: 76bb strb r3, [r7, #26] ret = MQTTConnect (&mqttClient, &data); 8002eda: 463b mov r3, r7 8002edc: 4619 mov r1, r3 8002ede: 4822 ldr r0, [pc, #136] @ (8002f68 ) 8002ee0: f024 ff1c bl 8027d1c 8002ee4: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002ee6: 6dbb ldr r3, [r7, #88] @ 0x58 8002ee8: 2b00 cmp r3, #0 8002eea: d008 beq.n 8002efe net_disconnect (&net); 8002eec: 4819 ldr r0, [pc, #100] @ (8002f54 ) 8002eee: f025 fa24 bl 802833a printf ("MQTTConnect failed. Code %d\n", ret); 8002ef2: 6db9 ldr r1, [r7, #88] @ 0x58 8002ef4: 4820 ldr r0, [pc, #128] @ (8002f78 ) 8002ef6: f027 fcb9 bl 802a86c return ret; 8002efa: 6dbb ldr r3, [r7, #88] @ 0x58 8002efc: e026 b.n 8002f4c } for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002efe: 2300 movs r3, #0 8002f00: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002f04: e01a b.n 8002f3c ret = MQTTSubscribe (&mqttClient, subscribeTopicNames[boardNumber], QOS0, MqttMessageArrived); 8002f06: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002f0a: 4a1c ldr r2, [pc, #112] @ (8002f7c ) 8002f0c: f852 1023 ldr.w r1, [r2, r3, lsl #2] 8002f10: 4b1b ldr r3, [pc, #108] @ (8002f80 ) 8002f12: 2200 movs r2, #0 8002f14: 4814 ldr r0, [pc, #80] @ (8002f68 ) 8002f16: f025 f81c bl 8027f52 8002f1a: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002f1c: 6dbb ldr r3, [r7, #88] @ 0x58 8002f1e: 2b00 cmp r3, #0 8002f20: d007 beq.n 8002f32 net_disconnect (&net); 8002f22: 480c ldr r0, [pc, #48] @ (8002f54 ) 8002f24: f025 fa09 bl 802833a printf ("MQTTSubscribe failed.\n"); 8002f28: 4816 ldr r0, [pc, #88] @ (8002f84 ) 8002f2a: f027 fd07 bl 802a93c return ret; 8002f2e: 6dbb ldr r3, [r7, #88] @ 0x58 8002f30: e00c b.n 8002f4c for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002f32: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002f36: 3301 adds r3, #1 8002f38: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002f3c: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002f40: 2b03 cmp r3, #3 8002f42: d9e0 bls.n 8002f06 } } printf ("MQTT_ConnectBroker O.K.\n"); 8002f44: 4810 ldr r0, [pc, #64] @ (8002f88 ) 8002f46: f027 fcf9 bl 802a93c return MQTT_SUCCESS; 8002f4a: 2300 movs r3, #0 } 8002f4c: 4618 mov r0, r3 8002f4e: 3760 adds r7, #96 @ 0x60 8002f50: 46bd mov sp, r7 8002f52: bd80 pop {r7, pc} 8002f54: 24000720 .word 0x24000720 8002f58: 0802d794 .word 0x0802d794 8002f5c: 0802d7a4 .word 0x0802d7a4 8002f60: 24000b9c .word 0x24000b9c 8002f64: 2400079c .word 0x2400079c 8002f68: 24000730 .word 0x24000730 8002f6c: 0802d820 .word 0x0802d820 8002f70: 0802d7bc .word 0x0802d7bc 8002f74: 0802d7c8 .word 0x0802d7c8 8002f78: 0802d7d0 .word 0x0802d7d0 8002f7c: 080319f4 .word 0x080319f4 8002f80: 080030f1 .word 0x080030f1 8002f84: 0802d7f0 .word 0x0802d7f0 8002f88: 0802d808 .word 0x0802d808 08002f8c : void RelayCtrl (int32_t relayNumber, int32_t relayTimeOn) { 8002f8c: b580 push {r7, lr} 8002f8e: b082 sub sp, #8 8002f90: af00 add r7, sp, #0 8002f92: 6078 str r0, [r7, #4] 8002f94: 6039 str r1, [r7, #0] switch (relayNumber) { 8002f96: 687b ldr r3, [r7, #4] 8002f98: 3b01 subs r3, #1 8002f9a: 2b03 cmp r3, #3 8002f9c: f200 8098 bhi.w 80030d0 8002fa0: a201 add r2, pc, #4 @ (adr r2, 8002fa8 ) 8002fa2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8002fa6: bf00 nop 8002fa8: 08002fb9 .word 0x08002fb9 8002fac: 08002fff .word 0x08002fff 8002fb0: 08003045 .word 0x08003045 8002fb4: 0800308b .word 0x0800308b case 1: if (relayTimeOn > 0) { 8002fb8: 683b ldr r3, [r7, #0] 8002fba: 2b00 cmp r3, #0 8002fbc: dd0b ble.n 8002fd6 osTimerStart (relay1TimerHandle, relayTimeOn * 1000); 8002fbe: 4b47 ldr r3, [pc, #284] @ (80030dc ) 8002fc0: 681a ldr r2, [r3, #0] 8002fc2: 683b ldr r3, [r7, #0] 8002fc4: f44f 717a mov.w r1, #1000 @ 0x3e8 8002fc8: fb01 f303 mul.w r3, r1, r3 8002fcc: 4619 mov r1, r3 8002fce: 4610 mov r0, r2 8002fd0: f00e fafa bl 80115c8 8002fd4: e004 b.n 8002fe0 } else { osTimerStop (relay1TimerHandle); 8002fd6: 4b41 ldr r3, [pc, #260] @ (80030dc ) 8002fd8: 681b ldr r3, [r3, #0] 8002fda: 4618 mov r0, r3 8002fdc: f00e fb22 bl 8011624 } if (relayTimeOn != 0) { 8002fe0: 683b ldr r3, [r7, #0] 8002fe2: 2b00 cmp r3, #0 8002fe4: d005 beq.n 8002ff2 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_5, GPIO_PIN_SET); 8002fe6: 2201 movs r2, #1 8002fe8: 2120 movs r1, #32 8002fea: 483d ldr r0, [pc, #244] @ (80030e0 ) 8002fec: f007 f8d8 bl 800a1a0 } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); } break; 8002ff0: e06f b.n 80030d2 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); 8002ff2: 2200 movs r2, #0 8002ff4: 2120 movs r1, #32 8002ff6: 483a ldr r0, [pc, #232] @ (80030e0 ) 8002ff8: f007 f8d2 bl 800a1a0 break; 8002ffc: e069 b.n 80030d2 case 2: if (relayTimeOn > 0) { 8002ffe: 683b ldr r3, [r7, #0] 8003000: 2b00 cmp r3, #0 8003002: dd0b ble.n 800301c osTimerStart (relay2TimerHandle, relayTimeOn * 1000); 8003004: 4b37 ldr r3, [pc, #220] @ (80030e4 ) 8003006: 681a ldr r2, [r3, #0] 8003008: 683b ldr r3, [r7, #0] 800300a: f44f 717a mov.w r1, #1000 @ 0x3e8 800300e: fb01 f303 mul.w r3, r1, r3 8003012: 4619 mov r1, r3 8003014: 4610 mov r0, r2 8003016: f00e fad7 bl 80115c8 800301a: e004 b.n 8003026 } else { osTimerStop (relay2TimerHandle); 800301c: 4b31 ldr r3, [pc, #196] @ (80030e4 ) 800301e: 681b ldr r3, [r3, #0] 8003020: 4618 mov r0, r3 8003022: f00e faff bl 8011624 } if (relayTimeOn != 0) { 8003026: 683b ldr r3, [r7, #0] 8003028: 2b00 cmp r3, #0 800302a: d005 beq.n 8003038 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_3, GPIO_PIN_SET); 800302c: 2201 movs r2, #1 800302e: 2108 movs r1, #8 8003030: 482b ldr r0, [pc, #172] @ (80030e0 ) 8003032: f007 f8b5 bl 800a1a0 } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); } break; 8003036: e04c b.n 80030d2 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); 8003038: 2200 movs r2, #0 800303a: 2108 movs r1, #8 800303c: 4828 ldr r0, [pc, #160] @ (80030e0 ) 800303e: f007 f8af bl 800a1a0 break; 8003042: e046 b.n 80030d2 case 3: if (relayTimeOn > 0) { 8003044: 683b ldr r3, [r7, #0] 8003046: 2b00 cmp r3, #0 8003048: dd0b ble.n 8003062 osTimerStart (relay3TimerHandle, relayTimeOn * 1000); 800304a: 4b27 ldr r3, [pc, #156] @ (80030e8 ) 800304c: 681a ldr r2, [r3, #0] 800304e: 683b ldr r3, [r7, #0] 8003050: f44f 717a mov.w r1, #1000 @ 0x3e8 8003054: fb01 f303 mul.w r3, r1, r3 8003058: 4619 mov r1, r3 800305a: 4610 mov r0, r2 800305c: f00e fab4 bl 80115c8 8003060: e004 b.n 800306c } else { osTimerStop (relay3TimerHandle); 8003062: 4b21 ldr r3, [pc, #132] @ (80030e8 ) 8003064: 681b ldr r3, [r3, #0] 8003066: 4618 mov r0, r3 8003068: f00e fadc bl 8011624 } if (relayTimeOn != 0) { 800306c: 683b ldr r3, [r7, #0] 800306e: 2b00 cmp r3, #0 8003070: d005 beq.n 800307e HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_SET); 8003072: 2201 movs r2, #1 8003074: 2110 movs r1, #16 8003076: 481a ldr r0, [pc, #104] @ (80030e0 ) 8003078: f007 f892 bl 800a1a0 } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); } break; 800307c: e029 b.n 80030d2 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); 800307e: 2200 movs r2, #0 8003080: 2110 movs r1, #16 8003082: 4817 ldr r0, [pc, #92] @ (80030e0 ) 8003084: f007 f88c bl 800a1a0 break; 8003088: e023 b.n 80030d2 case 4: if (relayTimeOn > 0) { 800308a: 683b ldr r3, [r7, #0] 800308c: 2b00 cmp r3, #0 800308e: dd0b ble.n 80030a8 osTimerStart (relay4TimerHandle, relayTimeOn * 1000); 8003090: 4b16 ldr r3, [pc, #88] @ (80030ec ) 8003092: 681a ldr r2, [r3, #0] 8003094: 683b ldr r3, [r7, #0] 8003096: f44f 717a mov.w r1, #1000 @ 0x3e8 800309a: fb01 f303 mul.w r3, r1, r3 800309e: 4619 mov r1, r3 80030a0: 4610 mov r0, r2 80030a2: f00e fa91 bl 80115c8 80030a6: e004 b.n 80030b2 } else { osTimerStop (relay4TimerHandle); 80030a8: 4b10 ldr r3, [pc, #64] @ (80030ec ) 80030aa: 681b ldr r3, [r3, #0] 80030ac: 4618 mov r0, r3 80030ae: f00e fab9 bl 8011624 } if (relayTimeOn != 0) { 80030b2: 683b ldr r3, [r7, #0] 80030b4: 2b00 cmp r3, #0 80030b6: d005 beq.n 80030c4 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_SET); 80030b8: 2201 movs r2, #1 80030ba: 2104 movs r1, #4 80030bc: 4808 ldr r0, [pc, #32] @ (80030e0 ) 80030be: f007 f86f bl 800a1a0 } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); } break; 80030c2: e006 b.n 80030d2 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); 80030c4: 2200 movs r2, #0 80030c6: 2104 movs r1, #4 80030c8: 4805 ldr r0, [pc, #20] @ (80030e0 ) 80030ca: f007 f869 bl 800a1a0 break; 80030ce: e000 b.n 80030d2 default: break; 80030d0: bf00 nop } } 80030d2: bf00 nop 80030d4: 3708 adds r7, #8 80030d6: 46bd mov sp, r7 80030d8: bd80 pop {r7, pc} 80030da: bf00 nop 80030dc: 24000658 .word 0x24000658 80030e0: 58021000 .word 0x58021000 80030e4: 24000688 .word 0x24000688 80030e8: 240006b8 .word 0x240006b8 80030ec: 240006e8 .word 0x240006e8 080030f0 : void MqttMessageArrived (MessageData* msg) { 80030f0: b580 push {r7, lr} 80030f2: b09c sub sp, #112 @ 0x70 80030f4: af00 add r7, sp, #0 80030f6: 6078 str r0, [r7, #4] SerialProtocolCommands spCommand = spUnknown; 80030f8: 2310 movs r3, #16 80030fa: f887 306f strb.w r3, [r7, #111] @ 0x6f BoardNoOverTopic topicForBoard = unknownBoard; 80030fe: 2305 movs r3, #5 8003100: f887 306e strb.w r3, [r7, #110] @ 0x6e uint8_t boardNumber = 0; 8003104: 2300 movs r3, #0 8003106: f887 306d strb.w r3, [r7, #109] @ 0x6d MQTTMessage* message = msg->message; 800310a: 687b ldr r3, [r7, #4] 800310c: 681b ldr r3, [r3, #0] 800310e: 653b str r3, [r7, #80] @ 0x50 char topicName[32] = { 0 }; 8003110: 2300 movs r3, #0 8003112: 61bb str r3, [r7, #24] 8003114: f107 031c add.w r3, r7, #28 8003118: 2200 movs r2, #0 800311a: 601a str r2, [r3, #0] 800311c: 605a str r2, [r3, #4] 800311e: 609a str r2, [r3, #8] 8003120: 60da str r2, [r3, #12] 8003122: 611a str r2, [r3, #16] 8003124: 615a str r2, [r3, #20] 8003126: 619a str r2, [r3, #24] memcpy (topicName, msg->topicName->lenstring.data, msg->topicName->lenstring.len); 8003128: 687b ldr r3, [r7, #4] 800312a: 685b ldr r3, [r3, #4] 800312c: 6899 ldr r1, [r3, #8] 800312e: 687b ldr r3, [r7, #4] 8003130: 685b ldr r3, [r3, #4] 8003132: 685b ldr r3, [r3, #4] 8003134: 461a mov r2, r3 8003136: f107 0318 add.w r3, r7, #24 800313a: 4618 mov r0, r3 800313c: f027 fe1f bl 802ad7e for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8003140: 2300 movs r3, #0 8003142: f887 306d strb.w r3, [r7, #109] @ 0x6d 8003146: e017 b.n 8003178 if (strcmp (topicName, subscribeTopicNames[boardNumber]) == 0) { 8003148: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 800314c: 4ab5 ldr r2, [pc, #724] @ (8003424 ) 800314e: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8003152: f107 0318 add.w r3, r7, #24 8003156: 4611 mov r1, r2 8003158: 4618 mov r0, r3 800315a: f7fd f8c1 bl 80002e0 800315e: 4603 mov r3, r0 8003160: 2b00 cmp r3, #0 8003162: d104 bne.n 800316e topicForBoard = (BoardNoOverTopic)(boardNumber); 8003164: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 8003168: f887 306e strb.w r3, [r7, #110] @ 0x6e break; 800316c: e008 b.n 8003180 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 800316e: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 8003172: 3301 adds r3, #1 8003174: f887 306d strb.w r3, [r7, #109] @ 0x6d 8003178: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 800317c: 2b03 cmp r3, #3 800317e: d9e3 bls.n 8003148 } } if (topicForBoard == unknownBoard) { 8003180: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 8003184: 2b05 cmp r3, #5 8003186: f000 8212 beq.w 80035ae return; } cJSON* json = cJSON_Parse (message->payload); 800318a: 6d3b ldr r3, [r7, #80] @ 0x50 800318c: 689b ldr r3, [r3, #8] 800318e: 4618 mov r0, r3 8003190: f7fe f9e0 bl 8001554 8003194: 64f8 str r0, [r7, #76] @ 0x4c const cJSON* objectItem = NULL; 8003196: 2300 movs r3, #0 8003198: 64bb str r3, [r7, #72] @ 0x48 InterProcessData data = { 0 }; 800319a: f107 0308 add.w r3, r7, #8 800319e: 2200 movs r2, #0 80031a0: 601a str r2, [r3, #0] 80031a2: 605a str r2, [r3, #4] 80031a4: 609a str r2, [r3, #8] 80031a6: 60da str r2, [r3, #12] uint32_t arraySize = 0; 80031a8: 2300 movs r3, #0 80031aa: 647b str r3, [r7, #68] @ 0x44 if (topicForBoard != main_board) { 80031ac: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 80031b0: 2b00 cmp r3, #0 80031b2: f000 8180 beq.w 80034b6 for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 80031b6: 2300 movs r3, #0 80031b8: 66bb str r3, [r7, #104] @ 0x68 80031ba: e177 b.n 80034ac spCommand = spUnknown; 80031bc: 2310 movs r3, #16 80031be: f887 306f strb.w r3, [r7, #111] @ 0x6f objectItem = cJSON_GetObjectItemCaseSensitive (json, topicCommands[topicCmdNumber]); 80031c2: 4a99 ldr r2, [pc, #612] @ (8003428 ) 80031c4: 6ebb ldr r3, [r7, #104] @ 0x68 80031c6: f852 3023 ldr.w r3, [r2, r3, lsl #2] 80031ca: 4619 mov r1, r3 80031cc: 6cf8 ldr r0, [r7, #76] @ 0x4c 80031ce: f7fe fd2b bl 8001c28 80031d2: 64b8 str r0, [r7, #72] @ 0x48 if (objectItem != NULL) { 80031d4: 6cbb ldr r3, [r7, #72] @ 0x48 80031d6: 2b00 cmp r3, #0 80031d8: f000 8165 beq.w 80034a6 switch (topicCmdNumber) { 80031dc: 6ebb ldr r3, [r7, #104] @ 0x68 80031de: 2b0e cmp r3, #14 80031e0: f200 8150 bhi.w 8003484 80031e4: a201 add r2, pc, #4 @ (adr r2, 80031ec ) 80031e6: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80031ea: bf00 nop 80031ec: 08003229 .word 0x08003229 80031f0: 0800322f .word 0x0800322f 80031f4: 0800323d .word 0x0800323d 80031f8: 080032ad .word 0x080032ad 80031fc: 080032c7 .word 0x080032c7 8003200: 080032cd .word 0x080032cd 8003204: 080032ff .word 0x080032ff 8003208: 0800331d .word 0x0800331d 800320c: 08003389 .word 0x08003389 8003210: 080033ab .word 0x080033ab 8003214: 080033cb .word 0x080033cb 8003218: 080033d1 .word 0x080033d1 800321c: 080033df .word 0x080033df 8003220: 080033ed .word 0x080033ed 8003224: 0800346b .word 0x0800346b case fanSpeedTopic: spCommand = spSetFanSpeed; 8003228: 2302 movs r3, #2 800322a: f887 306f strb.w r3, [r7, #111] @ 0x6f case motorXonTopic: if (spCommand == spUnknown) { 800322e: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 8003232: 2b10 cmp r3, #16 8003234: d102 bne.n 800323c spCommand = spSetMotorXOn; 8003236: 2303 movs r3, #3 8003238: f887 306f strb.w r3, [r7, #111] @ 0x6f } case motorYonTopic: if (spCommand == spUnknown) { 800323c: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 8003240: 2b10 cmp r3, #16 8003242: d102 bne.n 800324a spCommand = spSetMotorYOn; 8003244: 2304 movs r3, #4 8003246: f887 306f strb.w r3, [r7, #111] @ 0x6f } if (cJSON_IsArray (objectItem)) { 800324a: 6cb8 ldr r0, [r7, #72] @ 0x48 800324c: f7fe fd12 bl 8001c74 8003250: 4603 mov r3, r0 8003252: 2b00 cmp r3, #0 8003254: f000 8118 beq.w 8003488 data.spCommand = spCommand; 8003258: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 800325c: 723b strb r3, [r7, #8] arraySize = cJSON_GetArraySize (objectItem); 800325e: 6cb8 ldr r0, [r7, #72] @ 0x48 8003260: f7fe fc42 bl 8001ae8 8003264: 4603 mov r3, r0 8003266: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 2) { 8003268: 6c7b ldr r3, [r7, #68] @ 0x44 800326a: 2b02 cmp r3, #2 800326c: f040 810c bne.w 8003488 for (int i = 0; i < arraySize; i++) { 8003270: 2300 movs r3, #0 8003272: 667b str r3, [r7, #100] @ 0x64 8003274: e015 b.n 80032a2 cJSON* item = cJSON_GetArrayItem (objectItem, i); 8003276: 6e79 ldr r1, [r7, #100] @ 0x64 8003278: 6cb8 ldr r0, [r7, #72] @ 0x48 800327a: f7fe fc79 bl 8001b70 800327e: 63b8 str r0, [r7, #56] @ 0x38 if (cJSON_IsNumber (item)) { 8003280: 6bb8 ldr r0, [r7, #56] @ 0x38 8003282: f7fe fce0 bl 8001c46 8003286: 4603 mov r3, r0 8003288: 2b00 cmp r3, #0 800328a: d007 beq.n 800329c data.values.integerValues.value[i] = item->valueint; 800328c: 6bbb ldr r3, [r7, #56] @ 0x38 800328e: 695a ldr r2, [r3, #20] 8003290: 6e7b ldr r3, [r7, #100] @ 0x64 8003292: 009b lsls r3, r3, #2 8003294: 3370 adds r3, #112 @ 0x70 8003296: 443b add r3, r7 8003298: f843 2c64 str.w r2, [r3, #-100] for (int i = 0; i < arraySize; i++) { 800329c: 6e7b ldr r3, [r7, #100] @ 0x64 800329e: 3301 adds r3, #1 80032a0: 667b str r3, [r7, #100] @ 0x64 80032a2: 6e7b ldr r3, [r7, #100] @ 0x64 80032a4: 6c7a ldr r2, [r7, #68] @ 0x44 80032a6: 429a cmp r2, r3 80032a8: d8e5 bhi.n 8003276 } } } } break; 80032aa: e0ed b.n 8003488 case diodeTopic: if (cJSON_IsNumber (objectItem)) { 80032ac: 6cb8 ldr r0, [r7, #72] @ 0x48 80032ae: f7fe fcca bl 8001c46 80032b2: 4603 mov r3, r0 80032b4: 2b00 cmp r3, #0 80032b6: f000 80e9 beq.w 800348c data.spCommand = spSetDiodeOn; 80032ba: 2307 movs r3, #7 80032bc: 723b strb r3, [r7, #8] data.values.integerValues.value[0] = objectItem->valueint; 80032be: 6cbb ldr r3, [r7, #72] @ 0x48 80032c0: 695b ldr r3, [r3, #20] 80032c2: 60fb str r3, [r7, #12] } break; 80032c4: e0e2 b.n 800348c case motorXMaxCurrentTopic: spCommand = spSetmotorXMaxCurrent; 80032c6: 2305 movs r3, #5 80032c8: f887 306f strb.w r3, [r7, #111] @ 0x6f case motorYMaxCurrentTopic: if (cJSON_IsNumber (objectItem)) { 80032cc: 6cb8 ldr r0, [r7, #72] @ 0x48 80032ce: f7fe fcba bl 8001c46 80032d2: 4603 mov r3, r0 80032d4: 2b00 cmp r3, #0 80032d6: f000 80db beq.w 8003490 if (spCommand == spUnknown) { 80032da: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80032de: 2b10 cmp r3, #16 80032e0: d102 bne.n 80032e8 spCommand = spSetmotorYMaxCurrent; 80032e2: 2306 movs r3, #6 80032e4: f887 306f strb.w r3, [r7, #111] @ 0x6f } data.spCommand = spCommand; 80032e8: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80032ec: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 80032ee: 6cbb ldr r3, [r7, #72] @ 0x48 80032f0: ed93 7b06 vldr d7, [r3, #24] 80032f4: eef7 7bc7 vcvt.f32.f64 s15, d7 80032f8: edc7 7a03 vstr s15, [r7, #12] } break; 80032fc: e0c8 b.n 8003490 case clearPeakElectricalMeasurementsTopic: if (cJSON_IsNumber (objectItem)) { 80032fe: 6cb8 ldr r0, [r7, #72] @ 0x48 8003300: f7fe fca1 bl 8001c46 8003304: 4603 mov r3, r0 8003306: 2b00 cmp r3, #0 8003308: f000 80c4 beq.w 8003494 if (objectItem->valueint == 1) { 800330c: 6cbb ldr r3, [r7, #72] @ 0x48 800330e: 695b ldr r3, [r3, #20] 8003310: 2b01 cmp r3, #1 8003312: f040 80bf bne.w 8003494 data.spCommand = spClearPeakMeasurments; 8003316: 2308 movs r3, #8 8003318: 723b strb r3, [r7, #8] } } break; 800331a: e0bb b.n 8003494 case mainBoardRelayTopic: if (cJSON_IsArray (objectItem)) { 800331c: 6cb8 ldr r0, [r7, #72] @ 0x48 800331e: f7fe fca9 bl 8001c74 8003322: 4603 mov r3, r0 8003324: 2b00 cmp r3, #0 8003326: f000 80b7 beq.w 8003498 arraySize = cJSON_GetArraySize (objectItem); 800332a: 6cb8 ldr r0, [r7, #72] @ 0x48 800332c: f7fe fbdc bl 8001ae8 8003330: 4603 mov r3, r0 8003332: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 2) { 8003334: 6c7b ldr r3, [r7, #68] @ 0x44 8003336: 2b02 cmp r3, #2 8003338: f040 80ae bne.w 8003498 int32_t relayNumber = -1; 800333c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8003340: 663b str r3, [r7, #96] @ 0x60 cJSON* item = cJSON_GetArrayItem (objectItem, 0); 8003342: 2100 movs r1, #0 8003344: 6cb8 ldr r0, [r7, #72] @ 0x48 8003346: f7fe fc13 bl 8001b70 800334a: 63f8 str r0, [r7, #60] @ 0x3c if (cJSON_IsNumber (item)) { 800334c: 6bf8 ldr r0, [r7, #60] @ 0x3c 800334e: f7fe fc7a bl 8001c46 8003352: 4603 mov r3, r0 8003354: 2b00 cmp r3, #0 8003356: d002 beq.n 800335e relayNumber = item->valueint; 8003358: 6bfb ldr r3, [r7, #60] @ 0x3c 800335a: 695b ldr r3, [r3, #20] 800335c: 663b str r3, [r7, #96] @ 0x60 } int32_t relayTimeOn = 0; 800335e: 2300 movs r3, #0 8003360: 65fb str r3, [r7, #92] @ 0x5c item = cJSON_GetArrayItem (objectItem, 1); 8003362: 2101 movs r1, #1 8003364: 6cb8 ldr r0, [r7, #72] @ 0x48 8003366: f7fe fc03 bl 8001b70 800336a: 63f8 str r0, [r7, #60] @ 0x3c if (cJSON_IsNumber (item)) { 800336c: 6bf8 ldr r0, [r7, #60] @ 0x3c 800336e: f7fe fc6a bl 8001c46 8003372: 4603 mov r3, r0 8003374: 2b00 cmp r3, #0 8003376: d002 beq.n 800337e relayTimeOn = item->valueint; 8003378: 6bfb ldr r3, [r7, #60] @ 0x3c 800337a: 695b ldr r3, [r3, #20] 800337c: 65fb str r3, [r7, #92] @ 0x5c } RelayCtrl (relayNumber, relayTimeOn); 800337e: 6df9 ldr r1, [r7, #92] @ 0x5c 8003380: 6e38 ldr r0, [r7, #96] @ 0x60 8003382: f7ff fe03 bl 8002f8c } } break; 8003386: e087 b.n 8003498 case setEncoderXValue: if (cJSON_IsNumber (objectItem)) { 8003388: 6cb8 ldr r0, [r7, #72] @ 0x48 800338a: f7fe fc5c bl 8001c46 800338e: 4603 mov r3, r0 8003390: 2b00 cmp r3, #0 8003392: f000 8083 beq.w 800349c data.spCommand = spSetEncoderXValue; 8003396: 2309 movs r3, #9 8003398: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 800339a: 6cbb ldr r3, [r7, #72] @ 0x48 800339c: ed93 7b06 vldr d7, [r3, #24] 80033a0: eef7 7bc7 vcvt.f32.f64 s15, d7 80033a4: edc7 7a03 vstr s15, [r7, #12] } break; 80033a8: e078 b.n 800349c case setEncoderYValue: if (cJSON_IsNumber (objectItem)) { 80033aa: 6cb8 ldr r0, [r7, #72] @ 0x48 80033ac: f7fe fc4b bl 8001c46 80033b0: 4603 mov r3, r0 80033b2: 2b00 cmp r3, #0 80033b4: d074 beq.n 80034a0 data.spCommand = spSetEncoderYValue; 80033b6: 230a movs r3, #10 80033b8: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 80033ba: 6cbb ldr r3, [r7, #72] @ 0x48 80033bc: ed93 7b06 vldr d7, [r3, #24] 80033c0: eef7 7bc7 vcvt.f32.f64 s15, d7 80033c4: edc7 7a03 vstr s15, [r7, #12] } break; 80033c8: e06a b.n 80034a0 case setVoltageMeasGains: spCommand = spSetVoltageMeasGains; 80033ca: 230b movs r3, #11 80033cc: f887 306f strb.w r3, [r7, #111] @ 0x6f case setVoltageMeasOffsets: if (spCommand == spUnknown) { 80033d0: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80033d4: 2b10 cmp r3, #16 80033d6: d102 bne.n 80033de spCommand = spSetVoltageMeasOffsets; 80033d8: 230c movs r3, #12 80033da: f887 306f strb.w r3, [r7, #111] @ 0x6f } case setCurrentMeasGains: if (spCommand == spUnknown) { 80033de: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80033e2: 2b10 cmp r3, #16 80033e4: d102 bne.n 80033ec spCommand = spSetCurrentMeasGains; 80033e6: 230d movs r3, #13 80033e8: f887 306f strb.w r3, [r7, #111] @ 0x6f } case setCurrentMeasOffsets: if (spCommand == spUnknown) { 80033ec: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80033f0: 2b10 cmp r3, #16 80033f2: d102 bne.n 80033fa spCommand = spSetCurrentMeasOffsets; 80033f4: 230e movs r3, #14 80033f6: f887 306f strb.w r3, [r7, #111] @ 0x6f } if (cJSON_IsArray (objectItem)) { 80033fa: 6cb8 ldr r0, [r7, #72] @ 0x48 80033fc: f7fe fc3a bl 8001c74 8003400: 4603 mov r3, r0 8003402: 2b00 cmp r3, #0 8003404: d04e beq.n 80034a4 data.spCommand = spCommand; 8003406: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 800340a: 723b strb r3, [r7, #8] arraySize = cJSON_GetArraySize (objectItem); 800340c: 6cb8 ldr r0, [r7, #72] @ 0x48 800340e: f7fe fb6b bl 8001ae8 8003412: 4603 mov r3, r0 8003414: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 3) { 8003416: 6c7b ldr r3, [r7, #68] @ 0x44 8003418: 2b03 cmp r3, #3 800341a: d143 bne.n 80034a4 for (int i = 0; i < arraySize; i++) { 800341c: 2300 movs r3, #0 800341e: 65bb str r3, [r7, #88] @ 0x58 8003420: e01e b.n 8003460 8003422: bf00 nop 8003424: 080319f4 .word 0x080319f4 8003428: 08031a08 .word 0x08031a08 cJSON* item = cJSON_GetArrayItem (objectItem, i); 800342c: 6db9 ldr r1, [r7, #88] @ 0x58 800342e: 6cb8 ldr r0, [r7, #72] @ 0x48 8003430: f7fe fb9e bl 8001b70 8003434: 6438 str r0, [r7, #64] @ 0x40 if (cJSON_IsNumber (item)) { 8003436: 6c38 ldr r0, [r7, #64] @ 0x40 8003438: f7fe fc05 bl 8001c46 800343c: 4603 mov r3, r0 800343e: 2b00 cmp r3, #0 8003440: d00b beq.n 800345a data.values.flaotValues.value[i] = item->valuedouble; 8003442: 6c3b ldr r3, [r7, #64] @ 0x40 8003444: ed93 7b06 vldr d7, [r3, #24] 8003448: eef7 7bc7 vcvt.f32.f64 s15, d7 800344c: 6dbb ldr r3, [r7, #88] @ 0x58 800344e: 009b lsls r3, r3, #2 8003450: 3370 adds r3, #112 @ 0x70 8003452: 443b add r3, r7 8003454: 3b64 subs r3, #100 @ 0x64 8003456: edc3 7a00 vstr s15, [r3] for (int i = 0; i < arraySize; i++) { 800345a: 6dbb ldr r3, [r7, #88] @ 0x58 800345c: 3301 adds r3, #1 800345e: 65bb str r3, [r7, #88] @ 0x58 8003460: 6dbb ldr r3, [r7, #88] @ 0x58 8003462: 6c7a ldr r2, [r7, #68] @ 0x44 8003464: 429a cmp r2, r3 8003466: d8e1 bhi.n 800342c } } } } break; 8003468: e01c b.n 80034a4 case resetSystem: if (cJSON_IsNumber (objectItem)) { 800346a: 6cb8 ldr r0, [r7, #72] @ 0x48 800346c: f7fe fbeb bl 8001c46 8003470: 4603 mov r3, r0 8003472: 2b00 cmp r3, #0 8003474: d006 beq.n 8003484 if (objectItem->valueint == 1) { 8003476: 6cbb ldr r3, [r7, #72] @ 0x48 8003478: 695b ldr r3, [r3, #20] 800347a: 2b01 cmp r3, #1 800347c: d102 bne.n 8003484 data.spCommand = spResetSystem; 800347e: 230f movs r3, #15 8003480: 723b strb r3, [r7, #8] break; 8003482: e010 b.n 80034a6 } } default: break; 8003484: bf00 nop 8003486: e00e b.n 80034a6 break; 8003488: bf00 nop 800348a: e00c b.n 80034a6 break; 800348c: bf00 nop 800348e: e00a b.n 80034a6 break; 8003490: bf00 nop 8003492: e008 b.n 80034a6 break; 8003494: bf00 nop 8003496: e006 b.n 80034a6 break; 8003498: bf00 nop 800349a: e004 b.n 80034a6 break; 800349c: bf00 nop 800349e: e002 b.n 80034a6 break; 80034a0: bf00 nop 80034a2: e000 b.n 80034a6 break; 80034a4: bf00 nop for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 80034a6: 6ebb ldr r3, [r7, #104] @ 0x68 80034a8: 3301 adds r3, #1 80034aa: 66bb str r3, [r7, #104] @ 0x68 80034ac: 6ebb ldr r3, [r7, #104] @ 0x68 80034ae: 2b0e cmp r3, #14 80034b0: f77f ae84 ble.w 80031bc 80034b4: e01b b.n 80034ee } } } } else { for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 80034b6: 2300 movs r3, #0 80034b8: 657b str r3, [r7, #84] @ 0x54 80034ba: e015 b.n 80034e8 objectItem = cJSON_GetObjectItemCaseSensitive (json, topicCommands[topicCmdNumber]); 80034bc: 4a3e ldr r2, [pc, #248] @ (80035b8 ) 80034be: 6d7b ldr r3, [r7, #84] @ 0x54 80034c0: f852 3023 ldr.w r3, [r2, r3, lsl #2] 80034c4: 4619 mov r1, r3 80034c6: 6cf8 ldr r0, [r7, #76] @ 0x4c 80034c8: f7fe fbae bl 8001c28 80034cc: 64b8 str r0, [r7, #72] @ 0x48 if (objectItem != NULL) { 80034ce: 6cbb ldr r3, [r7, #72] @ 0x48 80034d0: 2b00 cmp r3, #0 80034d2: d006 beq.n 80034e2 if (topicCmdNumber == resetSystem) { 80034d4: 6d7b ldr r3, [r7, #84] @ 0x54 80034d6: 2b0e cmp r3, #14 80034d8: d103 bne.n 80034e2 __ASM volatile ("cpsid i" : : : "memory"); 80034da: b672 cpsid i } 80034dc: bf00 nop __disable_irq (); NVIC_SystemReset (); 80034de: f7ff f8f7 bl 80026d0 <__NVIC_SystemReset> for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 80034e2: 6d7b ldr r3, [r7, #84] @ 0x54 80034e4: 3301 adds r3, #1 80034e6: 657b str r3, [r7, #84] @ 0x54 80034e8: 6d7b ldr r3, [r7, #84] @ 0x54 80034ea: 2b0e cmp r3, #14 80034ec: dde6 ble.n 80034bc } } } } switch (topicForBoard) { 80034ee: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 80034f2: 2b04 cmp r3, #4 80034f4: d84c bhi.n 8003590 80034f6: a201 add r2, pc, #4 @ (adr r2, 80034fc ) 80034f8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80034fc: 08003591 .word 0x08003591 8003500: 08003511 .word 0x08003511 8003504: 08003531 .word 0x08003531 8003508: 08003551 .word 0x08003551 800350c: 08003571 .word 0x08003571 case main_board: break; case board_1: if (uart1TaskData.sendCmdToSlaveQueue != NULL) { 8003510: 4b2a ldr r3, [pc, #168] @ (80035bc ) 8003512: 6adb ldr r3, [r3, #44] @ 0x2c 8003514: 2b00 cmp r3, #0 8003516: d007 beq.n 8003528 osMessageQueuePut (uart1TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8003518: 4b28 ldr r3, [pc, #160] @ (80035bc ) 800351a: 6ad8 ldr r0, [r3, #44] @ 0x2c 800351c: f107 0108 add.w r1, r7, #8 8003520: 2364 movs r3, #100 @ 0x64 8003522: 2200 movs r2, #0 8003524: f00e fb7a bl 8011c1c } printf ("Send cmd to board 1\n"); 8003528: 4825 ldr r0, [pc, #148] @ (80035c0 ) 800352a: f027 fa07 bl 802a93c break; 800352e: e030 b.n 8003592 case board_2: if (uart3TaskData.sendCmdToSlaveQueue != NULL) { 8003530: 4b24 ldr r3, [pc, #144] @ (80035c4 ) 8003532: 6adb ldr r3, [r3, #44] @ 0x2c 8003534: 2b00 cmp r3, #0 8003536: d007 beq.n 8003548 osMessageQueuePut (uart3TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8003538: 4b22 ldr r3, [pc, #136] @ (80035c4 ) 800353a: 6ad8 ldr r0, [r3, #44] @ 0x2c 800353c: f107 0108 add.w r1, r7, #8 8003540: 2364 movs r3, #100 @ 0x64 8003542: 2200 movs r2, #0 8003544: f00e fb6a bl 8011c1c } printf ("Send cmd to board 2\n"); 8003548: 481f ldr r0, [pc, #124] @ (80035c8 ) 800354a: f027 f9f7 bl 802a93c break; 800354e: e020 b.n 8003592 case board_3: if (uart6TaskData.sendCmdToSlaveQueue != NULL) { 8003550: 4b1e ldr r3, [pc, #120] @ (80035cc ) 8003552: 6adb ldr r3, [r3, #44] @ 0x2c 8003554: 2b00 cmp r3, #0 8003556: d007 beq.n 8003568 osMessageQueuePut (uart6TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8003558: 4b1c ldr r3, [pc, #112] @ (80035cc ) 800355a: 6ad8 ldr r0, [r3, #44] @ 0x2c 800355c: f107 0108 add.w r1, r7, #8 8003560: 2364 movs r3, #100 @ 0x64 8003562: 2200 movs r2, #0 8003564: f00e fb5a bl 8011c1c } printf ("Send cmd to board 3\n"); 8003568: 4819 ldr r0, [pc, #100] @ (80035d0 ) 800356a: f027 f9e7 bl 802a93c break; 800356e: e010 b.n 8003592 case board_4: if (uart2TaskData.sendCmdToSlaveQueue != NULL) { 8003570: 4b18 ldr r3, [pc, #96] @ (80035d4 ) 8003572: 6adb ldr r3, [r3, #44] @ 0x2c 8003574: 2b00 cmp r3, #0 8003576: d007 beq.n 8003588 osMessageQueuePut (uart2TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8003578: 4b16 ldr r3, [pc, #88] @ (80035d4 ) 800357a: 6ad8 ldr r0, [r3, #44] @ 0x2c 800357c: f107 0108 add.w r1, r7, #8 8003580: 2364 movs r3, #100 @ 0x64 8003582: 2200 movs r2, #0 8003584: f00e fb4a bl 8011c1c } printf ("Send cmd to board 4\n"); 8003588: 4813 ldr r0, [pc, #76] @ (80035d8 ) 800358a: f027 f9d7 bl 802a93c break; 800358e: e000 b.n 8003592 default: break; 8003590: bf00 nop } cJSON_Delete (json); 8003592: 6cf8 ldr r0, [r7, #76] @ 0x4c 8003594: f7fd fafa bl 8000b8c printf ("MQTT Topic:%s, MSG[%d]:%s\n", topicName, (int)message->payloadlen, (char*)message->payload); 8003598: 6d3b ldr r3, [r7, #80] @ 0x50 800359a: 68db ldr r3, [r3, #12] 800359c: 461a mov r2, r3 800359e: 6d3b ldr r3, [r7, #80] @ 0x50 80035a0: 689b ldr r3, [r3, #8] 80035a2: f107 0118 add.w r1, r7, #24 80035a6: 480d ldr r0, [pc, #52] @ (80035dc ) 80035a8: f027 f960 bl 802a86c 80035ac: e000 b.n 80035b0 return; 80035ae: bf00 nop } 80035b0: 3770 adds r7, #112 @ 0x70 80035b2: 46bd mov sp, r7 80035b4: bd80 pop {r7, pc} 80035b6: bf00 nop 80035b8: 08031a08 .word 0x08031a08 80035bc: 24001eec .word 0x24001eec 80035c0: 0802d878 .word 0x0802d878 80035c4: 24001f24 .word 0x24001f24 80035c8: 0802d88c .word 0x0802d88c 80035cc: 24001f5c .word 0x24001f5c 80035d0: 0802d8a0 .word 0x0802d8a0 80035d4: 24001f94 .word 0x24001f94 80035d8: 0802d8b4 .word 0x0802d8b4 80035dc: 0802d8c8 .word 0x0802d8c8 080035e0 : void mqtt_cli_init (void) { 80035e0: b580 push {r7, lr} 80035e2: af00 add r7, sp, #0 mqttClientSubTaskHandle = osThreadNew (MqttClientSubTask, NULL, &mqttClientSubTaskAttr); // subscribe task 80035e4: 4a08 ldr r2, [pc, #32] @ (8003608 ) 80035e6: 2100 movs r1, #0 80035e8: 4808 ldr r0, [pc, #32] @ (800360c ) 80035ea: f00d fea2 bl 8011332 80035ee: 4603 mov r3, r0 80035f0: 4a07 ldr r2, [pc, #28] @ (8003610 ) 80035f2: 6013 str r3, [r2, #0] mqttClientPubTaskHandle = osThreadNew (MqttClientPubTask, NULL, &mqttClientPubTaskAttr); // publish task 80035f4: 4a07 ldr r2, [pc, #28] @ (8003614 ) 80035f6: 2100 movs r1, #0 80035f8: 4807 ldr r0, [pc, #28] @ (8003618 ) 80035fa: f00d fe9a bl 8011332 80035fe: 4603 mov r3, r0 8003600: 4a06 ldr r2, [pc, #24] @ (800361c ) 8003602: 6013 str r3, [r2, #0] } 8003604: bf00 nop 8003606: bd80 pop {r7, pc} 8003608: 08031a44 .word 0x08031a44 800360c: 080026fd .word 0x080026fd 8003610: 24000718 .word 0x24000718 8003614: 08031a68 .word 0x08031a68 8003618: 0800276d .word 0x0800276d 800361c: 2400071c .word 0x2400071c 08003620 : buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); } *buffPos = newBuffPos; } void WriteDataToBuffer (uint8_t* buff, uint16_t* buffPos, void* data, uint8_t dataSize) { 8003620: b480 push {r7} 8003622: b089 sub sp, #36 @ 0x24 8003624: af00 add r7, sp, #0 8003626: 60f8 str r0, [r7, #12] 8003628: 60b9 str r1, [r7, #8] 800362a: 607a str r2, [r7, #4] 800362c: 70fb strb r3, [r7, #3] uint32_t* uDataPtr = data; 800362e: 687b ldr r3, [r7, #4] 8003630: 61bb str r3, [r7, #24] uint32_t uData = *uDataPtr; 8003632: 69bb ldr r3, [r7, #24] 8003634: 681b ldr r3, [r3, #0] 8003636: 617b str r3, [r7, #20] uint8_t i = 0; 8003638: 2300 movs r3, #0 800363a: 77fb strb r3, [r7, #31] uint8_t newBuffPos = *buffPos; 800363c: 68bb ldr r3, [r7, #8] 800363e: 881b ldrh r3, [r3, #0] 8003640: 77bb strb r3, [r7, #30] for (i = 0; i < dataSize; i++) { 8003642: 2300 movs r3, #0 8003644: 77fb strb r3, [r7, #31] 8003646: e00e b.n 8003666 buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); 8003648: 7ffb ldrb r3, [r7, #31] 800364a: 00db lsls r3, r3, #3 800364c: 697a ldr r2, [r7, #20] 800364e: 40da lsrs r2, r3 8003650: 7fbb ldrb r3, [r7, #30] 8003652: 1c59 adds r1, r3, #1 8003654: 77b9 strb r1, [r7, #30] 8003656: 4619 mov r1, r3 8003658: 68fb ldr r3, [r7, #12] 800365a: 440b add r3, r1 800365c: b2d2 uxtb r2, r2 800365e: 701a strb r2, [r3, #0] for (i = 0; i < dataSize; i++) { 8003660: 7ffb ldrb r3, [r7, #31] 8003662: 3301 adds r3, #1 8003664: 77fb strb r3, [r7, #31] 8003666: 7ffa ldrb r2, [r7, #31] 8003668: 78fb ldrb r3, [r7, #3] 800366a: 429a cmp r2, r3 800366c: d3ec bcc.n 8003648 } *buffPos = newBuffPos; 800366e: 7fbb ldrb r3, [r7, #30] 8003670: b29a uxth r2, r3 8003672: 68bb ldr r3, [r7, #8] 8003674: 801a strh r2, [r3, #0] } 8003676: bf00 nop 8003678: 3724 adds r7, #36 @ 0x24 800367a: 46bd mov sp, r7 800367c: f85d 7b04 ldr.w r7, [sp], #4 8003680: 4770 bx lr 08003682 : void ReadFloatFromBuffer(uint8_t* buff, uint16_t* buffPos, float* data) { 8003682: b480 push {r7} 8003684: b087 sub sp, #28 8003686: af00 add r7, sp, #0 8003688: 60f8 str r0, [r7, #12] 800368a: 60b9 str r1, [r7, #8] 800368c: 607a str r2, [r7, #4] uint32_t* word = (uint32_t *)data; 800368e: 687b ldr r3, [r7, #4] 8003690: 617b str r3, [r7, #20] *word = CONVERT_BYTES_TO_WORD(&buff[*buffPos]); 8003692: 68bb ldr r3, [r7, #8] 8003694: 881b ldrh r3, [r3, #0] 8003696: 3303 adds r3, #3 8003698: 68fa ldr r2, [r7, #12] 800369a: 4413 add r3, r2 800369c: 781b ldrb r3, [r3, #0] 800369e: 061a lsls r2, r3, #24 80036a0: 68bb ldr r3, [r7, #8] 80036a2: 881b ldrh r3, [r3, #0] 80036a4: 3302 adds r3, #2 80036a6: 68f9 ldr r1, [r7, #12] 80036a8: 440b add r3, r1 80036aa: 781b ldrb r3, [r3, #0] 80036ac: 041b lsls r3, r3, #16 80036ae: 431a orrs r2, r3 80036b0: 68bb ldr r3, [r7, #8] 80036b2: 881b ldrh r3, [r3, #0] 80036b4: 3301 adds r3, #1 80036b6: 68f9 ldr r1, [r7, #12] 80036b8: 440b add r3, r1 80036ba: 781b ldrb r3, [r3, #0] 80036bc: 021b lsls r3, r3, #8 80036be: 4313 orrs r3, r2 80036c0: 68ba ldr r2, [r7, #8] 80036c2: 8812 ldrh r2, [r2, #0] 80036c4: 4611 mov r1, r2 80036c6: 68fa ldr r2, [r7, #12] 80036c8: 440a add r2, r1 80036ca: 7812 ldrb r2, [r2, #0] 80036cc: 4313 orrs r3, r2 80036ce: 461a mov r2, r3 80036d0: 697b ldr r3, [r7, #20] 80036d2: 601a str r2, [r3, #0] *buffPos += sizeof(float); 80036d4: 68bb ldr r3, [r7, #8] 80036d6: 881b ldrh r3, [r3, #0] 80036d8: 3304 adds r3, #4 80036da: b29a uxth r2, r3 80036dc: 68bb ldr r3, [r7, #8] 80036de: 801a strh r2, [r3, #0] } 80036e0: bf00 nop 80036e2: 371c adds r7, #28 80036e4: 46bd mov sp, r7 80036e6: f85d 7b04 ldr.w r7, [sp], #4 80036ea: 4770 bx lr 080036ec : *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); *buffPos += sizeof(uint32_t); } void ReadByteFromBufer(uint8_t* buff, uint16_t* buffPos, uint8_t* data) { 80036ec: b480 push {r7} 80036ee: b085 sub sp, #20 80036f0: af00 add r7, sp, #0 80036f2: 60f8 str r0, [r7, #12] 80036f4: 60b9 str r1, [r7, #8] 80036f6: 607a str r2, [r7, #4] *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); 80036f8: 68bb ldr r3, [r7, #8] 80036fa: 881b ldrh r3, [r3, #0] 80036fc: 3301 adds r3, #1 80036fe: 68fa ldr r2, [r7, #12] 8003700: 4413 add r3, r2 8003702: 781b ldrb r3, [r3, #0] 8003704: 021b lsls r3, r3, #8 8003706: b25a sxtb r2, r3 8003708: 68bb ldr r3, [r7, #8] 800370a: 881b ldrh r3, [r3, #0] 800370c: 4619 mov r1, r3 800370e: 68fb ldr r3, [r7, #12] 8003710: 440b add r3, r1 8003712: 781b ldrb r3, [r3, #0] 8003714: b25b sxtb r3, r3 8003716: 4313 orrs r3, r2 8003718: b25b sxtb r3, r3 800371a: b2da uxtb r2, r3 800371c: 687b ldr r3, [r7, #4] 800371e: 701a strb r2, [r3, #0] *buffPos += sizeof(uint8_t); 8003720: 68bb ldr r3, [r7, #8] 8003722: 881b ldrh r3, [r3, #0] 8003724: 3301 adds r3, #1 8003726: b29a uxth r2, r3 8003728: 68bb ldr r3, [r7, #8] 800372a: 801a strh r2, [r3, #0] } 800372c: bf00 nop 800372e: 3714 adds r7, #20 8003730: 46bd mov sp, r7 8003732: f85d 7b04 ldr.w r7, [sp], #4 8003736: 4770 bx lr 08003738 : uint16_t PrepareReqFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, uint8_t* dataBuffer, uint16_t dataLength) { 8003738: b580 push {r7, lr} 800373a: b086 sub sp, #24 800373c: af00 add r7, sp, #0 800373e: 60f8 str r0, [r7, #12] 8003740: 607b str r3, [r7, #4] 8003742: 460b mov r3, r1 8003744: 817b strh r3, [r7, #10] 8003746: 4613 mov r3, r2 8003748: 727b strb r3, [r7, #9] uint16_t crc = 0; 800374a: 2300 movs r3, #0 800374c: 82bb strh r3, [r7, #20] uint16_t txBufferPos = 0; 800374e: 2300 movs r3, #0 8003750: 82fb strh r3, [r7, #22] uint16_t frameCmd = ((uint16_t)frameCommand); 8003752: 7a7b ldrb r3, [r7, #9] 8003754: 827b strh r3, [r7, #18] memset (txBuffer, 0x00, dataLength); 8003756: 8c3b ldrh r3, [r7, #32] 8003758: 461a mov r2, r3 800375a: 2100 movs r1, #0 800375c: 68f8 ldr r0, [r7, #12] 800375e: f027 fa17 bl 802ab90 txBuffer[txBufferPos++] = FRAME_INDICATOR; 8003762: 8afb ldrh r3, [r7, #22] 8003764: 1c5a adds r2, r3, #1 8003766: 82fa strh r2, [r7, #22] 8003768: 461a mov r2, r3 800376a: 68fb ldr r3, [r7, #12] 800376c: 4413 add r3, r2 800376e: 22aa movs r2, #170 @ 0xaa 8003770: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 8003772: 8afb ldrh r3, [r7, #22] 8003774: 1c5a adds r2, r3, #1 8003776: 82fa strh r2, [r7, #22] 8003778: 461a mov r2, r3 800377a: 68fb ldr r3, [r7, #12] 800377c: 4413 add r3, r2 800377e: 897a ldrh r2, [r7, #10] 8003780: b2d2 uxtb r2, r2 8003782: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 8003784: 897b ldrh r3, [r7, #10] 8003786: 0a1b lsrs r3, r3, #8 8003788: b29a uxth r2, r3 800378a: 8afb ldrh r3, [r7, #22] 800378c: 1c59 adds r1, r3, #1 800378e: 82f9 strh r1, [r7, #22] 8003790: 4619 mov r1, r3 8003792: 68fb ldr r3, [r7, #12] 8003794: 440b add r3, r1 8003796: b2d2 uxtb r2, r2 8003798: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 800379a: 8afb ldrh r3, [r7, #22] 800379c: 1c5a adds r2, r3, #1 800379e: 82fa strh r2, [r7, #22] 80037a0: 461a mov r2, r3 80037a2: 68fb ldr r3, [r7, #12] 80037a4: 4413 add r3, r2 80037a6: 8a7a ldrh r2, [r7, #18] 80037a8: b2d2 uxtb r2, r2 80037aa: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 80037ac: 8a7b ldrh r3, [r7, #18] 80037ae: 0a1b lsrs r3, r3, #8 80037b0: b29a uxth r2, r3 80037b2: 8afb ldrh r3, [r7, #22] 80037b4: 1c59 adds r1, r3, #1 80037b6: 82f9 strh r1, [r7, #22] 80037b8: 4619 mov r1, r3 80037ba: 68fb ldr r3, [r7, #12] 80037bc: 440b add r3, r1 80037be: b2d2 uxtb r2, r2 80037c0: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 80037c2: 8afb ldrh r3, [r7, #22] 80037c4: 1c5a adds r2, r3, #1 80037c6: 82fa strh r2, [r7, #22] 80037c8: 461a mov r2, r3 80037ca: 68fb ldr r3, [r7, #12] 80037cc: 4413 add r3, r2 80037ce: 8c3a ldrh r2, [r7, #32] 80037d0: b2d2 uxtb r2, r2 80037d2: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 80037d4: 8c3b ldrh r3, [r7, #32] 80037d6: 0a1b lsrs r3, r3, #8 80037d8: b29a uxth r2, r3 80037da: 8afb ldrh r3, [r7, #22] 80037dc: 1c59 adds r1, r3, #1 80037de: 82f9 strh r1, [r7, #22] 80037e0: 4619 mov r1, r3 80037e2: 68fb ldr r3, [r7, #12] 80037e4: 440b add r3, r1 80037e6: b2d2 uxtb r2, r2 80037e8: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = 0x00; 80037ea: 8afb ldrh r3, [r7, #22] 80037ec: 1c5a adds r2, r3, #1 80037ee: 82fa strh r2, [r7, #22] 80037f0: 461a mov r2, r3 80037f2: 68fb ldr r3, [r7, #12] 80037f4: 4413 add r3, r2 80037f6: 2200 movs r2, #0 80037f8: 701a strb r2, [r3, #0] if (dataLength > 0) { 80037fa: 8c3b ldrh r3, [r7, #32] 80037fc: 2b00 cmp r3, #0 80037fe: d00b beq.n 8003818 memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 8003800: 8afb ldrh r3, [r7, #22] 8003802: 68fa ldr r2, [r7, #12] 8003804: 4413 add r3, r2 8003806: 8c3a ldrh r2, [r7, #32] 8003808: 6879 ldr r1, [r7, #4] 800380a: 4618 mov r0, r3 800380c: f027 fab7 bl 802ad7e txBufferPos += dataLength; 8003810: 8afa ldrh r2, [r7, #22] 8003812: 8c3b ldrh r3, [r7, #32] 8003814: 4413 add r3, r2 8003816: 82fb strh r3, [r7, #22] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 8003818: 8afb ldrh r3, [r7, #22] 800381a: 461a mov r2, r3 800381c: 68f9 ldr r1, [r7, #12] 800381e: 480f ldr r0, [pc, #60] @ (800385c ) 8003820: f002 f9d2 bl 8005bc8 8003824: 4603 mov r3, r0 8003826: 82bb strh r3, [r7, #20] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 8003828: 8afb ldrh r3, [r7, #22] 800382a: 1c5a adds r2, r3, #1 800382c: 82fa strh r2, [r7, #22] 800382e: 461a mov r2, r3 8003830: 68fb ldr r3, [r7, #12] 8003832: 4413 add r3, r2 8003834: 8aba ldrh r2, [r7, #20] 8003836: b2d2 uxtb r2, r2 8003838: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 800383a: 8abb ldrh r3, [r7, #20] 800383c: 0a1b lsrs r3, r3, #8 800383e: b29a uxth r2, r3 8003840: 8afb ldrh r3, [r7, #22] 8003842: 1c59 adds r1, r3, #1 8003844: 82f9 strh r1, [r7, #22] 8003846: 4619 mov r1, r3 8003848: 68fb ldr r3, [r7, #12] 800384a: 440b add r3, r1 800384c: b2d2 uxtb r2, r2 800384e: 701a strb r2, [r3, #0] return txBufferPos; 8003850: 8afb ldrh r3, [r7, #22] } 8003852: 4618 mov r0, r3 8003854: 3718 adds r7, #24 8003856: 46bd mov sp, r7 8003858: bd80 pop {r7, pc} 800385a: bf00 nop 800385c: 24000248 .word 0x24000248 08003860 : uint16_t PrepareRespFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, SerialProtocolRespStatus respStatus, uint8_t* dataBuffer, uint16_t dataLength) { 8003860: b580 push {r7, lr} 8003862: b084 sub sp, #16 8003864: af00 add r7, sp, #0 8003866: 6078 str r0, [r7, #4] 8003868: 4608 mov r0, r1 800386a: 4611 mov r1, r2 800386c: 461a mov r2, r3 800386e: 4603 mov r3, r0 8003870: 807b strh r3, [r7, #2] 8003872: 460b mov r3, r1 8003874: 707b strb r3, [r7, #1] 8003876: 4613 mov r3, r2 8003878: 703b strb r3, [r7, #0] uint16_t crc = 0; 800387a: 2300 movs r3, #0 800387c: 81bb strh r3, [r7, #12] uint16_t txBufferPos = 0; 800387e: 2300 movs r3, #0 8003880: 81fb strh r3, [r7, #14] uint16_t frameCmd = ((uint16_t)frameCommand) | 0x8000; // MSB set means response 8003882: 787b ldrb r3, [r7, #1] 8003884: b21a sxth r2, r3 8003886: 4b43 ldr r3, [pc, #268] @ (8003994 ) 8003888: 4313 orrs r3, r2 800388a: b21b sxth r3, r3 800388c: 817b strh r3, [r7, #10] memset (txBuffer, 0x00, dataLength); 800388e: 8bbb ldrh r3, [r7, #28] 8003890: 461a mov r2, r3 8003892: 2100 movs r1, #0 8003894: 6878 ldr r0, [r7, #4] 8003896: f027 f97b bl 802ab90 txBuffer[txBufferPos++] = FRAME_INDICATOR; 800389a: 89fb ldrh r3, [r7, #14] 800389c: 1c5a adds r2, r3, #1 800389e: 81fa strh r2, [r7, #14] 80038a0: 461a mov r2, r3 80038a2: 687b ldr r3, [r7, #4] 80038a4: 4413 add r3, r2 80038a6: 22aa movs r2, #170 @ 0xaa 80038a8: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 80038aa: 89fb ldrh r3, [r7, #14] 80038ac: 1c5a adds r2, r3, #1 80038ae: 81fa strh r2, [r7, #14] 80038b0: 461a mov r2, r3 80038b2: 687b ldr r3, [r7, #4] 80038b4: 4413 add r3, r2 80038b6: 887a ldrh r2, [r7, #2] 80038b8: b2d2 uxtb r2, r2 80038ba: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 80038bc: 887b ldrh r3, [r7, #2] 80038be: 0a1b lsrs r3, r3, #8 80038c0: b29a uxth r2, r3 80038c2: 89fb ldrh r3, [r7, #14] 80038c4: 1c59 adds r1, r3, #1 80038c6: 81f9 strh r1, [r7, #14] 80038c8: 4619 mov r1, r3 80038ca: 687b ldr r3, [r7, #4] 80038cc: 440b add r3, r1 80038ce: b2d2 uxtb r2, r2 80038d0: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 80038d2: 89fb ldrh r3, [r7, #14] 80038d4: 1c5a adds r2, r3, #1 80038d6: 81fa strh r2, [r7, #14] 80038d8: 461a mov r2, r3 80038da: 687b ldr r3, [r7, #4] 80038dc: 4413 add r3, r2 80038de: 897a ldrh r2, [r7, #10] 80038e0: b2d2 uxtb r2, r2 80038e2: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 80038e4: 897b ldrh r3, [r7, #10] 80038e6: 0a1b lsrs r3, r3, #8 80038e8: b29a uxth r2, r3 80038ea: 89fb ldrh r3, [r7, #14] 80038ec: 1c59 adds r1, r3, #1 80038ee: 81f9 strh r1, [r7, #14] 80038f0: 4619 mov r1, r3 80038f2: 687b ldr r3, [r7, #4] 80038f4: 440b add r3, r1 80038f6: b2d2 uxtb r2, r2 80038f8: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 80038fa: 89fb ldrh r3, [r7, #14] 80038fc: 1c5a adds r2, r3, #1 80038fe: 81fa strh r2, [r7, #14] 8003900: 461a mov r2, r3 8003902: 687b ldr r3, [r7, #4] 8003904: 4413 add r3, r2 8003906: 8bba ldrh r2, [r7, #28] 8003908: b2d2 uxtb r2, r2 800390a: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 800390c: 8bbb ldrh r3, [r7, #28] 800390e: 0a1b lsrs r3, r3, #8 8003910: b29a uxth r2, r3 8003912: 89fb ldrh r3, [r7, #14] 8003914: 1c59 adds r1, r3, #1 8003916: 81f9 strh r1, [r7, #14] 8003918: 4619 mov r1, r3 800391a: 687b ldr r3, [r7, #4] 800391c: 440b add r3, r1 800391e: b2d2 uxtb r2, r2 8003920: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = (uint8_t)respStatus; 8003922: 89fb ldrh r3, [r7, #14] 8003924: 1c5a adds r2, r3, #1 8003926: 81fa strh r2, [r7, #14] 8003928: 461a mov r2, r3 800392a: 687b ldr r3, [r7, #4] 800392c: 4413 add r3, r2 800392e: 783a ldrb r2, [r7, #0] 8003930: 701a strb r2, [r3, #0] if (dataLength > 0) { 8003932: 8bbb ldrh r3, [r7, #28] 8003934: 2b00 cmp r3, #0 8003936: d00b beq.n 8003950 memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 8003938: 89fb ldrh r3, [r7, #14] 800393a: 687a ldr r2, [r7, #4] 800393c: 4413 add r3, r2 800393e: 8bba ldrh r2, [r7, #28] 8003940: 69b9 ldr r1, [r7, #24] 8003942: 4618 mov r0, r3 8003944: f027 fa1b bl 802ad7e txBufferPos += dataLength; 8003948: 89fa ldrh r2, [r7, #14] 800394a: 8bbb ldrh r3, [r7, #28] 800394c: 4413 add r3, r2 800394e: 81fb strh r3, [r7, #14] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 8003950: 89fb ldrh r3, [r7, #14] 8003952: 461a mov r2, r3 8003954: 6879 ldr r1, [r7, #4] 8003956: 4810 ldr r0, [pc, #64] @ (8003998 ) 8003958: f002 f936 bl 8005bc8 800395c: 4603 mov r3, r0 800395e: 81bb strh r3, [r7, #12] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 8003960: 89fb ldrh r3, [r7, #14] 8003962: 1c5a adds r2, r3, #1 8003964: 81fa strh r2, [r7, #14] 8003966: 461a mov r2, r3 8003968: 687b ldr r3, [r7, #4] 800396a: 4413 add r3, r2 800396c: 89ba ldrh r2, [r7, #12] 800396e: b2d2 uxtb r2, r2 8003970: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 8003972: 89bb ldrh r3, [r7, #12] 8003974: 0a1b lsrs r3, r3, #8 8003976: b29a uxth r2, r3 8003978: 89fb ldrh r3, [r7, #14] 800397a: 1c59 adds r1, r3, #1 800397c: 81f9 strh r1, [r7, #14] 800397e: 4619 mov r1, r3 8003980: 687b ldr r3, [r7, #4] 8003982: 440b add r3, r1 8003984: b2d2 uxtb r2, r2 8003986: 701a strb r2, [r3, #0] return txBufferPos; 8003988: 89fb ldrh r3, [r7, #14] } 800398a: 4618 mov r0, r3 800398c: 3710 adds r7, #16 800398e: 46bd mov sp, r7 8003990: bd80 pop {r7, pc} 8003992: bf00 nop 8003994: ffff8000 .word 0xffff8000 8003998: 24000248 .word 0x24000248 0800399c : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 800399c: b580 push {r7, lr} 800399e: b086 sub sp, #24 80039a0: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ PWREx_AVDTypeDef sConfigAVD = {0}; 80039a2: f107 0310 add.w r3, r7, #16 80039a6: 2200 movs r2, #0 80039a8: 601a str r2, [r3, #0] 80039aa: 605a str r2, [r3, #4] PWR_PVDTypeDef sConfigPVD = {0}; 80039ac: f107 0308 add.w r3, r7, #8 80039b0: 2200 movs r2, #0 80039b2: 601a str r2, [r3, #0] 80039b4: 605a str r2, [r3, #4] __HAL_RCC_SYSCFG_CLK_ENABLE(); 80039b6: 4b1c ldr r3, [pc, #112] @ (8003a28 ) 80039b8: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 80039bc: 4a1a ldr r2, [pc, #104] @ (8003a28 ) 80039be: f043 0302 orr.w r3, r3, #2 80039c2: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 80039c6: 4b18 ldr r3, [pc, #96] @ (8003a28 ) 80039c8: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 80039cc: f003 0302 and.w r3, r3, #2 80039d0: 607b str r3, [r7, #4] 80039d2: 687b ldr r3, [r7, #4] /* System interrupt init*/ /* PendSV_IRQn interrupt configuration */ HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); 80039d4: 2200 movs r2, #0 80039d6: 210f movs r1, #15 80039d8: f06f 0001 mvn.w r0, #1 80039dc: f001 fff0 bl 80059c0 /* Peripheral interrupt init */ /* RCC_IRQn interrupt configuration */ HAL_NVIC_SetPriority(RCC_IRQn, 5, 0); 80039e0: 2200 movs r2, #0 80039e2: 2105 movs r1, #5 80039e4: 2005 movs r0, #5 80039e6: f001 ffeb bl 80059c0 HAL_NVIC_EnableIRQ(RCC_IRQn); 80039ea: 2005 movs r0, #5 80039ec: f002 f802 bl 80059f4 /** AVD Configuration */ sConfigAVD.AVDLevel = PWR_AVDLEVEL_3; 80039f0: f44f 23c0 mov.w r3, #393216 @ 0x60000 80039f4: 613b str r3, [r7, #16] sConfigAVD.Mode = PWR_AVD_MODE_NORMAL; 80039f6: 2300 movs r3, #0 80039f8: 617b str r3, [r7, #20] HAL_PWREx_ConfigAVD(&sConfigAVD); 80039fa: f107 0310 add.w r3, r7, #16 80039fe: 4618 mov r0, r3 8003a00: f006 fcac bl 800a35c /** Enable the AVD Output */ HAL_PWREx_EnableAVD(); 8003a04: f006 fd20 bl 800a448 /** PVD Configuration */ sConfigPVD.PVDLevel = PWR_PVDLEVEL_6; 8003a08: 23c0 movs r3, #192 @ 0xc0 8003a0a: 60bb str r3, [r7, #8] sConfigPVD.Mode = PWR_PVD_MODE_NORMAL; 8003a0c: 2300 movs r3, #0 8003a0e: 60fb str r3, [r7, #12] HAL_PWR_ConfigPVD(&sConfigPVD); 8003a10: f107 0308 add.w r3, r7, #8 8003a14: 4618 mov r0, r3 8003a16: f006 fbdd bl 800a1d4 /** Enable the PVD Output */ HAL_PWR_EnablePVD(); 8003a1a: f006 fc55 bl 800a2c8 /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 8003a1e: bf00 nop 8003a20: 3718 adds r7, #24 8003a22: 46bd mov sp, r7 8003a24: bd80 pop {r7, pc} 8003a26: bf00 nop 8003a28: 58024400 .word 0x58024400 08003a2c : * This function configures the hardware resources used in this example * @param hcrc: CRC handle pointer * @retval None */ void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc) { 8003a2c: b480 push {r7} 8003a2e: b085 sub sp, #20 8003a30: af00 add r7, sp, #0 8003a32: 6078 str r0, [r7, #4] if(hcrc->Instance==CRC) 8003a34: 687b ldr r3, [r7, #4] 8003a36: 681b ldr r3, [r3, #0] 8003a38: 4a0b ldr r2, [pc, #44] @ (8003a68 ) 8003a3a: 4293 cmp r3, r2 8003a3c: d10e bne.n 8003a5c { /* USER CODE BEGIN CRC_MspInit 0 */ /* USER CODE END CRC_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_CRC_CLK_ENABLE(); 8003a3e: 4b0b ldr r3, [pc, #44] @ (8003a6c ) 8003a40: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003a44: 4a09 ldr r2, [pc, #36] @ (8003a6c ) 8003a46: f443 2300 orr.w r3, r3, #524288 @ 0x80000 8003a4a: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003a4e: 4b07 ldr r3, [pc, #28] @ (8003a6c ) 8003a50: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003a54: f403 2300 and.w r3, r3, #524288 @ 0x80000 8003a58: 60fb str r3, [r7, #12] 8003a5a: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN CRC_MspInit 1 */ /* USER CODE END CRC_MspInit 1 */ } } 8003a5c: bf00 nop 8003a5e: 3714 adds r7, #20 8003a60: 46bd mov sp, r7 8003a62: f85d 7b04 ldr.w r7, [sp], #4 8003a66: 4770 bx lr 8003a68: 58024c00 .word 0x58024c00 8003a6c: 58024400 .word 0x58024400 08003a70 : * This function configures the hardware resources used in this example * @param hrng: RNG handle pointer * @retval None */ void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng) { 8003a70: b580 push {r7, lr} 8003a72: b0b4 sub sp, #208 @ 0xd0 8003a74: af00 add r7, sp, #0 8003a76: 6078 str r0, [r7, #4] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003a78: f107 0310 add.w r3, r7, #16 8003a7c: 22c0 movs r2, #192 @ 0xc0 8003a7e: 2100 movs r1, #0 8003a80: 4618 mov r0, r3 8003a82: f027 f885 bl 802ab90 if(hrng->Instance==RNG) 8003a86: 687b ldr r3, [r7, #4] 8003a88: 681b ldr r3, [r3, #0] 8003a8a: 4a14 ldr r2, [pc, #80] @ (8003adc ) 8003a8c: 4293 cmp r3, r2 8003a8e: d121 bne.n 8003ad4 /* USER CODE END RNG_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG; 8003a90: f44f 3200 mov.w r2, #131072 @ 0x20000 8003a94: f04f 0300 mov.w r3, #0 8003a98: e9c7 2304 strd r2, r3, [r7, #16] PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_HSI48; 8003a9c: 2300 movs r3, #0 8003a9e: f8c7 3090 str.w r3, [r7, #144] @ 0x90 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003aa2: f107 0310 add.w r3, r7, #16 8003aa6: 4618 mov r0, r3 8003aa8: f007 fd06 bl 800b4b8 8003aac: 4603 mov r3, r0 8003aae: 2b00 cmp r3, #0 8003ab0: d001 beq.n 8003ab6 { Error_Handler(); 8003ab2: f7fe fe07 bl 80026c4 } /* Peripheral clock enable */ __HAL_RCC_RNG_CLK_ENABLE(); 8003ab6: 4b0a ldr r3, [pc, #40] @ (8003ae0 ) 8003ab8: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 8003abc: 4a08 ldr r2, [pc, #32] @ (8003ae0 ) 8003abe: f043 0340 orr.w r3, r3, #64 @ 0x40 8003ac2: f8c2 30dc str.w r3, [r2, #220] @ 0xdc 8003ac6: 4b06 ldr r3, [pc, #24] @ (8003ae0 ) 8003ac8: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 8003acc: f003 0340 and.w r3, r3, #64 @ 0x40 8003ad0: 60fb str r3, [r7, #12] 8003ad2: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN RNG_MspInit 1 */ /* USER CODE END RNG_MspInit 1 */ } } 8003ad4: bf00 nop 8003ad6: 37d0 adds r7, #208 @ 0xd0 8003ad8: 46bd mov sp, r7 8003ada: bd80 pop {r7, pc} 8003adc: 48021800 .word 0x48021800 8003ae0: 58024400 .word 0x58024400 08003ae4 : * This function configures the hardware resources used in this example * @param huart: UART handle pointer * @retval None */ void HAL_UART_MspInit(UART_HandleTypeDef* huart) { 8003ae4: b580 push {r7, lr} 8003ae6: b0c2 sub sp, #264 @ 0x108 8003ae8: af00 add r7, sp, #0 8003aea: f507 7384 add.w r3, r7, #264 @ 0x108 8003aee: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003af2: 6018 str r0, [r3, #0] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8003af4: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003af8: 2200 movs r2, #0 8003afa: 601a str r2, [r3, #0] 8003afc: 605a str r2, [r3, #4] 8003afe: 609a str r2, [r3, #8] 8003b00: 60da str r2, [r3, #12] 8003b02: 611a str r2, [r3, #16] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003b04: f107 0330 add.w r3, r7, #48 @ 0x30 8003b08: 22c0 movs r2, #192 @ 0xc0 8003b0a: 2100 movs r1, #0 8003b0c: 4618 mov r0, r3 8003b0e: f027 f83f bl 802ab90 if(huart->Instance==UART8) 8003b12: f507 7384 add.w r3, r7, #264 @ 0x108 8003b16: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003b1a: 681b ldr r3, [r3, #0] 8003b1c: 681b ldr r3, [r3, #0] 8003b1e: 4ab8 ldr r2, [pc, #736] @ (8003e00 ) 8003b20: 4293 cmp r3, r2 8003b22: f040 80bc bne.w 8003c9e /* USER CODE END UART8_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART8; 8003b26: f04f 0202 mov.w r2, #2 8003b2a: f04f 0300 mov.w r3, #0 8003b2e: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003b32: 2300 movs r3, #0 8003b34: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003b38: f107 0330 add.w r3, r7, #48 @ 0x30 8003b3c: 4618 mov r0, r3 8003b3e: f007 fcbb bl 800b4b8 8003b42: 4603 mov r3, r0 8003b44: 2b00 cmp r3, #0 8003b46: d001 beq.n 8003b4c { Error_Handler(); 8003b48: f7fe fdbc bl 80026c4 } /* Peripheral clock enable */ __HAL_RCC_UART8_CLK_ENABLE(); 8003b4c: 4bad ldr r3, [pc, #692] @ (8003e04 ) 8003b4e: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003b52: 4aac ldr r2, [pc, #688] @ (8003e04 ) 8003b54: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000 8003b58: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003b5c: 4ba9 ldr r3, [pc, #676] @ (8003e04 ) 8003b5e: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003b62: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8003b66: 62fb str r3, [r7, #44] @ 0x2c 8003b68: 6afb ldr r3, [r7, #44] @ 0x2c __HAL_RCC_GPIOE_CLK_ENABLE(); 8003b6a: 4ba6 ldr r3, [pc, #664] @ (8003e04 ) 8003b6c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003b70: 4aa4 ldr r2, [pc, #656] @ (8003e04 ) 8003b72: f043 0310 orr.w r3, r3, #16 8003b76: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003b7a: 4ba2 ldr r3, [pc, #648] @ (8003e04 ) 8003b7c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003b80: f003 0310 and.w r3, r3, #16 8003b84: 62bb str r3, [r7, #40] @ 0x28 8003b86: 6abb ldr r3, [r7, #40] @ 0x28 /**UART8 GPIO Configuration PE0 ------> UART8_RX PE1 ------> UART8_TX */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1; 8003b88: 2303 movs r3, #3 8003b8a: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003b8e: 2302 movs r3, #2 8003b90: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003b94: 2300 movs r3, #0 8003b96: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 8003b9a: 2300 movs r3, #0 8003b9c: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF8_UART8; 8003ba0: 2308 movs r3, #8 8003ba2: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 8003ba6: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003baa: 4619 mov r1, r3 8003bac: 4896 ldr r0, [pc, #600] @ (8003e08 ) 8003bae: f006 f92f bl 8009e10 /* UART8 DMA Init */ /* UART8_RX Init */ hdma_uart8_rx.Instance = DMA2_Stream7; 8003bb2: 4b96 ldr r3, [pc, #600] @ (8003e0c ) 8003bb4: 4a96 ldr r2, [pc, #600] @ (8003e10 ) 8003bb6: 601a str r2, [r3, #0] hdma_uart8_rx.Init.Request = DMA_REQUEST_UART8_RX; 8003bb8: 4b94 ldr r3, [pc, #592] @ (8003e0c ) 8003bba: 2251 movs r2, #81 @ 0x51 8003bbc: 605a str r2, [r3, #4] hdma_uart8_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; 8003bbe: 4b93 ldr r3, [pc, #588] @ (8003e0c ) 8003bc0: 2200 movs r2, #0 8003bc2: 609a str r2, [r3, #8] hdma_uart8_rx.Init.PeriphInc = DMA_PINC_DISABLE; 8003bc4: 4b91 ldr r3, [pc, #580] @ (8003e0c ) 8003bc6: 2200 movs r2, #0 8003bc8: 60da str r2, [r3, #12] hdma_uart8_rx.Init.MemInc = DMA_MINC_ENABLE; 8003bca: 4b90 ldr r3, [pc, #576] @ (8003e0c ) 8003bcc: f44f 6280 mov.w r2, #1024 @ 0x400 8003bd0: 611a str r2, [r3, #16] hdma_uart8_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 8003bd2: 4b8e ldr r3, [pc, #568] @ (8003e0c ) 8003bd4: 2200 movs r2, #0 8003bd6: 615a str r2, [r3, #20] hdma_uart8_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 8003bd8: 4b8c ldr r3, [pc, #560] @ (8003e0c ) 8003bda: 2200 movs r2, #0 8003bdc: 619a str r2, [r3, #24] hdma_uart8_rx.Init.Mode = DMA_NORMAL; 8003bde: 4b8b ldr r3, [pc, #556] @ (8003e0c ) 8003be0: 2200 movs r2, #0 8003be2: 61da str r2, [r3, #28] hdma_uart8_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 8003be4: 4b89 ldr r3, [pc, #548] @ (8003e0c ) 8003be6: f44f 3240 mov.w r2, #196608 @ 0x30000 8003bea: 621a str r2, [r3, #32] hdma_uart8_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003bec: 4b87 ldr r3, [pc, #540] @ (8003e0c ) 8003bee: 2200 movs r2, #0 8003bf0: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_rx) != HAL_OK) 8003bf2: 4886 ldr r0, [pc, #536] @ (8003e0c ) 8003bf4: f002 f98a bl 8005f0c 8003bf8: 4603 mov r3, r0 8003bfa: 2b00 cmp r3, #0 8003bfc: d001 beq.n 8003c02 { Error_Handler(); 8003bfe: f7fe fd61 bl 80026c4 } __HAL_LINKDMA(huart,hdmarx,hdma_uart8_rx); 8003c02: f507 7384 add.w r3, r7, #264 @ 0x108 8003c06: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003c0a: 681b ldr r3, [r3, #0] 8003c0c: 4a7f ldr r2, [pc, #508] @ (8003e0c ) 8003c0e: f8c3 2080 str.w r2, [r3, #128] @ 0x80 8003c12: 4a7e ldr r2, [pc, #504] @ (8003e0c ) 8003c14: f507 7384 add.w r3, r7, #264 @ 0x108 8003c18: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003c1c: 681b ldr r3, [r3, #0] 8003c1e: 6393 str r3, [r2, #56] @ 0x38 /* UART8_TX Init */ hdma_uart8_tx.Instance = DMA2_Stream6; 8003c20: 4b7c ldr r3, [pc, #496] @ (8003e14 ) 8003c22: 4a7d ldr r2, [pc, #500] @ (8003e18 ) 8003c24: 601a str r2, [r3, #0] hdma_uart8_tx.Init.Request = DMA_REQUEST_UART8_TX; 8003c26: 4b7b ldr r3, [pc, #492] @ (8003e14 ) 8003c28: 2252 movs r2, #82 @ 0x52 8003c2a: 605a str r2, [r3, #4] hdma_uart8_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; 8003c2c: 4b79 ldr r3, [pc, #484] @ (8003e14 ) 8003c2e: 2240 movs r2, #64 @ 0x40 8003c30: 609a str r2, [r3, #8] hdma_uart8_tx.Init.PeriphInc = DMA_PINC_DISABLE; 8003c32: 4b78 ldr r3, [pc, #480] @ (8003e14 ) 8003c34: 2200 movs r2, #0 8003c36: 60da str r2, [r3, #12] hdma_uart8_tx.Init.MemInc = DMA_MINC_ENABLE; 8003c38: 4b76 ldr r3, [pc, #472] @ (8003e14 ) 8003c3a: f44f 6280 mov.w r2, #1024 @ 0x400 8003c3e: 611a str r2, [r3, #16] hdma_uart8_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 8003c40: 4b74 ldr r3, [pc, #464] @ (8003e14 ) 8003c42: 2200 movs r2, #0 8003c44: 615a str r2, [r3, #20] hdma_uart8_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 8003c46: 4b73 ldr r3, [pc, #460] @ (8003e14 ) 8003c48: 2200 movs r2, #0 8003c4a: 619a str r2, [r3, #24] hdma_uart8_tx.Init.Mode = DMA_NORMAL; 8003c4c: 4b71 ldr r3, [pc, #452] @ (8003e14 ) 8003c4e: 2200 movs r2, #0 8003c50: 61da str r2, [r3, #28] hdma_uart8_tx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 8003c52: 4b70 ldr r3, [pc, #448] @ (8003e14 ) 8003c54: f44f 3240 mov.w r2, #196608 @ 0x30000 8003c58: 621a str r2, [r3, #32] hdma_uart8_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003c5a: 4b6e ldr r3, [pc, #440] @ (8003e14 ) 8003c5c: 2200 movs r2, #0 8003c5e: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_tx) != HAL_OK) 8003c60: 486c ldr r0, [pc, #432] @ (8003e14 ) 8003c62: f002 f953 bl 8005f0c 8003c66: 4603 mov r3, r0 8003c68: 2b00 cmp r3, #0 8003c6a: d001 beq.n 8003c70 { Error_Handler(); 8003c6c: f7fe fd2a bl 80026c4 } __HAL_LINKDMA(huart,hdmatx,hdma_uart8_tx); 8003c70: f507 7384 add.w r3, r7, #264 @ 0x108 8003c74: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003c78: 681b ldr r3, [r3, #0] 8003c7a: 4a66 ldr r2, [pc, #408] @ (8003e14 ) 8003c7c: 67da str r2, [r3, #124] @ 0x7c 8003c7e: 4a65 ldr r2, [pc, #404] @ (8003e14 ) 8003c80: f507 7384 add.w r3, r7, #264 @ 0x108 8003c84: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003c88: 681b ldr r3, [r3, #0] 8003c8a: 6393 str r3, [r2, #56] @ 0x38 /* UART8 interrupt Init */ HAL_NVIC_SetPriority(UART8_IRQn, 5, 0); 8003c8c: 2200 movs r2, #0 8003c8e: 2105 movs r1, #5 8003c90: 2053 movs r0, #83 @ 0x53 8003c92: f001 fe95 bl 80059c0 HAL_NVIC_EnableIRQ(UART8_IRQn); 8003c96: 2053 movs r0, #83 @ 0x53 8003c98: f001 feac bl 80059f4 /* USER CODE BEGIN USART6_MspInit 1 */ /* USER CODE END USART6_MspInit 1 */ } } 8003c9c: e17e b.n 8003f9c else if(huart->Instance==USART1) 8003c9e: f507 7384 add.w r3, r7, #264 @ 0x108 8003ca2: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003ca6: 681b ldr r3, [r3, #0] 8003ca8: 681b ldr r3, [r3, #0] 8003caa: 4a5c ldr r2, [pc, #368] @ (8003e1c ) 8003cac: 4293 cmp r3, r2 8003cae: d14f bne.n 8003d50 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1; 8003cb0: f04f 0201 mov.w r2, #1 8003cb4: f04f 0300 mov.w r3, #0 8003cb8: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 8003cbc: 2300 movs r3, #0 8003cbe: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003cc2: f107 0330 add.w r3, r7, #48 @ 0x30 8003cc6: 4618 mov r0, r3 8003cc8: f007 fbf6 bl 800b4b8 8003ccc: 4603 mov r3, r0 8003cce: 2b00 cmp r3, #0 8003cd0: d001 beq.n 8003cd6 Error_Handler(); 8003cd2: f7fe fcf7 bl 80026c4 __HAL_RCC_USART1_CLK_ENABLE(); 8003cd6: 4b4b ldr r3, [pc, #300] @ (8003e04 ) 8003cd8: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003cdc: 4a49 ldr r2, [pc, #292] @ (8003e04 ) 8003cde: f043 0310 orr.w r3, r3, #16 8003ce2: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003ce6: 4b47 ldr r3, [pc, #284] @ (8003e04 ) 8003ce8: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003cec: f003 0310 and.w r3, r3, #16 8003cf0: 627b str r3, [r7, #36] @ 0x24 8003cf2: 6a7b ldr r3, [r7, #36] @ 0x24 __HAL_RCC_GPIOB_CLK_ENABLE(); 8003cf4: 4b43 ldr r3, [pc, #268] @ (8003e04 ) 8003cf6: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003cfa: 4a42 ldr r2, [pc, #264] @ (8003e04 ) 8003cfc: f043 0302 orr.w r3, r3, #2 8003d00: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003d04: 4b3f ldr r3, [pc, #252] @ (8003e04 ) 8003d06: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003d0a: f003 0302 and.w r3, r3, #2 8003d0e: 623b str r3, [r7, #32] 8003d10: 6a3b ldr r3, [r7, #32] GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 8003d12: f44f 4340 mov.w r3, #49152 @ 0xc000 8003d16: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003d1a: 2302 movs r3, #2 8003d1c: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003d20: 2300 movs r3, #0 8003d22: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003d26: 2302 movs r3, #2 8003d28: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF4_USART1; 8003d2c: 2304 movs r3, #4 8003d2e: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8003d32: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003d36: 4619 mov r1, r3 8003d38: 4839 ldr r0, [pc, #228] @ (8003e20 ) 8003d3a: f006 f869 bl 8009e10 HAL_NVIC_SetPriority(USART1_IRQn, 5, 0); 8003d3e: 2200 movs r2, #0 8003d40: 2105 movs r1, #5 8003d42: 2025 movs r0, #37 @ 0x25 8003d44: f001 fe3c bl 80059c0 HAL_NVIC_EnableIRQ(USART1_IRQn); 8003d48: 2025 movs r0, #37 @ 0x25 8003d4a: f001 fe53 bl 80059f4 } 8003d4e: e125 b.n 8003f9c else if(huart->Instance==USART2) 8003d50: f507 7384 add.w r3, r7, #264 @ 0x108 8003d54: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003d58: 681b ldr r3, [r3, #0] 8003d5a: 681b ldr r3, [r3, #0] 8003d5c: 4a31 ldr r2, [pc, #196] @ (8003e24 ) 8003d5e: 4293 cmp r3, r2 8003d60: d164 bne.n 8003e2c PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2; 8003d62: f04f 0202 mov.w r2, #2 8003d66: f04f 0300 mov.w r3, #0 8003d6a: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003d6e: 2300 movs r3, #0 8003d70: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003d74: f107 0330 add.w r3, r7, #48 @ 0x30 8003d78: 4618 mov r0, r3 8003d7a: f007 fb9d bl 800b4b8 8003d7e: 4603 mov r3, r0 8003d80: 2b00 cmp r3, #0 8003d82: d001 beq.n 8003d88 Error_Handler(); 8003d84: f7fe fc9e bl 80026c4 __HAL_RCC_USART2_CLK_ENABLE(); 8003d88: 4b1e ldr r3, [pc, #120] @ (8003e04 ) 8003d8a: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003d8e: 4a1d ldr r2, [pc, #116] @ (8003e04 ) 8003d90: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8003d94: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003d98: 4b1a ldr r3, [pc, #104] @ (8003e04 ) 8003d9a: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003d9e: f403 3300 and.w r3, r3, #131072 @ 0x20000 8003da2: 61fb str r3, [r7, #28] 8003da4: 69fb ldr r3, [r7, #28] __HAL_RCC_GPIOD_CLK_ENABLE(); 8003da6: 4b17 ldr r3, [pc, #92] @ (8003e04 ) 8003da8: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003dac: 4a15 ldr r2, [pc, #84] @ (8003e04 ) 8003dae: f043 0308 orr.w r3, r3, #8 8003db2: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003db6: 4b13 ldr r3, [pc, #76] @ (8003e04 ) 8003db8: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003dbc: f003 0308 and.w r3, r3, #8 8003dc0: 61bb str r3, [r7, #24] 8003dc2: 69bb ldr r3, [r7, #24] GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6; 8003dc4: 2360 movs r3, #96 @ 0x60 8003dc6: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003dca: 2302 movs r3, #2 8003dcc: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003dd0: 2300 movs r3, #0 8003dd2: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003dd6: 2302 movs r3, #2 8003dd8: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART2; 8003ddc: 2307 movs r3, #7 8003dde: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 8003de2: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003de6: 4619 mov r1, r3 8003de8: 480f ldr r0, [pc, #60] @ (8003e28 ) 8003dea: f006 f811 bl 8009e10 HAL_NVIC_SetPriority(USART2_IRQn, 5, 0); 8003dee: 2200 movs r2, #0 8003df0: 2105 movs r1, #5 8003df2: 2026 movs r0, #38 @ 0x26 8003df4: f001 fde4 bl 80059c0 HAL_NVIC_EnableIRQ(USART2_IRQn); 8003df8: 2026 movs r0, #38 @ 0x26 8003dfa: f001 fdfb bl 80059f4 } 8003dfe: e0cd b.n 8003f9c 8003e00: 40007c00 .word 0x40007c00 8003e04: 58024400 .word 0x58024400 8003e08: 58021000 .word 0x58021000 8003e0c: 24000564 .word 0x24000564 8003e10: 400204b8 .word 0x400204b8 8003e14: 240005dc .word 0x240005dc 8003e18: 400204a0 .word 0x400204a0 8003e1c: 40011000 .word 0x40011000 8003e20: 58020400 .word 0x58020400 8003e24: 40004400 .word 0x40004400 8003e28: 58020c00 .word 0x58020c00 else if(huart->Instance==USART3) 8003e2c: f507 7384 add.w r3, r7, #264 @ 0x108 8003e30: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003e34: 681b ldr r3, [r3, #0] 8003e36: 681b ldr r3, [r3, #0] 8003e38: 4a5b ldr r2, [pc, #364] @ (8003fa8 ) 8003e3a: 4293 cmp r3, r2 8003e3c: d14f bne.n 8003ede PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3; 8003e3e: f04f 0202 mov.w r2, #2 8003e42: f04f 0300 mov.w r3, #0 8003e46: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003e4a: 2300 movs r3, #0 8003e4c: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003e50: f107 0330 add.w r3, r7, #48 @ 0x30 8003e54: 4618 mov r0, r3 8003e56: f007 fb2f bl 800b4b8 8003e5a: 4603 mov r3, r0 8003e5c: 2b00 cmp r3, #0 8003e5e: d001 beq.n 8003e64 Error_Handler(); 8003e60: f7fe fc30 bl 80026c4 __HAL_RCC_USART3_CLK_ENABLE(); 8003e64: 4b51 ldr r3, [pc, #324] @ (8003fac ) 8003e66: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003e6a: 4a50 ldr r2, [pc, #320] @ (8003fac ) 8003e6c: f443 2380 orr.w r3, r3, #262144 @ 0x40000 8003e70: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003e74: 4b4d ldr r3, [pc, #308] @ (8003fac ) 8003e76: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003e7a: f403 2380 and.w r3, r3, #262144 @ 0x40000 8003e7e: 617b str r3, [r7, #20] 8003e80: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOD_CLK_ENABLE(); 8003e82: 4b4a ldr r3, [pc, #296] @ (8003fac ) 8003e84: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003e88: 4a48 ldr r2, [pc, #288] @ (8003fac ) 8003e8a: f043 0308 orr.w r3, r3, #8 8003e8e: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003e92: 4b46 ldr r3, [pc, #280] @ (8003fac ) 8003e94: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003e98: f003 0308 and.w r3, r3, #8 8003e9c: 613b str r3, [r7, #16] 8003e9e: 693b ldr r3, [r7, #16] GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; 8003ea0: f44f 7340 mov.w r3, #768 @ 0x300 8003ea4: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003ea8: 2302 movs r3, #2 8003eaa: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003eae: 2300 movs r3, #0 8003eb0: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003eb4: 2302 movs r3, #2 8003eb6: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART3; 8003eba: 2307 movs r3, #7 8003ebc: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 8003ec0: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003ec4: 4619 mov r1, r3 8003ec6: 483a ldr r0, [pc, #232] @ (8003fb0 ) 8003ec8: f005 ffa2 bl 8009e10 HAL_NVIC_SetPriority(USART3_IRQn, 5, 0); 8003ecc: 2200 movs r2, #0 8003ece: 2105 movs r1, #5 8003ed0: 2027 movs r0, #39 @ 0x27 8003ed2: f001 fd75 bl 80059c0 HAL_NVIC_EnableIRQ(USART3_IRQn); 8003ed6: 2027 movs r0, #39 @ 0x27 8003ed8: f001 fd8c bl 80059f4 } 8003edc: e05e b.n 8003f9c else if(huart->Instance==USART6) 8003ede: f507 7384 add.w r3, r7, #264 @ 0x108 8003ee2: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003ee6: 681b ldr r3, [r3, #0] 8003ee8: 681b ldr r3, [r3, #0] 8003eea: 4a32 ldr r2, [pc, #200] @ (8003fb4 ) 8003eec: 4293 cmp r3, r2 8003eee: d155 bne.n 8003f9c PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART6; 8003ef0: f04f 0201 mov.w r2, #1 8003ef4: f04f 0300 mov.w r3, #0 8003ef8: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 8003efc: 2300 movs r3, #0 8003efe: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003f02: f107 0330 add.w r3, r7, #48 @ 0x30 8003f06: 4618 mov r0, r3 8003f08: f007 fad6 bl 800b4b8 8003f0c: 4603 mov r3, r0 8003f0e: 2b00 cmp r3, #0 8003f10: d001 beq.n 8003f16 Error_Handler(); 8003f12: f7fe fbd7 bl 80026c4 __HAL_RCC_USART6_CLK_ENABLE(); 8003f16: 4b25 ldr r3, [pc, #148] @ (8003fac ) 8003f18: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003f1c: 4a23 ldr r2, [pc, #140] @ (8003fac ) 8003f1e: f043 0320 orr.w r3, r3, #32 8003f22: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003f26: 4b21 ldr r3, [pc, #132] @ (8003fac ) 8003f28: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003f2c: f003 0320 and.w r3, r3, #32 8003f30: 60fb str r3, [r7, #12] 8003f32: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOC_CLK_ENABLE(); 8003f34: 4b1d ldr r3, [pc, #116] @ (8003fac ) 8003f36: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003f3a: 4a1c ldr r2, [pc, #112] @ (8003fac ) 8003f3c: f043 0304 orr.w r3, r3, #4 8003f40: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003f44: 4b19 ldr r3, [pc, #100] @ (8003fac ) 8003f46: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003f4a: f003 0204 and.w r2, r3, #4 8003f4e: f507 7384 add.w r3, r7, #264 @ 0x108 8003f52: f5a3 7380 sub.w r3, r3, #256 @ 0x100 8003f56: 601a str r2, [r3, #0] 8003f58: f507 7384 add.w r3, r7, #264 @ 0x108 8003f5c: f5a3 7380 sub.w r3, r3, #256 @ 0x100 8003f60: 681b ldr r3, [r3, #0] GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; 8003f62: 23c0 movs r3, #192 @ 0xc0 8003f64: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003f68: 2302 movs r3, #2 8003f6a: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003f6e: 2300 movs r3, #0 8003f70: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003f74: 2302 movs r3, #2 8003f76: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART6; 8003f7a: 2307 movs r3, #7 8003f7c: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 8003f80: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003f84: 4619 mov r1, r3 8003f86: 480c ldr r0, [pc, #48] @ (8003fb8 ) 8003f88: f005 ff42 bl 8009e10 HAL_NVIC_SetPriority(USART6_IRQn, 5, 0); 8003f8c: 2200 movs r2, #0 8003f8e: 2105 movs r1, #5 8003f90: 2047 movs r0, #71 @ 0x47 8003f92: f001 fd15 bl 80059c0 HAL_NVIC_EnableIRQ(USART6_IRQn); 8003f96: 2047 movs r0, #71 @ 0x47 8003f98: f001 fd2c bl 80059f4 } 8003f9c: bf00 nop 8003f9e: f507 7784 add.w r7, r7, #264 @ 0x108 8003fa2: 46bd mov sp, r7 8003fa4: bd80 pop {r7, pc} 8003fa6: bf00 nop 8003fa8: 40004800 .word 0x40004800 8003fac: 58024400 .word 0x58024400 8003fb0: 58020c00 .word 0x58020c00 8003fb4: 40011400 .word 0x40011400 8003fb8: 58020800 .word 0x58020800 08003fbc : * 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) { 8003fbc: b580 push {r7, lr} 8003fbe: b090 sub sp, #64 @ 0x40 8003fc0: af00 add r7, sp, #0 8003fc2: 6078 str r0, [r7, #4] uint32_t uwTimclock, uwAPB1Prescaler; uint32_t uwPrescalerValue; uint32_t pFLatency; /*Configure the TIM6 IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 8003fc4: 687b ldr r3, [r7, #4] 8003fc6: 2b0f cmp r3, #15 8003fc8: d827 bhi.n 800401a { HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); 8003fca: 2200 movs r2, #0 8003fcc: 6879 ldr r1, [r7, #4] 8003fce: 2036 movs r0, #54 @ 0x36 8003fd0: f001 fcf6 bl 80059c0 /* Enable the TIM6 global Interrupt */ HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); 8003fd4: 2036 movs r0, #54 @ 0x36 8003fd6: f001 fd0d bl 80059f4 uwTickPrio = TickPriority; 8003fda: 4a29 ldr r2, [pc, #164] @ (8004080 ) 8003fdc: 687b ldr r3, [r7, #4] 8003fde: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Enable TIM6 clock */ __HAL_RCC_TIM6_CLK_ENABLE(); 8003fe0: 4b28 ldr r3, [pc, #160] @ (8004084 ) 8003fe2: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003fe6: 4a27 ldr r2, [pc, #156] @ (8004084 ) 8003fe8: f043 0310 orr.w r3, r3, #16 8003fec: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003ff0: 4b24 ldr r3, [pc, #144] @ (8004084 ) 8003ff2: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003ff6: f003 0310 and.w r3, r3, #16 8003ffa: 60fb str r3, [r7, #12] 8003ffc: 68fb ldr r3, [r7, #12] /* Get clock configuration */ HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); 8003ffe: f107 0210 add.w r2, r7, #16 8004002: f107 0314 add.w r3, r7, #20 8004006: 4611 mov r1, r2 8004008: 4618 mov r0, r3 800400a: f007 fa13 bl 800b434 /* Get APB1 prescaler */ uwAPB1Prescaler = clkconfig.APB1CLKDivider; 800400e: 6abb ldr r3, [r7, #40] @ 0x28 8004010: 63bb str r3, [r7, #56] @ 0x38 /* Compute TIM6 clock */ if (uwAPB1Prescaler == RCC_HCLK_DIV1) 8004012: 6bbb ldr r3, [r7, #56] @ 0x38 8004014: 2b00 cmp r3, #0 8004016: d106 bne.n 8004026 8004018: e001 b.n 800401e return HAL_ERROR; 800401a: 2301 movs r3, #1 800401c: e02b b.n 8004076 { uwTimclock = HAL_RCC_GetPCLK1Freq(); 800401e: f007 f9dd bl 800b3dc 8004022: 63f8 str r0, [r7, #60] @ 0x3c 8004024: e004 b.n 8004030 } else { uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq(); 8004026: f007 f9d9 bl 800b3dc 800402a: 4603 mov r3, r0 800402c: 005b lsls r3, r3, #1 800402e: 63fb str r3, [r7, #60] @ 0x3c } /* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */ uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U); 8004030: 6bfb ldr r3, [r7, #60] @ 0x3c 8004032: 4a15 ldr r2, [pc, #84] @ (8004088 ) 8004034: fba2 2303 umull r2, r3, r2, r3 8004038: 0c9b lsrs r3, r3, #18 800403a: 3b01 subs r3, #1 800403c: 637b str r3, [r7, #52] @ 0x34 /* Initialize TIM6 */ htim6.Instance = TIM6; 800403e: 4b13 ldr r3, [pc, #76] @ (800408c ) 8004040: 4a13 ldr r2, [pc, #76] @ (8004090 ) 8004042: 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; 8004044: 4b11 ldr r3, [pc, #68] @ (800408c ) 8004046: f240 32e7 movw r2, #999 @ 0x3e7 800404a: 60da str r2, [r3, #12] htim6.Init.Prescaler = uwPrescalerValue; 800404c: 4a0f ldr r2, [pc, #60] @ (800408c ) 800404e: 6b7b ldr r3, [r7, #52] @ 0x34 8004050: 6053 str r3, [r2, #4] htim6.Init.ClockDivision = 0; 8004052: 4b0e ldr r3, [pc, #56] @ (800408c ) 8004054: 2200 movs r2, #0 8004056: 611a str r2, [r3, #16] htim6.Init.CounterMode = TIM_COUNTERMODE_UP; 8004058: 4b0c ldr r3, [pc, #48] @ (800408c ) 800405a: 2200 movs r2, #0 800405c: 609a str r2, [r3, #8] if(HAL_TIM_Base_Init(&htim6) == HAL_OK) 800405e: 480b ldr r0, [pc, #44] @ (800408c ) 8004060: f009 f8f2 bl 800d248 8004064: 4603 mov r3, r0 8004066: 2b00 cmp r3, #0 8004068: d104 bne.n 8004074 { /* Start the TIM time Base generation in interrupt mode */ return HAL_TIM_Base_Start_IT(&htim6); 800406a: 4808 ldr r0, [pc, #32] @ (800408c ) 800406c: f009 f94e bl 800d30c 8004070: 4603 mov r3, r0 8004072: e000 b.n 8004076 } /* Return function status */ return HAL_ERROR; 8004074: 2301 movs r3, #1 } 8004076: 4618 mov r0, r3 8004078: 3740 adds r7, #64 @ 0x40 800407a: 46bd mov sp, r7 800407c: bd80 pop {r7, pc} 800407e: bf00 nop 8004080: 2400002c .word 0x2400002c 8004084: 58024400 .word 0x58024400 8004088: 431bde83 .word 0x431bde83 800408c: 24000f9c .word 0x24000f9c 8004090: 40001000 .word 0x40001000 08004094 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 8004094: b480 push {r7} 8004096: 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) 8004098: bf00 nop 800409a: e7fd b.n 8004098 0800409c : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 800409c: b480 push {r7} 800409e: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 80040a0: bf00 nop 80040a2: e7fd b.n 80040a0 080040a4 : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 80040a4: b480 push {r7} 80040a6: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 80040a8: bf00 nop 80040aa: e7fd b.n 80040a8 080040ac : /** * @brief This function handles Pre-fetch fault, memory access fault. */ void BusFault_Handler(void) { 80040ac: b480 push {r7} 80040ae: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 80040b0: bf00 nop 80040b2: e7fd b.n 80040b0 080040b4 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 80040b4: b480 push {r7} 80040b6: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 80040b8: bf00 nop 80040ba: e7fd b.n 80040b8 080040bc : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 80040bc: b480 push {r7} 80040be: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 80040c0: bf00 nop 80040c2: 46bd mov sp, r7 80040c4: f85d 7b04 ldr.w r7, [sp], #4 80040c8: 4770 bx lr 080040ca : /** * @brief This function handles RCC global interrupt. */ void RCC_IRQHandler(void) { 80040ca: b480 push {r7} 80040cc: af00 add r7, sp, #0 /* USER CODE END RCC_IRQn 0 */ /* USER CODE BEGIN RCC_IRQn 1 */ /* USER CODE END RCC_IRQn 1 */ } 80040ce: bf00 nop 80040d0: 46bd mov sp, r7 80040d2: f85d 7b04 ldr.w r7, [sp], #4 80040d6: 4770 bx lr 080040d8 : /** * @brief This function handles USART1 global interrupt. */ void USART1_IRQHandler(void) { 80040d8: b580 push {r7, lr} 80040da: af00 add r7, sp, #0 /* USER CODE BEGIN USART1_IRQn 0 */ /* USER CODE END USART1_IRQn 0 */ HAL_UART_IRQHandler(&huart1); 80040dc: 4802 ldr r0, [pc, #8] @ (80040e8 ) 80040de: f009 fcf3 bl 800dac8 /* USER CODE BEGIN USART1_IRQn 1 */ /* USER CODE END USART1_IRQn 1 */ } 80040e2: bf00 nop 80040e4: bd80 pop {r7, pc} 80040e6: bf00 nop 80040e8: 24000314 .word 0x24000314 080040ec : /** * @brief This function handles USART2 global interrupt. */ void USART2_IRQHandler(void) { 80040ec: b580 push {r7, lr} 80040ee: af00 add r7, sp, #0 /* USER CODE BEGIN USART2_IRQn 0 */ /* USER CODE END USART2_IRQn 0 */ HAL_UART_IRQHandler(&huart2); 80040f0: 4802 ldr r0, [pc, #8] @ (80040fc ) 80040f2: f009 fce9 bl 800dac8 /* USER CODE BEGIN USART2_IRQn 1 */ /* USER CODE END USART2_IRQn 1 */ } 80040f6: bf00 nop 80040f8: bd80 pop {r7, pc} 80040fa: bf00 nop 80040fc: 240003a8 .word 0x240003a8 08004100 : /** * @brief This function handles USART3 global interrupt. */ void USART3_IRQHandler(void) { 8004100: b580 push {r7, lr} 8004102: af00 add r7, sp, #0 /* USER CODE BEGIN USART3_IRQn 0 */ /* USER CODE END USART3_IRQn 0 */ HAL_UART_IRQHandler(&huart3); 8004104: 4802 ldr r0, [pc, #8] @ (8004110 ) 8004106: f009 fcdf bl 800dac8 /* USER CODE BEGIN USART3_IRQn 1 */ /* USER CODE END USART3_IRQn 1 */ } 800410a: bf00 nop 800410c: bd80 pop {r7, pc} 800410e: bf00 nop 8004110: 2400043c .word 0x2400043c 08004114 : /** * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts. */ void TIM6_DAC_IRQHandler(void) { 8004114: b580 push {r7, lr} 8004116: af00 add r7, sp, #0 /* USER CODE BEGIN TIM6_DAC_IRQn 0 */ /* USER CODE END TIM6_DAC_IRQn 0 */ HAL_TIM_IRQHandler(&htim6); 8004118: 4802 ldr r0, [pc, #8] @ (8004124 ) 800411a: f009 f96f bl 800d3fc /* USER CODE BEGIN TIM6_DAC_IRQn 1 */ /* USER CODE END TIM6_DAC_IRQn 1 */ } 800411e: bf00 nop 8004120: bd80 pop {r7, pc} 8004122: bf00 nop 8004124: 24000f9c .word 0x24000f9c 08004128 : /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { 8004128: b580 push {r7, lr} 800412a: af00 add r7, sp, #0 /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); 800412c: 4802 ldr r0, [pc, #8] @ (8004138 ) 800412e: f004 fce7 bl 8008b00 /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } 8004132: bf00 nop 8004134: bd80 pop {r7, pc} 8004136: bf00 nop 8004138: 240022cc .word 0x240022cc 0800413c : /** * @brief This function handles DMA2 stream6 global interrupt. */ void DMA2_Stream6_IRQHandler(void) { 800413c: b580 push {r7, lr} 800413e: af00 add r7, sp, #0 /* USER CODE BEGIN DMA2_Stream6_IRQn 0 */ /* USER CODE END DMA2_Stream6_IRQn 0 */ HAL_DMA_IRQHandler(&hdma_uart8_tx); 8004140: 4802 ldr r0, [pc, #8] @ (800414c ) 8004142: f002 ffa3 bl 800708c /* USER CODE BEGIN DMA2_Stream6_IRQn 1 */ /* USER CODE END DMA2_Stream6_IRQn 1 */ } 8004146: bf00 nop 8004148: bd80 pop {r7, pc} 800414a: bf00 nop 800414c: 240005dc .word 0x240005dc 08004150 : /** * @brief This function handles DMA2 stream7 global interrupt. */ void DMA2_Stream7_IRQHandler(void) { 8004150: b580 push {r7, lr} 8004152: af00 add r7, sp, #0 /* USER CODE BEGIN DMA2_Stream7_IRQn 0 */ /* USER CODE END DMA2_Stream7_IRQn 0 */ HAL_DMA_IRQHandler(&hdma_uart8_rx); 8004154: 4802 ldr r0, [pc, #8] @ (8004160 ) 8004156: f002 ff99 bl 800708c /* USER CODE BEGIN DMA2_Stream7_IRQn 1 */ /* USER CODE END DMA2_Stream7_IRQn 1 */ } 800415a: bf00 nop 800415c: bd80 pop {r7, pc} 800415e: bf00 nop 8004160: 24000564 .word 0x24000564 08004164 : /** * @brief This function handles USART6 global interrupt. */ void USART6_IRQHandler(void) { 8004164: b580 push {r7, lr} 8004166: af00 add r7, sp, #0 /* USER CODE BEGIN USART6_IRQn 0 */ /* USER CODE END USART6_IRQn 0 */ HAL_UART_IRQHandler(&huart6); 8004168: 4802 ldr r0, [pc, #8] @ (8004174 ) 800416a: f009 fcad bl 800dac8 /* USER CODE BEGIN USART6_IRQn 1 */ /* USER CODE END USART6_IRQn 1 */ } 800416e: bf00 nop 8004170: bd80 pop {r7, pc} 8004172: bf00 nop 8004174: 240004d0 .word 0x240004d0 08004178 : /** * @brief This function handles UART8 global interrupt. */ void UART8_IRQHandler(void) { 8004178: b580 push {r7, lr} 800417a: af00 add r7, sp, #0 /* USER CODE BEGIN UART8_IRQn 0 */ /* USER CODE END UART8_IRQn 0 */ HAL_UART_IRQHandler(&huart8); 800417c: 4802 ldr r0, [pc, #8] @ (8004188 ) 800417e: f009 fca3 bl 800dac8 /* USER CODE BEGIN UART8_IRQn 1 */ /* USER CODE END UART8_IRQn 1 */ } 8004182: bf00 nop 8004184: bd80 pop {r7, pc} 8004186: bf00 nop 8004188: 24000280 .word 0x24000280 0800418c <_getpid>: void initialise_monitor_handles() { } int _getpid(void) { 800418c: b480 push {r7} 800418e: af00 add r7, sp, #0 return 1; 8004190: 2301 movs r3, #1 } 8004192: 4618 mov r0, r3 8004194: 46bd mov sp, r7 8004196: f85d 7b04 ldr.w r7, [sp], #4 800419a: 4770 bx lr 0800419c <_kill>: int _kill(int pid, int sig) { 800419c: b480 push {r7} 800419e: b083 sub sp, #12 80041a0: af00 add r7, sp, #0 80041a2: 6078 str r0, [r7, #4] 80041a4: 6039 str r1, [r7, #0] (void)pid; (void)sig; errno = EINVAL; 80041a6: 4b05 ldr r3, [pc, #20] @ (80041bc <_kill+0x20>) 80041a8: 2216 movs r2, #22 80041aa: 601a str r2, [r3, #0] return -1; 80041ac: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 80041b0: 4618 mov r0, r3 80041b2: 370c adds r7, #12 80041b4: 46bd mov sp, r7 80041b6: f85d 7b04 ldr.w r7, [sp], #4 80041ba: 4770 bx lr 80041bc: 2402b260 .word 0x2402b260 080041c0 <_exit>: void _exit (int status) { 80041c0: b580 push {r7, lr} 80041c2: b082 sub sp, #8 80041c4: af00 add r7, sp, #0 80041c6: 6078 str r0, [r7, #4] _kill(status, -1); 80041c8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80041cc: 6878 ldr r0, [r7, #4] 80041ce: f7ff ffe5 bl 800419c <_kill> while (1) {} /* Make sure we hang here */ 80041d2: bf00 nop 80041d4: e7fd b.n 80041d2 <_exit+0x12> 080041d6 <_read>: } __attribute__((weak)) int _read(int file, char *ptr, int len) { 80041d6: b580 push {r7, lr} 80041d8: b086 sub sp, #24 80041da: af00 add r7, sp, #0 80041dc: 60f8 str r0, [r7, #12] 80041de: 60b9 str r1, [r7, #8] 80041e0: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 80041e2: 2300 movs r3, #0 80041e4: 617b str r3, [r7, #20] 80041e6: e00a b.n 80041fe <_read+0x28> { *ptr++ = __io_getchar(); 80041e8: f3af 8000 nop.w 80041ec: 4601 mov r1, r0 80041ee: 68bb ldr r3, [r7, #8] 80041f0: 1c5a adds r2, r3, #1 80041f2: 60ba str r2, [r7, #8] 80041f4: b2ca uxtb r2, r1 80041f6: 701a strb r2, [r3, #0] for (DataIdx = 0; DataIdx < len; DataIdx++) 80041f8: 697b ldr r3, [r7, #20] 80041fa: 3301 adds r3, #1 80041fc: 617b str r3, [r7, #20] 80041fe: 697a ldr r2, [r7, #20] 8004200: 687b ldr r3, [r7, #4] 8004202: 429a cmp r2, r3 8004204: dbf0 blt.n 80041e8 <_read+0x12> } return len; 8004206: 687b ldr r3, [r7, #4] } 8004208: 4618 mov r0, r3 800420a: 3718 adds r7, #24 800420c: 46bd mov sp, r7 800420e: bd80 pop {r7, pc} 08004210 <_write>: __attribute__((weak)) int _write(int file, char *ptr, int len) { 8004210: b580 push {r7, lr} 8004212: b086 sub sp, #24 8004214: af00 add r7, sp, #0 8004216: 60f8 str r0, [r7, #12] 8004218: 60b9 str r1, [r7, #8] 800421a: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 800421c: 2300 movs r3, #0 800421e: 617b str r3, [r7, #20] 8004220: e009 b.n 8004236 <_write+0x26> { __io_putchar(*ptr++); 8004222: 68bb ldr r3, [r7, #8] 8004224: 1c5a adds r2, r3, #1 8004226: 60ba str r2, [r7, #8] 8004228: 781b ldrb r3, [r3, #0] 800422a: 4618 mov r0, r3 800422c: f7fd fd5a bl 8001ce4 <__io_putchar> for (DataIdx = 0; DataIdx < len; DataIdx++) 8004230: 697b ldr r3, [r7, #20] 8004232: 3301 adds r3, #1 8004234: 617b str r3, [r7, #20] 8004236: 697a ldr r2, [r7, #20] 8004238: 687b ldr r3, [r7, #4] 800423a: 429a cmp r2, r3 800423c: dbf1 blt.n 8004222 <_write+0x12> // ITM_SendChar(*ptr++); } return len; 800423e: 687b ldr r3, [r7, #4] } 8004240: 4618 mov r0, r3 8004242: 3718 adds r7, #24 8004244: 46bd mov sp, r7 8004246: bd80 pop {r7, pc} 08004248 <_close>: int _close(int file) { 8004248: b480 push {r7} 800424a: b083 sub sp, #12 800424c: af00 add r7, sp, #0 800424e: 6078 str r0, [r7, #4] (void)file; return -1; 8004250: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8004254: 4618 mov r0, r3 8004256: 370c adds r7, #12 8004258: 46bd mov sp, r7 800425a: f85d 7b04 ldr.w r7, [sp], #4 800425e: 4770 bx lr 08004260 <_fstat>: int _fstat(int file, struct stat *st) { 8004260: b480 push {r7} 8004262: b083 sub sp, #12 8004264: af00 add r7, sp, #0 8004266: 6078 str r0, [r7, #4] 8004268: 6039 str r1, [r7, #0] (void)file; st->st_mode = S_IFCHR; 800426a: 683b ldr r3, [r7, #0] 800426c: f44f 5200 mov.w r2, #8192 @ 0x2000 8004270: 605a str r2, [r3, #4] return 0; 8004272: 2300 movs r3, #0 } 8004274: 4618 mov r0, r3 8004276: 370c adds r7, #12 8004278: 46bd mov sp, r7 800427a: f85d 7b04 ldr.w r7, [sp], #4 800427e: 4770 bx lr 08004280 <_isatty>: int _isatty(int file) { 8004280: b480 push {r7} 8004282: b083 sub sp, #12 8004284: af00 add r7, sp, #0 8004286: 6078 str r0, [r7, #4] (void)file; return 1; 8004288: 2301 movs r3, #1 } 800428a: 4618 mov r0, r3 800428c: 370c adds r7, #12 800428e: 46bd mov sp, r7 8004290: f85d 7b04 ldr.w r7, [sp], #4 8004294: 4770 bx lr 08004296 <_lseek>: int _lseek(int file, int ptr, int dir) { 8004296: b480 push {r7} 8004298: b085 sub sp, #20 800429a: af00 add r7, sp, #0 800429c: 60f8 str r0, [r7, #12] 800429e: 60b9 str r1, [r7, #8] 80042a0: 607a str r2, [r7, #4] (void)file; (void)ptr; (void)dir; return 0; 80042a2: 2300 movs r3, #0 } 80042a4: 4618 mov r0, r3 80042a6: 3714 adds r7, #20 80042a8: 46bd mov sp, r7 80042aa: f85d 7b04 ldr.w r7, [sp], #4 80042ae: 4770 bx lr 080042b0 <_sbrk>: * * @param incr Memory size * @return Pointer to allocated memory */ void *_sbrk(ptrdiff_t incr) { 80042b0: b480 push {r7} 80042b2: b087 sub sp, #28 80042b4: af00 add r7, sp, #0 80042b6: 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; 80042b8: 4a14 ldr r2, [pc, #80] @ (800430c <_sbrk+0x5c>) 80042ba: 4b15 ldr r3, [pc, #84] @ (8004310 <_sbrk+0x60>) 80042bc: 1ad3 subs r3, r2, r3 80042be: 617b str r3, [r7, #20] const uint8_t *max_heap = (uint8_t *)stack_limit; 80042c0: 697b ldr r3, [r7, #20] 80042c2: 613b str r3, [r7, #16] uint8_t *prev_heap_end; /* Initialize heap end at first call */ if (NULL == __sbrk_heap_end) 80042c4: 4b13 ldr r3, [pc, #76] @ (8004314 <_sbrk+0x64>) 80042c6: 681b ldr r3, [r3, #0] 80042c8: 2b00 cmp r3, #0 80042ca: d102 bne.n 80042d2 <_sbrk+0x22> { __sbrk_heap_end = &_end; 80042cc: 4b11 ldr r3, [pc, #68] @ (8004314 <_sbrk+0x64>) 80042ce: 4a12 ldr r2, [pc, #72] @ (8004318 <_sbrk+0x68>) 80042d0: 601a str r2, [r3, #0] } /* Protect heap from growing into the reserved MSP stack */ if (__sbrk_heap_end + incr > max_heap) 80042d2: 4b10 ldr r3, [pc, #64] @ (8004314 <_sbrk+0x64>) 80042d4: 681a ldr r2, [r3, #0] 80042d6: 687b ldr r3, [r7, #4] 80042d8: 4413 add r3, r2 80042da: 693a ldr r2, [r7, #16] 80042dc: 429a cmp r2, r3 80042de: d205 bcs.n 80042ec <_sbrk+0x3c> { errno = ENOMEM; 80042e0: 4b0e ldr r3, [pc, #56] @ (800431c <_sbrk+0x6c>) 80042e2: 220c movs r2, #12 80042e4: 601a str r2, [r3, #0] return (void *)-1; 80042e6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80042ea: e009 b.n 8004300 <_sbrk+0x50> } prev_heap_end = __sbrk_heap_end; 80042ec: 4b09 ldr r3, [pc, #36] @ (8004314 <_sbrk+0x64>) 80042ee: 681b ldr r3, [r3, #0] 80042f0: 60fb str r3, [r7, #12] __sbrk_heap_end += incr; 80042f2: 4b08 ldr r3, [pc, #32] @ (8004314 <_sbrk+0x64>) 80042f4: 681a ldr r2, [r3, #0] 80042f6: 687b ldr r3, [r7, #4] 80042f8: 4413 add r3, r2 80042fa: 4a06 ldr r2, [pc, #24] @ (8004314 <_sbrk+0x64>) 80042fc: 6013 str r3, [r2, #0] return (void *)prev_heap_end; 80042fe: 68fb ldr r3, [r7, #12] } 8004300: 4618 mov r0, r3 8004302: 371c adds r7, #28 8004304: 46bd mov sp, r7 8004306: f85d 7b04 ldr.w r7, [sp], #4 800430a: 4770 bx lr 800430c: 24060000 .word 0x24060000 8004310: 00000400 .word 0x00000400 8004314: 24000fe8 .word 0x24000fe8 8004318: 2402b268 .word 0x2402b268 800431c: 2402b260 .word 0x2402b260 08004320 : * configuration. * @param None * @retval None */ void SystemInit (void) { 8004320: b480 push {r7} 8004322: af00 add r7, sp, #0 __IO uint32_t tmpreg; #endif /* DATA_IN_D2_SRAM */ /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */ 8004324: 4b37 ldr r3, [pc, #220] @ (8004404 ) 8004326: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800432a: 4a36 ldr r2, [pc, #216] @ (8004404 ) 800432c: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 8004330: f8c2 3088 str.w r3, [r2, #136] @ 0x88 #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Increasing the CPU frequency */ if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 8004334: 4b34 ldr r3, [pc, #208] @ (8004408 ) 8004336: 681b ldr r3, [r3, #0] 8004338: f003 030f and.w r3, r3, #15 800433c: 2b06 cmp r3, #6 800433e: d807 bhi.n 8004350 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 8004340: 4b31 ldr r3, [pc, #196] @ (8004408 ) 8004342: 681b ldr r3, [r3, #0] 8004344: f023 030f bic.w r3, r3, #15 8004348: 4a2f ldr r2, [pc, #188] @ (8004408 ) 800434a: f043 0307 orr.w r3, r3, #7 800434e: 6013 str r3, [r2, #0] } /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; 8004350: 4b2e ldr r3, [pc, #184] @ (800440c ) 8004352: 681b ldr r3, [r3, #0] 8004354: 4a2d ldr r2, [pc, #180] @ (800440c ) 8004356: f043 0301 orr.w r3, r3, #1 800435a: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 800435c: 4b2b ldr r3, [pc, #172] @ (800440c ) 800435e: 2200 movs r2, #0 8004360: 611a str r2, [r3, #16] /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; 8004362: 4b2a ldr r3, [pc, #168] @ (800440c ) 8004364: 681a ldr r2, [r3, #0] 8004366: 4929 ldr r1, [pc, #164] @ (800440c ) 8004368: 4b29 ldr r3, [pc, #164] @ (8004410 ) 800436a: 4013 ands r3, r2 800436c: 600b str r3, [r1, #0] /* Decreasing the number of wait states because of lower CPU frequency */ if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 800436e: 4b26 ldr r3, [pc, #152] @ (8004408 ) 8004370: 681b ldr r3, [r3, #0] 8004372: f003 0308 and.w r3, r3, #8 8004376: 2b00 cmp r3, #0 8004378: d007 beq.n 800438a { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 800437a: 4b23 ldr r3, [pc, #140] @ (8004408 ) 800437c: 681b ldr r3, [r3, #0] 800437e: f023 030f bic.w r3, r3, #15 8004382: 4a21 ldr r2, [pc, #132] @ (8004408 ) 8004384: f043 0307 orr.w r3, r3, #7 8004388: 6013 str r3, [r2, #0] } #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; 800438a: 4b20 ldr r3, [pc, #128] @ (800440c ) 800438c: 2200 movs r2, #0 800438e: 619a str r2, [r3, #24] /* Reset D2CFGR register */ RCC->D2CFGR = 0x00000000; 8004390: 4b1e ldr r3, [pc, #120] @ (800440c ) 8004392: 2200 movs r2, #0 8004394: 61da str r2, [r3, #28] /* Reset D3CFGR register */ RCC->D3CFGR = 0x00000000; 8004396: 4b1d ldr r3, [pc, #116] @ (800440c ) 8004398: 2200 movs r2, #0 800439a: 621a str r2, [r3, #32] /* Reset SRDCFGR register */ RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ RCC->PLLCKSELR = 0x02020200; 800439c: 4b1b ldr r3, [pc, #108] @ (800440c ) 800439e: 4a1d ldr r2, [pc, #116] @ (8004414 ) 80043a0: 629a str r2, [r3, #40] @ 0x28 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x01FF0000; 80043a2: 4b1a ldr r3, [pc, #104] @ (800440c ) 80043a4: 4a1c ldr r2, [pc, #112] @ (8004418 ) 80043a6: 62da str r2, [r3, #44] @ 0x2c /* Reset PLL1DIVR register */ RCC->PLL1DIVR = 0x01010280; 80043a8: 4b18 ldr r3, [pc, #96] @ (800440c ) 80043aa: 4a1c ldr r2, [pc, #112] @ (800441c ) 80043ac: 631a str r2, [r3, #48] @ 0x30 /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; 80043ae: 4b17 ldr r3, [pc, #92] @ (800440c ) 80043b0: 2200 movs r2, #0 80043b2: 635a str r2, [r3, #52] @ 0x34 /* Reset PLL2DIVR register */ RCC->PLL2DIVR = 0x01010280; 80043b4: 4b15 ldr r3, [pc, #84] @ (800440c ) 80043b6: 4a19 ldr r2, [pc, #100] @ (800441c ) 80043b8: 639a str r2, [r3, #56] @ 0x38 /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; 80043ba: 4b14 ldr r3, [pc, #80] @ (800440c ) 80043bc: 2200 movs r2, #0 80043be: 63da str r2, [r3, #60] @ 0x3c /* Reset PLL3DIVR register */ RCC->PLL3DIVR = 0x01010280; 80043c0: 4b12 ldr r3, [pc, #72] @ (800440c ) 80043c2: 4a16 ldr r2, [pc, #88] @ (800441c ) 80043c4: 641a str r2, [r3, #64] @ 0x40 /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; 80043c6: 4b11 ldr r3, [pc, #68] @ (800440c ) 80043c8: 2200 movs r2, #0 80043ca: 645a str r2, [r3, #68] @ 0x44 /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; 80043cc: 4b0f ldr r3, [pc, #60] @ (800440c ) 80043ce: 681b ldr r3, [r3, #0] 80043d0: 4a0e ldr r2, [pc, #56] @ (800440c ) 80043d2: f423 2380 bic.w r3, r3, #262144 @ 0x40000 80043d6: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000; 80043d8: 4b0c ldr r3, [pc, #48] @ (800440c ) 80043da: 2200 movs r2, #0 80043dc: 661a str r2, [r3, #96] @ 0x60 #if (STM32H7_DEV_ID == 0x450UL) /* dual core CM7 or single core line */ if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U) 80043de: 4b10 ldr r3, [pc, #64] @ (8004420 ) 80043e0: 681a ldr r2, [r3, #0] 80043e2: 4b10 ldr r3, [pc, #64] @ (8004424 ) 80043e4: 4013 ands r3, r2 80043e6: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 80043ea: d202 bcs.n 80043f2 { /* if stm32h7 revY*/ /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */ *((__IO uint32_t*)0x51008108) = 0x000000001U; 80043ec: 4b0e ldr r3, [pc, #56] @ (8004428 ) 80043ee: 2201 movs r2, #1 80043f0: 601a str r2, [r3, #0] /* * Disable the FMC bank1 (enabled after reset). * This, prevents CPU speculation access on this bank which blocks the use of FMC during * 24us. During this time the others FMC master (such as LTDC) cannot use it! */ FMC_Bank1_R->BTCR[0] = 0x000030D2; 80043f2: 4b0e ldr r3, [pc, #56] @ (800442c ) 80043f4: f243 02d2 movw r2, #12498 @ 0x30d2 80043f8: 601a str r2, [r3, #0] #if defined(USER_VECT_TAB_ADDRESS) SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D1 AXI-RAM or in Internal FLASH */ #endif /* USER_VECT_TAB_ADDRESS */ #endif /*DUAL_CORE && CORE_CM4*/ } 80043fa: bf00 nop 80043fc: 46bd mov sp, r7 80043fe: f85d 7b04 ldr.w r7, [sp], #4 8004402: 4770 bx lr 8004404: e000ed00 .word 0xe000ed00 8004408: 52002000 .word 0x52002000 800440c: 58024400 .word 0x58024400 8004410: eaf6ed7f .word 0xeaf6ed7f 8004414: 02020200 .word 0x02020200 8004418: 01ff0000 .word 0x01ff0000 800441c: 01010280 .word 0x01010280 8004420: 5c001000 .word 0x5c001000 8004424: ffff0000 .word 0xffff0000 8004428: 51008108 .word 0x51008108 800442c: 52004000 .word 0x52004000 08004430 : osMutexId_t resMeasurementsMutex; osMutexId_t sensorsInfoMutex; extern RNG_HandleTypeDef hrng; void UartTasksInit (void) { 8004430: b580 push {r7, lr} 8004432: af00 add r7, sp, #0 uart1TaskData.uartRxBuffer = uart1RxBuffer; 8004434: 4b4e ldr r3, [pc, #312] @ (8004570 ) 8004436: 4a4f ldr r2, [pc, #316] @ (8004574 ) 8004438: 601a str r2, [r3, #0] uart1TaskData.uartRxBufferLen = UART1_RX_BUFF_SIZE; 800443a: 4b4d ldr r3, [pc, #308] @ (8004570 ) 800443c: f44f 7280 mov.w r2, #256 @ 0x100 8004440: 809a strh r2, [r3, #4] uart1TaskData.uartTxBuffer = uart1TxBuffer; 8004442: 4b4b ldr r3, [pc, #300] @ (8004570 ) 8004444: 4a4c ldr r2, [pc, #304] @ (8004578 ) 8004446: 609a str r2, [r3, #8] uart1TaskData.uartRxBufferLen = UART1_TX_BUFF_SIZE; 8004448: 4b49 ldr r3, [pc, #292] @ (8004570 ) 800444a: f44f 7280 mov.w r2, #256 @ 0x100 800444e: 809a strh r2, [r3, #4] uart1TaskData.frameData = uart1TaskFrameData; 8004450: 4b47 ldr r3, [pc, #284] @ (8004570 ) 8004452: 4a4a ldr r2, [pc, #296] @ (800457c ) 8004454: 611a str r2, [r3, #16] uart1TaskData.frameDataLen = UART1_RX_BUFF_SIZE; 8004456: 4b46 ldr r3, [pc, #280] @ (8004570 ) 8004458: f44f 7280 mov.w r2, #256 @ 0x100 800445c: 829a strh r2, [r3, #20] uart1TaskData.huart = &huart1; 800445e: 4b44 ldr r3, [pc, #272] @ (8004570 ) 8004460: 4a47 ldr r2, [pc, #284] @ (8004580 ) 8004462: 631a str r2, [r3, #48] @ 0x30 uart1TaskData.uartNumber = 1; 8004464: 4b42 ldr r3, [pc, #264] @ (8004570 ) 8004466: 2201 movs r2, #1 8004468: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart2TaskData.uartRxBuffer = uart2RxBuffer; 800446c: 4b45 ldr r3, [pc, #276] @ (8004584 ) 800446e: 4a46 ldr r2, [pc, #280] @ (8004588 ) 8004470: 601a str r2, [r3, #0] uart2TaskData.uartRxBufferLen = UART2_RX_BUFF_SIZE; 8004472: 4b44 ldr r3, [pc, #272] @ (8004584 ) 8004474: f44f 7280 mov.w r2, #256 @ 0x100 8004478: 809a strh r2, [r3, #4] uart2TaskData.uartTxBuffer = uart2TxBuffer; 800447a: 4b42 ldr r3, [pc, #264] @ (8004584 ) 800447c: 4a43 ldr r2, [pc, #268] @ (800458c ) 800447e: 609a str r2, [r3, #8] uart2TaskData.uartRxBufferLen = UART2_TX_BUFF_SIZE; 8004480: 4b40 ldr r3, [pc, #256] @ (8004584 ) 8004482: f44f 7280 mov.w r2, #256 @ 0x100 8004486: 809a strh r2, [r3, #4] uart2TaskData.frameData = uart2TaskFrameData; 8004488: 4b3e ldr r3, [pc, #248] @ (8004584 ) 800448a: 4a41 ldr r2, [pc, #260] @ (8004590 ) 800448c: 611a str r2, [r3, #16] uart2TaskData.frameDataLen = UART2_RX_BUFF_SIZE; 800448e: 4b3d ldr r3, [pc, #244] @ (8004584 ) 8004490: f44f 7280 mov.w r2, #256 @ 0x100 8004494: 829a strh r2, [r3, #20] uart2TaskData.huart = &huart2; 8004496: 4b3b ldr r3, [pc, #236] @ (8004584 ) 8004498: 4a3e ldr r2, [pc, #248] @ (8004594 ) 800449a: 631a str r2, [r3, #48] @ 0x30 uart2TaskData.uartNumber = 2; 800449c: 4b39 ldr r3, [pc, #228] @ (8004584 ) 800449e: 2202 movs r2, #2 80044a0: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart3TaskData.uartRxBuffer = uart3RxBuffer; 80044a4: 4b3c ldr r3, [pc, #240] @ (8004598 ) 80044a6: 4a3d ldr r2, [pc, #244] @ (800459c ) 80044a8: 601a str r2, [r3, #0] uart3TaskData.uartRxBufferLen = UART3_RX_BUFF_SIZE; 80044aa: 4b3b ldr r3, [pc, #236] @ (8004598 ) 80044ac: f44f 7280 mov.w r2, #256 @ 0x100 80044b0: 809a strh r2, [r3, #4] uart3TaskData.uartTxBuffer = uart3TxBuffer; 80044b2: 4b39 ldr r3, [pc, #228] @ (8004598 ) 80044b4: 4a3a ldr r2, [pc, #232] @ (80045a0 ) 80044b6: 609a str r2, [r3, #8] uart3TaskData.uartRxBufferLen = UART3_TX_BUFF_SIZE; 80044b8: 4b37 ldr r3, [pc, #220] @ (8004598 ) 80044ba: f44f 7280 mov.w r2, #256 @ 0x100 80044be: 809a strh r2, [r3, #4] uart3TaskData.frameData = uart3TaskFrameData; 80044c0: 4b35 ldr r3, [pc, #212] @ (8004598 ) 80044c2: 4a38 ldr r2, [pc, #224] @ (80045a4 ) 80044c4: 611a str r2, [r3, #16] uart3TaskData.frameDataLen = UART3_RX_BUFF_SIZE; 80044c6: 4b34 ldr r3, [pc, #208] @ (8004598 ) 80044c8: f44f 7280 mov.w r2, #256 @ 0x100 80044cc: 829a strh r2, [r3, #20] uart3TaskData.huart = &huart3; 80044ce: 4b32 ldr r3, [pc, #200] @ (8004598 ) 80044d0: 4a35 ldr r2, [pc, #212] @ (80045a8 ) 80044d2: 631a str r2, [r3, #48] @ 0x30 uart3TaskData.uartNumber = 3; 80044d4: 4b30 ldr r3, [pc, #192] @ (8004598 ) 80044d6: 2203 movs r2, #3 80044d8: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart6TaskData.uartRxBuffer = uart6RxBuffer; 80044dc: 4b33 ldr r3, [pc, #204] @ (80045ac ) 80044de: 4a34 ldr r2, [pc, #208] @ (80045b0 ) 80044e0: 601a str r2, [r3, #0] uart6TaskData.uartRxBufferLen = UART6_RX_BUFF_SIZE; 80044e2: 4b32 ldr r3, [pc, #200] @ (80045ac ) 80044e4: f44f 7280 mov.w r2, #256 @ 0x100 80044e8: 809a strh r2, [r3, #4] uart6TaskData.uartTxBuffer = uart6TxBuffer; 80044ea: 4b30 ldr r3, [pc, #192] @ (80045ac ) 80044ec: 4a31 ldr r2, [pc, #196] @ (80045b4 ) 80044ee: 609a str r2, [r3, #8] uart6TaskData.uartRxBufferLen = UART6_TX_BUFF_SIZE; 80044f0: 4b2e ldr r3, [pc, #184] @ (80045ac ) 80044f2: f44f 7280 mov.w r2, #256 @ 0x100 80044f6: 809a strh r2, [r3, #4] uart6TaskData.frameData = uart6TaskFrameData; 80044f8: 4b2c ldr r3, [pc, #176] @ (80045ac ) 80044fa: 4a2f ldr r2, [pc, #188] @ (80045b8 ) 80044fc: 611a str r2, [r3, #16] uart6TaskData.frameDataLen = UART6_RX_BUFF_SIZE; 80044fe: 4b2b ldr r3, [pc, #172] @ (80045ac ) 8004500: f44f 7280 mov.w r2, #256 @ 0x100 8004504: 829a strh r2, [r3, #20] uart6TaskData.huart = &huart6; 8004506: 4b29 ldr r3, [pc, #164] @ (80045ac ) 8004508: 4a2c ldr r2, [pc, #176] @ (80045bc ) 800450a: 631a str r2, [r3, #48] @ 0x30 uart6TaskData.uartNumber = 6; 800450c: 4b27 ldr r3, [pc, #156] @ (80045ac ) 800450e: 2206 movs r2, #6 8004510: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart8TaskData.uartRxBuffer = uart8RxBuffer; 8004514: 4b2a ldr r3, [pc, #168] @ (80045c0 ) 8004516: 4a2b ldr r2, [pc, #172] @ (80045c4 ) 8004518: 601a str r2, [r3, #0] uart8TaskData.uartRxBufferLen = UART8_RX_BUFF_SIZE; 800451a: 4b29 ldr r3, [pc, #164] @ (80045c0 ) 800451c: f44f 7280 mov.w r2, #256 @ 0x100 8004520: 809a strh r2, [r3, #4] uart8TaskData.uartTxBuffer = uart8TxBuffer; 8004522: 4b27 ldr r3, [pc, #156] @ (80045c0 ) 8004524: 4a28 ldr r2, [pc, #160] @ (80045c8 ) 8004526: 609a str r2, [r3, #8] uart8TaskData.uartRxBufferLen = UART8_TX_BUFF_SIZE; 8004528: 4b25 ldr r3, [pc, #148] @ (80045c0 ) 800452a: f44f 7280 mov.w r2, #256 @ 0x100 800452e: 809a strh r2, [r3, #4] uart8TaskData.frameData = uart8TaskFrameData; 8004530: 4b23 ldr r3, [pc, #140] @ (80045c0 ) 8004532: 4a26 ldr r2, [pc, #152] @ (80045cc ) 8004534: 611a str r2, [r3, #16] uart8TaskData.frameDataLen = UART8_RX_BUFF_SIZE; 8004536: 4b22 ldr r3, [pc, #136] @ (80045c0 ) 8004538: f44f 7280 mov.w r2, #256 @ 0x100 800453c: 829a strh r2, [r3, #20] uart8TaskData.huart = &huart8; 800453e: 4b20 ldr r3, [pc, #128] @ (80045c0 ) 8004540: 4a23 ldr r2, [pc, #140] @ (80045d0 ) 8004542: 631a str r2, [r3, #48] @ 0x30 uart8TaskData.uartNumber = 8; 8004544: 4b1e ldr r3, [pc, #120] @ (80045c0 ) 8004546: 2208 movs r2, #8 8004548: f883 2034 strb.w r2, [r3, #52] @ 0x34 UartTaskCreate (&uart1TaskData); 800454c: 4808 ldr r0, [pc, #32] @ (8004570 ) 800454e: f000 f841 bl 80045d4 UartTaskCreate (&uart2TaskData); 8004552: 480c ldr r0, [pc, #48] @ (8004584 ) 8004554: f000 f83e bl 80045d4 UartTaskCreate (&uart3TaskData); 8004558: 480f ldr r0, [pc, #60] @ (8004598 ) 800455a: f000 f83b bl 80045d4 UartTaskCreate (&uart6TaskData); 800455e: 4813 ldr r0, [pc, #76] @ (80045ac ) 8004560: f000 f838 bl 80045d4 UartTaskCreate (&uart8TaskData); 8004564: 4816 ldr r0, [pc, #88] @ (80045c0 ) 8004566: f000 f835 bl 80045d4 } 800456a: bf00 nop 800456c: bd80 pop {r7, pc} 800456e: bf00 nop 8004570: 24001eec .word 0x24001eec 8004574: 24000fec .word 0x24000fec 8004578: 240010ec .word 0x240010ec 800457c: 240011ec .word 0x240011ec 8004580: 24000314 .word 0x24000314 8004584: 24001f94 .word 0x24001f94 8004588: 240012ec .word 0x240012ec 800458c: 240013ec .word 0x240013ec 8004590: 240014ec .word 0x240014ec 8004594: 240003a8 .word 0x240003a8 8004598: 24001f24 .word 0x24001f24 800459c: 240015ec .word 0x240015ec 80045a0: 240016ec .word 0x240016ec 80045a4: 240017ec .word 0x240017ec 80045a8: 2400043c .word 0x2400043c 80045ac: 24001f5c .word 0x24001f5c 80045b0: 240018ec .word 0x240018ec 80045b4: 240019ec .word 0x240019ec 80045b8: 24001aec .word 0x24001aec 80045bc: 240004d0 .word 0x240004d0 80045c0: 24001fcc .word 0x24001fcc 80045c4: 24001bec .word 0x24001bec 80045c8: 24001cec .word 0x24001cec 80045cc: 24001dec .word 0x24001dec 80045d0: 24000280 .word 0x24000280 080045d4 : void UartTaskCreate (UartTaskData* uartTaskData) { 80045d4: b580 push {r7, lr} 80045d6: b09a sub sp, #104 @ 0x68 80045d8: af00 add r7, sp, #0 80045da: 6078 str r0, [r7, #4] osThreadAttr_t osThreadAttrRxUart = { 0 }; 80045dc: f107 0344 add.w r3, r7, #68 @ 0x44 80045e0: 2224 movs r2, #36 @ 0x24 80045e2: 2100 movs r1, #0 80045e4: 4618 mov r0, r3 80045e6: f026 fad3 bl 802ab90 osThreadAttr_t osThreadAttrTxUart = { 0 }; 80045ea: f107 0320 add.w r3, r7, #32 80045ee: 2224 movs r2, #36 @ 0x24 80045f0: 2100 movs r1, #0 80045f2: 4618 mov r0, r3 80045f4: f026 facc bl 802ab90 uartTaskData->processRxDataMsgBuffer = xMessageBufferCreate (INPUT_DATA_BUFF_SIZE); 80045f8: 2201 movs r2, #1 80045fa: 2100 movs r1, #0 80045fc: f44f 7080 mov.w r0, #256 @ 0x100 8004600: f00e fe18 bl 8013234 8004604: 4602 mov r2, r0 8004606: 687b ldr r3, [r7, #4] 8004608: 625a str r2, [r3, #36] @ 0x24 uartTaskData->processDataCb = NULL; 800460a: 687b ldr r3, [r7, #4] 800460c: 2200 movs r2, #0 800460e: 629a str r2, [r3, #40] @ 0x28 // osThreadAttrRxUart.name = "os_thread_uart1_rx"; osThreadAttrRxUart.stack_size = configMINIMAL_STACK_SIZE * 2; 8004610: f44f 6380 mov.w r3, #1024 @ 0x400 8004614: 65bb str r3, [r7, #88] @ 0x58 osThreadAttrRxUart.priority = (osPriority_t)osPriorityHigh; 8004616: 2328 movs r3, #40 @ 0x28 8004618: 65fb str r3, [r7, #92] @ 0x5c uartTaskData->uartRecieveTaskHandle = osThreadNew (UartRxTask, uartTaskData, &osThreadAttrRxUart); 800461a: f107 0344 add.w r3, r7, #68 @ 0x44 800461e: 461a mov r2, r3 8004620: 6879 ldr r1, [r7, #4] 8004622: 4816 ldr r0, [pc, #88] @ (800467c ) 8004624: f00c fe85 bl 8011332 8004628: 4602 mov r2, r0 800462a: 687b ldr r3, [r7, #4] 800462c: 619a str r2, [r3, #24] osMessageQueueAttr_t uartTxMsgQueueAttr = { 0 }; 800462e: f107 0308 add.w r3, r7, #8 8004632: 2200 movs r2, #0 8004634: 601a str r2, [r3, #0] 8004636: 605a str r2, [r3, #4] 8004638: 609a str r2, [r3, #8] 800463a: 60da str r2, [r3, #12] 800463c: 611a str r2, [r3, #16] 800463e: 615a str r2, [r3, #20] // uartTxMsgQueueAttr.name = "uart1TxMsgQueue"; uartTaskData->sendCmdToSlaveQueue = osMessageQueueNew (16, sizeof (InterProcessData), &uartTxMsgQueueAttr); 8004640: f107 0308 add.w r3, r7, #8 8004644: 461a mov r2, r3 8004646: 2110 movs r1, #16 8004648: 2010 movs r0, #16 800464a: f00d fa73 bl 8011b34 800464e: 4602 mov r2, r0 8004650: 687b ldr r3, [r7, #4] 8004652: 62da str r2, [r3, #44] @ 0x2c // osThreadAttrTxUart.name = "os_thread_uart1_tx"; osThreadAttrTxUart.stack_size = configMINIMAL_STACK_SIZE * 4; 8004654: f44f 6300 mov.w r3, #2048 @ 0x800 8004658: 637b str r3, [r7, #52] @ 0x34 osThreadAttrTxUart.priority = (osPriority_t)osPriorityNormal; 800465a: 2318 movs r3, #24 800465c: 63bb str r3, [r7, #56] @ 0x38 uartTaskData->uartTransmitTaskHandle = osThreadNew (UartTxTask, uartTaskData, &osThreadAttrTxUart); 800465e: f107 0320 add.w r3, r7, #32 8004662: 461a mov r2, r3 8004664: 6879 ldr r1, [r7, #4] 8004666: 4806 ldr r0, [pc, #24] @ (8004680 ) 8004668: f00c fe63 bl 8011332 800466c: 4602 mov r2, r0 800466e: 687b ldr r3, [r7, #4] 8004670: 61da str r2, [r3, #28] } 8004672: bf00 nop 8004674: 3768 adds r7, #104 @ 0x68 8004676: 46bd mov sp, r7 8004678: bd80 pop {r7, pc} 800467a: bf00 nop 800467c: 080047f9 .word 0x080047f9 8004680: 08004de5 .word 0x08004de5 08004684 : void HAL_UART_RxCpltCallback (UART_HandleTypeDef* huart) { 8004684: b480 push {r7} 8004686: b083 sub sp, #12 8004688: af00 add r7, sp, #0 800468a: 6078 str r0, [r7, #4] // osSemaphoreRelease(uart8RxSemaphore); } 800468c: bf00 nop 800468e: 370c adds r7, #12 8004690: 46bd mov sp, r7 8004692: f85d 7b04 ldr.w r7, [sp], #4 8004696: 4770 bx lr 08004698 : void HAL_UARTEx_RxEventCallback (UART_HandleTypeDef* huart, uint16_t Size) { 8004698: b580 push {r7, lr} 800469a: b082 sub sp, #8 800469c: af00 add r7, sp, #0 800469e: 6078 str r0, [r7, #4] 80046a0: 460b mov r3, r1 80046a2: 807b strh r3, [r7, #2] if (huart->Instance == USART1) { 80046a4: 687b ldr r3, [r7, #4] 80046a6: 681b ldr r3, [r3, #0] 80046a8: 4a1e ldr r2, [pc, #120] @ (8004724 ) 80046aa: 4293 cmp r3, r2 80046ac: d106 bne.n 80046bc HandleUartRxCallback (&uart1TaskData, huart, Size); 80046ae: 887b ldrh r3, [r7, #2] 80046b0: 461a mov r2, r3 80046b2: 6879 ldr r1, [r7, #4] 80046b4: 481c ldr r0, [pc, #112] @ (8004728 ) 80046b6: f000 f853 bl 8004760 } else if (huart->Instance == USART6) { HandleUartRxCallback (&uart6TaskData, huart, Size); } else if (huart->Instance == UART8) { HandleUartRxCallback (&uart8TaskData, huart, Size); } } 80046ba: e02e b.n 800471a } else if (huart->Instance == USART2) { 80046bc: 687b ldr r3, [r7, #4] 80046be: 681b ldr r3, [r3, #0] 80046c0: 4a1a ldr r2, [pc, #104] @ (800472c ) 80046c2: 4293 cmp r3, r2 80046c4: d106 bne.n 80046d4 HandleUartRxCallback (&uart2TaskData, huart, Size); 80046c6: 887b ldrh r3, [r7, #2] 80046c8: 461a mov r2, r3 80046ca: 6879 ldr r1, [r7, #4] 80046cc: 4818 ldr r0, [pc, #96] @ (8004730 ) 80046ce: f000 f847 bl 8004760 } 80046d2: e022 b.n 800471a } else if (huart->Instance == USART3) { 80046d4: 687b ldr r3, [r7, #4] 80046d6: 681b ldr r3, [r3, #0] 80046d8: 4a16 ldr r2, [pc, #88] @ (8004734 ) 80046da: 4293 cmp r3, r2 80046dc: d106 bne.n 80046ec HandleUartRxCallback (&uart3TaskData, huart, Size); 80046de: 887b ldrh r3, [r7, #2] 80046e0: 461a mov r2, r3 80046e2: 6879 ldr r1, [r7, #4] 80046e4: 4814 ldr r0, [pc, #80] @ (8004738 ) 80046e6: f000 f83b bl 8004760 } 80046ea: e016 b.n 800471a } else if (huart->Instance == USART6) { 80046ec: 687b ldr r3, [r7, #4] 80046ee: 681b ldr r3, [r3, #0] 80046f0: 4a12 ldr r2, [pc, #72] @ (800473c ) 80046f2: 4293 cmp r3, r2 80046f4: d106 bne.n 8004704 HandleUartRxCallback (&uart6TaskData, huart, Size); 80046f6: 887b ldrh r3, [r7, #2] 80046f8: 461a mov r2, r3 80046fa: 6879 ldr r1, [r7, #4] 80046fc: 4810 ldr r0, [pc, #64] @ (8004740 ) 80046fe: f000 f82f bl 8004760 } 8004702: e00a b.n 800471a } else if (huart->Instance == UART8) { 8004704: 687b ldr r3, [r7, #4] 8004706: 681b ldr r3, [r3, #0] 8004708: 4a0e ldr r2, [pc, #56] @ (8004744 ) 800470a: 4293 cmp r3, r2 800470c: d105 bne.n 800471a HandleUartRxCallback (&uart8TaskData, huart, Size); 800470e: 887b ldrh r3, [r7, #2] 8004710: 461a mov r2, r3 8004712: 6879 ldr r1, [r7, #4] 8004714: 480c ldr r0, [pc, #48] @ (8004748 ) 8004716: f000 f823 bl 8004760 } 800471a: bf00 nop 800471c: 3708 adds r7, #8 800471e: 46bd mov sp, r7 8004720: bd80 pop {r7, pc} 8004722: bf00 nop 8004724: 40011000 .word 0x40011000 8004728: 24001eec .word 0x24001eec 800472c: 40004400 .word 0x40004400 8004730: 24001f94 .word 0x24001f94 8004734: 40004800 .word 0x40004800 8004738: 24001f24 .word 0x24001f24 800473c: 40011400 .word 0x40011400 8004740: 24001f5c .word 0x24001f5c 8004744: 40007c00 .word 0x40007c00 8004748: 24001fcc .word 0x24001fcc 0800474c : void HAL_UART_TxCpltCallback (UART_HandleTypeDef* huart) { 800474c: b480 push {r7} 800474e: b083 sub sp, #12 8004750: af00 add r7, sp, #0 8004752: 6078 str r0, [r7, #4] if (huart->Instance == UART8) { } } 8004754: bf00 nop 8004756: 370c adds r7, #12 8004758: 46bd mov sp, r7 800475a: f85d 7b04 ldr.w r7, [sp], #4 800475e: 4770 bx lr 08004760 : void HandleUartRxCallback (UartTaskData* uartTaskData, UART_HandleTypeDef* huart, uint16_t Size) { 8004760: b580 push {r7, lr} 8004762: b088 sub sp, #32 8004764: af02 add r7, sp, #8 8004766: 60f8 str r0, [r7, #12] 8004768: 60b9 str r1, [r7, #8] 800476a: 4613 mov r3, r2 800476c: 80fb strh r3, [r7, #6] BaseType_t pxHigherPriorityTaskWoken = pdFALSE; 800476e: 2300 movs r3, #0 8004770: 617b str r3, [r7, #20] osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004772: 68fb ldr r3, [r7, #12] 8004774: 6a1b ldr r3, [r3, #32] 8004776: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800477a: 4618 mov r0, r3 800477c: f00d f80f bl 801179e memcpy (&(uartTaskData->frameData[uartTaskData->frameBytesCount]), uartTaskData->uartRxBuffer, Size); 8004780: 68fb ldr r3, [r7, #12] 8004782: 691b ldr r3, [r3, #16] 8004784: 68fa ldr r2, [r7, #12] 8004786: 8ad2 ldrh r2, [r2, #22] 8004788: 1898 adds r0, r3, r2 800478a: 68fb ldr r3, [r7, #12] 800478c: 681b ldr r3, [r3, #0] 800478e: 88fa ldrh r2, [r7, #6] 8004790: 4619 mov r1, r3 8004792: f026 faf4 bl 802ad7e uartTaskData->frameBytesCount += Size; 8004796: 68fb ldr r3, [r7, #12] 8004798: 8ada ldrh r2, [r3, #22] 800479a: 88fb ldrh r3, [r7, #6] 800479c: 4413 add r3, r2 800479e: b29a uxth r2, r3 80047a0: 68fb ldr r3, [r7, #12] 80047a2: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 80047a4: 68fb ldr r3, [r7, #12] 80047a6: 6a1b ldr r3, [r3, #32] 80047a8: 4618 mov r0, r3 80047aa: f00d f843 bl 8011834 xTaskNotifyFromISR (uartTaskData->uartRecieveTaskHandle, Size, eSetValueWithOverwrite, &pxHigherPriorityTaskWoken); 80047ae: 68fb ldr r3, [r7, #12] 80047b0: 6998 ldr r0, [r3, #24] 80047b2: 88f9 ldrh r1, [r7, #6] 80047b4: f107 0314 add.w r3, r7, #20 80047b8: 9300 str r3, [sp, #0] 80047ba: 2300 movs r3, #0 80047bc: 2203 movs r2, #3 80047be: f010 fa31 bl 8014c24 // HAL_UARTEx_ReceiveToIdle_DMA(huart, uart8RxBuffer, UART8_RX_BUFF_SIZE); // __HAL_DMA_DISABLE_IT(&hdma_uart8_rx, DMA_IT_HT); HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 80047c2: 68fb ldr r3, [r7, #12] 80047c4: 6b18 ldr r0, [r3, #48] @ 0x30 80047c6: 68fb ldr r3, [r7, #12] 80047c8: 6819 ldr r1, [r3, #0] 80047ca: 68fb ldr r3, [r7, #12] 80047cc: 889b ldrh r3, [r3, #4] 80047ce: 461a mov r2, r3 80047d0: f00b fdbb bl 801034a portEND_SWITCHING_ISR (pxHigherPriorityTaskWoken); 80047d4: 697b ldr r3, [r7, #20] 80047d6: 2b00 cmp r3, #0 80047d8: d007 beq.n 80047ea 80047da: 4b06 ldr r3, [pc, #24] @ (80047f4 ) 80047dc: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80047e0: 601a str r2, [r3, #0] 80047e2: f3bf 8f4f dsb sy 80047e6: f3bf 8f6f isb sy } 80047ea: bf00 nop 80047ec: 3718 adds r7, #24 80047ee: 46bd mov sp, r7 80047f0: bd80 pop {r7, pc} 80047f2: bf00 nop 80047f4: e000ed04 .word 0xe000ed04 080047f8 : void UartRxTask (void* argument) { 80047f8: b580 push {r7, lr} 80047fa: b0d2 sub sp, #328 @ 0x148 80047fc: af02 add r7, sp, #8 80047fe: f507 73a0 add.w r3, r7, #320 @ 0x140 8004802: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004806: 6018 str r0, [r3, #0] UartTaskData* uartTaskData = (UartTaskData*)argument; 8004808: f507 73a0 add.w r3, r7, #320 @ 0x140 800480c: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004810: 681b ldr r3, [r3, #0] 8004812: f8c7 312c str.w r3, [r7, #300] @ 0x12c SerialProtocolFrameData spFrameData = { 0 }; 8004816: f507 73a0 add.w r3, r7, #320 @ 0x140 800481a: f5a3 7398 sub.w r3, r3, #304 @ 0x130 800481e: 4618 mov r0, r3 8004820: f44f 7386 mov.w r3, #268 @ 0x10c 8004824: 461a mov r2, r3 8004826: 2100 movs r1, #0 8004828: f026 f9b2 bl 802ab90 uint32_t bytesRec = 0; 800482c: f507 73a0 add.w r3, r7, #320 @ 0x140 8004830: f5a3 739a sub.w r3, r3, #308 @ 0x134 8004834: 2200 movs r2, #0 8004836: 601a str r2, [r3, #0] uint32_t crc = 0; 8004838: 2300 movs r3, #0 800483a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 uint16_t frameCommandRaw = 0x0000; 800483e: 2300 movs r3, #0 8004840: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 uint16_t frameBytesCount = 0; 8004844: 2300 movs r3, #0 8004846: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 uint16_t frameCrc = 0; 800484a: 2300 movs r3, #0 800484c: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 uint16_t frameTotalLength = 0; 8004850: 2300 movs r3, #0 8004852: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint16_t dataToSend = 0; 8004856: 2300 movs r3, #0 8004858: f8a7 313c strh.w r3, [r7, #316] @ 0x13c portBASE_TYPE crcPass = pdFAIL; 800485c: 2300 movs r3, #0 800485e: f8c7 3138 str.w r3, [r7, #312] @ 0x138 portBASE_TYPE proceed = pdFALSE; 8004862: 2300 movs r3, #0 8004864: f8c7 3134 str.w r3, [r7, #308] @ 0x134 portBASE_TYPE frameTimeout = pdFAIL; 8004868: 2300 movs r3, #0 800486a: f8c7 311c str.w r3, [r7, #284] @ 0x11c enum SerialReceiverStates receverState = srWaitForHeader; 800486e: 2300 movs r3, #0 8004870: f887 3133 strb.w r3, [r7, #307] @ 0x133 uartTaskData->rxDataBufferMutex = osMutexNew (NULL); 8004874: 2000 movs r0, #0 8004876: f00c ff0c bl 8011692 800487a: 4602 mov r2, r0 800487c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004880: 621a str r2, [r3, #32] HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 8004882: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004886: 6b18 ldr r0, [r3, #48] @ 0x30 8004888: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800488c: 6819 ldr r1, [r3, #0] 800488e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004892: 889b ldrh r3, [r3, #4] 8004894: 461a mov r2, r3 8004896: f00b fd58 bl 801034a while (pdTRUE) { frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 800489a: f107 020c add.w r2, r7, #12 800489e: f44f 63fa mov.w r3, #2000 @ 0x7d0 80048a2: 2100 movs r1, #0 80048a4: 2000 movs r0, #0 80048a6: f010 f89b bl 80149e0 80048aa: 4603 mov r3, r0 80048ac: 2b00 cmp r3, #0 80048ae: bf0c ite eq 80048b0: 2301 moveq r3, #1 80048b2: 2300 movne r3, #0 80048b4: b2db uxtb r3, r3 80048b6: f8c7 311c str.w r3, [r7, #284] @ 0x11c osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80048ba: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80048be: 6a1b ldr r3, [r3, #32] 80048c0: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80048c4: 4618 mov r0, r3 80048c6: f00c ff6a bl 801179e frameBytesCount = uartTaskData->frameBytesCount; 80048ca: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80048ce: 8adb ldrh r3, [r3, #22] 80048d0: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 osMutexRelease (uartTaskData->rxDataBufferMutex); 80048d4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80048d8: 6a1b ldr r3, [r3, #32] 80048da: 4618 mov r0, r3 80048dc: f00c ffaa bl 8011834 if ((frameTimeout == pdTRUE) && (frameBytesCount > 0)) { 80048e0: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 80048e4: 2b01 cmp r3, #1 80048e6: d10a bne.n 80048fe 80048e8: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 80048ec: 2b00 cmp r3, #0 80048ee: d006 beq.n 80048fe receverState = srFail; 80048f0: 2304 movs r3, #4 80048f2: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdTRUE; 80048f6: 2301 movs r3, #1 80048f8: f8c7 3134 str.w r3, [r7, #308] @ 0x134 80048fc: e029 b.n 8004952 } else { if (frameTimeout == pdFALSE) { 80048fe: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 8004902: 2b00 cmp r3, #0 8004904: d111 bne.n 800492a proceed = pdTRUE; 8004906: 2301 movs r3, #1 8004908: f8c7 3134 str.w r3, [r7, #308] @ 0x134 printf ("Uart%d: RX bytes received: %ld\n", uartTaskData->uartNumber, bytesRec); 800490c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004910: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004914: 4619 mov r1, r3 8004916: f507 73a0 add.w r3, r7, #320 @ 0x140 800491a: f5a3 739a sub.w r3, r3, #308 @ 0x134 800491e: 681b ldr r3, [r3, #0] 8004920: 461a mov r2, r3 8004922: 48c1 ldr r0, [pc, #772] @ (8004c28 ) 8004924: f025 ffa2 bl 802a86c 8004928: e22f b.n 8004d8a } else { if (uartTaskData->huart->RxState == HAL_UART_STATE_READY) { 800492a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800492e: 6b1b ldr r3, [r3, #48] @ 0x30 8004930: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 8004934: 2b20 cmp r3, #32 8004936: f040 8228 bne.w 8004d8a HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 800493a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800493e: 6b18 ldr r0, [r3, #48] @ 0x30 8004940: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004944: 6819 ldr r1, [r3, #0] 8004946: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800494a: 889b ldrh r3, [r3, #4] 800494c: 461a mov r2, r3 800494e: f00b fcfc bl 801034a } } } while (proceed) { 8004952: e21a b.n 8004d8a switch (receverState) { 8004954: f897 3133 ldrb.w r3, [r7, #307] @ 0x133 8004958: 2b04 cmp r3, #4 800495a: f200 81f1 bhi.w 8004d40 800495e: a201 add r2, pc, #4 @ (adr r2, 8004964 ) 8004960: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8004964: 08004979 .word 0x08004979 8004968: 08004adb .word 0x08004adb 800496c: 08004abf .word 0x08004abf 8004970: 08004b7b .word 0x08004b7b 8004974: 08004c35 .word 0x08004c35 case srWaitForHeader: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004978: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800497c: 6a1b ldr r3, [r3, #32] 800497e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004982: 4618 mov r0, r3 8004984: f00c ff0b bl 801179e if (uartTaskData->frameData[0] == FRAME_INDICATOR) { 8004988: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800498c: 691b ldr r3, [r3, #16] 800498e: 781b ldrb r3, [r3, #0] 8004990: 2baa cmp r3, #170 @ 0xaa 8004992: f040 8082 bne.w 8004a9a if (frameBytesCount > FRAME_ID_LENGTH) { 8004996: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 800499a: 2b02 cmp r3, #2 800499c: d914 bls.n 80049c8 spFrameData.frameHeader.frameId = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH - FRAME_ID_LENGTH - FRAME_COMMAND_LENGTH])); 800499e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049a2: 691b ldr r3, [r3, #16] 80049a4: 3302 adds r3, #2 80049a6: 781b ldrb r3, [r3, #0] 80049a8: 021b lsls r3, r3, #8 80049aa: b21a sxth r2, r3 80049ac: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049b0: 691b ldr r3, [r3, #16] 80049b2: 3301 adds r3, #1 80049b4: 781b ldrb r3, [r3, #0] 80049b6: b21b sxth r3, r3 80049b8: 4313 orrs r3, r2 80049ba: b21b sxth r3, r3 80049bc: b29a uxth r2, r3 spFrameData.frameHeader.frameId = 80049be: f507 73a0 add.w r3, r7, #320 @ 0x140 80049c2: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80049c6: 801a strh r2, [r3, #0] } if (frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH) { 80049c8: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 80049cc: 2b04 cmp r3, #4 80049ce: d923 bls.n 8004a18 frameCommandRaw = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH - FRAME_COMMAND_LENGTH])); 80049d0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049d4: 691b ldr r3, [r3, #16] 80049d6: 3304 adds r3, #4 80049d8: 781b ldrb r3, [r3, #0] 80049da: 021b lsls r3, r3, #8 80049dc: b21a sxth r2, r3 80049de: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049e2: 691b ldr r3, [r3, #16] 80049e4: 3303 adds r3, #3 80049e6: 781b ldrb r3, [r3, #0] 80049e8: b21b sxth r3, r3 80049ea: 4313 orrs r3, r2 80049ec: b21b sxth r3, r3 80049ee: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 spFrameData.frameHeader.frameCommand = (SerialProtocolCommands)(frameCommandRaw & 0x7FFF); 80049f2: f8b7 3126 ldrh.w r3, [r7, #294] @ 0x126 80049f6: b2da uxtb r2, r3 80049f8: f507 73a0 add.w r3, r7, #320 @ 0x140 80049fc: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a00: 709a strb r2, [r3, #2] spFrameData.frameHeader.isResponseFrame = (frameCommandRaw & 0x8000) != 0 ? pdTRUE : pdFALSE; 8004a02: f9b7 3126 ldrsh.w r3, [r7, #294] @ 0x126 8004a06: 13db asrs r3, r3, #15 8004a08: b21b sxth r3, r3 8004a0a: f003 0201 and.w r2, r3, #1 8004a0e: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a12: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a16: 609a str r2, [r3, #8] } if ((frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH) && ((spFrameData.frameHeader.frameCommand & 0x8000) != 0)) { 8004a18: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004a1c: 2b05 cmp r3, #5 8004a1e: d913 bls.n 8004a48 8004a20: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a24: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a28: 789b ldrb r3, [r3, #2] 8004a2a: f403 4300 and.w r3, r3, #32768 @ 0x8000 8004a2e: 2b00 cmp r3, #0 8004a30: d00a beq.n 8004a48 spFrameData.frameHeader.respStatus = (SerialProtocolRespStatus)(uartTaskData->frameData[FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH]); 8004a32: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a36: 691b ldr r3, [r3, #16] 8004a38: 3305 adds r3, #5 8004a3a: 781b ldrb r3, [r3, #0] 8004a3c: b25a sxtb r2, r3 8004a3e: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a42: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a46: 70da strb r2, [r3, #3] } if (frameBytesCount >= FRAME_HEADER_LENGTH) { 8004a48: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004a4c: 2b07 cmp r3, #7 8004a4e: d920 bls.n 8004a92 spFrameData.frameHeader.frameDataLength = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH])); 8004a50: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a54: 691b ldr r3, [r3, #16] 8004a56: 3306 adds r3, #6 8004a58: 781b ldrb r3, [r3, #0] 8004a5a: 021b lsls r3, r3, #8 8004a5c: b21a sxth r2, r3 8004a5e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a62: 691b ldr r3, [r3, #16] 8004a64: 3305 adds r3, #5 8004a66: 781b ldrb r3, [r3, #0] 8004a68: b21b sxth r3, r3 8004a6a: 4313 orrs r3, r2 8004a6c: b21b sxth r3, r3 8004a6e: b29a uxth r2, r3 8004a70: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a74: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a78: 809a strh r2, [r3, #4] frameTotalLength = FRAME_HEADER_LENGTH + spFrameData.frameHeader.frameDataLength + FRAME_CRC_LENGTH; 8004a7a: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a7e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a82: 889b ldrh r3, [r3, #4] 8004a84: 330a adds r3, #10 8004a86: f8a7 313e strh.w r3, [r7, #318] @ 0x13e receverState = srRecieveData; 8004a8a: 2302 movs r3, #2 8004a8c: f887 3133 strb.w r3, [r7, #307] @ 0x133 8004a90: e00e b.n 8004ab0 } else { proceed = pdFALSE; 8004a92: 2300 movs r3, #0 8004a94: f8c7 3134 str.w r3, [r7, #308] @ 0x134 8004a98: e00a b.n 8004ab0 } } else { if (frameBytesCount > 0) { 8004a9a: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004a9e: 2b00 cmp r3, #0 8004aa0: d003 beq.n 8004aaa receverState = srFail; 8004aa2: 2304 movs r3, #4 8004aa4: f887 3133 strb.w r3, [r7, #307] @ 0x133 8004aa8: e002 b.n 8004ab0 } else { proceed = pdFALSE; 8004aaa: 2300 movs r3, #0 8004aac: f8c7 3134 str.w r3, [r7, #308] @ 0x134 } } osMutexRelease (uartTaskData->rxDataBufferMutex); 8004ab0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ab4: 6a1b ldr r3, [r3, #32] 8004ab6: 4618 mov r0, r3 8004ab8: f00c febc bl 8011834 break; 8004abc: e165 b.n 8004d8a case srRecieveData: if (frameBytesCount >= frameTotalLength) { 8004abe: f8b7 2124 ldrh.w r2, [r7, #292] @ 0x124 8004ac2: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004ac6: 429a cmp r2, r3 8004ac8: d303 bcc.n 8004ad2 receverState = srCheckCrc; 8004aca: 2301 movs r3, #1 8004acc: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { proceed = pdFALSE; } break; 8004ad0: e15b b.n 8004d8a proceed = pdFALSE; 8004ad2: 2300 movs r3, #0 8004ad4: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 8004ad8: e157 b.n 8004d8a case srCheckCrc: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004ada: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ade: 6a1b ldr r3, [r3, #32] 8004ae0: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004ae4: 4618 mov r0, r3 8004ae6: f00c fe5a bl 801179e frameCrc = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[frameTotalLength - FRAME_CRC_LENGTH])); 8004aea: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004aee: 691a ldr r2, [r3, #16] 8004af0: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004af4: 3b01 subs r3, #1 8004af6: 4413 add r3, r2 8004af8: 781b ldrb r3, [r3, #0] 8004afa: 021b lsls r3, r3, #8 8004afc: b21a sxth r2, r3 8004afe: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b02: 6919 ldr r1, [r3, #16] 8004b04: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004b08: 3b02 subs r3, #2 8004b0a: 440b add r3, r1 8004b0c: 781b ldrb r3, [r3, #0] 8004b0e: b21b sxth r3, r3 8004b10: 4313 orrs r3, r2 8004b12: b21b sxth r3, r3 8004b14: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)(uartTaskData->frameData), frameTotalLength - FRAME_CRC_LENGTH); 8004b18: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b1c: 6919 ldr r1, [r3, #16] 8004b1e: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004b22: 3b02 subs r3, #2 8004b24: 461a mov r2, r3 8004b26: 4841 ldr r0, [pc, #260] @ (8004c2c ) 8004b28: f001 f84e bl 8005bc8 8004b2c: f8c7 0128 str.w r0, [r7, #296] @ 0x128 osMutexRelease (uartTaskData->rxDataBufferMutex); 8004b30: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b34: 6a1b ldr r3, [r3, #32] 8004b36: 4618 mov r0, r3 8004b38: f00c fe7c bl 8011834 crcPass = frameCrc == crc; 8004b3c: f8b7 3122 ldrh.w r3, [r7, #290] @ 0x122 8004b40: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 8004b44: 429a cmp r2, r3 8004b46: bf0c ite eq 8004b48: 2301 moveq r3, #1 8004b4a: 2300 movne r3, #0 8004b4c: b2db uxtb r3, r3 8004b4e: f8c7 3138 str.w r3, [r7, #312] @ 0x138 if (crcPass) { 8004b52: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 8004b56: 2b00 cmp r3, #0 8004b58: d00b beq.n 8004b72 printf ("Uart%d: Frame CRC PASS\n", uartTaskData->uartNumber); 8004b5a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b5e: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004b62: 4619 mov r1, r3 8004b64: 4832 ldr r0, [pc, #200] @ (8004c30 ) 8004b66: f025 fe81 bl 802a86c receverState = srExecuteCmd; 8004b6a: 2303 movs r3, #3 8004b6c: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { receverState = srFail; } break; 8004b70: e10b b.n 8004d8a receverState = srFail; 8004b72: 2304 movs r3, #4 8004b74: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004b78: e107 b.n 8004d8a case srExecuteCmd: if ((uartTaskData->processDataCb != NULL) || (uartTaskData->processRxDataMsgBuffer != NULL)) { 8004b7a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b7e: 6a9b ldr r3, [r3, #40] @ 0x28 8004b80: 2b00 cmp r3, #0 8004b82: d104 bne.n 8004b8e 8004b84: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b88: 6a5b ldr r3, [r3, #36] @ 0x24 8004b8a: 2b00 cmp r3, #0 8004b8c: d01e beq.n 8004bcc osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004b8e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b92: 6a1b ldr r3, [r3, #32] 8004b94: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004b98: 4618 mov r0, r3 8004b9a: f00c fe00 bl 801179e memcpy (spFrameData.dataBuffer, &(uartTaskData->frameData[FRAME_HEADER_LENGTH]), spFrameData.frameHeader.frameDataLength); 8004b9e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ba2: 691b ldr r3, [r3, #16] 8004ba4: f103 0108 add.w r1, r3, #8 8004ba8: f507 73a0 add.w r3, r7, #320 @ 0x140 8004bac: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004bb0: 889b ldrh r3, [r3, #4] 8004bb2: 461a mov r2, r3 8004bb4: f107 0310 add.w r3, r7, #16 8004bb8: 330c adds r3, #12 8004bba: 4618 mov r0, r3 8004bbc: f026 f8df bl 802ad7e osMutexRelease (uartTaskData->rxDataBufferMutex); 8004bc0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004bc4: 6a1b ldr r3, [r3, #32] 8004bc6: 4618 mov r0, r3 8004bc8: f00c fe34 bl 8011834 } if (uartTaskData->processRxDataMsgBuffer != NULL) { 8004bcc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004bd0: 6a5b ldr r3, [r3, #36] @ 0x24 8004bd2: 2b00 cmp r3, #0 8004bd4: d015 beq.n 8004c02 if(xMessageBufferSend (uartTaskData->processRxDataMsgBuffer, &spFrameData, sizeof (SerialProtocolFrameHeader) + spFrameData.frameHeader.frameDataLength, pdMS_TO_TICKS (200)) == pdFALSE) 8004bd6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004bda: 6a58 ldr r0, [r3, #36] @ 0x24 8004bdc: f507 73a0 add.w r3, r7, #320 @ 0x140 8004be0: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004be4: 889b ldrh r3, [r3, #4] 8004be6: f103 020c add.w r2, r3, #12 8004bea: f107 0110 add.w r1, r7, #16 8004bee: 23c8 movs r3, #200 @ 0xc8 8004bf0: f00e fbb2 bl 8013358 8004bf4: 4603 mov r3, r0 8004bf6: 2b00 cmp r3, #0 8004bf8: d103 bne.n 8004c02 { receverState = srFail; 8004bfa: 2304 movs r3, #4 8004bfc: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004c00: e0c3 b.n 8004d8a } } if (uartTaskData->processDataCb != NULL) { 8004c02: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c06: 6a9b ldr r3, [r3, #40] @ 0x28 8004c08: 2b00 cmp r3, #0 8004c0a: d008 beq.n 8004c1e uartTaskData->processDataCb (uartTaskData, &spFrameData); 8004c0c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c10: 6a9b ldr r3, [r3, #40] @ 0x28 8004c12: f107 0210 add.w r2, r7, #16 8004c16: 4611 mov r1, r2 8004c18: f8d7 012c ldr.w r0, [r7, #300] @ 0x12c 8004c1c: 4798 blx r3 } receverState = srFinish; 8004c1e: 2305 movs r3, #5 8004c20: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004c24: e0b1 b.n 8004d8a 8004c26: bf00 nop 8004c28: 0802d8e4 .word 0x0802d8e4 8004c2c: 24000248 .word 0x24000248 8004c30: 0802d904 .word 0x0802d904 case srFail: dataToSend = 0; 8004c34: 2300 movs r3, #0 8004c36: f8a7 313c strh.w r3, [r7, #316] @ 0x13c if ((frameTimeout == pdTRUE) && (frameBytesCount > 2)) { 8004c3a: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 8004c3e: 2b01 cmp r3, #1 8004c40: d124 bne.n 8004c8c 8004c42: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004c46: 2b02 cmp r3, #2 8004c48: d920 bls.n 8004c8c dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spTimeout, NULL, 0); 8004c4a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c4e: 6898 ldr r0, [r3, #8] 8004c50: f507 73a0 add.w r3, r7, #320 @ 0x140 8004c54: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004c58: 8819 ldrh r1, [r3, #0] 8004c5a: f507 73a0 add.w r3, r7, #320 @ 0x140 8004c5e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004c62: 789a ldrb r2, [r3, #2] 8004c64: 2300 movs r3, #0 8004c66: 9301 str r3, [sp, #4] 8004c68: 2300 movs r3, #0 8004c6a: 9300 str r3, [sp, #0] 8004c6c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004c70: f7fe fdf6 bl 8003860 8004c74: 4603 mov r3, r0 8004c76: f8a7 313c strh.w r3, [r7, #316] @ 0x13c printf ("Uart%d: RX data receiver timeout!\n", uartTaskData->uartNumber); 8004c7a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c7e: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004c82: 4619 mov r1, r3 8004c84: 4844 ldr r0, [pc, #272] @ (8004d98 ) 8004c86: f025 fdf1 bl 802a86c 8004c8a: e03c b.n 8004d06 } else if (!crcPass) { 8004c8c: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 8004c90: 2b00 cmp r3, #0 8004c92: d120 bne.n 8004cd6 dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spCrcFail, NULL, 0); 8004c94: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c98: 6898 ldr r0, [r3, #8] 8004c9a: f507 73a0 add.w r3, r7, #320 @ 0x140 8004c9e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004ca2: 8819 ldrh r1, [r3, #0] 8004ca4: f507 73a0 add.w r3, r7, #320 @ 0x140 8004ca8: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004cac: 789a ldrb r2, [r3, #2] 8004cae: 2300 movs r3, #0 8004cb0: 9301 str r3, [sp, #4] 8004cb2: 2300 movs r3, #0 8004cb4: 9300 str r3, [sp, #0] 8004cb6: f06f 0301 mvn.w r3, #1 8004cba: f7fe fdd1 bl 8003860 8004cbe: 4603 mov r3, r0 8004cc0: f8a7 313c strh.w r3, [r7, #316] @ 0x13c printf ("Uart%d: Frame CRC FAIL\n", uartTaskData->uartNumber); 8004cc4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004cc8: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004ccc: 4619 mov r1, r3 8004cce: 4833 ldr r0, [pc, #204] @ (8004d9c ) 8004cd0: f025 fdcc bl 802a86c 8004cd4: e017 b.n 8004d06 } else { dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spInternalError, NULL, 0); 8004cd6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004cda: 6898 ldr r0, [r3, #8] 8004cdc: f507 73a0 add.w r3, r7, #320 @ 0x140 8004ce0: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004ce4: 8819 ldrh r1, [r3, #0] 8004ce6: f507 73a0 add.w r3, r7, #320 @ 0x140 8004cea: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004cee: 789a ldrb r2, [r3, #2] 8004cf0: 2300 movs r3, #0 8004cf2: 9301 str r3, [sp, #4] 8004cf4: 2300 movs r3, #0 8004cf6: 9300 str r3, [sp, #0] 8004cf8: f06f 0303 mvn.w r3, #3 8004cfc: f7fe fdb0 bl 8003860 8004d00: 4603 mov r3, r0 8004d02: f8a7 313c strh.w r3, [r7, #316] @ 0x13c } if (dataToSend > 0) { 8004d06: f8b7 313c ldrh.w r3, [r7, #316] @ 0x13c 8004d0a: 2b00 cmp r3, #0 8004d0c: d00a beq.n 8004d24 HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, dataToSend); 8004d0e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d12: 6b18 ldr r0, [r3, #48] @ 0x30 8004d14: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d18: 689b ldr r3, [r3, #8] 8004d1a: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 8004d1e: 4619 mov r1, r3 8004d20: f008 fe3e bl 800d9a0 } printf ("Uart%d: TX bytes sent: %d\n", dataToSend, uartTaskData->uartNumber); 8004d24: f8b7 113c ldrh.w r1, [r7, #316] @ 0x13c 8004d28: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d2c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004d30: 461a mov r2, r3 8004d32: 481b ldr r0, [pc, #108] @ (8004da0 ) 8004d34: f025 fd9a bl 802a86c receverState = srFinish; 8004d38: 2305 movs r3, #5 8004d3a: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004d3e: e024 b.n 8004d8a case srFinish: default: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004d40: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d44: 6a1b ldr r3, [r3, #32] 8004d46: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004d4a: 4618 mov r0, r3 8004d4c: f00c fd27 bl 801179e uartTaskData->frameBytesCount = 0; 8004d50: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d54: 2200 movs r2, #0 8004d56: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 8004d58: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d5c: 6a1b ldr r3, [r3, #32] 8004d5e: 4618 mov r0, r3 8004d60: f00c fd68 bl 8011834 spFrameData.frameHeader.frameCommand = spUnknown; 8004d64: f507 73a0 add.w r3, r7, #320 @ 0x140 8004d68: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004d6c: 2210 movs r2, #16 8004d6e: 709a strb r2, [r3, #2] frameTotalLength = 0; 8004d70: 2300 movs r3, #0 8004d72: f8a7 313e strh.w r3, [r7, #318] @ 0x13e outputDataBufferPos = 0; 8004d76: 4b0b ldr r3, [pc, #44] @ (8004da4 ) 8004d78: 2200 movs r2, #0 8004d7a: 801a strh r2, [r3, #0] receverState = srWaitForHeader; 8004d7c: 2300 movs r3, #0 8004d7e: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdFALSE; 8004d82: 2300 movs r3, #0 8004d84: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 8004d88: bf00 nop while (proceed) { 8004d8a: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 8004d8e: 2b00 cmp r3, #0 8004d90: f47f ade0 bne.w 8004954 frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 8004d94: e581 b.n 800489a 8004d96: bf00 nop 8004d98: 0802d91c .word 0x0802d91c 8004d9c: 0802d940 .word 0x0802d940 8004da0: 0802d958 .word 0x0802d958 8004da4: 24002084 .word 0x24002084 08004da8 : } } } void ReadMeasSetFromBuffer(uint8_t* buff, uint16_t* buffPos, float* dataSet) { 8004da8: b580 push {r7, lr} 8004daa: b086 sub sp, #24 8004dac: af00 add r7, sp, #0 8004dae: 60f8 str r0, [r7, #12] 8004db0: 60b9 str r1, [r7, #8] 8004db2: 607a str r2, [r7, #4] for(uint8_t i = 0; i < 3; i++) 8004db4: 2300 movs r3, #0 8004db6: 75fb strb r3, [r7, #23] 8004db8: e00b b.n 8004dd2 { ReadFloatFromBuffer(buff, buffPos, &dataSet[i]); 8004dba: 7dfb ldrb r3, [r7, #23] 8004dbc: 009b lsls r3, r3, #2 8004dbe: 687a ldr r2, [r7, #4] 8004dc0: 4413 add r3, r2 8004dc2: 461a mov r2, r3 8004dc4: 68b9 ldr r1, [r7, #8] 8004dc6: 68f8 ldr r0, [r7, #12] 8004dc8: f7fe fc5b bl 8003682 for(uint8_t i = 0; i < 3; i++) 8004dcc: 7dfb ldrb r3, [r7, #23] 8004dce: 3301 adds r3, #1 8004dd0: 75fb strb r3, [r7, #23] 8004dd2: 7dfb ldrb r3, [r7, #23] 8004dd4: 2b02 cmp r3, #2 8004dd6: d9f0 bls.n 8004dba } } 8004dd8: bf00 nop 8004dda: bf00 nop 8004ddc: 3718 adds r7, #24 8004dde: 46bd mov sp, r7 8004de0: bd80 pop {r7, pc} ... 08004de4 : void UartTxTask (void* argument) { 8004de4: b580 push {r7, lr} 8004de6: b0d4 sub sp, #336 @ 0x150 8004de8: af02 add r7, sp, #8 8004dea: f507 73a4 add.w r3, r7, #328 @ 0x148 8004dee: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 8004df2: 6018 str r0, [r3, #0] UartTaskData* const uartTaskData = (UartTaskData*)argument; 8004df4: f507 73a4 add.w r3, r7, #328 @ 0x148 8004df8: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 8004dfc: 681b ldr r3, [r3, #0] 8004dfe: f8c7 3140 str.w r3, [r7, #320] @ 0x140 InterProcessData data = { 0 }; 8004e02: f507 738e add.w r3, r7, #284 @ 0x11c 8004e06: 2200 movs r2, #0 8004e08: 601a str r2, [r3, #0] 8004e0a: 605a str r2, [r3, #4] 8004e0c: 609a str r2, [r3, #8] 8004e0e: 60da str r2, [r3, #12] SerialProtocolFrameData frameData = { 0 }; 8004e10: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e14: f5a3 739c sub.w r3, r3, #312 @ 0x138 8004e18: 4618 mov r0, r3 8004e1a: f44f 7386 mov.w r3, #268 @ 0x10c 8004e1e: 461a mov r2, r3 8004e20: 2100 movs r1, #0 8004e22: f025 feb5 bl 802ab90 size_t bytesInMsg; uint16_t frameId = 0; 8004e26: 2300 movs r3, #0 8004e28: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint32_t rndVal = 0; 8004e2c: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e30: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004e34: 2200 movs r2, #0 8004e36: 601a str r2, [r3, #0] uint16_t bytesToSend = 0; 8004e38: 2300 movs r3, #0 8004e3a: f8a7 313c strh.w r3, [r7, #316] @ 0x13c SerialProtocolCommands frameCommand = spUnknown; 8004e3e: 2310 movs r3, #16 8004e40: f887 313b strb.w r3, [r7, #315] @ 0x13b uint16_t inputDataBufferPos = 0; 8004e44: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e48: f5a3 739f sub.w r3, r3, #318 @ 0x13e 8004e4c: 2200 movs r2, #0 8004e4e: 801a strh r2, [r3, #0] uint8_t boardNumber = 0; 8004e50: 2300 movs r3, #0 8004e52: f887 3147 strb.w r3, [r7, #327] @ 0x147 while (pdTRUE) { if (uartTaskData->sendCmdToSlaveQueue != NULL) { 8004e56: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004e5a: 6adb ldr r3, [r3, #44] @ 0x2c 8004e5c: 2b00 cmp r3, #0 8004e5e: f000 8291 beq.w 8005384 osMessageQueueGet (uartTaskData->sendCmdToSlaveQueue, &data, 0, osWaitForever); 8004e62: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004e66: 6ad8 ldr r0, [r3, #44] @ 0x2c 8004e68: f507 718e add.w r1, r7, #284 @ 0x11c 8004e6c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004e70: 2200 movs r2, #0 8004e72: f00c ff33 bl 8011cdc HAL_RNG_GenerateRandomNumber (&hrng, &rndVal); 8004e76: f107 030c add.w r3, r7, #12 8004e7a: 4619 mov r1, r3 8004e7c: 48bf ldr r0, [pc, #764] @ (800517c ) 8004e7e: f008 f98d bl 800d19c frameId = (uint16_t)(rndVal & 0xFFFF); 8004e82: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e86: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004e8a: 681b ldr r3, [r3, #0] 8004e8c: f8a7 313e strh.w r3, [r7, #318] @ 0x13e frameCommand = data.spCommand; 8004e90: f897 311c ldrb.w r3, [r7, #284] @ 0x11c 8004e94: f887 313b strb.w r3, [r7, #315] @ 0x13b outputDataBufferPos = 0; 8004e98: 4bb9 ldr r3, [pc, #740] @ (8005180 ) 8004e9a: 2200 movs r2, #0 8004e9c: 801a strh r2, [r3, #0] memset (outputDataBuffer, 0x00, OUTPUT_DATA_BUFF_SIZE); 8004e9e: 2280 movs r2, #128 @ 0x80 8004ea0: 2100 movs r1, #0 8004ea2: 48b8 ldr r0, [pc, #736] @ (8005184 ) 8004ea4: f025 fe74 bl 802ab90 switch (frameCommand) { 8004ea8: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 8004eac: 2b0f cmp r3, #15 8004eae: f200 826e bhi.w 800538e 8004eb2: a201 add r2, pc, #4 @ (adr r2, 8004eb8 ) 8004eb4: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8004eb8: 08004f9b .word 0x08004f9b 8004ebc: 08004f9b .word 0x08004f9b 8004ec0: 08004ef9 .word 0x08004ef9 8004ec4: 08004ef9 .word 0x08004ef9 8004ec8: 08004ef9 .word 0x08004ef9 8004ecc: 08004f2f .word 0x08004f2f 8004ed0: 08004f2f .word 0x08004f2f 8004ed4: 08004f1d .word 0x08004f1d 8004ed8: 08004f9b .word 0x08004f9b 8004edc: 08004f41 .word 0x08004f41 8004ee0: 08004f53 .word 0x08004f53 8004ee4: 08004f65 .word 0x08004f65 8004ee8: 08004f65 .word 0x08004f65 8004eec: 08004f65 .word 0x08004f65 8004ef0: 08004f65 .word 0x08004f65 8004ef4: 08004f9b .word 0x08004f9b case spSetFanSpeed: case spSetMotorXOn: case spSetMotorYOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (uint32_t)); 8004ef8: f507 738e add.w r3, r7, #284 @ 0x11c 8004efc: 1d1a adds r2, r3, #4 8004efe: 2304 movs r3, #4 8004f00: 499f ldr r1, [pc, #636] @ (8005180 ) 8004f02: 48a0 ldr r0, [pc, #640] @ (8005184 ) 8004f04: f7fe fb8c bl 8003620 WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[1], sizeof (uint32_t)); 8004f08: f507 738e add.w r3, r7, #284 @ 0x11c 8004f0c: f103 0208 add.w r2, r3, #8 8004f10: 2304 movs r3, #4 8004f12: 499b ldr r1, [pc, #620] @ (8005180 ) 8004f14: 489b ldr r0, [pc, #620] @ (8005184 ) 8004f16: f7fe fb83 bl 8003620 break; 8004f1a: e03f b.n 8004f9c case spSetDiodeOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (uint32_t)); break; 8004f1c: f507 738e add.w r3, r7, #284 @ 0x11c 8004f20: 1d1a adds r2, r3, #4 8004f22: 2304 movs r3, #4 8004f24: 4996 ldr r1, [pc, #600] @ (8005180 ) 8004f26: 4897 ldr r0, [pc, #604] @ (8005184 ) 8004f28: f7fe fb7a bl 8003620 8004f2c: e036 b.n 8004f9c case spSetmotorXMaxCurrent: case spSetmotorYMaxCurrent: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004f2e: f507 738e add.w r3, r7, #284 @ 0x11c 8004f32: 1d1a adds r2, r3, #4 8004f34: 2304 movs r3, #4 8004f36: 4992 ldr r1, [pc, #584] @ (8005180 ) 8004f38: 4892 ldr r0, [pc, #584] @ (8005184 ) 8004f3a: f7fe fb71 bl 8003620 8004f3e: e02d b.n 8004f9c case spGetElectricalMeasurments: case spGetSensorMeasurments: break; case spClearPeakMeasurments: break; case spSetEncoderXValue: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004f40: f507 738e add.w r3, r7, #284 @ 0x11c 8004f44: 1d1a adds r2, r3, #4 8004f46: 2304 movs r3, #4 8004f48: 498d ldr r1, [pc, #564] @ (8005180 ) 8004f4a: 488e ldr r0, [pc, #568] @ (8005184 ) 8004f4c: f7fe fb68 bl 8003620 8004f50: e024 b.n 8004f9c case spSetEncoderYValue: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004f52: f507 738e add.w r3, r7, #284 @ 0x11c 8004f56: 1d1a adds r2, r3, #4 8004f58: 2304 movs r3, #4 8004f5a: 4989 ldr r1, [pc, #548] @ (8005180 ) 8004f5c: 4889 ldr r0, [pc, #548] @ (8005184 ) 8004f5e: f7fe fb5f bl 8003620 8004f62: e01b b.n 8004f9c case spSetVoltageMeasGains: case spSetVoltageMeasOffsets: case spSetCurrentMeasGains: case spSetCurrentMeasOffsets: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); 8004f64: f507 738e add.w r3, r7, #284 @ 0x11c 8004f68: 1d1a adds r2, r3, #4 8004f6a: 2304 movs r3, #4 8004f6c: 4984 ldr r1, [pc, #528] @ (8005180 ) 8004f6e: 4885 ldr r0, [pc, #532] @ (8005184 ) 8004f70: f7fe fb56 bl 8003620 WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[1], sizeof (float)); 8004f74: f507 738e add.w r3, r7, #284 @ 0x11c 8004f78: f103 0208 add.w r2, r3, #8 8004f7c: 2304 movs r3, #4 8004f7e: 4980 ldr r1, [pc, #512] @ (8005180 ) 8004f80: 4880 ldr r0, [pc, #512] @ (8005184 ) 8004f82: f7fe fb4d bl 8003620 WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[2], sizeof (float)); 8004f86: f507 738e add.w r3, r7, #284 @ 0x11c 8004f8a: f103 020c add.w r2, r3, #12 8004f8e: 2304 movs r3, #4 8004f90: 497b ldr r1, [pc, #492] @ (8005180 ) 8004f92: 487c ldr r0, [pc, #496] @ (8005184 ) 8004f94: f7fe fb44 bl 8003620 break; 8004f98: e000 b.n 8004f9c case spGetSensorMeasurments: break; 8004f9a: bf00 nop case spResetSystem: break; default: continue; break; } bytesToSend = PrepareReqFrame (uartTaskData->uartTxBuffer, frameId, frameCommand, outputDataBuffer, outputDataBufferPos); 8004f9c: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004fa0: 6898 ldr r0, [r3, #8] 8004fa2: 4b77 ldr r3, [pc, #476] @ (8005180 ) 8004fa4: 881b ldrh r3, [r3, #0] 8004fa6: f897 213b ldrb.w r2, [r7, #315] @ 0x13b 8004faa: f8b7 113e ldrh.w r1, [r7, #318] @ 0x13e 8004fae: 9300 str r3, [sp, #0] 8004fb0: 4b74 ldr r3, [pc, #464] @ (8005184 ) 8004fb2: f7fe fbc1 bl 8003738 8004fb6: 4603 mov r3, r0 8004fb8: f8a7 313c strh.w r3, [r7, #316] @ 0x13c HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, bytesToSend); 8004fbc: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004fc0: 6b18 ldr r0, [r3, #48] @ 0x30 8004fc2: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004fc6: 689b ldr r3, [r3, #8] 8004fc8: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 8004fcc: 4619 mov r1, r3 8004fce: f008 fce7 bl 800d9a0 bytesInMsg = xMessageBufferReceive (uartTaskData->processRxDataMsgBuffer, &frameData, INPUT_DATA_BUFF_SIZE, pdMS_TO_TICKS (1000)); 8004fd2: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004fd6: 6a58 ldr r0, [r3, #36] @ 0x24 8004fd8: f107 0110 add.w r1, r7, #16 8004fdc: f44f 737a mov.w r3, #1000 @ 0x3e8 8004fe0: f44f 7280 mov.w r2, #256 @ 0x100 8004fe4: f00e faae bl 8013544 8004fe8: f8c7 0134 str.w r0, [r7, #308] @ 0x134 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8004fec: 2300 movs r3, #0 8004fee: f887 3147 strb.w r3, [r7, #327] @ 0x147 8004ff2: e00e b.n 8005012 if (boardToUartNumberMap[boardNumber] == uartTaskData->uartNumber) { 8004ff4: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8004ff8: 4a63 ldr r2, [pc, #396] @ (8005188 ) 8004ffa: 5cd2 ldrb r2, [r2, r3] 8004ffc: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8005000: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8005004: 429a cmp r2, r3 8005006: d009 beq.n 800501c for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8005008: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 800500c: 3301 adds r3, #1 800500e: f887 3147 strb.w r3, [r7, #327] @ 0x147 8005012: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8005016: 2b03 cmp r3, #3 8005018: d9ec bls.n 8004ff4 800501a: e000 b.n 800501e break; 800501c: bf00 nop } } if (bytesInMsg == 0) { 800501e: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 8005022: 2b00 cmp r3, #0 8005024: d124 bne.n 8005070 if (frameCommand == spGetElectricalMeasurments) { 8005026: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 800502a: 2b00 cmp r3, #0 800502c: d114 bne.n 8005058 osMutexAcquire (resMeasurementsMutex, osWaitForever); 800502e: 4b57 ldr r3, [pc, #348] @ (800518c ) 8005030: 681b ldr r3, [r3, #0] 8005032: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005036: 4618 mov r0, r3 8005038: f00c fbb1 bl 801179e slaveLastSeen[boardNumber]++; 800503c: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8005040: 4a53 ldr r2, [pc, #332] @ (8005190 ) 8005042: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8005046: 3201 adds r2, #1 8005048: 4951 ldr r1, [pc, #324] @ (8005190 ) 800504a: f841 2023 str.w r2, [r1, r3, lsl #2] osMutexRelease (resMeasurementsMutex); 800504e: 4b4f ldr r3, [pc, #316] @ (800518c ) 8005050: 681b ldr r3, [r3, #0] 8005052: 4618 mov r0, r3 8005054: f00c fbee bl 8011834 } printf ("Uart%d: Response timeout for frameId 0x%x\n", uartTaskData->uartNumber, frameId); 8005058: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800505c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8005060: 4619 mov r1, r3 8005062: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8005066: 461a mov r2, r3 8005068: 484a ldr r0, [pc, #296] @ (8005194 ) 800506a: f025 fbff bl 802a86c 800506e: e6f2 b.n 8004e56 } else { if ((frameId == frameData.frameHeader.frameId) && (frameData.frameHeader.respStatus == spOK)) { 8005070: f507 73a4 add.w r3, r7, #328 @ 0x148 8005074: f5a3 739c sub.w r3, r3, #312 @ 0x138 8005078: 881b ldrh r3, [r3, #0] 800507a: f8b7 213e ldrh.w r2, [r7, #318] @ 0x13e 800507e: 429a cmp r2, r3 8005080: f47f aee9 bne.w 8004e56 8005084: f507 73a4 add.w r3, r7, #328 @ 0x148 8005088: f5a3 739c sub.w r3, r3, #312 @ 0x138 800508c: f993 3003 ldrsb.w r3, [r3, #3] 8005090: 2b00 cmp r3, #0 8005092: f47f aee0 bne.w 8004e56 printf ("Uart%d: Response for frameId 0x%x OK\n", uartTaskData->uartNumber, frameId); 8005096: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800509a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800509e: 4619 mov r1, r3 80050a0: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 80050a4: 461a mov r2, r3 80050a6: 483c ldr r0, [pc, #240] @ (8005198 ) 80050a8: f025 fbe0 bl 802a86c slaveLastSeen[boardNumber] = 0; 80050ac: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80050b0: 4a37 ldr r2, [pc, #220] @ (8005190 ) 80050b2: 2100 movs r1, #0 80050b4: f842 1023 str.w r1, [r2, r3, lsl #2] switch (frameData.frameHeader.frameCommand) { 80050b8: f507 73a4 add.w r3, r7, #328 @ 0x148 80050bc: f5a3 739c sub.w r3, r3, #312 @ 0x138 80050c0: 789b ldrb r3, [r3, #2] 80050c2: 2b00 cmp r3, #0 80050c4: d002 beq.n 80050cc 80050c6: 2b01 cmp r3, #1 80050c8: d06a beq.n 80051a0 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchDown); ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchCenter); ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); osMutexRelease (sensorsInfoMutex); break; default: break; 80050ca: e161 b.n 8005390 osMutexAcquire (resMeasurementsMutex, osWaitForever); 80050cc: 4b2f ldr r3, [pc, #188] @ (800518c ) 80050ce: 681b ldr r3, [r3, #0] 80050d0: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80050d4: 4618 mov r0, r3 80050d6: f00c fb62 bl 801179e RESMeasurements* resMeas = &resMeasurements[boardNumber]; 80050da: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 80050de: 4613 mov r3, r2 80050e0: 011b lsls r3, r3, #4 80050e2: 1a9b subs r3, r3, r2 80050e4: 009b lsls r3, r3, #2 80050e6: 4a2d ldr r2, [pc, #180] @ (800519c ) 80050e8: 4413 add r3, r2 80050ea: f8c7 312c str.w r3, [r7, #300] @ 0x12c inputDataBufferPos = 0; 80050ee: f507 73a4 add.w r3, r7, #328 @ 0x148 80050f2: f5a3 739f sub.w r3, r3, #318 @ 0x13e 80050f6: 2200 movs r2, #0 80050f8: 801a strh r2, [r3, #0] ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->voltageRMS); 80050fa: f8d7 212c ldr.w r2, [r7, #300] @ 0x12c 80050fe: f107 010a add.w r1, r7, #10 8005102: f107 0310 add.w r3, r7, #16 8005106: 330c adds r3, #12 8005108: 4618 mov r0, r3 800510a: f7ff fe4d bl 8004da8 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->voltagePeak); 800510e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8005112: f103 020c add.w r2, r3, #12 8005116: f107 010a add.w r1, r7, #10 800511a: f107 0310 add.w r3, r7, #16 800511e: 330c adds r3, #12 8005120: 4618 mov r0, r3 8005122: f7ff fe41 bl 8004da8 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->currentRMS); 8005126: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800512a: f103 0218 add.w r2, r3, #24 800512e: f107 010a add.w r1, r7, #10 8005132: f107 0310 add.w r3, r7, #16 8005136: 330c adds r3, #12 8005138: 4618 mov r0, r3 800513a: f7ff fe35 bl 8004da8 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->currentPeak); 800513e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8005142: f103 0224 add.w r2, r3, #36 @ 0x24 8005146: f107 010a add.w r1, r7, #10 800514a: f107 0310 add.w r3, r7, #16 800514e: 330c adds r3, #12 8005150: 4618 mov r0, r3 8005152: f7ff fe29 bl 8004da8 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->power); 8005156: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800515a: f103 0230 add.w r2, r3, #48 @ 0x30 800515e: f107 010a add.w r1, r7, #10 8005162: f107 0310 add.w r3, r7, #16 8005166: 330c adds r3, #12 8005168: 4618 mov r0, r3 800516a: f7ff fe1d bl 8004da8 osMutexRelease (resMeasurementsMutex); 800516e: 4b07 ldr r3, [pc, #28] @ (800518c ) 8005170: 681b ldr r3, [r3, #0] 8005172: 4618 mov r0, r3 8005174: f00c fb5e bl 8011834 break; 8005178: e10a b.n 8005390 800517a: bf00 nop 800517c: 2400026c .word 0x2400026c 8005180: 24002084 .word 0x24002084 8005184: 24002004 .word 0x24002004 8005188: 24000014 .word 0x24000014 800518c: 24002248 .word 0x24002248 8005190: 24002238 .word 0x24002238 8005194: 0802d974 .word 0x0802d974 8005198: 0802d9a0 .word 0x0802d9a0 800519c: 24002088 .word 0x24002088 osMutexAcquire (sensorsInfoMutex, osWaitForever); 80051a0: 4b7c ldr r3, [pc, #496] @ (8005394 ) 80051a2: 681b ldr r3, [r3, #0] 80051a4: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80051a8: 4618 mov r0, r3 80051aa: f00c faf8 bl 801179e inputDataBufferPos = 0; 80051ae: f507 73a4 add.w r3, r7, #328 @ 0x148 80051b2: f5a3 739f sub.w r3, r3, #318 @ 0x13e 80051b6: 2200 movs r2, #0 80051b8: 801a strh r2, [r3, #0] SesnorsInfo* sensors = &sensorsInfo[boardNumber]; 80051ba: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 80051be: 4613 mov r3, r2 80051c0: 005b lsls r3, r3, #1 80051c2: 4413 add r3, r2 80051c4: 011b lsls r3, r3, #4 80051c6: 4a74 ldr r2, [pc, #464] @ (8005398 ) 80051c8: 4413 add r3, r2 80051ca: f8c7 3130 str.w r3, [r7, #304] @ 0x130 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[0]); 80051ce: f8d7 2130 ldr.w r2, [r7, #304] @ 0x130 80051d2: f107 010a add.w r1, r7, #10 80051d6: f107 0310 add.w r3, r7, #16 80051da: 330c adds r3, #12 80051dc: 4618 mov r0, r3 80051de: f7fe fa50 bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[1]); 80051e2: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80051e6: 1d1a adds r2, r3, #4 80051e8: f107 010a add.w r1, r7, #10 80051ec: f107 0310 add.w r3, r7, #16 80051f0: 330c adds r3, #12 80051f2: 4618 mov r0, r3 80051f4: f7fe fa45 bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->fanVoltage); 80051f8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80051fc: f103 0208 add.w r2, r3, #8 8005200: f107 010a add.w r1, r7, #10 8005204: f107 0310 add.w r3, r7, #16 8005208: 330c adds r3, #12 800520a: 4618 mov r0, r3 800520c: f7fe fa39 bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvEncoderX); 8005210: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005214: f103 020c add.w r2, r3, #12 8005218: f107 010a add.w r1, r7, #10 800521c: f107 0310 add.w r3, r7, #16 8005220: 330c adds r3, #12 8005222: 4618 mov r0, r3 8005224: f7fe fa2d bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvEncoderY); 8005228: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 800522c: f103 0210 add.w r2, r3, #16 8005230: f107 010a add.w r1, r7, #10 8005234: f107 0310 add.w r3, r7, #16 8005238: 330c adds r3, #12 800523a: 4618 mov r0, r3 800523c: f7fe fa21 bl 8003682 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXStatus); 8005240: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005244: f103 0214 add.w r2, r3, #20 8005248: f107 010a add.w r1, r7, #10 800524c: f107 0310 add.w r3, r7, #16 8005250: 330c adds r3, #12 8005252: 4618 mov r0, r3 8005254: f7fe fa4a bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYStatus); 8005258: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 800525c: f103 0215 add.w r2, r3, #21 8005260: f107 010a add.w r1, r7, #10 8005264: f107 0310 add.w r3, r7, #16 8005268: 330c adds r3, #12 800526a: 4618 mov r0, r3 800526c: f7fe fa3e bl 80036ec ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXAveCurrent); 8005270: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005274: f103 0218 add.w r2, r3, #24 8005278: f107 010a add.w r1, r7, #10 800527c: f107 0310 add.w r3, r7, #16 8005280: 330c adds r3, #12 8005282: 4618 mov r0, r3 8005284: f7fe f9fd bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYAveCurrent); 8005288: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 800528c: f103 021c add.w r2, r3, #28 8005290: f107 010a add.w r1, r7, #10 8005294: f107 0310 add.w r3, r7, #16 8005298: 330c adds r3, #12 800529a: 4618 mov r0, r3 800529c: f7fe f9f1 bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXPeakCurrent); 80052a0: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052a4: f103 0220 add.w r2, r3, #32 80052a8: f107 010a add.w r1, r7, #10 80052ac: f107 0310 add.w r3, r7, #16 80052b0: 330c adds r3, #12 80052b2: 4618 mov r0, r3 80052b4: f7fe f9e5 bl 8003682 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYPeakCurrent); 80052b8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052bc: f103 0224 add.w r2, r3, #36 @ 0x24 80052c0: f107 010a add.w r1, r7, #10 80052c4: f107 0310 add.w r3, r7, #16 80052c8: 330c adds r3, #12 80052ca: 4618 mov r0, r3 80052cc: f7fe f9d9 bl 8003682 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchUp); 80052d0: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052d4: f103 0228 add.w r2, r3, #40 @ 0x28 80052d8: f107 010a add.w r1, r7, #10 80052dc: f107 0310 add.w r3, r7, #16 80052e0: 330c adds r3, #12 80052e2: 4618 mov r0, r3 80052e4: f7fe fa02 bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchDown); 80052e8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052ec: f103 0229 add.w r2, r3, #41 @ 0x29 80052f0: f107 010a add.w r1, r7, #10 80052f4: f107 0310 add.w r3, r7, #16 80052f8: 330c adds r3, #12 80052fa: 4618 mov r0, r3 80052fc: f7fe f9f6 bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchCenter); 8005300: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005304: f103 022a add.w r2, r3, #42 @ 0x2a 8005308: f107 010a add.w r1, r7, #10 800530c: f107 0310 add.w r3, r7, #16 8005310: 330c adds r3, #12 8005312: 4618 mov r0, r3 8005314: f7fe f9ea bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchUp); 8005318: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 800531c: f103 022b add.w r2, r3, #43 @ 0x2b 8005320: f107 010a add.w r1, r7, #10 8005324: f107 0310 add.w r3, r7, #16 8005328: 330c adds r3, #12 800532a: 4618 mov r0, r3 800532c: f7fe f9de bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchDown); 8005330: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005334: f103 022c add.w r2, r3, #44 @ 0x2c 8005338: f107 010a add.w r1, r7, #10 800533c: f107 0310 add.w r3, r7, #16 8005340: 330c adds r3, #12 8005342: 4618 mov r0, r3 8005344: f7fe f9d2 bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchCenter); 8005348: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 800534c: f103 022d add.w r2, r3, #45 @ 0x2d 8005350: f107 010a add.w r1, r7, #10 8005354: f107 0310 add.w r3, r7, #16 8005358: 330c adds r3, #12 800535a: 4618 mov r0, r3 800535c: f7fe f9c6 bl 80036ec ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); 8005360: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005364: f103 022e add.w r2, r3, #46 @ 0x2e 8005368: f107 010a add.w r1, r7, #10 800536c: f107 0310 add.w r3, r7, #16 8005370: 330c adds r3, #12 8005372: 4618 mov r0, r3 8005374: f7fe f9ba bl 80036ec osMutexRelease (sensorsInfoMutex); 8005378: 4b06 ldr r3, [pc, #24] @ (8005394 ) 800537a: 681b ldr r3, [r3, #0] 800537c: 4618 mov r0, r3 800537e: f00c fa59 bl 8011834 break; 8005382: e005 b.n 8005390 } } } } else { osDelay (pdMS_TO_TICKS (1000)); 8005384: f44f 707a mov.w r0, #1000 @ 0x3e8 8005388: f00c f871 bl 801146e 800538c: e563 b.n 8004e56 default: continue; break; 800538e: bf00 nop if (uartTaskData->sendCmdToSlaveQueue != NULL) { 8005390: e561 b.n 8004e56 8005392: bf00 nop 8005394: 2400224c .word 0x2400224c 8005398: 24002178 .word 0x24002178 0800539c : } } } void MeasurmentsReqSchedulerTaskInit (void) { 800539c: b580 push {r7, lr} 800539e: b08a sub sp, #40 @ 0x28 80053a0: af00 add r7, sp, #0 osThreadAttr_t osThreadAttrMeasurmentsReqSchedulerTask = { 0 }; 80053a2: 1d3b adds r3, r7, #4 80053a4: 2224 movs r2, #36 @ 0x24 80053a6: 2100 movs r1, #0 80053a8: 4618 mov r0, r3 80053aa: f025 fbf1 bl 802ab90 osThreadAttrMeasurmentsReqSchedulerTask.name = "os_thread_XXX"; 80053ae: 4b08 ldr r3, [pc, #32] @ (80053d0 ) 80053b0: 607b str r3, [r7, #4] osThreadAttrMeasurmentsReqSchedulerTask.stack_size = configMINIMAL_STACK_SIZE * 2; 80053b2: f44f 6380 mov.w r3, #1024 @ 0x400 80053b6: 61bb str r3, [r7, #24] osThreadAttrMeasurmentsReqSchedulerTask.priority = (osPriority_t)osPriorityNormal; 80053b8: 2318 movs r3, #24 80053ba: 61fb str r3, [r7, #28] osThreadNew (MeasurmentsReqSchedulerTask, uartTasks, &osThreadAttrMeasurmentsReqSchedulerTask); 80053bc: 1d3b adds r3, r7, #4 80053be: 461a mov r2, r3 80053c0: 4904 ldr r1, [pc, #16] @ (80053d4 ) 80053c2: 4805 ldr r0, [pc, #20] @ (80053d8 ) 80053c4: f00b ffb5 bl 8011332 } 80053c8: bf00 nop 80053ca: 3728 adds r7, #40 @ 0x28 80053cc: 46bd mov sp, r7 80053ce: bd80 pop {r7, pc} 80053d0: 0802d9c8 .word 0x0802d9c8 80053d4: 24000018 .word 0x24000018 80053d8: 080053dd .word 0x080053dd 080053dc : void MeasurmentsReqSchedulerTask (void* argument) { 80053dc: b580 push {r7, lr} 80053de: b08a sub sp, #40 @ 0x28 80053e0: af00 add r7, sp, #0 80053e2: 6078 str r0, [r7, #4] while (pdTRUE) { __uintptr_t* ptr = (__uintptr_t*)argument; 80053e4: 687b ldr r3, [r7, #4] 80053e6: 627b str r3, [r7, #36] @ 0x24 while (*ptr != 0) { 80053e8: e052 b.n 8005490 UartTaskData* uartTask = (UartTaskData*)*ptr; 80053ea: 6a7b ldr r3, [r7, #36] @ 0x24 80053ec: 681b ldr r3, [r3, #0] 80053ee: 61fb str r3, [r7, #28] if (uartTask->sendCmdToSlaveQueue != NULL) { 80053f0: 69fb ldr r3, [r7, #28] 80053f2: 6adb ldr r3, [r3, #44] @ 0x2c 80053f4: 2b00 cmp r3, #0 80053f6: d048 beq.n 800548a InterProcessData data = { 0 }; 80053f8: f107 030c add.w r3, r7, #12 80053fc: 2200 movs r2, #0 80053fe: 601a str r2, [r3, #0] 8005400: 605a str r2, [r3, #4] 8005402: 609a str r2, [r3, #8] 8005404: 60da str r2, [r3, #12] uint8_t boardNumber = 0; 8005406: 2300 movs r3, #0 8005408: f887 3023 strb.w r3, [r7, #35] @ 0x23 for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 800540c: 2300 movs r3, #0 800540e: f887 3023 strb.w r3, [r7, #35] @ 0x23 8005412: e00d b.n 8005430 { if(boardToUartNumberMap[boardNumber] == uartTask->uartNumber) 8005414: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8005418: 4a22 ldr r2, [pc, #136] @ (80054a4 ) 800541a: 5cd2 ldrb r2, [r2, r3] 800541c: 69fb ldr r3, [r7, #28] 800541e: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8005422: 429a cmp r2, r3 8005424: d009 beq.n 800543a for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 8005426: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 800542a: 3301 adds r3, #1 800542c: f887 3023 strb.w r3, [r7, #35] @ 0x23 8005430: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8005434: 2b03 cmp r3, #3 8005436: d9ed bls.n 8005414 8005438: e000 b.n 800543c { break; 800543a: bf00 nop } } data.spCommand = spGetElectricalMeasurments; 800543c: 2300 movs r3, #0 800543e: 733b strb r3, [r7, #12] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8005440: 69fb ldr r3, [r7, #28] 8005442: 6ad8 ldr r0, [r3, #44] @ 0x2c 8005444: f107 010c add.w r1, r7, #12 8005448: 2364 movs r3, #100 @ 0x64 800544a: 2200 movs r2, #0 800544c: f00c fbe6 bl 8011c1c osMutexAcquire (resMeasurementsMutex, osWaitForever); 8005450: 4b15 ldr r3, [pc, #84] @ (80054a8 ) 8005452: 681b ldr r3, [r3, #0] 8005454: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005458: 4618 mov r0, r3 800545a: f00c f9a0 bl 801179e if(slaveLastSeen[boardNumber] == 0) 800545e: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8005462: 4a12 ldr r2, [pc, #72] @ (80054ac ) 8005464: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8005468: 2b00 cmp r3, #0 800546a: d109 bne.n 8005480 { data.spCommand = spGetSensorMeasurments; 800546c: 2301 movs r3, #1 800546e: 733b strb r3, [r7, #12] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8005470: 69fb ldr r3, [r7, #28] 8005472: 6ad8 ldr r0, [r3, #44] @ 0x2c 8005474: f107 010c add.w r1, r7, #12 8005478: 2364 movs r3, #100 @ 0x64 800547a: 2200 movs r2, #0 800547c: f00c fbce bl 8011c1c } osMutexRelease(resMeasurementsMutex); 8005480: 4b09 ldr r3, [pc, #36] @ (80054a8 ) 8005482: 681b ldr r3, [r3, #0] 8005484: 4618 mov r0, r3 8005486: f00c f9d5 bl 8011834 } ptr++; 800548a: 6a7b ldr r3, [r7, #36] @ 0x24 800548c: 3304 adds r3, #4 800548e: 627b str r3, [r7, #36] @ 0x24 while (*ptr != 0) { 8005490: 6a7b ldr r3, [r7, #36] @ 0x24 8005492: 681b ldr r3, [r3, #0] 8005494: 2b00 cmp r3, #0 8005496: d1a8 bne.n 80053ea } osDelay (pdMS_TO_TICKS (MEASURMENTS_SCHEDULER_INTERVAL_MS)); 8005498: f44f 707a mov.w r0, #1000 @ 0x3e8 800549c: f00b ffe7 bl 801146e while (pdTRUE) { 80054a0: e7a0 b.n 80053e4 80054a2: bf00 nop 80054a4: 24000014 .word 0x24000014 80054a8: 24002248 .word 0x24002248 80054ac: 24002238 .word 0x24002238 080054b0 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ 80054b0: f8df d034 ldr.w sp, [pc, #52] @ 80054e8 /* Call the clock system initialization function.*/ bl SystemInit 80054b4: f7fe ff34 bl 8004320 /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 80054b8: 480c ldr r0, [pc, #48] @ (80054ec ) ldr r1, =_edata 80054ba: 490d ldr r1, [pc, #52] @ (80054f0 ) ldr r2, =_sidata 80054bc: 4a0d ldr r2, [pc, #52] @ (80054f4 ) movs r3, #0 80054be: 2300 movs r3, #0 b LoopCopyDataInit 80054c0: e002 b.n 80054c8 080054c2 : CopyDataInit: ldr r4, [r2, r3] 80054c2: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 80054c4: 50c4 str r4, [r0, r3] adds r3, r3, #4 80054c6: 3304 adds r3, #4 080054c8 : LoopCopyDataInit: adds r4, r0, r3 80054c8: 18c4 adds r4, r0, r3 cmp r4, r1 80054ca: 428c cmp r4, r1 bcc CopyDataInit 80054cc: d3f9 bcc.n 80054c2 /* Zero fill the bss segment. */ ldr r2, =_sbss 80054ce: 4a0a ldr r2, [pc, #40] @ (80054f8 ) ldr r4, =_ebss 80054d0: 4c0a ldr r4, [pc, #40] @ (80054fc ) movs r3, #0 80054d2: 2300 movs r3, #0 b LoopFillZerobss 80054d4: e001 b.n 80054da 080054d6 : FillZerobss: str r3, [r2] 80054d6: 6013 str r3, [r2, #0] adds r2, r2, #4 80054d8: 3204 adds r2, #4 080054da : LoopFillZerobss: cmp r2, r4 80054da: 42a2 cmp r2, r4 bcc FillZerobss 80054dc: d3fb bcc.n 80054d6 /* Call static constructors */ bl __libc_init_array 80054de: f025 fc27 bl 802ad30 <__libc_init_array> /* Call the application's entry point.*/ bl main 80054e2: f7fc fc11 bl 8001d08
bx lr 80054e6: 4770 bx lr ldr sp, =_estack /* set stack pointer */ 80054e8: 24060000 .word 0x24060000 ldr r0, =_sdata 80054ec: 24000000 .word 0x24000000 ldr r1, =_edata 80054f0: 24000224 .word 0x24000224 ldr r2, =_sidata 80054f4: 0803211c .word 0x0803211c ldr r2, =_sbss 80054f8: 24000224 .word 0x24000224 ldr r4, =_ebss 80054fc: 2402b268 .word 0x2402b268 08005500 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8005500: e7fe b.n 8005500 08005502 : * @param ioctx: holds device IO functions. * @retval DP83848_STATUS_OK if OK * DP83848_STATUS_ERROR if missing mandatory function */ int32_t DP83848_RegisterBusIO(dp83848_Object_t *pObj, dp83848_IOCtx_t *ioctx) { 8005502: b480 push {r7} 8005504: b083 sub sp, #12 8005506: af00 add r7, sp, #0 8005508: 6078 str r0, [r7, #4] 800550a: 6039 str r1, [r7, #0] if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick) 800550c: 687b ldr r3, [r7, #4] 800550e: 2b00 cmp r3, #0 8005510: d00b beq.n 800552a 8005512: 683b ldr r3, [r7, #0] 8005514: 68db ldr r3, [r3, #12] 8005516: 2b00 cmp r3, #0 8005518: d007 beq.n 800552a 800551a: 683b ldr r3, [r7, #0] 800551c: 689b ldr r3, [r3, #8] 800551e: 2b00 cmp r3, #0 8005520: d003 beq.n 800552a 8005522: 683b ldr r3, [r7, #0] 8005524: 691b ldr r3, [r3, #16] 8005526: 2b00 cmp r3, #0 8005528: d102 bne.n 8005530 { return DP83848_STATUS_ERROR; 800552a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 800552e: e014 b.n 800555a } pObj->IO.Init = ioctx->Init; 8005530: 683b ldr r3, [r7, #0] 8005532: 681a ldr r2, [r3, #0] 8005534: 687b ldr r3, [r7, #4] 8005536: 609a str r2, [r3, #8] pObj->IO.DeInit = ioctx->DeInit; 8005538: 683b ldr r3, [r7, #0] 800553a: 685a ldr r2, [r3, #4] 800553c: 687b ldr r3, [r7, #4] 800553e: 60da str r2, [r3, #12] pObj->IO.ReadReg = ioctx->ReadReg; 8005540: 683b ldr r3, [r7, #0] 8005542: 68da ldr r2, [r3, #12] 8005544: 687b ldr r3, [r7, #4] 8005546: 615a str r2, [r3, #20] pObj->IO.WriteReg = ioctx->WriteReg; 8005548: 683b ldr r3, [r7, #0] 800554a: 689a ldr r2, [r3, #8] 800554c: 687b ldr r3, [r7, #4] 800554e: 611a str r2, [r3, #16] pObj->IO.GetTick = ioctx->GetTick; 8005550: 683b ldr r3, [r7, #0] 8005552: 691a ldr r2, [r3, #16] 8005554: 687b ldr r3, [r7, #4] 8005556: 619a str r2, [r3, #24] return DP83848_STATUS_OK; 8005558: 2300 movs r3, #0 } 800555a: 4618 mov r0, r3 800555c: 370c adds r7, #12 800555e: 46bd mov sp, r7 8005560: f85d 7b04 ldr.w r7, [sp], #4 8005564: 4770 bx lr 08005566 : * @retval DP83848_STATUS_OK if OK * DP83848_STATUS_ADDRESS_ERROR if cannot find device address * DP83848_STATUS_READ_ERROR if connot read register */ int32_t DP83848_Init(dp83848_Object_t *pObj) { 8005566: b580 push {r7, lr} 8005568: b086 sub sp, #24 800556a: af00 add r7, sp, #0 800556c: 6078 str r0, [r7, #4] uint32_t regvalue = 0, addr = 0; 800556e: 2300 movs r3, #0 8005570: 60fb str r3, [r7, #12] 8005572: 2300 movs r3, #0 8005574: 617b str r3, [r7, #20] int32_t status = DP83848_STATUS_OK; 8005576: 2300 movs r3, #0 8005578: 613b str r3, [r7, #16] if(pObj->Is_Initialized == 0) 800557a: 687b ldr r3, [r7, #4] 800557c: 685b ldr r3, [r3, #4] 800557e: 2b00 cmp r3, #0 8005580: d139 bne.n 80055f6 { if(pObj->IO.Init != 0) 8005582: 687b ldr r3, [r7, #4] 8005584: 689b ldr r3, [r3, #8] 8005586: 2b00 cmp r3, #0 8005588: d002 beq.n 8005590 { /* GPIO and Clocks initialization */ pObj->IO.Init(); 800558a: 687b ldr r3, [r7, #4] 800558c: 689b ldr r3, [r3, #8] 800558e: 4798 blx r3 } /* for later check */ pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1; 8005590: 687b ldr r3, [r7, #4] 8005592: 2220 movs r2, #32 8005594: 601a str r2, [r3, #0] /* Get the device address from special mode register */ for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 8005596: 2300 movs r3, #0 8005598: 617b str r3, [r7, #20] 800559a: e01c b.n 80055d6 { if(pObj->IO.ReadReg(addr, DP83848_SMR, ®value) < 0) 800559c: 687b ldr r3, [r7, #4] 800559e: 695b ldr r3, [r3, #20] 80055a0: f107 020c add.w r2, r7, #12 80055a4: 2119 movs r1, #25 80055a6: 6978 ldr r0, [r7, #20] 80055a8: 4798 blx r3 80055aa: 4603 mov r3, r0 80055ac: 2b00 cmp r3, #0 80055ae: da03 bge.n 80055b8 { status = DP83848_STATUS_READ_ERROR; 80055b0: f06f 0304 mvn.w r3, #4 80055b4: 613b str r3, [r7, #16] /* Can't read from this device address continue with next address */ continue; 80055b6: e00b b.n 80055d0 } if((regvalue & DP83848_SMR_PHY_ADDR) == addr) 80055b8: 68fb ldr r3, [r7, #12] 80055ba: f003 031f and.w r3, r3, #31 80055be: 697a ldr r2, [r7, #20] 80055c0: 429a cmp r2, r3 80055c2: d105 bne.n 80055d0 { pObj->DevAddr = addr; 80055c4: 687b ldr r3, [r7, #4] 80055c6: 697a ldr r2, [r7, #20] 80055c8: 601a str r2, [r3, #0] status = DP83848_STATUS_OK; 80055ca: 2300 movs r3, #0 80055cc: 613b str r3, [r7, #16] break; 80055ce: e005 b.n 80055dc for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 80055d0: 697b ldr r3, [r7, #20] 80055d2: 3301 adds r3, #1 80055d4: 617b str r3, [r7, #20] 80055d6: 697b ldr r3, [r7, #20] 80055d8: 2b1f cmp r3, #31 80055da: d9df bls.n 800559c } } if(pObj->DevAddr > DP83848_MAX_DEV_ADDR) 80055dc: 687b ldr r3, [r7, #4] 80055de: 681b ldr r3, [r3, #0] 80055e0: 2b1f cmp r3, #31 80055e2: d902 bls.n 80055ea { status = DP83848_STATUS_ADDRESS_ERROR; 80055e4: f06f 0302 mvn.w r3, #2 80055e8: 613b str r3, [r7, #16] } /* if device address is matched */ if(status == DP83848_STATUS_OK) 80055ea: 693b ldr r3, [r7, #16] 80055ec: 2b00 cmp r3, #0 80055ee: d102 bne.n 80055f6 { pObj->Is_Initialized = 1; 80055f0: 687b ldr r3, [r7, #4] 80055f2: 2201 movs r2, #1 80055f4: 605a str r2, [r3, #4] } } return status; 80055f6: 693b ldr r3, [r7, #16] } 80055f8: 4618 mov r0, r3 80055fa: 3718 adds r7, #24 80055fc: 46bd mov sp, r7 80055fe: bd80 pop {r7, pc} 08005600 : * DP83848_STATUS_10MBITS_HALFDUPLEX if 10Mb/s HD * DP83848_STATUS_READ_ERROR if connot read register * DP83848_STATUS_WRITE_ERROR if connot write to register */ int32_t DP83848_GetLinkState(dp83848_Object_t *pObj) { 8005600: b580 push {r7, lr} 8005602: b084 sub sp, #16 8005604: af00 add r7, sp, #0 8005606: 6078 str r0, [r7, #4] uint32_t readval = 0; 8005608: 2300 movs r3, #0 800560a: 60fb str r3, [r7, #12] /* Read Status register */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 800560c: 687b ldr r3, [r7, #4] 800560e: 695b ldr r3, [r3, #20] 8005610: 687a ldr r2, [r7, #4] 8005612: 6810 ldr r0, [r2, #0] 8005614: f107 020c add.w r2, r7, #12 8005618: 2101 movs r1, #1 800561a: 4798 blx r3 800561c: 4603 mov r3, r0 800561e: 2b00 cmp r3, #0 8005620: da02 bge.n 8005628 { return DP83848_STATUS_READ_ERROR; 8005622: f06f 0304 mvn.w r3, #4 8005626: e06e b.n 8005706 } /* Read Status register again */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 8005628: 687b ldr r3, [r7, #4] 800562a: 695b ldr r3, [r3, #20] 800562c: 687a ldr r2, [r7, #4] 800562e: 6810 ldr r0, [r2, #0] 8005630: f107 020c add.w r2, r7, #12 8005634: 2101 movs r1, #1 8005636: 4798 blx r3 8005638: 4603 mov r3, r0 800563a: 2b00 cmp r3, #0 800563c: da02 bge.n 8005644 { return DP83848_STATUS_READ_ERROR; 800563e: f06f 0304 mvn.w r3, #4 8005642: e060 b.n 8005706 } if((readval & DP83848_BSR_LINK_STATUS) == 0) 8005644: 68fb ldr r3, [r7, #12] 8005646: f003 0304 and.w r3, r3, #4 800564a: 2b00 cmp r3, #0 800564c: d101 bne.n 8005652 { /* Return Link Down status */ return DP83848_STATUS_LINK_DOWN; 800564e: 2301 movs r3, #1 8005650: e059 b.n 8005706 } /* Check Auto negotiaition */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0) 8005652: 687b ldr r3, [r7, #4] 8005654: 695b ldr r3, [r3, #20] 8005656: 687a ldr r2, [r7, #4] 8005658: 6810 ldr r0, [r2, #0] 800565a: f107 020c add.w r2, r7, #12 800565e: 2100 movs r1, #0 8005660: 4798 blx r3 8005662: 4603 mov r3, r0 8005664: 2b00 cmp r3, #0 8005666: da02 bge.n 800566e { return DP83848_STATUS_READ_ERROR; 8005668: f06f 0304 mvn.w r3, #4 800566c: e04b b.n 8005706 } if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN) 800566e: 68fb ldr r3, [r7, #12] 8005670: f403 5380 and.w r3, r3, #4096 @ 0x1000 8005674: 2b00 cmp r3, #0 8005676: d11b bne.n 80056b0 { if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)) 8005678: 68fb ldr r3, [r7, #12] 800567a: f403 5300 and.w r3, r3, #8192 @ 0x2000 800567e: 2b00 cmp r3, #0 8005680: d006 beq.n 8005690 8005682: 68fb ldr r3, [r7, #12] 8005684: f403 7380 and.w r3, r3, #256 @ 0x100 8005688: 2b00 cmp r3, #0 800568a: d001 beq.n 8005690 { return DP83848_STATUS_100MBITS_FULLDUPLEX; 800568c: 2302 movs r3, #2 800568e: e03a b.n 8005706 } else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) 8005690: 68fb ldr r3, [r7, #12] 8005692: f403 5300 and.w r3, r3, #8192 @ 0x2000 8005696: 2b00 cmp r3, #0 8005698: d001 beq.n 800569e { return DP83848_STATUS_100MBITS_HALFDUPLEX; 800569a: 2303 movs r3, #3 800569c: e033 b.n 8005706 } else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE) 800569e: 68fb ldr r3, [r7, #12] 80056a0: f403 7380 and.w r3, r3, #256 @ 0x100 80056a4: 2b00 cmp r3, #0 80056a6: d001 beq.n 80056ac { return DP83848_STATUS_10MBITS_FULLDUPLEX; 80056a8: 2304 movs r3, #4 80056aa: e02c b.n 8005706 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 80056ac: 2305 movs r3, #5 80056ae: e02a b.n 8005706 } } else /* Auto Nego enabled */ { if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0) 80056b0: 687b ldr r3, [r7, #4] 80056b2: 695b ldr r3, [r3, #20] 80056b4: 687a ldr r2, [r7, #4] 80056b6: 6810 ldr r0, [r2, #0] 80056b8: f107 020c add.w r2, r7, #12 80056bc: 2110 movs r1, #16 80056be: 4798 blx r3 80056c0: 4603 mov r3, r0 80056c2: 2b00 cmp r3, #0 80056c4: da02 bge.n 80056cc { return DP83848_STATUS_READ_ERROR; 80056c6: f06f 0304 mvn.w r3, #4 80056ca: e01c b.n 8005706 } /* Check if auto nego not done */ if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0) 80056cc: 68fb ldr r3, [r7, #12] 80056ce: f003 0310 and.w r3, r3, #16 80056d2: 2b00 cmp r3, #0 80056d4: d101 bne.n 80056da { return DP83848_STATUS_AUTONEGO_NOTDONE; 80056d6: 2306 movs r3, #6 80056d8: e015 b.n 8005706 } if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD) 80056da: 68fb ldr r3, [r7, #12] 80056dc: f003 0306 and.w r3, r3, #6 80056e0: 2b04 cmp r3, #4 80056e2: d101 bne.n 80056e8 { return DP83848_STATUS_100MBITS_FULLDUPLEX; 80056e4: 2302 movs r3, #2 80056e6: e00e b.n 8005706 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD) 80056e8: 68fb ldr r3, [r7, #12] 80056ea: f003 0306 and.w r3, r3, #6 80056ee: 2b00 cmp r3, #0 80056f0: d101 bne.n 80056f6 { return DP83848_STATUS_100MBITS_HALFDUPLEX; 80056f2: 2303 movs r3, #3 80056f4: e007 b.n 8005706 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD) 80056f6: 68fb ldr r3, [r7, #12] 80056f8: f003 0306 and.w r3, r3, #6 80056fc: 2b06 cmp r3, #6 80056fe: d101 bne.n 8005704 { return DP83848_STATUS_10MBITS_FULLDUPLEX; 8005700: 2304 movs r3, #4 8005702: e000 b.n 8005706 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 8005704: 2305 movs r3, #5 } } } 8005706: 4618 mov r0, r3 8005708: 3710 adds r7, #16 800570a: 46bd mov sp, r7 800570c: bd80 pop {r7, pc} ... 08005710 : * 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) { 8005710: b580 push {r7, lr} 8005712: b082 sub sp, #8 8005714: af00 add r7, sp, #0 __HAL_ART_CONFIG_BASE_ADDRESS(0x08100000UL); /* Configure the Cortex-M4 ART Base address to the Flash Bank 2 : */ __HAL_ART_ENABLE(); /* Enable the Cortex-M4 ART */ #endif /* DUAL_CORE && CORE_CM4 */ /* Set Interrupt Group Priority */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 8005716: 2003 movs r0, #3 8005718: f000 f947 bl 80059aa /* Update the SystemCoreClock global variable */ #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 800571c: f005 fcb4 bl 800b088 8005720: 4602 mov r2, r0 8005722: 4b15 ldr r3, [pc, #84] @ (8005778 ) 8005724: 699b ldr r3, [r3, #24] 8005726: 0a1b lsrs r3, r3, #8 8005728: f003 030f and.w r3, r3, #15 800572c: 4913 ldr r1, [pc, #76] @ (800577c ) 800572e: 5ccb ldrb r3, [r1, r3] 8005730: f003 031f and.w r3, r3, #31 8005734: fa22 f303 lsr.w r3, r2, r3 8005738: 607b str r3, [r7, #4] common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU); #endif /* Update the SystemD2Clock global variable */ #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 800573a: 4b0f ldr r3, [pc, #60] @ (8005778 ) 800573c: 699b ldr r3, [r3, #24] 800573e: f003 030f and.w r3, r3, #15 8005742: 4a0e ldr r2, [pc, #56] @ (800577c ) 8005744: 5cd3 ldrb r3, [r2, r3] 8005746: f003 031f and.w r3, r3, #31 800574a: 687a ldr r2, [r7, #4] 800574c: fa22 f303 lsr.w r3, r2, r3 8005750: 4a0b ldr r2, [pc, #44] @ (8005780 ) 8005752: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8005754: 4a0b ldr r2, [pc, #44] @ (8005784 ) 8005756: 687b ldr r3, [r7, #4] 8005758: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) 800575a: 200f movs r0, #15 800575c: f7fe fc2e bl 8003fbc 8005760: 4603 mov r3, r0 8005762: 2b00 cmp r3, #0 8005764: d001 beq.n 800576a { return HAL_ERROR; 8005766: 2301 movs r3, #1 8005768: e002 b.n 8005770 } /* Init the low level hardware */ HAL_MspInit(); 800576a: f7fe f917 bl 800399c /* Return function status */ return HAL_OK; 800576e: 2300 movs r3, #0 } 8005770: 4618 mov r0, r3 8005772: 3708 adds r7, #8 8005774: 46bd mov sp, r7 8005776: bd80 pop {r7, pc} 8005778: 58024400 .word 0x58024400 800577c: 08031a8c .word 0x08031a8c 8005780: 24000010 .word 0x24000010 8005784: 2400000c .word 0x2400000c 08005788 : * @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) { 8005788: b480 push {r7} 800578a: af00 add r7, sp, #0 uwTick += (uint32_t)uwTickFreq; 800578c: 4b06 ldr r3, [pc, #24] @ (80057a8 ) 800578e: 781b ldrb r3, [r3, #0] 8005790: 461a mov r2, r3 8005792: 4b06 ldr r3, [pc, #24] @ (80057ac ) 8005794: 681b ldr r3, [r3, #0] 8005796: 4413 add r3, r2 8005798: 4a04 ldr r2, [pc, #16] @ (80057ac ) 800579a: 6013 str r3, [r2, #0] } 800579c: bf00 nop 800579e: 46bd mov sp, r7 80057a0: f85d 7b04 ldr.w r7, [sp], #4 80057a4: 4770 bx lr 80057a6: bf00 nop 80057a8: 24000030 .word 0x24000030 80057ac: 24002250 .word 0x24002250 080057b0 : * @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) { 80057b0: b480 push {r7} 80057b2: af00 add r7, sp, #0 return uwTick; 80057b4: 4b03 ldr r3, [pc, #12] @ (80057c4 ) 80057b6: 681b ldr r3, [r3, #0] } 80057b8: 4618 mov r0, r3 80057ba: 46bd mov sp, r7 80057bc: f85d 7b04 ldr.w r7, [sp], #4 80057c0: 4770 bx lr 80057c2: bf00 nop 80057c4: 24002250 .word 0x24002250 080057c8 : * implementations in user file. * @param Delay specifies the delay time length, in milliseconds. * @retval None */ __weak void HAL_Delay(uint32_t Delay) { 80057c8: b580 push {r7, lr} 80057ca: b084 sub sp, #16 80057cc: af00 add r7, sp, #0 80057ce: 6078 str r0, [r7, #4] uint32_t tickstart = HAL_GetTick(); 80057d0: f7ff ffee bl 80057b0 80057d4: 60b8 str r0, [r7, #8] uint32_t wait = Delay; 80057d6: 687b ldr r3, [r7, #4] 80057d8: 60fb str r3, [r7, #12] /* Add a freq to guarantee minimum wait */ if (wait < HAL_MAX_DELAY) 80057da: 68fb ldr r3, [r7, #12] 80057dc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80057e0: d005 beq.n 80057ee { wait += (uint32_t)(uwTickFreq); 80057e2: 4b0a ldr r3, [pc, #40] @ (800580c ) 80057e4: 781b ldrb r3, [r3, #0] 80057e6: 461a mov r2, r3 80057e8: 68fb ldr r3, [r7, #12] 80057ea: 4413 add r3, r2 80057ec: 60fb str r3, [r7, #12] } while ((HAL_GetTick() - tickstart) < wait) 80057ee: bf00 nop 80057f0: f7ff ffde bl 80057b0 80057f4: 4602 mov r2, r0 80057f6: 68bb ldr r3, [r7, #8] 80057f8: 1ad3 subs r3, r2, r3 80057fa: 68fa ldr r2, [r7, #12] 80057fc: 429a cmp r2, r3 80057fe: d8f7 bhi.n 80057f0 { } } 8005800: bf00 nop 8005802: bf00 nop 8005804: 3710 adds r7, #16 8005806: 46bd mov sp, r7 8005808: bd80 pop {r7, pc} 800580a: bf00 nop 800580c: 24000030 .word 0x24000030 08005810 : /** * @brief Returns the device revision identifier. * @retval Device revision identifier */ uint32_t HAL_GetREVID(void) { 8005810: b480 push {r7} 8005812: af00 add r7, sp, #0 return((DBGMCU->IDCODE) >> 16); 8005814: 4b03 ldr r3, [pc, #12] @ (8005824 ) 8005816: 681b ldr r3, [r3, #0] 8005818: 0c1b lsrs r3, r3, #16 } 800581a: 4618 mov r0, r3 800581c: 46bd mov sp, r7 800581e: f85d 7b04 ldr.w r7, [sp], #4 8005822: 4770 bx lr 8005824: 5c001000 .word 0x5c001000 08005828 : * @arg SYSCFG_ETH_MII : Select the Media Independent Interface * @arg SYSCFG_ETH_RMII: Select the Reduced Media Independent Interface * @retval None */ void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface) { 8005828: b480 push {r7} 800582a: b083 sub sp, #12 800582c: af00 add r7, sp, #0 800582e: 6078 str r0, [r7, #4] /* Check the parameter */ assert_param(IS_SYSCFG_ETHERNET_CONFIG(SYSCFG_ETHInterface)); MODIFY_REG(SYSCFG->PMCR, SYSCFG_PMCR_EPIS_SEL, (uint32_t)(SYSCFG_ETHInterface)); 8005830: 4b06 ldr r3, [pc, #24] @ (800584c ) 8005832: 685b ldr r3, [r3, #4] 8005834: f423 0260 bic.w r2, r3, #14680064 @ 0xe00000 8005838: 4904 ldr r1, [pc, #16] @ (800584c ) 800583a: 687b ldr r3, [r7, #4] 800583c: 4313 orrs r3, r2 800583e: 604b str r3, [r1, #4] } 8005840: bf00 nop 8005842: 370c adds r7, #12 8005844: 46bd mov sp, r7 8005846: f85d 7b04 ldr.w r7, [sp], #4 800584a: 4770 bx lr 800584c: 58000400 .word 0x58000400 08005850 <__NVIC_SetPriorityGrouping>: { 8005850: b480 push {r7} 8005852: b085 sub sp, #20 8005854: af00 add r7, sp, #0 8005856: 6078 str r0, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 8005858: 687b ldr r3, [r7, #4] 800585a: f003 0307 and.w r3, r3, #7 800585e: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 8005860: 4b0b ldr r3, [pc, #44] @ (8005890 <__NVIC_SetPriorityGrouping+0x40>) 8005862: 68db ldr r3, [r3, #12] 8005864: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 8005866: 68ba ldr r2, [r7, #8] 8005868: f64f 03ff movw r3, #63743 @ 0xf8ff 800586c: 4013 ands r3, r2 800586e: 60bb str r3, [r7, #8] (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 8005870: 68fb ldr r3, [r7, #12] 8005872: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8005874: 68bb ldr r3, [r7, #8] 8005876: 431a orrs r2, r3 reg_value = (reg_value | 8005878: 4b06 ldr r3, [pc, #24] @ (8005894 <__NVIC_SetPriorityGrouping+0x44>) 800587a: 4313 orrs r3, r2 800587c: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 800587e: 4a04 ldr r2, [pc, #16] @ (8005890 <__NVIC_SetPriorityGrouping+0x40>) 8005880: 68bb ldr r3, [r7, #8] 8005882: 60d3 str r3, [r2, #12] } 8005884: bf00 nop 8005886: 3714 adds r7, #20 8005888: 46bd mov sp, r7 800588a: f85d 7b04 ldr.w r7, [sp], #4 800588e: 4770 bx lr 8005890: e000ed00 .word 0xe000ed00 8005894: 05fa0000 .word 0x05fa0000 08005898 <__NVIC_GetPriorityGrouping>: { 8005898: b480 push {r7} 800589a: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 800589c: 4b04 ldr r3, [pc, #16] @ (80058b0 <__NVIC_GetPriorityGrouping+0x18>) 800589e: 68db ldr r3, [r3, #12] 80058a0: 0a1b lsrs r3, r3, #8 80058a2: f003 0307 and.w r3, r3, #7 } 80058a6: 4618 mov r0, r3 80058a8: 46bd mov sp, r7 80058aa: f85d 7b04 ldr.w r7, [sp], #4 80058ae: 4770 bx lr 80058b0: e000ed00 .word 0xe000ed00 080058b4 <__NVIC_EnableIRQ>: { 80058b4: b480 push {r7} 80058b6: b083 sub sp, #12 80058b8: af00 add r7, sp, #0 80058ba: 4603 mov r3, r0 80058bc: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 80058be: f9b7 3006 ldrsh.w r3, [r7, #6] 80058c2: 2b00 cmp r3, #0 80058c4: db0b blt.n 80058de <__NVIC_EnableIRQ+0x2a> NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 80058c6: 88fb ldrh r3, [r7, #6] 80058c8: f003 021f and.w r2, r3, #31 80058cc: 4907 ldr r1, [pc, #28] @ (80058ec <__NVIC_EnableIRQ+0x38>) 80058ce: f9b7 3006 ldrsh.w r3, [r7, #6] 80058d2: 095b lsrs r3, r3, #5 80058d4: 2001 movs r0, #1 80058d6: fa00 f202 lsl.w r2, r0, r2 80058da: f841 2023 str.w r2, [r1, r3, lsl #2] } 80058de: bf00 nop 80058e0: 370c adds r7, #12 80058e2: 46bd mov sp, r7 80058e4: f85d 7b04 ldr.w r7, [sp], #4 80058e8: 4770 bx lr 80058ea: bf00 nop 80058ec: e000e100 .word 0xe000e100 080058f0 <__NVIC_SetPriority>: { 80058f0: b480 push {r7} 80058f2: b083 sub sp, #12 80058f4: af00 add r7, sp, #0 80058f6: 4603 mov r3, r0 80058f8: 6039 str r1, [r7, #0] 80058fa: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 80058fc: f9b7 3006 ldrsh.w r3, [r7, #6] 8005900: 2b00 cmp r3, #0 8005902: db0a blt.n 800591a <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8005904: 683b ldr r3, [r7, #0] 8005906: b2da uxtb r2, r3 8005908: 490c ldr r1, [pc, #48] @ (800593c <__NVIC_SetPriority+0x4c>) 800590a: f9b7 3006 ldrsh.w r3, [r7, #6] 800590e: 0112 lsls r2, r2, #4 8005910: b2d2 uxtb r2, r2 8005912: 440b add r3, r1 8005914: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 8005918: e00a b.n 8005930 <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 800591a: 683b ldr r3, [r7, #0] 800591c: b2da uxtb r2, r3 800591e: 4908 ldr r1, [pc, #32] @ (8005940 <__NVIC_SetPriority+0x50>) 8005920: 88fb ldrh r3, [r7, #6] 8005922: f003 030f and.w r3, r3, #15 8005926: 3b04 subs r3, #4 8005928: 0112 lsls r2, r2, #4 800592a: b2d2 uxtb r2, r2 800592c: 440b add r3, r1 800592e: 761a strb r2, [r3, #24] } 8005930: bf00 nop 8005932: 370c adds r7, #12 8005934: 46bd mov sp, r7 8005936: f85d 7b04 ldr.w r7, [sp], #4 800593a: 4770 bx lr 800593c: e000e100 .word 0xe000e100 8005940: e000ed00 .word 0xe000ed00 08005944 : { 8005944: b480 push {r7} 8005946: b089 sub sp, #36 @ 0x24 8005948: af00 add r7, sp, #0 800594a: 60f8 str r0, [r7, #12] 800594c: 60b9 str r1, [r7, #8] 800594e: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 8005950: 68fb ldr r3, [r7, #12] 8005952: f003 0307 and.w r3, r3, #7 8005956: 61fb str r3, [r7, #28] PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 8005958: 69fb ldr r3, [r7, #28] 800595a: f1c3 0307 rsb r3, r3, #7 800595e: 2b04 cmp r3, #4 8005960: bf28 it cs 8005962: 2304 movcs r3, #4 8005964: 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)); 8005966: 69fb ldr r3, [r7, #28] 8005968: 3304 adds r3, #4 800596a: 2b06 cmp r3, #6 800596c: d902 bls.n 8005974 800596e: 69fb ldr r3, [r7, #28] 8005970: 3b03 subs r3, #3 8005972: e000 b.n 8005976 8005974: 2300 movs r3, #0 8005976: 617b str r3, [r7, #20] ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8005978: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 800597c: 69bb ldr r3, [r7, #24] 800597e: fa02 f303 lsl.w r3, r2, r3 8005982: 43da mvns r2, r3 8005984: 68bb ldr r3, [r7, #8] 8005986: 401a ands r2, r3 8005988: 697b ldr r3, [r7, #20] 800598a: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 800598c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005990: 697b ldr r3, [r7, #20] 8005992: fa01 f303 lsl.w r3, r1, r3 8005996: 43d9 mvns r1, r3 8005998: 687b ldr r3, [r7, #4] 800599a: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 800599c: 4313 orrs r3, r2 } 800599e: 4618 mov r0, r3 80059a0: 3724 adds r7, #36 @ 0x24 80059a2: 46bd mov sp, r7 80059a4: f85d 7b04 ldr.w r7, [sp], #4 80059a8: 4770 bx lr 080059aa : * @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) { 80059aa: b580 push {r7, lr} 80059ac: b082 sub sp, #8 80059ae: af00 add r7, sp, #0 80059b0: 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); 80059b2: 6878 ldr r0, [r7, #4] 80059b4: f7ff ff4c bl 8005850 <__NVIC_SetPriorityGrouping> } 80059b8: bf00 nop 80059ba: 3708 adds r7, #8 80059bc: 46bd mov sp, r7 80059be: bd80 pop {r7, pc} 080059c0 : * 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) { 80059c0: b580 push {r7, lr} 80059c2: b086 sub sp, #24 80059c4: af00 add r7, sp, #0 80059c6: 4603 mov r3, r0 80059c8: 60b9 str r1, [r7, #8] 80059ca: 607a str r2, [r7, #4] 80059cc: 81fb strh r3, [r7, #14] /* Check the parameters */ assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); prioritygroup = NVIC_GetPriorityGrouping(); 80059ce: f7ff ff63 bl 8005898 <__NVIC_GetPriorityGrouping> 80059d2: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 80059d4: 687a ldr r2, [r7, #4] 80059d6: 68b9 ldr r1, [r7, #8] 80059d8: 6978 ldr r0, [r7, #20] 80059da: f7ff ffb3 bl 8005944 80059de: 4602 mov r2, r0 80059e0: f9b7 300e ldrsh.w r3, [r7, #14] 80059e4: 4611 mov r1, r2 80059e6: 4618 mov r0, r3 80059e8: f7ff ff82 bl 80058f0 <__NVIC_SetPriority> } 80059ec: bf00 nop 80059ee: 3718 adds r7, #24 80059f0: 46bd mov sp, r7 80059f2: bd80 pop {r7, pc} 080059f4 : * 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 (stm32h7xxxx.h)) * @retval None */ void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) { 80059f4: b580 push {r7, lr} 80059f6: b082 sub sp, #8 80059f8: af00 add r7, sp, #0 80059fa: 4603 mov r3, r0 80059fc: 80fb strh r3, [r7, #6] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 80059fe: f9b7 3006 ldrsh.w r3, [r7, #6] 8005a02: 4618 mov r0, r3 8005a04: f7ff ff56 bl 80058b4 <__NVIC_EnableIRQ> } 8005a08: bf00 nop 8005a0a: 3708 adds r7, #8 8005a0c: 46bd mov sp, r7 8005a0e: bd80 pop {r7, pc} 08005a10 : /** * @brief Disables the MPU * @retval None */ void HAL_MPU_Disable(void) { 8005a10: b480 push {r7} 8005a12: af00 add r7, sp, #0 \details Ensures the apparent order of the explicit memory operations before and after the instruction, without ensuring their completion. */ __STATIC_FORCEINLINE void __DMB(void) { __ASM volatile ("dmb 0xF":::"memory"); 8005a14: f3bf 8f5f dmb sy } 8005a18: bf00 nop /* Make sure outstanding transfers are done */ __DMB(); /* Disable fault exceptions */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; 8005a1a: 4b07 ldr r3, [pc, #28] @ (8005a38 ) 8005a1c: 6a5b ldr r3, [r3, #36] @ 0x24 8005a1e: 4a06 ldr r2, [pc, #24] @ (8005a38 ) 8005a20: f423 3380 bic.w r3, r3, #65536 @ 0x10000 8005a24: 6253 str r3, [r2, #36] @ 0x24 /* Disable the MPU and clear the control register*/ MPU->CTRL = 0; 8005a26: 4b05 ldr r3, [pc, #20] @ (8005a3c ) 8005a28: 2200 movs r2, #0 8005a2a: 605a str r2, [r3, #4] } 8005a2c: bf00 nop 8005a2e: 46bd mov sp, r7 8005a30: f85d 7b04 ldr.w r7, [sp], #4 8005a34: 4770 bx lr 8005a36: bf00 nop 8005a38: e000ed00 .word 0xe000ed00 8005a3c: e000ed90 .word 0xe000ed90 08005a40 : * @arg MPU_PRIVILEGED_DEFAULT * @arg MPU_HFNMI_PRIVDEF * @retval None */ void HAL_MPU_Enable(uint32_t MPU_Control) { 8005a40: b480 push {r7} 8005a42: b083 sub sp, #12 8005a44: af00 add r7, sp, #0 8005a46: 6078 str r0, [r7, #4] /* Enable the MPU */ MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; 8005a48: 4a0b ldr r2, [pc, #44] @ (8005a78 ) 8005a4a: 687b ldr r3, [r7, #4] 8005a4c: f043 0301 orr.w r3, r3, #1 8005a50: 6053 str r3, [r2, #4] /* Enable fault exceptions */ SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; 8005a52: 4b0a ldr r3, [pc, #40] @ (8005a7c ) 8005a54: 6a5b ldr r3, [r3, #36] @ 0x24 8005a56: 4a09 ldr r2, [pc, #36] @ (8005a7c ) 8005a58: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8005a5c: 6253 str r3, [r2, #36] @ 0x24 __ASM volatile ("dsb 0xF":::"memory"); 8005a5e: f3bf 8f4f dsb sy } 8005a62: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8005a64: f3bf 8f6f isb sy } 8005a68: bf00 nop /* Ensure MPU setting take effects */ __DSB(); __ISB(); } 8005a6a: bf00 nop 8005a6c: 370c adds r7, #12 8005a6e: 46bd mov sp, r7 8005a70: f85d 7b04 ldr.w r7, [sp], #4 8005a74: 4770 bx lr 8005a76: bf00 nop 8005a78: e000ed90 .word 0xe000ed90 8005a7c: e000ed00 .word 0xe000ed00 08005a80 : * @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains * the initialization and configuration information. * @retval None */ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init) { 8005a80: b480 push {r7} 8005a82: b083 sub sp, #12 8005a84: af00 add r7, sp, #0 8005a86: 6078 str r0, [r7, #4] assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable)); assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable)); assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size)); /* Set the Region number */ MPU->RNR = MPU_Init->Number; 8005a88: 687b ldr r3, [r7, #4] 8005a8a: 785a ldrb r2, [r3, #1] 8005a8c: 4b1b ldr r3, [pc, #108] @ (8005afc ) 8005a8e: 609a str r2, [r3, #8] /* Disable the Region */ CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); 8005a90: 4b1a ldr r3, [pc, #104] @ (8005afc ) 8005a92: 691b ldr r3, [r3, #16] 8005a94: 4a19 ldr r2, [pc, #100] @ (8005afc ) 8005a96: f023 0301 bic.w r3, r3, #1 8005a9a: 6113 str r3, [r2, #16] /* Apply configuration */ MPU->RBAR = MPU_Init->BaseAddress; 8005a9c: 4a17 ldr r2, [pc, #92] @ (8005afc ) 8005a9e: 687b ldr r3, [r7, #4] 8005aa0: 685b ldr r3, [r3, #4] 8005aa2: 60d3 str r3, [r2, #12] MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005aa4: 687b ldr r3, [r7, #4] 8005aa6: 7b1b ldrb r3, [r3, #12] 8005aa8: 071a lsls r2, r3, #28 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8005aaa: 687b ldr r3, [r7, #4] 8005aac: 7adb ldrb r3, [r3, #11] 8005aae: 061b lsls r3, r3, #24 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005ab0: 431a orrs r2, r3 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005ab2: 687b ldr r3, [r7, #4] 8005ab4: 7a9b ldrb r3, [r3, #10] 8005ab6: 04db lsls r3, r3, #19 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8005ab8: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8005aba: 687b ldr r3, [r7, #4] 8005abc: 7b5b ldrb r3, [r3, #13] 8005abe: 049b lsls r3, r3, #18 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005ac0: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005ac2: 687b ldr r3, [r7, #4] 8005ac4: 7b9b ldrb r3, [r3, #14] 8005ac6: 045b lsls r3, r3, #17 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8005ac8: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8005aca: 687b ldr r3, [r7, #4] 8005acc: 7bdb ldrb r3, [r3, #15] 8005ace: 041b lsls r3, r3, #16 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005ad0: 431a orrs r2, r3 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005ad2: 687b ldr r3, [r7, #4] 8005ad4: 7a5b ldrb r3, [r3, #9] 8005ad6: 021b lsls r3, r3, #8 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8005ad8: 431a orrs r2, r3 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8005ada: 687b ldr r3, [r7, #4] 8005adc: 7a1b ldrb r3, [r3, #8] 8005ade: 005b lsls r3, r3, #1 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005ae0: 4313 orrs r3, r2 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); 8005ae2: 687a ldr r2, [r7, #4] 8005ae4: 7812 ldrb r2, [r2, #0] 8005ae6: 4611 mov r1, r2 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005ae8: 4a04 ldr r2, [pc, #16] @ (8005afc ) ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8005aea: 430b orrs r3, r1 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005aec: 6113 str r3, [r2, #16] } 8005aee: bf00 nop 8005af0: 370c adds r7, #12 8005af2: 46bd mov sp, r7 8005af4: f85d 7b04 ldr.w r7, [sp], #4 8005af8: 4770 bx lr 8005afa: bf00 nop 8005afc: e000ed90 .word 0xe000ed90 08005b00 : * 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) { 8005b00: b580 push {r7, lr} 8005b02: b082 sub sp, #8 8005b04: af00 add r7, sp, #0 8005b06: 6078 str r0, [r7, #4] /* Check the CRC handle allocation */ if (hcrc == NULL) 8005b08: 687b ldr r3, [r7, #4] 8005b0a: 2b00 cmp r3, #0 8005b0c: d101 bne.n 8005b12 { return HAL_ERROR; 8005b0e: 2301 movs r3, #1 8005b10: e054 b.n 8005bbc } /* Check the parameters */ assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance)); if (hcrc->State == HAL_CRC_STATE_RESET) 8005b12: 687b ldr r3, [r7, #4] 8005b14: 7f5b ldrb r3, [r3, #29] 8005b16: b2db uxtb r3, r3 8005b18: 2b00 cmp r3, #0 8005b1a: d105 bne.n 8005b28 { /* Allocate lock resource and initialize it */ hcrc->Lock = HAL_UNLOCKED; 8005b1c: 687b ldr r3, [r7, #4] 8005b1e: 2200 movs r2, #0 8005b20: 771a strb r2, [r3, #28] /* Init the low level hardware */ HAL_CRC_MspInit(hcrc); 8005b22: 6878 ldr r0, [r7, #4] 8005b24: f7fd ff82 bl 8003a2c } hcrc->State = HAL_CRC_STATE_BUSY; 8005b28: 687b ldr r3, [r7, #4] 8005b2a: 2202 movs r2, #2 8005b2c: 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) 8005b2e: 687b ldr r3, [r7, #4] 8005b30: 791b ldrb r3, [r3, #4] 8005b32: 2b00 cmp r3, #0 8005b34: d10c bne.n 8005b50 { /* initialize peripheral with default generating polynomial */ WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY); 8005b36: 687b ldr r3, [r7, #4] 8005b38: 681b ldr r3, [r3, #0] 8005b3a: 4a22 ldr r2, [pc, #136] @ (8005bc4 ) 8005b3c: 615a str r2, [r3, #20] MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B); 8005b3e: 687b ldr r3, [r7, #4] 8005b40: 681b ldr r3, [r3, #0] 8005b42: 689a ldr r2, [r3, #8] 8005b44: 687b ldr r3, [r7, #4] 8005b46: 681b ldr r3, [r3, #0] 8005b48: f022 0218 bic.w r2, r2, #24 8005b4c: 609a str r2, [r3, #8] 8005b4e: e00c b.n 8005b6a } else { /* initialize CRC peripheral with generating polynomial defined by user */ if (HAL_CRCEx_Polynomial_Set(hcrc, hcrc->Init.GeneratingPolynomial, hcrc->Init.CRCLength) != HAL_OK) 8005b50: 687b ldr r3, [r7, #4] 8005b52: 6899 ldr r1, [r3, #8] 8005b54: 687b ldr r3, [r7, #4] 8005b56: 68db ldr r3, [r3, #12] 8005b58: 461a mov r2, r3 8005b5a: 6878 ldr r0, [r7, #4] 8005b5c: f000 f948 bl 8005df0 8005b60: 4603 mov r3, r0 8005b62: 2b00 cmp r3, #0 8005b64: d001 beq.n 8005b6a { return HAL_ERROR; 8005b66: 2301 movs r3, #1 8005b68: e028 b.n 8005bbc } /* 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) 8005b6a: 687b ldr r3, [r7, #4] 8005b6c: 795b ldrb r3, [r3, #5] 8005b6e: 2b00 cmp r3, #0 8005b70: d105 bne.n 8005b7e { WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE); 8005b72: 687b ldr r3, [r7, #4] 8005b74: 681b ldr r3, [r3, #0] 8005b76: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8005b7a: 611a str r2, [r3, #16] 8005b7c: e004 b.n 8005b88 } else { WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue); 8005b7e: 687b ldr r3, [r7, #4] 8005b80: 681b ldr r3, [r3, #0] 8005b82: 687a ldr r2, [r7, #4] 8005b84: 6912 ldr r2, [r2, #16] 8005b86: 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); 8005b88: 687b ldr r3, [r7, #4] 8005b8a: 681b ldr r3, [r3, #0] 8005b8c: 689b ldr r3, [r3, #8] 8005b8e: f023 0160 bic.w r1, r3, #96 @ 0x60 8005b92: 687b ldr r3, [r7, #4] 8005b94: 695a ldr r2, [r3, #20] 8005b96: 687b ldr r3, [r7, #4] 8005b98: 681b ldr r3, [r3, #0] 8005b9a: 430a orrs r2, r1 8005b9c: 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); 8005b9e: 687b ldr r3, [r7, #4] 8005ba0: 681b ldr r3, [r3, #0] 8005ba2: 689b ldr r3, [r3, #8] 8005ba4: f023 0180 bic.w r1, r3, #128 @ 0x80 8005ba8: 687b ldr r3, [r7, #4] 8005baa: 699a ldr r2, [r3, #24] 8005bac: 687b ldr r3, [r7, #4] 8005bae: 681b ldr r3, [r3, #0] 8005bb0: 430a orrs r2, r1 8005bb2: 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; 8005bb4: 687b ldr r3, [r7, #4] 8005bb6: 2201 movs r2, #1 8005bb8: 775a strb r2, [r3, #29] /* Return function status */ return HAL_OK; 8005bba: 2300 movs r3, #0 } 8005bbc: 4618 mov r0, r3 8005bbe: 3708 adds r7, #8 8005bc0: 46bd mov sp, r7 8005bc2: bd80 pop {r7, pc} 8005bc4: 04c11db7 .word 0x04c11db7 08005bc8 : * and the API will internally adjust its input data processing based on the * handle field hcrc->InputDataFormat. * @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits) */ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength) { 8005bc8: b580 push {r7, lr} 8005bca: b086 sub sp, #24 8005bcc: af00 add r7, sp, #0 8005bce: 60f8 str r0, [r7, #12] 8005bd0: 60b9 str r1, [r7, #8] 8005bd2: 607a str r2, [r7, #4] uint32_t index; /* CRC input data buffer index */ uint32_t temp = 0U; /* CRC output (read from hcrc->Instance->DR register) */ 8005bd4: 2300 movs r3, #0 8005bd6: 613b str r3, [r7, #16] /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_BUSY; 8005bd8: 68fb ldr r3, [r7, #12] 8005bda: 2202 movs r2, #2 8005bdc: 775a strb r2, [r3, #29] /* Reset CRC Calculation Unit (hcrc->Instance->INIT is * written in hcrc->Instance->DR) */ __HAL_CRC_DR_RESET(hcrc); 8005bde: 68fb ldr r3, [r7, #12] 8005be0: 681b ldr r3, [r3, #0] 8005be2: 689a ldr r2, [r3, #8] 8005be4: 68fb ldr r3, [r7, #12] 8005be6: 681b ldr r3, [r3, #0] 8005be8: f042 0201 orr.w r2, r2, #1 8005bec: 609a str r2, [r3, #8] switch (hcrc->InputDataFormat) 8005bee: 68fb ldr r3, [r7, #12] 8005bf0: 6a1b ldr r3, [r3, #32] 8005bf2: 2b03 cmp r3, #3 8005bf4: d006 beq.n 8005c04 8005bf6: 2b03 cmp r3, #3 8005bf8: d829 bhi.n 8005c4e 8005bfa: 2b01 cmp r3, #1 8005bfc: d019 beq.n 8005c32 8005bfe: 2b02 cmp r3, #2 8005c00: d01e beq.n 8005c40 /* Specific 16-bit input data handling */ temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ break; default: break; 8005c02: e024 b.n 8005c4e for (index = 0U; index < BufferLength; index++) 8005c04: 2300 movs r3, #0 8005c06: 617b str r3, [r7, #20] 8005c08: e00a b.n 8005c20 hcrc->Instance->DR = pBuffer[index]; 8005c0a: 697b ldr r3, [r7, #20] 8005c0c: 009b lsls r3, r3, #2 8005c0e: 68ba ldr r2, [r7, #8] 8005c10: 441a add r2, r3 8005c12: 68fb ldr r3, [r7, #12] 8005c14: 681b ldr r3, [r3, #0] 8005c16: 6812 ldr r2, [r2, #0] 8005c18: 601a str r2, [r3, #0] for (index = 0U; index < BufferLength; index++) 8005c1a: 697b ldr r3, [r7, #20] 8005c1c: 3301 adds r3, #1 8005c1e: 617b str r3, [r7, #20] 8005c20: 697a ldr r2, [r7, #20] 8005c22: 687b ldr r3, [r7, #4] 8005c24: 429a cmp r2, r3 8005c26: d3f0 bcc.n 8005c0a temp = hcrc->Instance->DR; 8005c28: 68fb ldr r3, [r7, #12] 8005c2a: 681b ldr r3, [r3, #0] 8005c2c: 681b ldr r3, [r3, #0] 8005c2e: 613b str r3, [r7, #16] break; 8005c30: e00e b.n 8005c50 temp = CRC_Handle_8(hcrc, (uint8_t *)pBuffer, BufferLength); 8005c32: 687a ldr r2, [r7, #4] 8005c34: 68b9 ldr r1, [r7, #8] 8005c36: 68f8 ldr r0, [r7, #12] 8005c38: f000 f812 bl 8005c60 8005c3c: 6138 str r0, [r7, #16] break; 8005c3e: e007 b.n 8005c50 temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ 8005c40: 687a ldr r2, [r7, #4] 8005c42: 68b9 ldr r1, [r7, #8] 8005c44: 68f8 ldr r0, [r7, #12] 8005c46: f000 f899 bl 8005d7c 8005c4a: 6138 str r0, [r7, #16] break; 8005c4c: e000 b.n 8005c50 break; 8005c4e: bf00 nop } /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_READY; 8005c50: 68fb ldr r3, [r7, #12] 8005c52: 2201 movs r2, #1 8005c54: 775a strb r2, [r3, #29] /* Return the CRC computed value */ return temp; 8005c56: 693b ldr r3, [r7, #16] } 8005c58: 4618 mov r0, r3 8005c5a: 3718 adds r7, #24 8005c5c: 46bd mov sp, r7 8005c5e: bd80 pop {r7, pc} 08005c60 : * @param pBuffer pointer to the input data buffer * @param BufferLength input data buffer length * @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits) */ static uint32_t CRC_Handle_8(CRC_HandleTypeDef *hcrc, uint8_t pBuffer[], uint32_t BufferLength) { 8005c60: b480 push {r7} 8005c62: b089 sub sp, #36 @ 0x24 8005c64: af00 add r7, sp, #0 8005c66: 60f8 str r0, [r7, #12] 8005c68: 60b9 str r1, [r7, #8] 8005c6a: 607a str r2, [r7, #4] __IO uint16_t *pReg; /* Processing time optimization: 4 bytes are entered in a row with a single word write, * last bytes must be carefully fed to the CRC calculator to ensure a correct type * handling by the peripheral */ for (i = 0U; i < (BufferLength / 4U); i++) 8005c6c: 2300 movs r3, #0 8005c6e: 61fb str r3, [r7, #28] 8005c70: e023 b.n 8005cba { hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005c72: 69fb ldr r3, [r7, #28] 8005c74: 009b lsls r3, r3, #2 8005c76: 68ba ldr r2, [r7, #8] 8005c78: 4413 add r3, r2 8005c7a: 781b ldrb r3, [r3, #0] 8005c7c: 061a lsls r2, r3, #24 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 8005c7e: 69fb ldr r3, [r7, #28] 8005c80: 009b lsls r3, r3, #2 8005c82: 3301 adds r3, #1 8005c84: 68b9 ldr r1, [r7, #8] 8005c86: 440b add r3, r1 8005c88: 781b ldrb r3, [r3, #0] 8005c8a: 041b lsls r3, r3, #16 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005c8c: 431a orrs r2, r3 ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 8005c8e: 69fb ldr r3, [r7, #28] 8005c90: 009b lsls r3, r3, #2 8005c92: 3302 adds r3, #2 8005c94: 68b9 ldr r1, [r7, #8] 8005c96: 440b add r3, r1 8005c98: 781b ldrb r3, [r3, #0] 8005c9a: 021b lsls r3, r3, #8 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 8005c9c: 431a orrs r2, r3 (uint32_t)pBuffer[(4U * i) + 3U]; 8005c9e: 69fb ldr r3, [r7, #28] 8005ca0: 009b lsls r3, r3, #2 8005ca2: 3303 adds r3, #3 8005ca4: 68b9 ldr r1, [r7, #8] 8005ca6: 440b add r3, r1 8005ca8: 781b ldrb r3, [r3, #0] 8005caa: 4619 mov r1, r3 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005cac: 68fb ldr r3, [r7, #12] 8005cae: 681b ldr r3, [r3, #0] ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 8005cb0: 430a orrs r2, r1 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005cb2: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 4U); i++) 8005cb4: 69fb ldr r3, [r7, #28] 8005cb6: 3301 adds r3, #1 8005cb8: 61fb str r3, [r7, #28] 8005cba: 687b ldr r3, [r7, #4] 8005cbc: 089b lsrs r3, r3, #2 8005cbe: 69fa ldr r2, [r7, #28] 8005cc0: 429a cmp r2, r3 8005cc2: d3d6 bcc.n 8005c72 } /* last bytes specific handling */ if ((BufferLength % 4U) != 0U) 8005cc4: 687b ldr r3, [r7, #4] 8005cc6: f003 0303 and.w r3, r3, #3 8005cca: 2b00 cmp r3, #0 8005ccc: d04d beq.n 8005d6a { if ((BufferLength % 4U) == 1U) 8005cce: 687b ldr r3, [r7, #4] 8005cd0: f003 0303 and.w r3, r3, #3 8005cd4: 2b01 cmp r3, #1 8005cd6: d107 bne.n 8005ce8 { *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[4U * i]; /* Derogation MisraC2012 R.11.5 */ 8005cd8: 69fb ldr r3, [r7, #28] 8005cda: 009b lsls r3, r3, #2 8005cdc: 68ba ldr r2, [r7, #8] 8005cde: 4413 add r3, r2 8005ce0: 68fa ldr r2, [r7, #12] 8005ce2: 6812 ldr r2, [r2, #0] 8005ce4: 781b ldrb r3, [r3, #0] 8005ce6: 7013 strb r3, [r2, #0] } if ((BufferLength % 4U) == 2U) 8005ce8: 687b ldr r3, [r7, #4] 8005cea: f003 0303 and.w r3, r3, #3 8005cee: 2b02 cmp r3, #2 8005cf0: d116 bne.n 8005d20 { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 8005cf2: 69fb ldr r3, [r7, #28] 8005cf4: 009b lsls r3, r3, #2 8005cf6: 68ba ldr r2, [r7, #8] 8005cf8: 4413 add r3, r2 8005cfa: 781b ldrb r3, [r3, #0] 8005cfc: 021b lsls r3, r3, #8 8005cfe: b21a sxth r2, r3 8005d00: 69fb ldr r3, [r7, #28] 8005d02: 009b lsls r3, r3, #2 8005d04: 3301 adds r3, #1 8005d06: 68b9 ldr r1, [r7, #8] 8005d08: 440b add r3, r1 8005d0a: 781b ldrb r3, [r3, #0] 8005d0c: b21b sxth r3, r3 8005d0e: 4313 orrs r3, r2 8005d10: b21b sxth r3, r3 8005d12: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005d14: 68fb ldr r3, [r7, #12] 8005d16: 681b ldr r3, [r3, #0] 8005d18: 617b str r3, [r7, #20] *pReg = data; 8005d1a: 697b ldr r3, [r7, #20] 8005d1c: 8b7a ldrh r2, [r7, #26] 8005d1e: 801a strh r2, [r3, #0] } if ((BufferLength % 4U) == 3U) 8005d20: 687b ldr r3, [r7, #4] 8005d22: f003 0303 and.w r3, r3, #3 8005d26: 2b03 cmp r3, #3 8005d28: d11f bne.n 8005d6a { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 8005d2a: 69fb ldr r3, [r7, #28] 8005d2c: 009b lsls r3, r3, #2 8005d2e: 68ba ldr r2, [r7, #8] 8005d30: 4413 add r3, r2 8005d32: 781b ldrb r3, [r3, #0] 8005d34: 021b lsls r3, r3, #8 8005d36: b21a sxth r2, r3 8005d38: 69fb ldr r3, [r7, #28] 8005d3a: 009b lsls r3, r3, #2 8005d3c: 3301 adds r3, #1 8005d3e: 68b9 ldr r1, [r7, #8] 8005d40: 440b add r3, r1 8005d42: 781b ldrb r3, [r3, #0] 8005d44: b21b sxth r3, r3 8005d46: 4313 orrs r3, r2 8005d48: b21b sxth r3, r3 8005d4a: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005d4c: 68fb ldr r3, [r7, #12] 8005d4e: 681b ldr r3, [r3, #0] 8005d50: 617b str r3, [r7, #20] *pReg = data; 8005d52: 697b ldr r3, [r7, #20] 8005d54: 8b7a ldrh r2, [r7, #26] 8005d56: 801a strh r2, [r3, #0] *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[(4U * i) + 2U]; /* Derogation MisraC2012 R.11.5 */ 8005d58: 69fb ldr r3, [r7, #28] 8005d5a: 009b lsls r3, r3, #2 8005d5c: 3302 adds r3, #2 8005d5e: 68ba ldr r2, [r7, #8] 8005d60: 4413 add r3, r2 8005d62: 68fa ldr r2, [r7, #12] 8005d64: 6812 ldr r2, [r2, #0] 8005d66: 781b ldrb r3, [r3, #0] 8005d68: 7013 strb r3, [r2, #0] } } /* Return the CRC computed value */ return hcrc->Instance->DR; 8005d6a: 68fb ldr r3, [r7, #12] 8005d6c: 681b ldr r3, [r3, #0] 8005d6e: 681b ldr r3, [r3, #0] } 8005d70: 4618 mov r0, r3 8005d72: 3724 adds r7, #36 @ 0x24 8005d74: 46bd mov sp, r7 8005d76: f85d 7b04 ldr.w r7, [sp], #4 8005d7a: 4770 bx lr 08005d7c : * @param pBuffer pointer to the input data buffer * @param BufferLength input data buffer length * @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits) */ static uint32_t CRC_Handle_16(CRC_HandleTypeDef *hcrc, uint16_t pBuffer[], uint32_t BufferLength) { 8005d7c: b480 push {r7} 8005d7e: b087 sub sp, #28 8005d80: af00 add r7, sp, #0 8005d82: 60f8 str r0, [r7, #12] 8005d84: 60b9 str r1, [r7, #8] 8005d86: 607a str r2, [r7, #4] __IO uint16_t *pReg; /* Processing time optimization: 2 HalfWords are entered in a row with a single word write, * in case of odd length, last HalfWord must be carefully fed to the CRC calculator to ensure * a correct type handling by the peripheral */ for (i = 0U; i < (BufferLength / 2U); i++) 8005d88: 2300 movs r3, #0 8005d8a: 617b str r3, [r7, #20] 8005d8c: e013 b.n 8005db6 { hcrc->Instance->DR = ((uint32_t)pBuffer[2U * i] << 16U) | (uint32_t)pBuffer[(2U * i) + 1U]; 8005d8e: 697b ldr r3, [r7, #20] 8005d90: 009b lsls r3, r3, #2 8005d92: 68ba ldr r2, [r7, #8] 8005d94: 4413 add r3, r2 8005d96: 881b ldrh r3, [r3, #0] 8005d98: 041a lsls r2, r3, #16 8005d9a: 697b ldr r3, [r7, #20] 8005d9c: 009b lsls r3, r3, #2 8005d9e: 3302 adds r3, #2 8005da0: 68b9 ldr r1, [r7, #8] 8005da2: 440b add r3, r1 8005da4: 881b ldrh r3, [r3, #0] 8005da6: 4619 mov r1, r3 8005da8: 68fb ldr r3, [r7, #12] 8005daa: 681b ldr r3, [r3, #0] 8005dac: 430a orrs r2, r1 8005dae: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 2U); i++) 8005db0: 697b ldr r3, [r7, #20] 8005db2: 3301 adds r3, #1 8005db4: 617b str r3, [r7, #20] 8005db6: 687b ldr r3, [r7, #4] 8005db8: 085b lsrs r3, r3, #1 8005dba: 697a ldr r2, [r7, #20] 8005dbc: 429a cmp r2, r3 8005dbe: d3e6 bcc.n 8005d8e } if ((BufferLength % 2U) != 0U) 8005dc0: 687b ldr r3, [r7, #4] 8005dc2: f003 0301 and.w r3, r3, #1 8005dc6: 2b00 cmp r3, #0 8005dc8: d009 beq.n 8005dde { pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005dca: 68fb ldr r3, [r7, #12] 8005dcc: 681b ldr r3, [r3, #0] 8005dce: 613b str r3, [r7, #16] *pReg = pBuffer[2U * i]; 8005dd0: 697b ldr r3, [r7, #20] 8005dd2: 009b lsls r3, r3, #2 8005dd4: 68ba ldr r2, [r7, #8] 8005dd6: 4413 add r3, r2 8005dd8: 881a ldrh r2, [r3, #0] 8005dda: 693b ldr r3, [r7, #16] 8005ddc: 801a strh r2, [r3, #0] } /* Return the CRC computed value */ return hcrc->Instance->DR; 8005dde: 68fb ldr r3, [r7, #12] 8005de0: 681b ldr r3, [r3, #0] 8005de2: 681b ldr r3, [r3, #0] } 8005de4: 4618 mov r0, r3 8005de6: 371c adds r7, #28 8005de8: 46bd mov sp, r7 8005dea: f85d 7b04 ldr.w r7, [sp], #4 8005dee: 4770 bx lr 08005df0 : * @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) { 8005df0: b480 push {r7} 8005df2: b087 sub sp, #28 8005df4: af00 add r7, sp, #0 8005df6: 60f8 str r0, [r7, #12] 8005df8: 60b9 str r1, [r7, #8] 8005dfa: 607a str r2, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 8005dfc: 2300 movs r3, #0 8005dfe: 75fb strb r3, [r7, #23] uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */ 8005e00: 231f movs r3, #31 8005e02: 613b str r3, [r7, #16] /* Check the parameters */ assert_param(IS_CRC_POL_LENGTH(PolyLength)); /* Ensure that the generating polynomial is odd */ if ((Pol & (uint32_t)(0x1U)) == 0U) 8005e04: 68bb ldr r3, [r7, #8] 8005e06: f003 0301 and.w r3, r3, #1 8005e0a: 2b00 cmp r3, #0 8005e0c: d102 bne.n 8005e14 { status = HAL_ERROR; 8005e0e: 2301 movs r3, #1 8005e10: 75fb strb r3, [r7, #23] 8005e12: e063 b.n 8005edc * 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)) 8005e14: bf00 nop 8005e16: 693b ldr r3, [r7, #16] 8005e18: 1e5a subs r2, r3, #1 8005e1a: 613a str r2, [r7, #16] 8005e1c: 2b00 cmp r3, #0 8005e1e: d009 beq.n 8005e34 8005e20: 693b ldr r3, [r7, #16] 8005e22: f003 031f and.w r3, r3, #31 8005e26: 68ba ldr r2, [r7, #8] 8005e28: fa22 f303 lsr.w r3, r2, r3 8005e2c: f003 0301 and.w r3, r3, #1 8005e30: 2b00 cmp r3, #0 8005e32: d0f0 beq.n 8005e16 { } switch (PolyLength) 8005e34: 687b ldr r3, [r7, #4] 8005e36: 2b18 cmp r3, #24 8005e38: d846 bhi.n 8005ec8 8005e3a: a201 add r2, pc, #4 @ (adr r2, 8005e40 ) 8005e3c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8005e40: 08005ecf .word 0x08005ecf 8005e44: 08005ec9 .word 0x08005ec9 8005e48: 08005ec9 .word 0x08005ec9 8005e4c: 08005ec9 .word 0x08005ec9 8005e50: 08005ec9 .word 0x08005ec9 8005e54: 08005ec9 .word 0x08005ec9 8005e58: 08005ec9 .word 0x08005ec9 8005e5c: 08005ec9 .word 0x08005ec9 8005e60: 08005ebd .word 0x08005ebd 8005e64: 08005ec9 .word 0x08005ec9 8005e68: 08005ec9 .word 0x08005ec9 8005e6c: 08005ec9 .word 0x08005ec9 8005e70: 08005ec9 .word 0x08005ec9 8005e74: 08005ec9 .word 0x08005ec9 8005e78: 08005ec9 .word 0x08005ec9 8005e7c: 08005ec9 .word 0x08005ec9 8005e80: 08005eb1 .word 0x08005eb1 8005e84: 08005ec9 .word 0x08005ec9 8005e88: 08005ec9 .word 0x08005ec9 8005e8c: 08005ec9 .word 0x08005ec9 8005e90: 08005ec9 .word 0x08005ec9 8005e94: 08005ec9 .word 0x08005ec9 8005e98: 08005ec9 .word 0x08005ec9 8005e9c: 08005ec9 .word 0x08005ec9 8005ea0: 08005ea5 .word 0x08005ea5 { case CRC_POLYLENGTH_7B: if (msb >= HAL_CRC_LENGTH_7B) 8005ea4: 693b ldr r3, [r7, #16] 8005ea6: 2b06 cmp r3, #6 8005ea8: d913 bls.n 8005ed2 { status = HAL_ERROR; 8005eaa: 2301 movs r3, #1 8005eac: 75fb strb r3, [r7, #23] } break; 8005eae: e010 b.n 8005ed2 case CRC_POLYLENGTH_8B: if (msb >= HAL_CRC_LENGTH_8B) 8005eb0: 693b ldr r3, [r7, #16] 8005eb2: 2b07 cmp r3, #7 8005eb4: d90f bls.n 8005ed6 { status = HAL_ERROR; 8005eb6: 2301 movs r3, #1 8005eb8: 75fb strb r3, [r7, #23] } break; 8005eba: e00c b.n 8005ed6 case CRC_POLYLENGTH_16B: if (msb >= HAL_CRC_LENGTH_16B) 8005ebc: 693b ldr r3, [r7, #16] 8005ebe: 2b0f cmp r3, #15 8005ec0: d90b bls.n 8005eda { status = HAL_ERROR; 8005ec2: 2301 movs r3, #1 8005ec4: 75fb strb r3, [r7, #23] } break; 8005ec6: e008 b.n 8005eda case CRC_POLYLENGTH_32B: /* no polynomial definition vs. polynomial length issue possible */ break; default: status = HAL_ERROR; 8005ec8: 2301 movs r3, #1 8005eca: 75fb strb r3, [r7, #23] break; 8005ecc: e006 b.n 8005edc break; 8005ece: bf00 nop 8005ed0: e004 b.n 8005edc break; 8005ed2: bf00 nop 8005ed4: e002 b.n 8005edc break; 8005ed6: bf00 nop 8005ed8: e000 b.n 8005edc break; 8005eda: bf00 nop } } if (status == HAL_OK) 8005edc: 7dfb ldrb r3, [r7, #23] 8005ede: 2b00 cmp r3, #0 8005ee0: d10d bne.n 8005efe { /* set generating polynomial */ WRITE_REG(hcrc->Instance->POL, Pol); 8005ee2: 68fb ldr r3, [r7, #12] 8005ee4: 681b ldr r3, [r3, #0] 8005ee6: 68ba ldr r2, [r7, #8] 8005ee8: 615a str r2, [r3, #20] /* set generating polynomial size */ MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength); 8005eea: 68fb ldr r3, [r7, #12] 8005eec: 681b ldr r3, [r3, #0] 8005eee: 689b ldr r3, [r3, #8] 8005ef0: f023 0118 bic.w r1, r3, #24 8005ef4: 68fb ldr r3, [r7, #12] 8005ef6: 681b ldr r3, [r3, #0] 8005ef8: 687a ldr r2, [r7, #4] 8005efa: 430a orrs r2, r1 8005efc: 609a str r2, [r3, #8] } /* Return function status */ return status; 8005efe: 7dfb ldrb r3, [r7, #23] } 8005f00: 4618 mov r0, r3 8005f02: 371c adds r7, #28 8005f04: 46bd mov sp, r7 8005f06: f85d 7b04 ldr.w r7, [sp], #4 8005f0a: 4770 bx lr 08005f0c : * @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) { 8005f0c: b580 push {r7, lr} 8005f0e: b086 sub sp, #24 8005f10: af00 add r7, sp, #0 8005f12: 6078 str r0, [r7, #4] uint32_t registerValue; uint32_t tickstart = HAL_GetTick(); 8005f14: f7ff fc4c bl 80057b0 8005f18: 6138 str r0, [r7, #16] DMA_Base_Registers *regs_dma; BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 8005f1a: 687b ldr r3, [r7, #4] 8005f1c: 2b00 cmp r3, #0 8005f1e: d101 bne.n 8005f24 { return HAL_ERROR; 8005f20: 2301 movs r3, #1 8005f22: e316 b.n 8006552 assert_param(IS_DMA_PERIPHERAL_DATA_SIZE(hdma->Init.PeriphDataAlignment)); assert_param(IS_DMA_MEMORY_DATA_SIZE(hdma->Init.MemDataAlignment)); assert_param(IS_DMA_MODE(hdma->Init.Mode)); assert_param(IS_DMA_PRIORITY(hdma->Init.Priority)); if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8005f24: 687b ldr r3, [r7, #4] 8005f26: 681b ldr r3, [r3, #0] 8005f28: 4a66 ldr r2, [pc, #408] @ (80060c4 ) 8005f2a: 4293 cmp r3, r2 8005f2c: d04a beq.n 8005fc4 8005f2e: 687b ldr r3, [r7, #4] 8005f30: 681b ldr r3, [r3, #0] 8005f32: 4a65 ldr r2, [pc, #404] @ (80060c8 ) 8005f34: 4293 cmp r3, r2 8005f36: d045 beq.n 8005fc4 8005f38: 687b ldr r3, [r7, #4] 8005f3a: 681b ldr r3, [r3, #0] 8005f3c: 4a63 ldr r2, [pc, #396] @ (80060cc ) 8005f3e: 4293 cmp r3, r2 8005f40: d040 beq.n 8005fc4 8005f42: 687b ldr r3, [r7, #4] 8005f44: 681b ldr r3, [r3, #0] 8005f46: 4a62 ldr r2, [pc, #392] @ (80060d0 ) 8005f48: 4293 cmp r3, r2 8005f4a: d03b beq.n 8005fc4 8005f4c: 687b ldr r3, [r7, #4] 8005f4e: 681b ldr r3, [r3, #0] 8005f50: 4a60 ldr r2, [pc, #384] @ (80060d4 ) 8005f52: 4293 cmp r3, r2 8005f54: d036 beq.n 8005fc4 8005f56: 687b ldr r3, [r7, #4] 8005f58: 681b ldr r3, [r3, #0] 8005f5a: 4a5f ldr r2, [pc, #380] @ (80060d8 ) 8005f5c: 4293 cmp r3, r2 8005f5e: d031 beq.n 8005fc4 8005f60: 687b ldr r3, [r7, #4] 8005f62: 681b ldr r3, [r3, #0] 8005f64: 4a5d ldr r2, [pc, #372] @ (80060dc ) 8005f66: 4293 cmp r3, r2 8005f68: d02c beq.n 8005fc4 8005f6a: 687b ldr r3, [r7, #4] 8005f6c: 681b ldr r3, [r3, #0] 8005f6e: 4a5c ldr r2, [pc, #368] @ (80060e0 ) 8005f70: 4293 cmp r3, r2 8005f72: d027 beq.n 8005fc4 8005f74: 687b ldr r3, [r7, #4] 8005f76: 681b ldr r3, [r3, #0] 8005f78: 4a5a ldr r2, [pc, #360] @ (80060e4 ) 8005f7a: 4293 cmp r3, r2 8005f7c: d022 beq.n 8005fc4 8005f7e: 687b ldr r3, [r7, #4] 8005f80: 681b ldr r3, [r3, #0] 8005f82: 4a59 ldr r2, [pc, #356] @ (80060e8 ) 8005f84: 4293 cmp r3, r2 8005f86: d01d beq.n 8005fc4 8005f88: 687b ldr r3, [r7, #4] 8005f8a: 681b ldr r3, [r3, #0] 8005f8c: 4a57 ldr r2, [pc, #348] @ (80060ec ) 8005f8e: 4293 cmp r3, r2 8005f90: d018 beq.n 8005fc4 8005f92: 687b ldr r3, [r7, #4] 8005f94: 681b ldr r3, [r3, #0] 8005f96: 4a56 ldr r2, [pc, #344] @ (80060f0 ) 8005f98: 4293 cmp r3, r2 8005f9a: d013 beq.n 8005fc4 8005f9c: 687b ldr r3, [r7, #4] 8005f9e: 681b ldr r3, [r3, #0] 8005fa0: 4a54 ldr r2, [pc, #336] @ (80060f4 ) 8005fa2: 4293 cmp r3, r2 8005fa4: d00e beq.n 8005fc4 8005fa6: 687b ldr r3, [r7, #4] 8005fa8: 681b ldr r3, [r3, #0] 8005faa: 4a53 ldr r2, [pc, #332] @ (80060f8 ) 8005fac: 4293 cmp r3, r2 8005fae: d009 beq.n 8005fc4 8005fb0: 687b ldr r3, [r7, #4] 8005fb2: 681b ldr r3, [r3, #0] 8005fb4: 4a51 ldr r2, [pc, #324] @ (80060fc ) 8005fb6: 4293 cmp r3, r2 8005fb8: d004 beq.n 8005fc4 8005fba: 687b ldr r3, [r7, #4] 8005fbc: 681b ldr r3, [r3, #0] 8005fbe: 4a50 ldr r2, [pc, #320] @ (8006100 ) 8005fc0: 4293 cmp r3, r2 8005fc2: d101 bne.n 8005fc8 8005fc4: 2301 movs r3, #1 8005fc6: e000 b.n 8005fca 8005fc8: 2300 movs r3, #0 8005fca: 2b00 cmp r3, #0 8005fcc: f000 813b beq.w 8006246 assert_param(IS_DMA_MEMORY_BURST(hdma->Init.MemBurst)); assert_param(IS_DMA_PERIPHERAL_BURST(hdma->Init.PeriphBurst)); } /* Change DMA peripheral state */ hdma->State = HAL_DMA_STATE_BUSY; 8005fd0: 687b ldr r3, [r7, #4] 8005fd2: 2202 movs r2, #2 8005fd4: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 8005fd8: 687b ldr r3, [r7, #4] 8005fda: 2200 movs r2, #0 8005fdc: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Disable the peripheral */ __HAL_DMA_DISABLE(hdma); 8005fe0: 687b ldr r3, [r7, #4] 8005fe2: 681b ldr r3, [r3, #0] 8005fe4: 4a37 ldr r2, [pc, #220] @ (80060c4 ) 8005fe6: 4293 cmp r3, r2 8005fe8: d04a beq.n 8006080 8005fea: 687b ldr r3, [r7, #4] 8005fec: 681b ldr r3, [r3, #0] 8005fee: 4a36 ldr r2, [pc, #216] @ (80060c8 ) 8005ff0: 4293 cmp r3, r2 8005ff2: d045 beq.n 8006080 8005ff4: 687b ldr r3, [r7, #4] 8005ff6: 681b ldr r3, [r3, #0] 8005ff8: 4a34 ldr r2, [pc, #208] @ (80060cc ) 8005ffa: 4293 cmp r3, r2 8005ffc: d040 beq.n 8006080 8005ffe: 687b ldr r3, [r7, #4] 8006000: 681b ldr r3, [r3, #0] 8006002: 4a33 ldr r2, [pc, #204] @ (80060d0 ) 8006004: 4293 cmp r3, r2 8006006: d03b beq.n 8006080 8006008: 687b ldr r3, [r7, #4] 800600a: 681b ldr r3, [r3, #0] 800600c: 4a31 ldr r2, [pc, #196] @ (80060d4 ) 800600e: 4293 cmp r3, r2 8006010: d036 beq.n 8006080 8006012: 687b ldr r3, [r7, #4] 8006014: 681b ldr r3, [r3, #0] 8006016: 4a30 ldr r2, [pc, #192] @ (80060d8 ) 8006018: 4293 cmp r3, r2 800601a: d031 beq.n 8006080 800601c: 687b ldr r3, [r7, #4] 800601e: 681b ldr r3, [r3, #0] 8006020: 4a2e ldr r2, [pc, #184] @ (80060dc ) 8006022: 4293 cmp r3, r2 8006024: d02c beq.n 8006080 8006026: 687b ldr r3, [r7, #4] 8006028: 681b ldr r3, [r3, #0] 800602a: 4a2d ldr r2, [pc, #180] @ (80060e0 ) 800602c: 4293 cmp r3, r2 800602e: d027 beq.n 8006080 8006030: 687b ldr r3, [r7, #4] 8006032: 681b ldr r3, [r3, #0] 8006034: 4a2b ldr r2, [pc, #172] @ (80060e4 ) 8006036: 4293 cmp r3, r2 8006038: d022 beq.n 8006080 800603a: 687b ldr r3, [r7, #4] 800603c: 681b ldr r3, [r3, #0] 800603e: 4a2a ldr r2, [pc, #168] @ (80060e8 ) 8006040: 4293 cmp r3, r2 8006042: d01d beq.n 8006080 8006044: 687b ldr r3, [r7, #4] 8006046: 681b ldr r3, [r3, #0] 8006048: 4a28 ldr r2, [pc, #160] @ (80060ec ) 800604a: 4293 cmp r3, r2 800604c: d018 beq.n 8006080 800604e: 687b ldr r3, [r7, #4] 8006050: 681b ldr r3, [r3, #0] 8006052: 4a27 ldr r2, [pc, #156] @ (80060f0 ) 8006054: 4293 cmp r3, r2 8006056: d013 beq.n 8006080 8006058: 687b ldr r3, [r7, #4] 800605a: 681b ldr r3, [r3, #0] 800605c: 4a25 ldr r2, [pc, #148] @ (80060f4 ) 800605e: 4293 cmp r3, r2 8006060: d00e beq.n 8006080 8006062: 687b ldr r3, [r7, #4] 8006064: 681b ldr r3, [r3, #0] 8006066: 4a24 ldr r2, [pc, #144] @ (80060f8 ) 8006068: 4293 cmp r3, r2 800606a: d009 beq.n 8006080 800606c: 687b ldr r3, [r7, #4] 800606e: 681b ldr r3, [r3, #0] 8006070: 4a22 ldr r2, [pc, #136] @ (80060fc ) 8006072: 4293 cmp r3, r2 8006074: d004 beq.n 8006080 8006076: 687b ldr r3, [r7, #4] 8006078: 681b ldr r3, [r3, #0] 800607a: 4a21 ldr r2, [pc, #132] @ (8006100 ) 800607c: 4293 cmp r3, r2 800607e: d108 bne.n 8006092 8006080: 687b ldr r3, [r7, #4] 8006082: 681b ldr r3, [r3, #0] 8006084: 681a ldr r2, [r3, #0] 8006086: 687b ldr r3, [r7, #4] 8006088: 681b ldr r3, [r3, #0] 800608a: f022 0201 bic.w r2, r2, #1 800608e: 601a str r2, [r3, #0] 8006090: e007 b.n 80060a2 8006092: 687b ldr r3, [r7, #4] 8006094: 681b ldr r3, [r3, #0] 8006096: 681a ldr r2, [r3, #0] 8006098: 687b ldr r3, [r7, #4] 800609a: 681b ldr r3, [r3, #0] 800609c: f022 0201 bic.w r2, r2, #1 80060a0: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 80060a2: e02f b.n 8006104 { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 80060a4: f7ff fb84 bl 80057b0 80060a8: 4602 mov r2, r0 80060aa: 693b ldr r3, [r7, #16] 80060ac: 1ad3 subs r3, r2, r3 80060ae: 2b05 cmp r3, #5 80060b0: d928 bls.n 8006104 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 80060b2: 687b ldr r3, [r7, #4] 80060b4: 2220 movs r2, #32 80060b6: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 80060b8: 687b ldr r3, [r7, #4] 80060ba: 2203 movs r2, #3 80060bc: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 80060c0: 2301 movs r3, #1 80060c2: e246 b.n 8006552 80060c4: 40020010 .word 0x40020010 80060c8: 40020028 .word 0x40020028 80060cc: 40020040 .word 0x40020040 80060d0: 40020058 .word 0x40020058 80060d4: 40020070 .word 0x40020070 80060d8: 40020088 .word 0x40020088 80060dc: 400200a0 .word 0x400200a0 80060e0: 400200b8 .word 0x400200b8 80060e4: 40020410 .word 0x40020410 80060e8: 40020428 .word 0x40020428 80060ec: 40020440 .word 0x40020440 80060f0: 40020458 .word 0x40020458 80060f4: 40020470 .word 0x40020470 80060f8: 40020488 .word 0x40020488 80060fc: 400204a0 .word 0x400204a0 8006100: 400204b8 .word 0x400204b8 while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8006104: 687b ldr r3, [r7, #4] 8006106: 681b ldr r3, [r3, #0] 8006108: 681b ldr r3, [r3, #0] 800610a: f003 0301 and.w r3, r3, #1 800610e: 2b00 cmp r3, #0 8006110: d1c8 bne.n 80060a4 } } /* Get the CR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->CR; 8006112: 687b ldr r3, [r7, #4] 8006114: 681b ldr r3, [r3, #0] 8006116: 681b ldr r3, [r3, #0] 8006118: 617b str r3, [r7, #20] /* Clear CHSEL, MBURST, PBURST, PL, MSIZE, PSIZE, MINC, PINC, CIRC, DIR, CT and DBM bits */ registerValue &= ((uint32_t)~(DMA_SxCR_MBURST | DMA_SxCR_PBURST | \ 800611a: 697a ldr r2, [r7, #20] 800611c: 4b83 ldr r3, [pc, #524] @ (800632c ) 800611e: 4013 ands r3, r2 8006120: 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 */ registerValue |= hdma->Init.Direction | 8006122: 687b ldr r3, [r7, #4] 8006124: 689a ldr r2, [r3, #8] hdma->Init.PeriphInc | hdma->Init.MemInc | 8006126: 687b ldr r3, [r7, #4] 8006128: 68db ldr r3, [r3, #12] registerValue |= hdma->Init.Direction | 800612a: 431a orrs r2, r3 hdma->Init.PeriphInc | hdma->Init.MemInc | 800612c: 687b ldr r3, [r7, #4] 800612e: 691b ldr r3, [r3, #16] 8006130: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 8006132: 687b ldr r3, [r7, #4] 8006134: 695b ldr r3, [r3, #20] hdma->Init.PeriphInc | hdma->Init.MemInc | 8006136: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 8006138: 687b ldr r3, [r7, #4] 800613a: 699b ldr r3, [r3, #24] 800613c: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 800613e: 687b ldr r3, [r7, #4] 8006140: 69db ldr r3, [r3, #28] hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 8006142: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 8006144: 687b ldr r3, [r7, #4] 8006146: 6a1b ldr r3, [r3, #32] 8006148: 4313 orrs r3, r2 registerValue |= hdma->Init.Direction | 800614a: 697a ldr r2, [r7, #20] 800614c: 4313 orrs r3, r2 800614e: 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) 8006150: 687b ldr r3, [r7, #4] 8006152: 6a5b ldr r3, [r3, #36] @ 0x24 8006154: 2b04 cmp r3, #4 8006156: d107 bne.n 8006168 { /* Get memory burst and peripheral burst */ registerValue |= hdma->Init.MemBurst | hdma->Init.PeriphBurst; 8006158: 687b ldr r3, [r7, #4] 800615a: 6ada ldr r2, [r3, #44] @ 0x2c 800615c: 687b ldr r3, [r7, #4] 800615e: 6b1b ldr r3, [r3, #48] @ 0x30 8006160: 4313 orrs r3, r2 8006162: 697a ldr r2, [r7, #20] 8006164: 4313 orrs r3, r2 8006166: 617b str r3, [r7, #20] } /* Work around for Errata 2.22: UART/USART- DMA transfer lock: DMA stream could be lock when transferring data to/from USART/UART */ #if (STM32H7_DEV_ID == 0x450UL) if((DBGMCU->IDCODE & 0xFFFF0000U) >= 0x20000000U) 8006168: 4b71 ldr r3, [pc, #452] @ (8006330 ) 800616a: 681a ldr r2, [r3, #0] 800616c: 4b71 ldr r3, [pc, #452] @ (8006334 ) 800616e: 4013 ands r3, r2 8006170: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 8006174: d328 bcc.n 80061c8 { #endif /* STM32H7_DEV_ID == 0x450UL */ if(IS_DMA_UART_USART_REQUEST(hdma->Init.Request) != 0U) 8006176: 687b ldr r3, [r7, #4] 8006178: 685b ldr r3, [r3, #4] 800617a: 2b28 cmp r3, #40 @ 0x28 800617c: d903 bls.n 8006186 800617e: 687b ldr r3, [r7, #4] 8006180: 685b ldr r3, [r3, #4] 8006182: 2b2e cmp r3, #46 @ 0x2e 8006184: d917 bls.n 80061b6 8006186: 687b ldr r3, [r7, #4] 8006188: 685b ldr r3, [r3, #4] 800618a: 2b3e cmp r3, #62 @ 0x3e 800618c: d903 bls.n 8006196 800618e: 687b ldr r3, [r7, #4] 8006190: 685b ldr r3, [r3, #4] 8006192: 2b42 cmp r3, #66 @ 0x42 8006194: d90f bls.n 80061b6 8006196: 687b ldr r3, [r7, #4] 8006198: 685b ldr r3, [r3, #4] 800619a: 2b46 cmp r3, #70 @ 0x46 800619c: d903 bls.n 80061a6 800619e: 687b ldr r3, [r7, #4] 80061a0: 685b ldr r3, [r3, #4] 80061a2: 2b48 cmp r3, #72 @ 0x48 80061a4: d907 bls.n 80061b6 80061a6: 687b ldr r3, [r7, #4] 80061a8: 685b ldr r3, [r3, #4] 80061aa: 2b4e cmp r3, #78 @ 0x4e 80061ac: d905 bls.n 80061ba 80061ae: 687b ldr r3, [r7, #4] 80061b0: 685b ldr r3, [r3, #4] 80061b2: 2b52 cmp r3, #82 @ 0x52 80061b4: d801 bhi.n 80061ba 80061b6: 2301 movs r3, #1 80061b8: e000 b.n 80061bc 80061ba: 2300 movs r3, #0 80061bc: 2b00 cmp r3, #0 80061be: d003 beq.n 80061c8 { registerValue |= DMA_SxCR_TRBUFF; 80061c0: 697b ldr r3, [r7, #20] 80061c2: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 80061c6: 617b str r3, [r7, #20] #if (STM32H7_DEV_ID == 0x450UL) } #endif /* STM32H7_DEV_ID == 0x450UL */ /* Write to DMA Stream CR register */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR = registerValue; 80061c8: 687b ldr r3, [r7, #4] 80061ca: 681b ldr r3, [r3, #0] 80061cc: 697a ldr r2, [r7, #20] 80061ce: 601a str r2, [r3, #0] /* Get the FCR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->FCR; 80061d0: 687b ldr r3, [r7, #4] 80061d2: 681b ldr r3, [r3, #0] 80061d4: 695b ldr r3, [r3, #20] 80061d6: 617b str r3, [r7, #20] /* Clear Direct mode and FIFO threshold bits */ registerValue &= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH); 80061d8: 697b ldr r3, [r7, #20] 80061da: f023 0307 bic.w r3, r3, #7 80061de: 617b str r3, [r7, #20] /* Prepare the DMA Stream FIFO configuration */ registerValue |= hdma->Init.FIFOMode; 80061e0: 687b ldr r3, [r7, #4] 80061e2: 6a5b ldr r3, [r3, #36] @ 0x24 80061e4: 697a ldr r2, [r7, #20] 80061e6: 4313 orrs r3, r2 80061e8: 617b str r3, [r7, #20] /* the FIFO threshold is not used when the FIFO mode is disabled */ if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE) 80061ea: 687b ldr r3, [r7, #4] 80061ec: 6a5b ldr r3, [r3, #36] @ 0x24 80061ee: 2b04 cmp r3, #4 80061f0: d117 bne.n 8006222 { /* Get the FIFO threshold */ registerValue |= hdma->Init.FIFOThreshold; 80061f2: 687b ldr r3, [r7, #4] 80061f4: 6a9b ldr r3, [r3, #40] @ 0x28 80061f6: 697a ldr r2, [r7, #20] 80061f8: 4313 orrs r3, r2 80061fa: 617b str r3, [r7, #20] /* Check compatibility between FIFO threshold level and size of the memory burst */ /* for INCR4, INCR8, INCR16 */ if(hdma->Init.MemBurst != DMA_MBURST_SINGLE) 80061fc: 687b ldr r3, [r7, #4] 80061fe: 6adb ldr r3, [r3, #44] @ 0x2c 8006200: 2b00 cmp r3, #0 8006202: d00e beq.n 8006222 { if (DMA_CheckFifoParam(hdma) != HAL_OK) 8006204: 6878 ldr r0, [r7, #4] 8006206: f001 ff1d bl 8008044 800620a: 4603 mov r3, r0 800620c: 2b00 cmp r3, #0 800620e: d008 beq.n 8006222 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 8006210: 687b ldr r3, [r7, #4] 8006212: 2240 movs r2, #64 @ 0x40 8006214: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8006216: 687b ldr r3, [r7, #4] 8006218: 2201 movs r2, #1 800621a: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 800621e: 2301 movs r3, #1 8006220: e197 b.n 8006552 } } } /* Write to DMA Stream FCR */ ((DMA_Stream_TypeDef *)hdma->Instance)->FCR = registerValue; 8006222: 687b ldr r3, [r7, #4] 8006224: 681b ldr r3, [r3, #0] 8006226: 697a ldr r2, [r7, #20] 8006228: 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 = (DMA_Base_Registers *)DMA_CalcBaseAndBitshift(hdma); 800622a: 6878 ldr r0, [r7, #4] 800622c: f001 fe58 bl 8007ee0 8006230: 4603 mov r3, r0 8006232: 60bb str r3, [r7, #8] /* Clear all interrupt flags */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 8006234: 687b ldr r3, [r7, #4] 8006236: 6ddb ldr r3, [r3, #92] @ 0x5c 8006238: f003 031f and.w r3, r3, #31 800623c: 223f movs r2, #63 @ 0x3f 800623e: 409a lsls r2, r3 8006240: 68bb ldr r3, [r7, #8] 8006242: 609a str r2, [r3, #8] 8006244: e0cd b.n 80063e2 } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 8006246: 687b ldr r3, [r7, #4] 8006248: 681b ldr r3, [r3, #0] 800624a: 4a3b ldr r2, [pc, #236] @ (8006338 ) 800624c: 4293 cmp r3, r2 800624e: d022 beq.n 8006296 8006250: 687b ldr r3, [r7, #4] 8006252: 681b ldr r3, [r3, #0] 8006254: 4a39 ldr r2, [pc, #228] @ (800633c ) 8006256: 4293 cmp r3, r2 8006258: d01d beq.n 8006296 800625a: 687b ldr r3, [r7, #4] 800625c: 681b ldr r3, [r3, #0] 800625e: 4a38 ldr r2, [pc, #224] @ (8006340 ) 8006260: 4293 cmp r3, r2 8006262: d018 beq.n 8006296 8006264: 687b ldr r3, [r7, #4] 8006266: 681b ldr r3, [r3, #0] 8006268: 4a36 ldr r2, [pc, #216] @ (8006344 ) 800626a: 4293 cmp r3, r2 800626c: d013 beq.n 8006296 800626e: 687b ldr r3, [r7, #4] 8006270: 681b ldr r3, [r3, #0] 8006272: 4a35 ldr r2, [pc, #212] @ (8006348 ) 8006274: 4293 cmp r3, r2 8006276: d00e beq.n 8006296 8006278: 687b ldr r3, [r7, #4] 800627a: 681b ldr r3, [r3, #0] 800627c: 4a33 ldr r2, [pc, #204] @ (800634c ) 800627e: 4293 cmp r3, r2 8006280: d009 beq.n 8006296 8006282: 687b ldr r3, [r7, #4] 8006284: 681b ldr r3, [r3, #0] 8006286: 4a32 ldr r2, [pc, #200] @ (8006350 ) 8006288: 4293 cmp r3, r2 800628a: d004 beq.n 8006296 800628c: 687b ldr r3, [r7, #4] 800628e: 681b ldr r3, [r3, #0] 8006290: 4a30 ldr r2, [pc, #192] @ (8006354 ) 8006292: 4293 cmp r3, r2 8006294: d101 bne.n 800629a 8006296: 2301 movs r3, #1 8006298: e000 b.n 800629c 800629a: 2300 movs r3, #0 800629c: 2b00 cmp r3, #0 800629e: f000 8097 beq.w 80063d0 { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 80062a2: 687b ldr r3, [r7, #4] 80062a4: 681b ldr r3, [r3, #0] 80062a6: 4a24 ldr r2, [pc, #144] @ (8006338 ) 80062a8: 4293 cmp r3, r2 80062aa: d021 beq.n 80062f0 80062ac: 687b ldr r3, [r7, #4] 80062ae: 681b ldr r3, [r3, #0] 80062b0: 4a22 ldr r2, [pc, #136] @ (800633c ) 80062b2: 4293 cmp r3, r2 80062b4: d01c beq.n 80062f0 80062b6: 687b ldr r3, [r7, #4] 80062b8: 681b ldr r3, [r3, #0] 80062ba: 4a21 ldr r2, [pc, #132] @ (8006340 ) 80062bc: 4293 cmp r3, r2 80062be: d017 beq.n 80062f0 80062c0: 687b ldr r3, [r7, #4] 80062c2: 681b ldr r3, [r3, #0] 80062c4: 4a1f ldr r2, [pc, #124] @ (8006344 ) 80062c6: 4293 cmp r3, r2 80062c8: d012 beq.n 80062f0 80062ca: 687b ldr r3, [r7, #4] 80062cc: 681b ldr r3, [r3, #0] 80062ce: 4a1e ldr r2, [pc, #120] @ (8006348 ) 80062d0: 4293 cmp r3, r2 80062d2: d00d beq.n 80062f0 80062d4: 687b ldr r3, [r7, #4] 80062d6: 681b ldr r3, [r3, #0] 80062d8: 4a1c ldr r2, [pc, #112] @ (800634c ) 80062da: 4293 cmp r3, r2 80062dc: d008 beq.n 80062f0 80062de: 687b ldr r3, [r7, #4] 80062e0: 681b ldr r3, [r3, #0] 80062e2: 4a1b ldr r2, [pc, #108] @ (8006350 ) 80062e4: 4293 cmp r3, r2 80062e6: d003 beq.n 80062f0 80062e8: 687b ldr r3, [r7, #4] 80062ea: 681b ldr r3, [r3, #0] 80062ec: 4a19 ldr r2, [pc, #100] @ (8006354 ) 80062ee: 4293 cmp r3, r2 /* Check the request parameter */ assert_param(IS_BDMA_REQUEST(hdma->Init.Request)); } /* Change DMA peripheral state */ hdma->State = HAL_DMA_STATE_BUSY; 80062f0: 687b ldr r3, [r7, #4] 80062f2: 2202 movs r2, #2 80062f4: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 80062f8: 687b ldr r3, [r7, #4] 80062fa: 2200 movs r2, #0 80062fc: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Get the CR register value */ registerValue = ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR; 8006300: 687b ldr r3, [r7, #4] 8006302: 681b ldr r3, [r3, #0] 8006304: 681b ldr r3, [r3, #0] 8006306: 617b str r3, [r7, #20] /* Clear PL, MSIZE, PSIZE, MINC, PINC, CIRC, DIR, MEM2MEM, DBM and CT bits */ registerValue &= ((uint32_t)~(BDMA_CCR_PL | BDMA_CCR_MSIZE | BDMA_CCR_PSIZE | \ 8006308: 697a ldr r2, [r7, #20] 800630a: 4b13 ldr r3, [pc, #76] @ (8006358 ) 800630c: 4013 ands r3, r2 800630e: 617b str r3, [r7, #20] BDMA_CCR_MINC | BDMA_CCR_PINC | BDMA_CCR_CIRC | \ BDMA_CCR_DIR | BDMA_CCR_MEM2MEM | BDMA_CCR_DBM | \ BDMA_CCR_CT)); /* Prepare the DMA Channel configuration */ registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 8006310: 687b ldr r3, [r7, #4] 8006312: 689b ldr r3, [r3, #8] 8006314: 2b40 cmp r3, #64 @ 0x40 8006316: d021 beq.n 800635c 8006318: 687b ldr r3, [r7, #4] 800631a: 689b ldr r3, [r3, #8] 800631c: 2b80 cmp r3, #128 @ 0x80 800631e: d102 bne.n 8006326 8006320: f44f 4380 mov.w r3, #16384 @ 0x4000 8006324: e01b b.n 800635e 8006326: 2300 movs r3, #0 8006328: e019 b.n 800635e 800632a: bf00 nop 800632c: fe10803f .word 0xfe10803f 8006330: 5c001000 .word 0x5c001000 8006334: ffff0000 .word 0xffff0000 8006338: 58025408 .word 0x58025408 800633c: 5802541c .word 0x5802541c 8006340: 58025430 .word 0x58025430 8006344: 58025444 .word 0x58025444 8006348: 58025458 .word 0x58025458 800634c: 5802546c .word 0x5802546c 8006350: 58025480 .word 0x58025480 8006354: 58025494 .word 0x58025494 8006358: fffe000f .word 0xfffe000f 800635c: 2310 movs r3, #16 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 800635e: 687a ldr r2, [r7, #4] 8006360: 68d2 ldr r2, [r2, #12] 8006362: 08d2 lsrs r2, r2, #3 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 8006364: 431a orrs r2, r3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 8006366: 687b ldr r3, [r7, #4] 8006368: 691b ldr r3, [r3, #16] 800636a: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 800636c: 431a orrs r2, r3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 800636e: 687b ldr r3, [r7, #4] 8006370: 695b ldr r3, [r3, #20] 8006372: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 8006374: 431a orrs r2, r3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8006376: 687b ldr r3, [r7, #4] 8006378: 699b ldr r3, [r3, #24] 800637a: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 800637c: 431a orrs r2, r3 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 800637e: 687b ldr r3, [r7, #4] 8006380: 69db ldr r3, [r3, #28] 8006382: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8006384: 431a orrs r2, r3 DMA_TO_BDMA_PRIORITY(hdma->Init.Priority); 8006386: 687b ldr r3, [r7, #4] 8006388: 6a1b ldr r3, [r3, #32] 800638a: 091b lsrs r3, r3, #4 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 800638c: 4313 orrs r3, r2 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 800638e: 697a ldr r2, [r7, #20] 8006390: 4313 orrs r3, r2 8006392: 617b str r3, [r7, #20] /* Write to DMA Channel CR register */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR = registerValue; 8006394: 687b ldr r3, [r7, #4] 8006396: 681b ldr r3, [r3, #0] 8006398: 697a ldr r2, [r7, #20] 800639a: 601a str r2, [r3, #0] /* calculation of the channel index */ hdma->StreamIndex = (((uint32_t)((uint32_t*)hdma->Instance) - (uint32_t)BDMA_Channel0) / ((uint32_t)BDMA_Channel1 - (uint32_t)BDMA_Channel0)) << 2U; 800639c: 687b ldr r3, [r7, #4] 800639e: 681b ldr r3, [r3, #0] 80063a0: 461a mov r2, r3 80063a2: 4b6e ldr r3, [pc, #440] @ (800655c ) 80063a4: 4413 add r3, r2 80063a6: 4a6e ldr r2, [pc, #440] @ (8006560 ) 80063a8: fba2 2303 umull r2, r3, r2, r3 80063ac: 091b lsrs r3, r3, #4 80063ae: 009a lsls r2, r3, #2 80063b0: 687b ldr r3, [r7, #4] 80063b2: 65da str r2, [r3, #92] @ 0x5c /* Initialize StreamBaseAddress and StreamIndex parameters to be used to calculate DMA steam Base Address needed by HAL_DMA_IRQHandler() and HAL_DMA_PollForTransfer() */ regs_bdma = (BDMA_Base_Registers *)DMA_CalcBaseAndBitshift(hdma); 80063b4: 6878 ldr r0, [r7, #4] 80063b6: f001 fd93 bl 8007ee0 80063ba: 4603 mov r3, r0 80063bc: 60fb str r3, [r7, #12] /* Clear all interrupt flags */ regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 80063be: 687b ldr r3, [r7, #4] 80063c0: 6ddb ldr r3, [r3, #92] @ 0x5c 80063c2: f003 031f and.w r3, r3, #31 80063c6: 2201 movs r2, #1 80063c8: 409a lsls r2, r3 80063ca: 68fb ldr r3, [r7, #12] 80063cc: 605a str r2, [r3, #4] 80063ce: e008 b.n 80063e2 } else { hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 80063d0: 687b ldr r3, [r7, #4] 80063d2: 2240 movs r2, #64 @ 0x40 80063d4: 655a str r2, [r3, #84] @ 0x54 hdma->State = HAL_DMA_STATE_ERROR; 80063d6: 687b ldr r3, [r7, #4] 80063d8: 2203 movs r2, #3 80063da: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 80063de: 2301 movs r3, #1 80063e0: e0b7 b.n 8006552 } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 80063e2: 687b ldr r3, [r7, #4] 80063e4: 681b ldr r3, [r3, #0] 80063e6: 4a5f ldr r2, [pc, #380] @ (8006564 ) 80063e8: 4293 cmp r3, r2 80063ea: d072 beq.n 80064d2 80063ec: 687b ldr r3, [r7, #4] 80063ee: 681b ldr r3, [r3, #0] 80063f0: 4a5d ldr r2, [pc, #372] @ (8006568 ) 80063f2: 4293 cmp r3, r2 80063f4: d06d beq.n 80064d2 80063f6: 687b ldr r3, [r7, #4] 80063f8: 681b ldr r3, [r3, #0] 80063fa: 4a5c ldr r2, [pc, #368] @ (800656c ) 80063fc: 4293 cmp r3, r2 80063fe: d068 beq.n 80064d2 8006400: 687b ldr r3, [r7, #4] 8006402: 681b ldr r3, [r3, #0] 8006404: 4a5a ldr r2, [pc, #360] @ (8006570 ) 8006406: 4293 cmp r3, r2 8006408: d063 beq.n 80064d2 800640a: 687b ldr r3, [r7, #4] 800640c: 681b ldr r3, [r3, #0] 800640e: 4a59 ldr r2, [pc, #356] @ (8006574 ) 8006410: 4293 cmp r3, r2 8006412: d05e beq.n 80064d2 8006414: 687b ldr r3, [r7, #4] 8006416: 681b ldr r3, [r3, #0] 8006418: 4a57 ldr r2, [pc, #348] @ (8006578 ) 800641a: 4293 cmp r3, r2 800641c: d059 beq.n 80064d2 800641e: 687b ldr r3, [r7, #4] 8006420: 681b ldr r3, [r3, #0] 8006422: 4a56 ldr r2, [pc, #344] @ (800657c ) 8006424: 4293 cmp r3, r2 8006426: d054 beq.n 80064d2 8006428: 687b ldr r3, [r7, #4] 800642a: 681b ldr r3, [r3, #0] 800642c: 4a54 ldr r2, [pc, #336] @ (8006580 ) 800642e: 4293 cmp r3, r2 8006430: d04f beq.n 80064d2 8006432: 687b ldr r3, [r7, #4] 8006434: 681b ldr r3, [r3, #0] 8006436: 4a53 ldr r2, [pc, #332] @ (8006584 ) 8006438: 4293 cmp r3, r2 800643a: d04a beq.n 80064d2 800643c: 687b ldr r3, [r7, #4] 800643e: 681b ldr r3, [r3, #0] 8006440: 4a51 ldr r2, [pc, #324] @ (8006588 ) 8006442: 4293 cmp r3, r2 8006444: d045 beq.n 80064d2 8006446: 687b ldr r3, [r7, #4] 8006448: 681b ldr r3, [r3, #0] 800644a: 4a50 ldr r2, [pc, #320] @ (800658c ) 800644c: 4293 cmp r3, r2 800644e: d040 beq.n 80064d2 8006450: 687b ldr r3, [r7, #4] 8006452: 681b ldr r3, [r3, #0] 8006454: 4a4e ldr r2, [pc, #312] @ (8006590 ) 8006456: 4293 cmp r3, r2 8006458: d03b beq.n 80064d2 800645a: 687b ldr r3, [r7, #4] 800645c: 681b ldr r3, [r3, #0] 800645e: 4a4d ldr r2, [pc, #308] @ (8006594 ) 8006460: 4293 cmp r3, r2 8006462: d036 beq.n 80064d2 8006464: 687b ldr r3, [r7, #4] 8006466: 681b ldr r3, [r3, #0] 8006468: 4a4b ldr r2, [pc, #300] @ (8006598 ) 800646a: 4293 cmp r3, r2 800646c: d031 beq.n 80064d2 800646e: 687b ldr r3, [r7, #4] 8006470: 681b ldr r3, [r3, #0] 8006472: 4a4a ldr r2, [pc, #296] @ (800659c ) 8006474: 4293 cmp r3, r2 8006476: d02c beq.n 80064d2 8006478: 687b ldr r3, [r7, #4] 800647a: 681b ldr r3, [r3, #0] 800647c: 4a48 ldr r2, [pc, #288] @ (80065a0 ) 800647e: 4293 cmp r3, r2 8006480: d027 beq.n 80064d2 8006482: 687b ldr r3, [r7, #4] 8006484: 681b ldr r3, [r3, #0] 8006486: 4a47 ldr r2, [pc, #284] @ (80065a4 ) 8006488: 4293 cmp r3, r2 800648a: d022 beq.n 80064d2 800648c: 687b ldr r3, [r7, #4] 800648e: 681b ldr r3, [r3, #0] 8006490: 4a45 ldr r2, [pc, #276] @ (80065a8 ) 8006492: 4293 cmp r3, r2 8006494: d01d beq.n 80064d2 8006496: 687b ldr r3, [r7, #4] 8006498: 681b ldr r3, [r3, #0] 800649a: 4a44 ldr r2, [pc, #272] @ (80065ac ) 800649c: 4293 cmp r3, r2 800649e: d018 beq.n 80064d2 80064a0: 687b ldr r3, [r7, #4] 80064a2: 681b ldr r3, [r3, #0] 80064a4: 4a42 ldr r2, [pc, #264] @ (80065b0 ) 80064a6: 4293 cmp r3, r2 80064a8: d013 beq.n 80064d2 80064aa: 687b ldr r3, [r7, #4] 80064ac: 681b ldr r3, [r3, #0] 80064ae: 4a41 ldr r2, [pc, #260] @ (80065b4 ) 80064b0: 4293 cmp r3, r2 80064b2: d00e beq.n 80064d2 80064b4: 687b ldr r3, [r7, #4] 80064b6: 681b ldr r3, [r3, #0] 80064b8: 4a3f ldr r2, [pc, #252] @ (80065b8 ) 80064ba: 4293 cmp r3, r2 80064bc: d009 beq.n 80064d2 80064be: 687b ldr r3, [r7, #4] 80064c0: 681b ldr r3, [r3, #0] 80064c2: 4a3e ldr r2, [pc, #248] @ (80065bc ) 80064c4: 4293 cmp r3, r2 80064c6: d004 beq.n 80064d2 80064c8: 687b ldr r3, [r7, #4] 80064ca: 681b ldr r3, [r3, #0] 80064cc: 4a3c ldr r2, [pc, #240] @ (80065c0 ) 80064ce: 4293 cmp r3, r2 80064d0: d101 bne.n 80064d6 80064d2: 2301 movs r3, #1 80064d4: e000 b.n 80064d8 80064d6: 2300 movs r3, #0 80064d8: 2b00 cmp r3, #0 80064da: d032 beq.n 8006542 { /* Initialize parameters for DMAMUX channel : DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */ DMA_CalcDMAMUXChannelBaseAndMask(hdma); 80064dc: 6878 ldr r0, [r7, #4] 80064de: f001 fe2d bl 800813c if(hdma->Init.Direction == DMA_MEMORY_TO_MEMORY) 80064e2: 687b ldr r3, [r7, #4] 80064e4: 689b ldr r3, [r3, #8] 80064e6: 2b80 cmp r3, #128 @ 0x80 80064e8: d102 bne.n 80064f0 { /* if memory to memory force the request to 0*/ hdma->Init.Request = DMA_REQUEST_MEM2MEM; 80064ea: 687b ldr r3, [r7, #4] 80064ec: 2200 movs r2, #0 80064ee: 605a str r2, [r3, #4] } /* Set peripheral request to DMAMUX channel */ hdma->DMAmuxChannel->CCR = (hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID); 80064f0: 687b ldr r3, [r7, #4] 80064f2: 685a ldr r2, [r3, #4] 80064f4: 687b ldr r3, [r7, #4] 80064f6: 6e1b ldr r3, [r3, #96] @ 0x60 80064f8: b2d2 uxtb r2, r2 80064fa: 601a str r2, [r3, #0] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 80064fc: 687b ldr r3, [r7, #4] 80064fe: 6e5b ldr r3, [r3, #100] @ 0x64 8006500: 687a ldr r2, [r7, #4] 8006502: 6e92 ldr r2, [r2, #104] @ 0x68 8006504: 605a str r2, [r3, #4] /* Initialize parameters for DMAMUX request generator : if the DMA request is DMA_REQUEST_GENERATOR0 to DMA_REQUEST_GENERATOR7 */ if((hdma->Init.Request >= DMA_REQUEST_GENERATOR0) && (hdma->Init.Request <= DMA_REQUEST_GENERATOR7)) 8006506: 687b ldr r3, [r7, #4] 8006508: 685b ldr r3, [r3, #4] 800650a: 2b00 cmp r3, #0 800650c: d010 beq.n 8006530 800650e: 687b ldr r3, [r7, #4] 8006510: 685b ldr r3, [r3, #4] 8006512: 2b08 cmp r3, #8 8006514: d80c bhi.n 8006530 { /* Initialize parameters for DMAMUX request generator : DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask */ DMA_CalcDMAMUXRequestGenBaseAndMask(hdma); 8006516: 6878 ldr r0, [r7, #4] 8006518: f001 feaa bl 8008270 /* Reset the DMAMUX request generator register */ hdma->DMAmuxRequestGen->RGCR = 0U; 800651c: 687b ldr r3, [r7, #4] 800651e: 6edb ldr r3, [r3, #108] @ 0x6c 8006520: 2200 movs r2, #0 8006522: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 8006524: 687b ldr r3, [r7, #4] 8006526: 6f1b ldr r3, [r3, #112] @ 0x70 8006528: 687a ldr r2, [r7, #4] 800652a: 6f52 ldr r2, [r2, #116] @ 0x74 800652c: 605a str r2, [r3, #4] 800652e: e008 b.n 8006542 } else { hdma->DMAmuxRequestGen = 0U; 8006530: 687b ldr r3, [r7, #4] 8006532: 2200 movs r2, #0 8006534: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = 0U; 8006536: 687b ldr r3, [r7, #4] 8006538: 2200 movs r2, #0 800653a: 671a str r2, [r3, #112] @ 0x70 hdma->DMAmuxRequestGenStatusMask = 0U; 800653c: 687b ldr r3, [r7, #4] 800653e: 2200 movs r2, #0 8006540: 675a str r2, [r3, #116] @ 0x74 } } /* Initialize the error code */ hdma->ErrorCode = HAL_DMA_ERROR_NONE; 8006542: 687b ldr r3, [r7, #4] 8006544: 2200 movs r2, #0 8006546: 655a str r2, [r3, #84] @ 0x54 /* Initialize the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8006548: 687b ldr r3, [r7, #4] 800654a: 2201 movs r2, #1 800654c: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_OK; 8006550: 2300 movs r3, #0 } 8006552: 4618 mov r0, r3 8006554: 3718 adds r7, #24 8006556: 46bd mov sp, r7 8006558: bd80 pop {r7, pc} 800655a: bf00 nop 800655c: a7fdabf8 .word 0xa7fdabf8 8006560: cccccccd .word 0xcccccccd 8006564: 40020010 .word 0x40020010 8006568: 40020028 .word 0x40020028 800656c: 40020040 .word 0x40020040 8006570: 40020058 .word 0x40020058 8006574: 40020070 .word 0x40020070 8006578: 40020088 .word 0x40020088 800657c: 400200a0 .word 0x400200a0 8006580: 400200b8 .word 0x400200b8 8006584: 40020410 .word 0x40020410 8006588: 40020428 .word 0x40020428 800658c: 40020440 .word 0x40020440 8006590: 40020458 .word 0x40020458 8006594: 40020470 .word 0x40020470 8006598: 40020488 .word 0x40020488 800659c: 400204a0 .word 0x400204a0 80065a0: 400204b8 .word 0x400204b8 80065a4: 58025408 .word 0x58025408 80065a8: 5802541c .word 0x5802541c 80065ac: 58025430 .word 0x58025430 80065b0: 58025444 .word 0x58025444 80065b4: 58025458 .word 0x58025458 80065b8: 5802546c .word 0x5802546c 80065bc: 58025480 .word 0x58025480 80065c0: 58025494 .word 0x58025494 080065c4 : * and the Stream will be effectively disabled only after the transfer of * this single data is finished. * @retval HAL status */ HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma) { 80065c4: b580 push {r7, lr} 80065c6: b086 sub sp, #24 80065c8: af00 add r7, sp, #0 80065ca: 6078 str r0, [r7, #4] /* calculate DMA base and stream number */ DMA_Base_Registers *regs_dma; BDMA_Base_Registers *regs_bdma; const __IO uint32_t *enableRegister; uint32_t tickstart = HAL_GetTick(); 80065cc: f7ff f8f0 bl 80057b0 80065d0: 6138 str r0, [r7, #16] /* Check the DMA peripheral handle */ if(hdma == NULL) 80065d2: 687b ldr r3, [r7, #4] 80065d4: 2b00 cmp r3, #0 80065d6: d101 bne.n 80065dc { return HAL_ERROR; 80065d8: 2301 movs r3, #1 80065da: e2dc b.n 8006b96 } /* Check the DMA peripheral state */ if(hdma->State != HAL_DMA_STATE_BUSY) 80065dc: 687b ldr r3, [r7, #4] 80065de: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 80065e2: b2db uxtb r3, r3 80065e4: 2b02 cmp r3, #2 80065e6: d008 beq.n 80065fa { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 80065e8: 687b ldr r3, [r7, #4] 80065ea: 2280 movs r2, #128 @ 0x80 80065ec: 655a str r2, [r3, #84] @ 0x54 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80065ee: 687b ldr r3, [r7, #4] 80065f0: 2200 movs r2, #0 80065f2: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 80065f6: 2301 movs r3, #1 80065f8: e2cd b.n 8006b96 } else { /* Disable all the transfer interrupts */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 80065fa: 687b ldr r3, [r7, #4] 80065fc: 681b ldr r3, [r3, #0] 80065fe: 4a76 ldr r2, [pc, #472] @ (80067d8 ) 8006600: 4293 cmp r3, r2 8006602: d04a beq.n 800669a 8006604: 687b ldr r3, [r7, #4] 8006606: 681b ldr r3, [r3, #0] 8006608: 4a74 ldr r2, [pc, #464] @ (80067dc ) 800660a: 4293 cmp r3, r2 800660c: d045 beq.n 800669a 800660e: 687b ldr r3, [r7, #4] 8006610: 681b ldr r3, [r3, #0] 8006612: 4a73 ldr r2, [pc, #460] @ (80067e0 ) 8006614: 4293 cmp r3, r2 8006616: d040 beq.n 800669a 8006618: 687b ldr r3, [r7, #4] 800661a: 681b ldr r3, [r3, #0] 800661c: 4a71 ldr r2, [pc, #452] @ (80067e4 ) 800661e: 4293 cmp r3, r2 8006620: d03b beq.n 800669a 8006622: 687b ldr r3, [r7, #4] 8006624: 681b ldr r3, [r3, #0] 8006626: 4a70 ldr r2, [pc, #448] @ (80067e8 ) 8006628: 4293 cmp r3, r2 800662a: d036 beq.n 800669a 800662c: 687b ldr r3, [r7, #4] 800662e: 681b ldr r3, [r3, #0] 8006630: 4a6e ldr r2, [pc, #440] @ (80067ec ) 8006632: 4293 cmp r3, r2 8006634: d031 beq.n 800669a 8006636: 687b ldr r3, [r7, #4] 8006638: 681b ldr r3, [r3, #0] 800663a: 4a6d ldr r2, [pc, #436] @ (80067f0 ) 800663c: 4293 cmp r3, r2 800663e: d02c beq.n 800669a 8006640: 687b ldr r3, [r7, #4] 8006642: 681b ldr r3, [r3, #0] 8006644: 4a6b ldr r2, [pc, #428] @ (80067f4 ) 8006646: 4293 cmp r3, r2 8006648: d027 beq.n 800669a 800664a: 687b ldr r3, [r7, #4] 800664c: 681b ldr r3, [r3, #0] 800664e: 4a6a ldr r2, [pc, #424] @ (80067f8 ) 8006650: 4293 cmp r3, r2 8006652: d022 beq.n 800669a 8006654: 687b ldr r3, [r7, #4] 8006656: 681b ldr r3, [r3, #0] 8006658: 4a68 ldr r2, [pc, #416] @ (80067fc ) 800665a: 4293 cmp r3, r2 800665c: d01d beq.n 800669a 800665e: 687b ldr r3, [r7, #4] 8006660: 681b ldr r3, [r3, #0] 8006662: 4a67 ldr r2, [pc, #412] @ (8006800 ) 8006664: 4293 cmp r3, r2 8006666: d018 beq.n 800669a 8006668: 687b ldr r3, [r7, #4] 800666a: 681b ldr r3, [r3, #0] 800666c: 4a65 ldr r2, [pc, #404] @ (8006804 ) 800666e: 4293 cmp r3, r2 8006670: d013 beq.n 800669a 8006672: 687b ldr r3, [r7, #4] 8006674: 681b ldr r3, [r3, #0] 8006676: 4a64 ldr r2, [pc, #400] @ (8006808 ) 8006678: 4293 cmp r3, r2 800667a: d00e beq.n 800669a 800667c: 687b ldr r3, [r7, #4] 800667e: 681b ldr r3, [r3, #0] 8006680: 4a62 ldr r2, [pc, #392] @ (800680c ) 8006682: 4293 cmp r3, r2 8006684: d009 beq.n 800669a 8006686: 687b ldr r3, [r7, #4] 8006688: 681b ldr r3, [r3, #0] 800668a: 4a61 ldr r2, [pc, #388] @ (8006810 ) 800668c: 4293 cmp r3, r2 800668e: d004 beq.n 800669a 8006690: 687b ldr r3, [r7, #4] 8006692: 681b ldr r3, [r3, #0] 8006694: 4a5f ldr r2, [pc, #380] @ (8006814 ) 8006696: 4293 cmp r3, r2 8006698: d101 bne.n 800669e 800669a: 2301 movs r3, #1 800669c: e000 b.n 80066a0 800669e: 2300 movs r3, #0 80066a0: 2b00 cmp r3, #0 80066a2: d013 beq.n 80066cc { /* Disable DMA All Interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME | DMA_IT_HT); 80066a4: 687b ldr r3, [r7, #4] 80066a6: 681b ldr r3, [r3, #0] 80066a8: 681a ldr r2, [r3, #0] 80066aa: 687b ldr r3, [r7, #4] 80066ac: 681b ldr r3, [r3, #0] 80066ae: f022 021e bic.w r2, r2, #30 80066b2: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 80066b4: 687b ldr r3, [r7, #4] 80066b6: 681b ldr r3, [r3, #0] 80066b8: 695a ldr r2, [r3, #20] 80066ba: 687b ldr r3, [r7, #4] 80066bc: 681b ldr r3, [r3, #0] 80066be: f022 0280 bic.w r2, r2, #128 @ 0x80 80066c2: 615a str r2, [r3, #20] enableRegister = (__IO uint32_t *)(&(((DMA_Stream_TypeDef *)hdma->Instance)->CR)); 80066c4: 687b ldr r3, [r7, #4] 80066c6: 681b ldr r3, [r3, #0] 80066c8: 617b str r3, [r7, #20] 80066ca: e00a b.n 80066e2 } else /* BDMA channel */ { /* Disable DMA All Interrupts */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR &= ~(BDMA_CCR_TCIE | BDMA_CCR_HTIE | BDMA_CCR_TEIE); 80066cc: 687b ldr r3, [r7, #4] 80066ce: 681b ldr r3, [r3, #0] 80066d0: 681a ldr r2, [r3, #0] 80066d2: 687b ldr r3, [r7, #4] 80066d4: 681b ldr r3, [r3, #0] 80066d6: f022 020e bic.w r2, r2, #14 80066da: 601a str r2, [r3, #0] enableRegister = (__IO uint32_t *)(&(((BDMA_Channel_TypeDef *)hdma->Instance)->CCR)); 80066dc: 687b ldr r3, [r7, #4] 80066de: 681b ldr r3, [r3, #0] 80066e0: 617b str r3, [r7, #20] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 80066e2: 687b ldr r3, [r7, #4] 80066e4: 681b ldr r3, [r3, #0] 80066e6: 4a3c ldr r2, [pc, #240] @ (80067d8 ) 80066e8: 4293 cmp r3, r2 80066ea: d072 beq.n 80067d2 80066ec: 687b ldr r3, [r7, #4] 80066ee: 681b ldr r3, [r3, #0] 80066f0: 4a3a ldr r2, [pc, #232] @ (80067dc ) 80066f2: 4293 cmp r3, r2 80066f4: d06d beq.n 80067d2 80066f6: 687b ldr r3, [r7, #4] 80066f8: 681b ldr r3, [r3, #0] 80066fa: 4a39 ldr r2, [pc, #228] @ (80067e0 ) 80066fc: 4293 cmp r3, r2 80066fe: d068 beq.n 80067d2 8006700: 687b ldr r3, [r7, #4] 8006702: 681b ldr r3, [r3, #0] 8006704: 4a37 ldr r2, [pc, #220] @ (80067e4 ) 8006706: 4293 cmp r3, r2 8006708: d063 beq.n 80067d2 800670a: 687b ldr r3, [r7, #4] 800670c: 681b ldr r3, [r3, #0] 800670e: 4a36 ldr r2, [pc, #216] @ (80067e8 ) 8006710: 4293 cmp r3, r2 8006712: d05e beq.n 80067d2 8006714: 687b ldr r3, [r7, #4] 8006716: 681b ldr r3, [r3, #0] 8006718: 4a34 ldr r2, [pc, #208] @ (80067ec ) 800671a: 4293 cmp r3, r2 800671c: d059 beq.n 80067d2 800671e: 687b ldr r3, [r7, #4] 8006720: 681b ldr r3, [r3, #0] 8006722: 4a33 ldr r2, [pc, #204] @ (80067f0 ) 8006724: 4293 cmp r3, r2 8006726: d054 beq.n 80067d2 8006728: 687b ldr r3, [r7, #4] 800672a: 681b ldr r3, [r3, #0] 800672c: 4a31 ldr r2, [pc, #196] @ (80067f4 ) 800672e: 4293 cmp r3, r2 8006730: d04f beq.n 80067d2 8006732: 687b ldr r3, [r7, #4] 8006734: 681b ldr r3, [r3, #0] 8006736: 4a30 ldr r2, [pc, #192] @ (80067f8 ) 8006738: 4293 cmp r3, r2 800673a: d04a beq.n 80067d2 800673c: 687b ldr r3, [r7, #4] 800673e: 681b ldr r3, [r3, #0] 8006740: 4a2e ldr r2, [pc, #184] @ (80067fc ) 8006742: 4293 cmp r3, r2 8006744: d045 beq.n 80067d2 8006746: 687b ldr r3, [r7, #4] 8006748: 681b ldr r3, [r3, #0] 800674a: 4a2d ldr r2, [pc, #180] @ (8006800 ) 800674c: 4293 cmp r3, r2 800674e: d040 beq.n 80067d2 8006750: 687b ldr r3, [r7, #4] 8006752: 681b ldr r3, [r3, #0] 8006754: 4a2b ldr r2, [pc, #172] @ (8006804 ) 8006756: 4293 cmp r3, r2 8006758: d03b beq.n 80067d2 800675a: 687b ldr r3, [r7, #4] 800675c: 681b ldr r3, [r3, #0] 800675e: 4a2a ldr r2, [pc, #168] @ (8006808 ) 8006760: 4293 cmp r3, r2 8006762: d036 beq.n 80067d2 8006764: 687b ldr r3, [r7, #4] 8006766: 681b ldr r3, [r3, #0] 8006768: 4a28 ldr r2, [pc, #160] @ (800680c ) 800676a: 4293 cmp r3, r2 800676c: d031 beq.n 80067d2 800676e: 687b ldr r3, [r7, #4] 8006770: 681b ldr r3, [r3, #0] 8006772: 4a27 ldr r2, [pc, #156] @ (8006810 ) 8006774: 4293 cmp r3, r2 8006776: d02c beq.n 80067d2 8006778: 687b ldr r3, [r7, #4] 800677a: 681b ldr r3, [r3, #0] 800677c: 4a25 ldr r2, [pc, #148] @ (8006814 ) 800677e: 4293 cmp r3, r2 8006780: d027 beq.n 80067d2 8006782: 687b ldr r3, [r7, #4] 8006784: 681b ldr r3, [r3, #0] 8006786: 4a24 ldr r2, [pc, #144] @ (8006818 ) 8006788: 4293 cmp r3, r2 800678a: d022 beq.n 80067d2 800678c: 687b ldr r3, [r7, #4] 800678e: 681b ldr r3, [r3, #0] 8006790: 4a22 ldr r2, [pc, #136] @ (800681c ) 8006792: 4293 cmp r3, r2 8006794: d01d beq.n 80067d2 8006796: 687b ldr r3, [r7, #4] 8006798: 681b ldr r3, [r3, #0] 800679a: 4a21 ldr r2, [pc, #132] @ (8006820 ) 800679c: 4293 cmp r3, r2 800679e: d018 beq.n 80067d2 80067a0: 687b ldr r3, [r7, #4] 80067a2: 681b ldr r3, [r3, #0] 80067a4: 4a1f ldr r2, [pc, #124] @ (8006824 ) 80067a6: 4293 cmp r3, r2 80067a8: d013 beq.n 80067d2 80067aa: 687b ldr r3, [r7, #4] 80067ac: 681b ldr r3, [r3, #0] 80067ae: 4a1e ldr r2, [pc, #120] @ (8006828 ) 80067b0: 4293 cmp r3, r2 80067b2: d00e beq.n 80067d2 80067b4: 687b ldr r3, [r7, #4] 80067b6: 681b ldr r3, [r3, #0] 80067b8: 4a1c ldr r2, [pc, #112] @ (800682c ) 80067ba: 4293 cmp r3, r2 80067bc: d009 beq.n 80067d2 80067be: 687b ldr r3, [r7, #4] 80067c0: 681b ldr r3, [r3, #0] 80067c2: 4a1b ldr r2, [pc, #108] @ (8006830 ) 80067c4: 4293 cmp r3, r2 80067c6: d004 beq.n 80067d2 80067c8: 687b ldr r3, [r7, #4] 80067ca: 681b ldr r3, [r3, #0] 80067cc: 4a19 ldr r2, [pc, #100] @ (8006834 ) 80067ce: 4293 cmp r3, r2 80067d0: d132 bne.n 8006838 80067d2: 2301 movs r3, #1 80067d4: e031 b.n 800683a 80067d6: bf00 nop 80067d8: 40020010 .word 0x40020010 80067dc: 40020028 .word 0x40020028 80067e0: 40020040 .word 0x40020040 80067e4: 40020058 .word 0x40020058 80067e8: 40020070 .word 0x40020070 80067ec: 40020088 .word 0x40020088 80067f0: 400200a0 .word 0x400200a0 80067f4: 400200b8 .word 0x400200b8 80067f8: 40020410 .word 0x40020410 80067fc: 40020428 .word 0x40020428 8006800: 40020440 .word 0x40020440 8006804: 40020458 .word 0x40020458 8006808: 40020470 .word 0x40020470 800680c: 40020488 .word 0x40020488 8006810: 400204a0 .word 0x400204a0 8006814: 400204b8 .word 0x400204b8 8006818: 58025408 .word 0x58025408 800681c: 5802541c .word 0x5802541c 8006820: 58025430 .word 0x58025430 8006824: 58025444 .word 0x58025444 8006828: 58025458 .word 0x58025458 800682c: 5802546c .word 0x5802546c 8006830: 58025480 .word 0x58025480 8006834: 58025494 .word 0x58025494 8006838: 2300 movs r3, #0 800683a: 2b00 cmp r3, #0 800683c: d007 beq.n 800684e { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 800683e: 687b ldr r3, [r7, #4] 8006840: 6e1b ldr r3, [r3, #96] @ 0x60 8006842: 681a ldr r2, [r3, #0] 8006844: 687b ldr r3, [r7, #4] 8006846: 6e1b ldr r3, [r3, #96] @ 0x60 8006848: f422 7280 bic.w r2, r2, #256 @ 0x100 800684c: 601a str r2, [r3, #0] } /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 800684e: 687b ldr r3, [r7, #4] 8006850: 681b ldr r3, [r3, #0] 8006852: 4a6d ldr r2, [pc, #436] @ (8006a08 ) 8006854: 4293 cmp r3, r2 8006856: d04a beq.n 80068ee 8006858: 687b ldr r3, [r7, #4] 800685a: 681b ldr r3, [r3, #0] 800685c: 4a6b ldr r2, [pc, #428] @ (8006a0c ) 800685e: 4293 cmp r3, r2 8006860: d045 beq.n 80068ee 8006862: 687b ldr r3, [r7, #4] 8006864: 681b ldr r3, [r3, #0] 8006866: 4a6a ldr r2, [pc, #424] @ (8006a10 ) 8006868: 4293 cmp r3, r2 800686a: d040 beq.n 80068ee 800686c: 687b ldr r3, [r7, #4] 800686e: 681b ldr r3, [r3, #0] 8006870: 4a68 ldr r2, [pc, #416] @ (8006a14 ) 8006872: 4293 cmp r3, r2 8006874: d03b beq.n 80068ee 8006876: 687b ldr r3, [r7, #4] 8006878: 681b ldr r3, [r3, #0] 800687a: 4a67 ldr r2, [pc, #412] @ (8006a18 ) 800687c: 4293 cmp r3, r2 800687e: d036 beq.n 80068ee 8006880: 687b ldr r3, [r7, #4] 8006882: 681b ldr r3, [r3, #0] 8006884: 4a65 ldr r2, [pc, #404] @ (8006a1c ) 8006886: 4293 cmp r3, r2 8006888: d031 beq.n 80068ee 800688a: 687b ldr r3, [r7, #4] 800688c: 681b ldr r3, [r3, #0] 800688e: 4a64 ldr r2, [pc, #400] @ (8006a20 ) 8006890: 4293 cmp r3, r2 8006892: d02c beq.n 80068ee 8006894: 687b ldr r3, [r7, #4] 8006896: 681b ldr r3, [r3, #0] 8006898: 4a62 ldr r2, [pc, #392] @ (8006a24 ) 800689a: 4293 cmp r3, r2 800689c: d027 beq.n 80068ee 800689e: 687b ldr r3, [r7, #4] 80068a0: 681b ldr r3, [r3, #0] 80068a2: 4a61 ldr r2, [pc, #388] @ (8006a28 ) 80068a4: 4293 cmp r3, r2 80068a6: d022 beq.n 80068ee 80068a8: 687b ldr r3, [r7, #4] 80068aa: 681b ldr r3, [r3, #0] 80068ac: 4a5f ldr r2, [pc, #380] @ (8006a2c ) 80068ae: 4293 cmp r3, r2 80068b0: d01d beq.n 80068ee 80068b2: 687b ldr r3, [r7, #4] 80068b4: 681b ldr r3, [r3, #0] 80068b6: 4a5e ldr r2, [pc, #376] @ (8006a30 ) 80068b8: 4293 cmp r3, r2 80068ba: d018 beq.n 80068ee 80068bc: 687b ldr r3, [r7, #4] 80068be: 681b ldr r3, [r3, #0] 80068c0: 4a5c ldr r2, [pc, #368] @ (8006a34 ) 80068c2: 4293 cmp r3, r2 80068c4: d013 beq.n 80068ee 80068c6: 687b ldr r3, [r7, #4] 80068c8: 681b ldr r3, [r3, #0] 80068ca: 4a5b ldr r2, [pc, #364] @ (8006a38 ) 80068cc: 4293 cmp r3, r2 80068ce: d00e beq.n 80068ee 80068d0: 687b ldr r3, [r7, #4] 80068d2: 681b ldr r3, [r3, #0] 80068d4: 4a59 ldr r2, [pc, #356] @ (8006a3c ) 80068d6: 4293 cmp r3, r2 80068d8: d009 beq.n 80068ee 80068da: 687b ldr r3, [r7, #4] 80068dc: 681b ldr r3, [r3, #0] 80068de: 4a58 ldr r2, [pc, #352] @ (8006a40 ) 80068e0: 4293 cmp r3, r2 80068e2: d004 beq.n 80068ee 80068e4: 687b ldr r3, [r7, #4] 80068e6: 681b ldr r3, [r3, #0] 80068e8: 4a56 ldr r2, [pc, #344] @ (8006a44 ) 80068ea: 4293 cmp r3, r2 80068ec: d108 bne.n 8006900 80068ee: 687b ldr r3, [r7, #4] 80068f0: 681b ldr r3, [r3, #0] 80068f2: 681a ldr r2, [r3, #0] 80068f4: 687b ldr r3, [r7, #4] 80068f6: 681b ldr r3, [r3, #0] 80068f8: f022 0201 bic.w r2, r2, #1 80068fc: 601a str r2, [r3, #0] 80068fe: e007 b.n 8006910 8006900: 687b ldr r3, [r7, #4] 8006902: 681b ldr r3, [r3, #0] 8006904: 681a ldr r2, [r3, #0] 8006906: 687b ldr r3, [r7, #4] 8006908: 681b ldr r3, [r3, #0] 800690a: f022 0201 bic.w r2, r2, #1 800690e: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while(((*enableRegister) & DMA_SxCR_EN) != 0U) 8006910: e013 b.n 800693a { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 8006912: f7fe ff4d bl 80057b0 8006916: 4602 mov r2, r0 8006918: 693b ldr r3, [r7, #16] 800691a: 1ad3 subs r3, r2, r3 800691c: 2b05 cmp r3, #5 800691e: d90c bls.n 800693a { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 8006920: 687b ldr r3, [r7, #4] 8006922: 2220 movs r2, #32 8006924: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 8006926: 687b ldr r3, [r7, #4] 8006928: 2203 movs r2, #3 800692a: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 800692e: 687b ldr r3, [r7, #4] 8006930: 2200 movs r2, #0 8006932: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 8006936: 2301 movs r3, #1 8006938: e12d b.n 8006b96 while(((*enableRegister) & DMA_SxCR_EN) != 0U) 800693a: 697b ldr r3, [r7, #20] 800693c: 681b ldr r3, [r3, #0] 800693e: f003 0301 and.w r3, r3, #1 8006942: 2b00 cmp r3, #0 8006944: d1e5 bne.n 8006912 } } /* Clear all interrupt flags at correct offset within the register */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8006946: 687b ldr r3, [r7, #4] 8006948: 681b ldr r3, [r3, #0] 800694a: 4a2f ldr r2, [pc, #188] @ (8006a08 ) 800694c: 4293 cmp r3, r2 800694e: d04a beq.n 80069e6 8006950: 687b ldr r3, [r7, #4] 8006952: 681b ldr r3, [r3, #0] 8006954: 4a2d ldr r2, [pc, #180] @ (8006a0c ) 8006956: 4293 cmp r3, r2 8006958: d045 beq.n 80069e6 800695a: 687b ldr r3, [r7, #4] 800695c: 681b ldr r3, [r3, #0] 800695e: 4a2c ldr r2, [pc, #176] @ (8006a10 ) 8006960: 4293 cmp r3, r2 8006962: d040 beq.n 80069e6 8006964: 687b ldr r3, [r7, #4] 8006966: 681b ldr r3, [r3, #0] 8006968: 4a2a ldr r2, [pc, #168] @ (8006a14 ) 800696a: 4293 cmp r3, r2 800696c: d03b beq.n 80069e6 800696e: 687b ldr r3, [r7, #4] 8006970: 681b ldr r3, [r3, #0] 8006972: 4a29 ldr r2, [pc, #164] @ (8006a18 ) 8006974: 4293 cmp r3, r2 8006976: d036 beq.n 80069e6 8006978: 687b ldr r3, [r7, #4] 800697a: 681b ldr r3, [r3, #0] 800697c: 4a27 ldr r2, [pc, #156] @ (8006a1c ) 800697e: 4293 cmp r3, r2 8006980: d031 beq.n 80069e6 8006982: 687b ldr r3, [r7, #4] 8006984: 681b ldr r3, [r3, #0] 8006986: 4a26 ldr r2, [pc, #152] @ (8006a20 ) 8006988: 4293 cmp r3, r2 800698a: d02c beq.n 80069e6 800698c: 687b ldr r3, [r7, #4] 800698e: 681b ldr r3, [r3, #0] 8006990: 4a24 ldr r2, [pc, #144] @ (8006a24 ) 8006992: 4293 cmp r3, r2 8006994: d027 beq.n 80069e6 8006996: 687b ldr r3, [r7, #4] 8006998: 681b ldr r3, [r3, #0] 800699a: 4a23 ldr r2, [pc, #140] @ (8006a28 ) 800699c: 4293 cmp r3, r2 800699e: d022 beq.n 80069e6 80069a0: 687b ldr r3, [r7, #4] 80069a2: 681b ldr r3, [r3, #0] 80069a4: 4a21 ldr r2, [pc, #132] @ (8006a2c ) 80069a6: 4293 cmp r3, r2 80069a8: d01d beq.n 80069e6 80069aa: 687b ldr r3, [r7, #4] 80069ac: 681b ldr r3, [r3, #0] 80069ae: 4a20 ldr r2, [pc, #128] @ (8006a30 ) 80069b0: 4293 cmp r3, r2 80069b2: d018 beq.n 80069e6 80069b4: 687b ldr r3, [r7, #4] 80069b6: 681b ldr r3, [r3, #0] 80069b8: 4a1e ldr r2, [pc, #120] @ (8006a34 ) 80069ba: 4293 cmp r3, r2 80069bc: d013 beq.n 80069e6 80069be: 687b ldr r3, [r7, #4] 80069c0: 681b ldr r3, [r3, #0] 80069c2: 4a1d ldr r2, [pc, #116] @ (8006a38 ) 80069c4: 4293 cmp r3, r2 80069c6: d00e beq.n 80069e6 80069c8: 687b ldr r3, [r7, #4] 80069ca: 681b ldr r3, [r3, #0] 80069cc: 4a1b ldr r2, [pc, #108] @ (8006a3c ) 80069ce: 4293 cmp r3, r2 80069d0: d009 beq.n 80069e6 80069d2: 687b ldr r3, [r7, #4] 80069d4: 681b ldr r3, [r3, #0] 80069d6: 4a1a ldr r2, [pc, #104] @ (8006a40 ) 80069d8: 4293 cmp r3, r2 80069da: d004 beq.n 80069e6 80069dc: 687b ldr r3, [r7, #4] 80069de: 681b ldr r3, [r3, #0] 80069e0: 4a18 ldr r2, [pc, #96] @ (8006a44 ) 80069e2: 4293 cmp r3, r2 80069e4: d101 bne.n 80069ea 80069e6: 2301 movs r3, #1 80069e8: e000 b.n 80069ec 80069ea: 2300 movs r3, #0 80069ec: 2b00 cmp r3, #0 80069ee: d02b beq.n 8006a48 { regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 80069f0: 687b ldr r3, [r7, #4] 80069f2: 6d9b ldr r3, [r3, #88] @ 0x58 80069f4: 60bb str r3, [r7, #8] regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 80069f6: 687b ldr r3, [r7, #4] 80069f8: 6ddb ldr r3, [r3, #92] @ 0x5c 80069fa: f003 031f and.w r3, r3, #31 80069fe: 223f movs r2, #63 @ 0x3f 8006a00: 409a lsls r2, r3 8006a02: 68bb ldr r3, [r7, #8] 8006a04: 609a str r2, [r3, #8] 8006a06: e02a b.n 8006a5e 8006a08: 40020010 .word 0x40020010 8006a0c: 40020028 .word 0x40020028 8006a10: 40020040 .word 0x40020040 8006a14: 40020058 .word 0x40020058 8006a18: 40020070 .word 0x40020070 8006a1c: 40020088 .word 0x40020088 8006a20: 400200a0 .word 0x400200a0 8006a24: 400200b8 .word 0x400200b8 8006a28: 40020410 .word 0x40020410 8006a2c: 40020428 .word 0x40020428 8006a30: 40020440 .word 0x40020440 8006a34: 40020458 .word 0x40020458 8006a38: 40020470 .word 0x40020470 8006a3c: 40020488 .word 0x40020488 8006a40: 400204a0 .word 0x400204a0 8006a44: 400204b8 .word 0x400204b8 } else /* BDMA channel */ { regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 8006a48: 687b ldr r3, [r7, #4] 8006a4a: 6d9b ldr r3, [r3, #88] @ 0x58 8006a4c: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 8006a4e: 687b ldr r3, [r7, #4] 8006a50: 6ddb ldr r3, [r3, #92] @ 0x5c 8006a52: f003 031f and.w r3, r3, #31 8006a56: 2201 movs r2, #1 8006a58: 409a lsls r2, r3 8006a5a: 68fb ldr r3, [r7, #12] 8006a5c: 605a str r2, [r3, #4] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8006a5e: 687b ldr r3, [r7, #4] 8006a60: 681b ldr r3, [r3, #0] 8006a62: 4a4f ldr r2, [pc, #316] @ (8006ba0 ) 8006a64: 4293 cmp r3, r2 8006a66: d072 beq.n 8006b4e 8006a68: 687b ldr r3, [r7, #4] 8006a6a: 681b ldr r3, [r3, #0] 8006a6c: 4a4d ldr r2, [pc, #308] @ (8006ba4 ) 8006a6e: 4293 cmp r3, r2 8006a70: d06d beq.n 8006b4e 8006a72: 687b ldr r3, [r7, #4] 8006a74: 681b ldr r3, [r3, #0] 8006a76: 4a4c ldr r2, [pc, #304] @ (8006ba8 ) 8006a78: 4293 cmp r3, r2 8006a7a: d068 beq.n 8006b4e 8006a7c: 687b ldr r3, [r7, #4] 8006a7e: 681b ldr r3, [r3, #0] 8006a80: 4a4a ldr r2, [pc, #296] @ (8006bac ) 8006a82: 4293 cmp r3, r2 8006a84: d063 beq.n 8006b4e 8006a86: 687b ldr r3, [r7, #4] 8006a88: 681b ldr r3, [r3, #0] 8006a8a: 4a49 ldr r2, [pc, #292] @ (8006bb0 ) 8006a8c: 4293 cmp r3, r2 8006a8e: d05e beq.n 8006b4e 8006a90: 687b ldr r3, [r7, #4] 8006a92: 681b ldr r3, [r3, #0] 8006a94: 4a47 ldr r2, [pc, #284] @ (8006bb4 ) 8006a96: 4293 cmp r3, r2 8006a98: d059 beq.n 8006b4e 8006a9a: 687b ldr r3, [r7, #4] 8006a9c: 681b ldr r3, [r3, #0] 8006a9e: 4a46 ldr r2, [pc, #280] @ (8006bb8 ) 8006aa0: 4293 cmp r3, r2 8006aa2: d054 beq.n 8006b4e 8006aa4: 687b ldr r3, [r7, #4] 8006aa6: 681b ldr r3, [r3, #0] 8006aa8: 4a44 ldr r2, [pc, #272] @ (8006bbc ) 8006aaa: 4293 cmp r3, r2 8006aac: d04f beq.n 8006b4e 8006aae: 687b ldr r3, [r7, #4] 8006ab0: 681b ldr r3, [r3, #0] 8006ab2: 4a43 ldr r2, [pc, #268] @ (8006bc0 ) 8006ab4: 4293 cmp r3, r2 8006ab6: d04a beq.n 8006b4e 8006ab8: 687b ldr r3, [r7, #4] 8006aba: 681b ldr r3, [r3, #0] 8006abc: 4a41 ldr r2, [pc, #260] @ (8006bc4 ) 8006abe: 4293 cmp r3, r2 8006ac0: d045 beq.n 8006b4e 8006ac2: 687b ldr r3, [r7, #4] 8006ac4: 681b ldr r3, [r3, #0] 8006ac6: 4a40 ldr r2, [pc, #256] @ (8006bc8 ) 8006ac8: 4293 cmp r3, r2 8006aca: d040 beq.n 8006b4e 8006acc: 687b ldr r3, [r7, #4] 8006ace: 681b ldr r3, [r3, #0] 8006ad0: 4a3e ldr r2, [pc, #248] @ (8006bcc ) 8006ad2: 4293 cmp r3, r2 8006ad4: d03b beq.n 8006b4e 8006ad6: 687b ldr r3, [r7, #4] 8006ad8: 681b ldr r3, [r3, #0] 8006ada: 4a3d ldr r2, [pc, #244] @ (8006bd0 ) 8006adc: 4293 cmp r3, r2 8006ade: d036 beq.n 8006b4e 8006ae0: 687b ldr r3, [r7, #4] 8006ae2: 681b ldr r3, [r3, #0] 8006ae4: 4a3b ldr r2, [pc, #236] @ (8006bd4 ) 8006ae6: 4293 cmp r3, r2 8006ae8: d031 beq.n 8006b4e 8006aea: 687b ldr r3, [r7, #4] 8006aec: 681b ldr r3, [r3, #0] 8006aee: 4a3a ldr r2, [pc, #232] @ (8006bd8 ) 8006af0: 4293 cmp r3, r2 8006af2: d02c beq.n 8006b4e 8006af4: 687b ldr r3, [r7, #4] 8006af6: 681b ldr r3, [r3, #0] 8006af8: 4a38 ldr r2, [pc, #224] @ (8006bdc ) 8006afa: 4293 cmp r3, r2 8006afc: d027 beq.n 8006b4e 8006afe: 687b ldr r3, [r7, #4] 8006b00: 681b ldr r3, [r3, #0] 8006b02: 4a37 ldr r2, [pc, #220] @ (8006be0 ) 8006b04: 4293 cmp r3, r2 8006b06: d022 beq.n 8006b4e 8006b08: 687b ldr r3, [r7, #4] 8006b0a: 681b ldr r3, [r3, #0] 8006b0c: 4a35 ldr r2, [pc, #212] @ (8006be4 ) 8006b0e: 4293 cmp r3, r2 8006b10: d01d beq.n 8006b4e 8006b12: 687b ldr r3, [r7, #4] 8006b14: 681b ldr r3, [r3, #0] 8006b16: 4a34 ldr r2, [pc, #208] @ (8006be8 ) 8006b18: 4293 cmp r3, r2 8006b1a: d018 beq.n 8006b4e 8006b1c: 687b ldr r3, [r7, #4] 8006b1e: 681b ldr r3, [r3, #0] 8006b20: 4a32 ldr r2, [pc, #200] @ (8006bec ) 8006b22: 4293 cmp r3, r2 8006b24: d013 beq.n 8006b4e 8006b26: 687b ldr r3, [r7, #4] 8006b28: 681b ldr r3, [r3, #0] 8006b2a: 4a31 ldr r2, [pc, #196] @ (8006bf0 ) 8006b2c: 4293 cmp r3, r2 8006b2e: d00e beq.n 8006b4e 8006b30: 687b ldr r3, [r7, #4] 8006b32: 681b ldr r3, [r3, #0] 8006b34: 4a2f ldr r2, [pc, #188] @ (8006bf4 ) 8006b36: 4293 cmp r3, r2 8006b38: d009 beq.n 8006b4e 8006b3a: 687b ldr r3, [r7, #4] 8006b3c: 681b ldr r3, [r3, #0] 8006b3e: 4a2e ldr r2, [pc, #184] @ (8006bf8 ) 8006b40: 4293 cmp r3, r2 8006b42: d004 beq.n 8006b4e 8006b44: 687b ldr r3, [r7, #4] 8006b46: 681b ldr r3, [r3, #0] 8006b48: 4a2c ldr r2, [pc, #176] @ (8006bfc ) 8006b4a: 4293 cmp r3, r2 8006b4c: d101 bne.n 8006b52 8006b4e: 2301 movs r3, #1 8006b50: e000 b.n 8006b54 8006b52: 2300 movs r3, #0 8006b54: 2b00 cmp r3, #0 8006b56: d015 beq.n 8006b84 { /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 8006b58: 687b ldr r3, [r7, #4] 8006b5a: 6e5b ldr r3, [r3, #100] @ 0x64 8006b5c: 687a ldr r2, [r7, #4] 8006b5e: 6e92 ldr r2, [r2, #104] @ 0x68 8006b60: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 8006b62: 687b ldr r3, [r7, #4] 8006b64: 6edb ldr r3, [r3, #108] @ 0x6c 8006b66: 2b00 cmp r3, #0 8006b68: d00c beq.n 8006b84 { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT */ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 8006b6a: 687b ldr r3, [r7, #4] 8006b6c: 6edb ldr r3, [r3, #108] @ 0x6c 8006b6e: 681a ldr r2, [r3, #0] 8006b70: 687b ldr r3, [r7, #4] 8006b72: 6edb ldr r3, [r3, #108] @ 0x6c 8006b74: f422 7280 bic.w r2, r2, #256 @ 0x100 8006b78: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 8006b7a: 687b ldr r3, [r7, #4] 8006b7c: 6f1b ldr r3, [r3, #112] @ 0x70 8006b7e: 687a ldr r2, [r7, #4] 8006b80: 6f52 ldr r2, [r2, #116] @ 0x74 8006b82: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8006b84: 687b ldr r3, [r7, #4] 8006b86: 2201 movs r2, #1 8006b88: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8006b8c: 687b ldr r3, [r7, #4] 8006b8e: 2200 movs r2, #0 8006b90: f883 2034 strb.w r2, [r3, #52] @ 0x34 } return HAL_OK; 8006b94: 2300 movs r3, #0 } 8006b96: 4618 mov r0, r3 8006b98: 3718 adds r7, #24 8006b9a: 46bd mov sp, r7 8006b9c: bd80 pop {r7, pc} 8006b9e: bf00 nop 8006ba0: 40020010 .word 0x40020010 8006ba4: 40020028 .word 0x40020028 8006ba8: 40020040 .word 0x40020040 8006bac: 40020058 .word 0x40020058 8006bb0: 40020070 .word 0x40020070 8006bb4: 40020088 .word 0x40020088 8006bb8: 400200a0 .word 0x400200a0 8006bbc: 400200b8 .word 0x400200b8 8006bc0: 40020410 .word 0x40020410 8006bc4: 40020428 .word 0x40020428 8006bc8: 40020440 .word 0x40020440 8006bcc: 40020458 .word 0x40020458 8006bd0: 40020470 .word 0x40020470 8006bd4: 40020488 .word 0x40020488 8006bd8: 400204a0 .word 0x400204a0 8006bdc: 400204b8 .word 0x400204b8 8006be0: 58025408 .word 0x58025408 8006be4: 5802541c .word 0x5802541c 8006be8: 58025430 .word 0x58025430 8006bec: 58025444 .word 0x58025444 8006bf0: 58025458 .word 0x58025458 8006bf4: 5802546c .word 0x5802546c 8006bf8: 58025480 .word 0x58025480 8006bfc: 58025494 .word 0x58025494 08006c00 : * @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_Abort_IT(DMA_HandleTypeDef *hdma) { 8006c00: b580 push {r7, lr} 8006c02: b084 sub sp, #16 8006c04: af00 add r7, sp, #0 8006c06: 6078 str r0, [r7, #4] BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 8006c08: 687b ldr r3, [r7, #4] 8006c0a: 2b00 cmp r3, #0 8006c0c: d101 bne.n 8006c12 { return HAL_ERROR; 8006c0e: 2301 movs r3, #1 8006c10: e237 b.n 8007082 } if(hdma->State != HAL_DMA_STATE_BUSY) 8006c12: 687b ldr r3, [r7, #4] 8006c14: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 8006c18: b2db uxtb r3, r3 8006c1a: 2b02 cmp r3, #2 8006c1c: d004 beq.n 8006c28 { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 8006c1e: 687b ldr r3, [r7, #4] 8006c20: 2280 movs r2, #128 @ 0x80 8006c22: 655a str r2, [r3, #84] @ 0x54 return HAL_ERROR; 8006c24: 2301 movs r3, #1 8006c26: e22c b.n 8007082 } else { if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8006c28: 687b ldr r3, [r7, #4] 8006c2a: 681b ldr r3, [r3, #0] 8006c2c: 4a5c ldr r2, [pc, #368] @ (8006da0 ) 8006c2e: 4293 cmp r3, r2 8006c30: d04a beq.n 8006cc8 8006c32: 687b ldr r3, [r7, #4] 8006c34: 681b ldr r3, [r3, #0] 8006c36: 4a5b ldr r2, [pc, #364] @ (8006da4 ) 8006c38: 4293 cmp r3, r2 8006c3a: d045 beq.n 8006cc8 8006c3c: 687b ldr r3, [r7, #4] 8006c3e: 681b ldr r3, [r3, #0] 8006c40: 4a59 ldr r2, [pc, #356] @ (8006da8 ) 8006c42: 4293 cmp r3, r2 8006c44: d040 beq.n 8006cc8 8006c46: 687b ldr r3, [r7, #4] 8006c48: 681b ldr r3, [r3, #0] 8006c4a: 4a58 ldr r2, [pc, #352] @ (8006dac ) 8006c4c: 4293 cmp r3, r2 8006c4e: d03b beq.n 8006cc8 8006c50: 687b ldr r3, [r7, #4] 8006c52: 681b ldr r3, [r3, #0] 8006c54: 4a56 ldr r2, [pc, #344] @ (8006db0 ) 8006c56: 4293 cmp r3, r2 8006c58: d036 beq.n 8006cc8 8006c5a: 687b ldr r3, [r7, #4] 8006c5c: 681b ldr r3, [r3, #0] 8006c5e: 4a55 ldr r2, [pc, #340] @ (8006db4 ) 8006c60: 4293 cmp r3, r2 8006c62: d031 beq.n 8006cc8 8006c64: 687b ldr r3, [r7, #4] 8006c66: 681b ldr r3, [r3, #0] 8006c68: 4a53 ldr r2, [pc, #332] @ (8006db8 ) 8006c6a: 4293 cmp r3, r2 8006c6c: d02c beq.n 8006cc8 8006c6e: 687b ldr r3, [r7, #4] 8006c70: 681b ldr r3, [r3, #0] 8006c72: 4a52 ldr r2, [pc, #328] @ (8006dbc ) 8006c74: 4293 cmp r3, r2 8006c76: d027 beq.n 8006cc8 8006c78: 687b ldr r3, [r7, #4] 8006c7a: 681b ldr r3, [r3, #0] 8006c7c: 4a50 ldr r2, [pc, #320] @ (8006dc0 ) 8006c7e: 4293 cmp r3, r2 8006c80: d022 beq.n 8006cc8 8006c82: 687b ldr r3, [r7, #4] 8006c84: 681b ldr r3, [r3, #0] 8006c86: 4a4f ldr r2, [pc, #316] @ (8006dc4 ) 8006c88: 4293 cmp r3, r2 8006c8a: d01d beq.n 8006cc8 8006c8c: 687b ldr r3, [r7, #4] 8006c8e: 681b ldr r3, [r3, #0] 8006c90: 4a4d ldr r2, [pc, #308] @ (8006dc8 ) 8006c92: 4293 cmp r3, r2 8006c94: d018 beq.n 8006cc8 8006c96: 687b ldr r3, [r7, #4] 8006c98: 681b ldr r3, [r3, #0] 8006c9a: 4a4c ldr r2, [pc, #304] @ (8006dcc ) 8006c9c: 4293 cmp r3, r2 8006c9e: d013 beq.n 8006cc8 8006ca0: 687b ldr r3, [r7, #4] 8006ca2: 681b ldr r3, [r3, #0] 8006ca4: 4a4a ldr r2, [pc, #296] @ (8006dd0 ) 8006ca6: 4293 cmp r3, r2 8006ca8: d00e beq.n 8006cc8 8006caa: 687b ldr r3, [r7, #4] 8006cac: 681b ldr r3, [r3, #0] 8006cae: 4a49 ldr r2, [pc, #292] @ (8006dd4 ) 8006cb0: 4293 cmp r3, r2 8006cb2: d009 beq.n 8006cc8 8006cb4: 687b ldr r3, [r7, #4] 8006cb6: 681b ldr r3, [r3, #0] 8006cb8: 4a47 ldr r2, [pc, #284] @ (8006dd8 ) 8006cba: 4293 cmp r3, r2 8006cbc: d004 beq.n 8006cc8 8006cbe: 687b ldr r3, [r7, #4] 8006cc0: 681b ldr r3, [r3, #0] 8006cc2: 4a46 ldr r2, [pc, #280] @ (8006ddc ) 8006cc4: 4293 cmp r3, r2 8006cc6: d101 bne.n 8006ccc 8006cc8: 2301 movs r3, #1 8006cca: e000 b.n 8006cce 8006ccc: 2300 movs r3, #0 8006cce: 2b00 cmp r3, #0 8006cd0: f000 8086 beq.w 8006de0 { /* Set Abort State */ hdma->State = HAL_DMA_STATE_ABORT; 8006cd4: 687b ldr r3, [r7, #4] 8006cd6: 2204 movs r2, #4 8006cd8: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 8006cdc: 687b ldr r3, [r7, #4] 8006cde: 681b ldr r3, [r3, #0] 8006ce0: 4a2f ldr r2, [pc, #188] @ (8006da0 ) 8006ce2: 4293 cmp r3, r2 8006ce4: d04a beq.n 8006d7c 8006ce6: 687b ldr r3, [r7, #4] 8006ce8: 681b ldr r3, [r3, #0] 8006cea: 4a2e ldr r2, [pc, #184] @ (8006da4 ) 8006cec: 4293 cmp r3, r2 8006cee: d045 beq.n 8006d7c 8006cf0: 687b ldr r3, [r7, #4] 8006cf2: 681b ldr r3, [r3, #0] 8006cf4: 4a2c ldr r2, [pc, #176] @ (8006da8 ) 8006cf6: 4293 cmp r3, r2 8006cf8: d040 beq.n 8006d7c 8006cfa: 687b ldr r3, [r7, #4] 8006cfc: 681b ldr r3, [r3, #0] 8006cfe: 4a2b ldr r2, [pc, #172] @ (8006dac ) 8006d00: 4293 cmp r3, r2 8006d02: d03b beq.n 8006d7c 8006d04: 687b ldr r3, [r7, #4] 8006d06: 681b ldr r3, [r3, #0] 8006d08: 4a29 ldr r2, [pc, #164] @ (8006db0 ) 8006d0a: 4293 cmp r3, r2 8006d0c: d036 beq.n 8006d7c 8006d0e: 687b ldr r3, [r7, #4] 8006d10: 681b ldr r3, [r3, #0] 8006d12: 4a28 ldr r2, [pc, #160] @ (8006db4 ) 8006d14: 4293 cmp r3, r2 8006d16: d031 beq.n 8006d7c 8006d18: 687b ldr r3, [r7, #4] 8006d1a: 681b ldr r3, [r3, #0] 8006d1c: 4a26 ldr r2, [pc, #152] @ (8006db8 ) 8006d1e: 4293 cmp r3, r2 8006d20: d02c beq.n 8006d7c 8006d22: 687b ldr r3, [r7, #4] 8006d24: 681b ldr r3, [r3, #0] 8006d26: 4a25 ldr r2, [pc, #148] @ (8006dbc ) 8006d28: 4293 cmp r3, r2 8006d2a: d027 beq.n 8006d7c 8006d2c: 687b ldr r3, [r7, #4] 8006d2e: 681b ldr r3, [r3, #0] 8006d30: 4a23 ldr r2, [pc, #140] @ (8006dc0 ) 8006d32: 4293 cmp r3, r2 8006d34: d022 beq.n 8006d7c 8006d36: 687b ldr r3, [r7, #4] 8006d38: 681b ldr r3, [r3, #0] 8006d3a: 4a22 ldr r2, [pc, #136] @ (8006dc4 ) 8006d3c: 4293 cmp r3, r2 8006d3e: d01d beq.n 8006d7c 8006d40: 687b ldr r3, [r7, #4] 8006d42: 681b ldr r3, [r3, #0] 8006d44: 4a20 ldr r2, [pc, #128] @ (8006dc8 ) 8006d46: 4293 cmp r3, r2 8006d48: d018 beq.n 8006d7c 8006d4a: 687b ldr r3, [r7, #4] 8006d4c: 681b ldr r3, [r3, #0] 8006d4e: 4a1f ldr r2, [pc, #124] @ (8006dcc ) 8006d50: 4293 cmp r3, r2 8006d52: d013 beq.n 8006d7c 8006d54: 687b ldr r3, [r7, #4] 8006d56: 681b ldr r3, [r3, #0] 8006d58: 4a1d ldr r2, [pc, #116] @ (8006dd0 ) 8006d5a: 4293 cmp r3, r2 8006d5c: d00e beq.n 8006d7c 8006d5e: 687b ldr r3, [r7, #4] 8006d60: 681b ldr r3, [r3, #0] 8006d62: 4a1c ldr r2, [pc, #112] @ (8006dd4 ) 8006d64: 4293 cmp r3, r2 8006d66: d009 beq.n 8006d7c 8006d68: 687b ldr r3, [r7, #4] 8006d6a: 681b ldr r3, [r3, #0] 8006d6c: 4a1a ldr r2, [pc, #104] @ (8006dd8 ) 8006d6e: 4293 cmp r3, r2 8006d70: d004 beq.n 8006d7c 8006d72: 687b ldr r3, [r7, #4] 8006d74: 681b ldr r3, [r3, #0] 8006d76: 4a19 ldr r2, [pc, #100] @ (8006ddc ) 8006d78: 4293 cmp r3, r2 8006d7a: d108 bne.n 8006d8e 8006d7c: 687b ldr r3, [r7, #4] 8006d7e: 681b ldr r3, [r3, #0] 8006d80: 681a ldr r2, [r3, #0] 8006d82: 687b ldr r3, [r7, #4] 8006d84: 681b ldr r3, [r3, #0] 8006d86: f022 0201 bic.w r2, r2, #1 8006d8a: 601a str r2, [r3, #0] 8006d8c: e178 b.n 8007080 8006d8e: 687b ldr r3, [r7, #4] 8006d90: 681b ldr r3, [r3, #0] 8006d92: 681a ldr r2, [r3, #0] 8006d94: 687b ldr r3, [r7, #4] 8006d96: 681b ldr r3, [r3, #0] 8006d98: f022 0201 bic.w r2, r2, #1 8006d9c: 601a str r2, [r3, #0] 8006d9e: e16f b.n 8007080 8006da0: 40020010 .word 0x40020010 8006da4: 40020028 .word 0x40020028 8006da8: 40020040 .word 0x40020040 8006dac: 40020058 .word 0x40020058 8006db0: 40020070 .word 0x40020070 8006db4: 40020088 .word 0x40020088 8006db8: 400200a0 .word 0x400200a0 8006dbc: 400200b8 .word 0x400200b8 8006dc0: 40020410 .word 0x40020410 8006dc4: 40020428 .word 0x40020428 8006dc8: 40020440 .word 0x40020440 8006dcc: 40020458 .word 0x40020458 8006dd0: 40020470 .word 0x40020470 8006dd4: 40020488 .word 0x40020488 8006dd8: 400204a0 .word 0x400204a0 8006ddc: 400204b8 .word 0x400204b8 } else /* BDMA channel */ { /* Disable DMA All Interrupts */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR &= ~(BDMA_CCR_TCIE | BDMA_CCR_HTIE | BDMA_CCR_TEIE); 8006de0: 687b ldr r3, [r7, #4] 8006de2: 681b ldr r3, [r3, #0] 8006de4: 681a ldr r2, [r3, #0] 8006de6: 687b ldr r3, [r7, #4] 8006de8: 681b ldr r3, [r3, #0] 8006dea: f022 020e bic.w r2, r2, #14 8006dee: 601a str r2, [r3, #0] /* Disable the channel */ __HAL_DMA_DISABLE(hdma); 8006df0: 687b ldr r3, [r7, #4] 8006df2: 681b ldr r3, [r3, #0] 8006df4: 4a6c ldr r2, [pc, #432] @ (8006fa8 ) 8006df6: 4293 cmp r3, r2 8006df8: d04a beq.n 8006e90 8006dfa: 687b ldr r3, [r7, #4] 8006dfc: 681b ldr r3, [r3, #0] 8006dfe: 4a6b ldr r2, [pc, #428] @ (8006fac ) 8006e00: 4293 cmp r3, r2 8006e02: d045 beq.n 8006e90 8006e04: 687b ldr r3, [r7, #4] 8006e06: 681b ldr r3, [r3, #0] 8006e08: 4a69 ldr r2, [pc, #420] @ (8006fb0 ) 8006e0a: 4293 cmp r3, r2 8006e0c: d040 beq.n 8006e90 8006e0e: 687b ldr r3, [r7, #4] 8006e10: 681b ldr r3, [r3, #0] 8006e12: 4a68 ldr r2, [pc, #416] @ (8006fb4 ) 8006e14: 4293 cmp r3, r2 8006e16: d03b beq.n 8006e90 8006e18: 687b ldr r3, [r7, #4] 8006e1a: 681b ldr r3, [r3, #0] 8006e1c: 4a66 ldr r2, [pc, #408] @ (8006fb8 ) 8006e1e: 4293 cmp r3, r2 8006e20: d036 beq.n 8006e90 8006e22: 687b ldr r3, [r7, #4] 8006e24: 681b ldr r3, [r3, #0] 8006e26: 4a65 ldr r2, [pc, #404] @ (8006fbc ) 8006e28: 4293 cmp r3, r2 8006e2a: d031 beq.n 8006e90 8006e2c: 687b ldr r3, [r7, #4] 8006e2e: 681b ldr r3, [r3, #0] 8006e30: 4a63 ldr r2, [pc, #396] @ (8006fc0 ) 8006e32: 4293 cmp r3, r2 8006e34: d02c beq.n 8006e90 8006e36: 687b ldr r3, [r7, #4] 8006e38: 681b ldr r3, [r3, #0] 8006e3a: 4a62 ldr r2, [pc, #392] @ (8006fc4 ) 8006e3c: 4293 cmp r3, r2 8006e3e: d027 beq.n 8006e90 8006e40: 687b ldr r3, [r7, #4] 8006e42: 681b ldr r3, [r3, #0] 8006e44: 4a60 ldr r2, [pc, #384] @ (8006fc8 ) 8006e46: 4293 cmp r3, r2 8006e48: d022 beq.n 8006e90 8006e4a: 687b ldr r3, [r7, #4] 8006e4c: 681b ldr r3, [r3, #0] 8006e4e: 4a5f ldr r2, [pc, #380] @ (8006fcc ) 8006e50: 4293 cmp r3, r2 8006e52: d01d beq.n 8006e90 8006e54: 687b ldr r3, [r7, #4] 8006e56: 681b ldr r3, [r3, #0] 8006e58: 4a5d ldr r2, [pc, #372] @ (8006fd0 ) 8006e5a: 4293 cmp r3, r2 8006e5c: d018 beq.n 8006e90 8006e5e: 687b ldr r3, [r7, #4] 8006e60: 681b ldr r3, [r3, #0] 8006e62: 4a5c ldr r2, [pc, #368] @ (8006fd4 ) 8006e64: 4293 cmp r3, r2 8006e66: d013 beq.n 8006e90 8006e68: 687b ldr r3, [r7, #4] 8006e6a: 681b ldr r3, [r3, #0] 8006e6c: 4a5a ldr r2, [pc, #360] @ (8006fd8 ) 8006e6e: 4293 cmp r3, r2 8006e70: d00e beq.n 8006e90 8006e72: 687b ldr r3, [r7, #4] 8006e74: 681b ldr r3, [r3, #0] 8006e76: 4a59 ldr r2, [pc, #356] @ (8006fdc ) 8006e78: 4293 cmp r3, r2 8006e7a: d009 beq.n 8006e90 8006e7c: 687b ldr r3, [r7, #4] 8006e7e: 681b ldr r3, [r3, #0] 8006e80: 4a57 ldr r2, [pc, #348] @ (8006fe0 ) 8006e82: 4293 cmp r3, r2 8006e84: d004 beq.n 8006e90 8006e86: 687b ldr r3, [r7, #4] 8006e88: 681b ldr r3, [r3, #0] 8006e8a: 4a56 ldr r2, [pc, #344] @ (8006fe4 ) 8006e8c: 4293 cmp r3, r2 8006e8e: d108 bne.n 8006ea2 8006e90: 687b ldr r3, [r7, #4] 8006e92: 681b ldr r3, [r3, #0] 8006e94: 681a ldr r2, [r3, #0] 8006e96: 687b ldr r3, [r7, #4] 8006e98: 681b ldr r3, [r3, #0] 8006e9a: f022 0201 bic.w r2, r2, #1 8006e9e: 601a str r2, [r3, #0] 8006ea0: e007 b.n 8006eb2 8006ea2: 687b ldr r3, [r7, #4] 8006ea4: 681b ldr r3, [r3, #0] 8006ea6: 681a ldr r2, [r3, #0] 8006ea8: 687b ldr r3, [r7, #4] 8006eaa: 681b ldr r3, [r3, #0] 8006eac: f022 0201 bic.w r2, r2, #1 8006eb0: 601a str r2, [r3, #0] if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8006eb2: 687b ldr r3, [r7, #4] 8006eb4: 681b ldr r3, [r3, #0] 8006eb6: 4a3c ldr r2, [pc, #240] @ (8006fa8 ) 8006eb8: 4293 cmp r3, r2 8006eba: d072 beq.n 8006fa2 8006ebc: 687b ldr r3, [r7, #4] 8006ebe: 681b ldr r3, [r3, #0] 8006ec0: 4a3a ldr r2, [pc, #232] @ (8006fac ) 8006ec2: 4293 cmp r3, r2 8006ec4: d06d beq.n 8006fa2 8006ec6: 687b ldr r3, [r7, #4] 8006ec8: 681b ldr r3, [r3, #0] 8006eca: 4a39 ldr r2, [pc, #228] @ (8006fb0 ) 8006ecc: 4293 cmp r3, r2 8006ece: d068 beq.n 8006fa2 8006ed0: 687b ldr r3, [r7, #4] 8006ed2: 681b ldr r3, [r3, #0] 8006ed4: 4a37 ldr r2, [pc, #220] @ (8006fb4 ) 8006ed6: 4293 cmp r3, r2 8006ed8: d063 beq.n 8006fa2 8006eda: 687b ldr r3, [r7, #4] 8006edc: 681b ldr r3, [r3, #0] 8006ede: 4a36 ldr r2, [pc, #216] @ (8006fb8 ) 8006ee0: 4293 cmp r3, r2 8006ee2: d05e beq.n 8006fa2 8006ee4: 687b ldr r3, [r7, #4] 8006ee6: 681b ldr r3, [r3, #0] 8006ee8: 4a34 ldr r2, [pc, #208] @ (8006fbc ) 8006eea: 4293 cmp r3, r2 8006eec: d059 beq.n 8006fa2 8006eee: 687b ldr r3, [r7, #4] 8006ef0: 681b ldr r3, [r3, #0] 8006ef2: 4a33 ldr r2, [pc, #204] @ (8006fc0 ) 8006ef4: 4293 cmp r3, r2 8006ef6: d054 beq.n 8006fa2 8006ef8: 687b ldr r3, [r7, #4] 8006efa: 681b ldr r3, [r3, #0] 8006efc: 4a31 ldr r2, [pc, #196] @ (8006fc4 ) 8006efe: 4293 cmp r3, r2 8006f00: d04f beq.n 8006fa2 8006f02: 687b ldr r3, [r7, #4] 8006f04: 681b ldr r3, [r3, #0] 8006f06: 4a30 ldr r2, [pc, #192] @ (8006fc8 ) 8006f08: 4293 cmp r3, r2 8006f0a: d04a beq.n 8006fa2 8006f0c: 687b ldr r3, [r7, #4] 8006f0e: 681b ldr r3, [r3, #0] 8006f10: 4a2e ldr r2, [pc, #184] @ (8006fcc ) 8006f12: 4293 cmp r3, r2 8006f14: d045 beq.n 8006fa2 8006f16: 687b ldr r3, [r7, #4] 8006f18: 681b ldr r3, [r3, #0] 8006f1a: 4a2d ldr r2, [pc, #180] @ (8006fd0 ) 8006f1c: 4293 cmp r3, r2 8006f1e: d040 beq.n 8006fa2 8006f20: 687b ldr r3, [r7, #4] 8006f22: 681b ldr r3, [r3, #0] 8006f24: 4a2b ldr r2, [pc, #172] @ (8006fd4 ) 8006f26: 4293 cmp r3, r2 8006f28: d03b beq.n 8006fa2 8006f2a: 687b ldr r3, [r7, #4] 8006f2c: 681b ldr r3, [r3, #0] 8006f2e: 4a2a ldr r2, [pc, #168] @ (8006fd8 ) 8006f30: 4293 cmp r3, r2 8006f32: d036 beq.n 8006fa2 8006f34: 687b ldr r3, [r7, #4] 8006f36: 681b ldr r3, [r3, #0] 8006f38: 4a28 ldr r2, [pc, #160] @ (8006fdc ) 8006f3a: 4293 cmp r3, r2 8006f3c: d031 beq.n 8006fa2 8006f3e: 687b ldr r3, [r7, #4] 8006f40: 681b ldr r3, [r3, #0] 8006f42: 4a27 ldr r2, [pc, #156] @ (8006fe0 ) 8006f44: 4293 cmp r3, r2 8006f46: d02c beq.n 8006fa2 8006f48: 687b ldr r3, [r7, #4] 8006f4a: 681b ldr r3, [r3, #0] 8006f4c: 4a25 ldr r2, [pc, #148] @ (8006fe4 ) 8006f4e: 4293 cmp r3, r2 8006f50: d027 beq.n 8006fa2 8006f52: 687b ldr r3, [r7, #4] 8006f54: 681b ldr r3, [r3, #0] 8006f56: 4a24 ldr r2, [pc, #144] @ (8006fe8 ) 8006f58: 4293 cmp r3, r2 8006f5a: d022 beq.n 8006fa2 8006f5c: 687b ldr r3, [r7, #4] 8006f5e: 681b ldr r3, [r3, #0] 8006f60: 4a22 ldr r2, [pc, #136] @ (8006fec ) 8006f62: 4293 cmp r3, r2 8006f64: d01d beq.n 8006fa2 8006f66: 687b ldr r3, [r7, #4] 8006f68: 681b ldr r3, [r3, #0] 8006f6a: 4a21 ldr r2, [pc, #132] @ (8006ff0 ) 8006f6c: 4293 cmp r3, r2 8006f6e: d018 beq.n 8006fa2 8006f70: 687b ldr r3, [r7, #4] 8006f72: 681b ldr r3, [r3, #0] 8006f74: 4a1f ldr r2, [pc, #124] @ (8006ff4 ) 8006f76: 4293 cmp r3, r2 8006f78: d013 beq.n 8006fa2 8006f7a: 687b ldr r3, [r7, #4] 8006f7c: 681b ldr r3, [r3, #0] 8006f7e: 4a1e ldr r2, [pc, #120] @ (8006ff8 ) 8006f80: 4293 cmp r3, r2 8006f82: d00e beq.n 8006fa2 8006f84: 687b ldr r3, [r7, #4] 8006f86: 681b ldr r3, [r3, #0] 8006f88: 4a1c ldr r2, [pc, #112] @ (8006ffc ) 8006f8a: 4293 cmp r3, r2 8006f8c: d009 beq.n 8006fa2 8006f8e: 687b ldr r3, [r7, #4] 8006f90: 681b ldr r3, [r3, #0] 8006f92: 4a1b ldr r2, [pc, #108] @ (8007000 ) 8006f94: 4293 cmp r3, r2 8006f96: d004 beq.n 8006fa2 8006f98: 687b ldr r3, [r7, #4] 8006f9a: 681b ldr r3, [r3, #0] 8006f9c: 4a19 ldr r2, [pc, #100] @ (8007004 ) 8006f9e: 4293 cmp r3, r2 8006fa0: d132 bne.n 8007008 8006fa2: 2301 movs r3, #1 8006fa4: e031 b.n 800700a 8006fa6: bf00 nop 8006fa8: 40020010 .word 0x40020010 8006fac: 40020028 .word 0x40020028 8006fb0: 40020040 .word 0x40020040 8006fb4: 40020058 .word 0x40020058 8006fb8: 40020070 .word 0x40020070 8006fbc: 40020088 .word 0x40020088 8006fc0: 400200a0 .word 0x400200a0 8006fc4: 400200b8 .word 0x400200b8 8006fc8: 40020410 .word 0x40020410 8006fcc: 40020428 .word 0x40020428 8006fd0: 40020440 .word 0x40020440 8006fd4: 40020458 .word 0x40020458 8006fd8: 40020470 .word 0x40020470 8006fdc: 40020488 .word 0x40020488 8006fe0: 400204a0 .word 0x400204a0 8006fe4: 400204b8 .word 0x400204b8 8006fe8: 58025408 .word 0x58025408 8006fec: 5802541c .word 0x5802541c 8006ff0: 58025430 .word 0x58025430 8006ff4: 58025444 .word 0x58025444 8006ff8: 58025458 .word 0x58025458 8006ffc: 5802546c .word 0x5802546c 8007000: 58025480 .word 0x58025480 8007004: 58025494 .word 0x58025494 8007008: 2300 movs r3, #0 800700a: 2b00 cmp r3, #0 800700c: d028 beq.n 8007060 { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 800700e: 687b ldr r3, [r7, #4] 8007010: 6e1b ldr r3, [r3, #96] @ 0x60 8007012: 681a ldr r2, [r3, #0] 8007014: 687b ldr r3, [r7, #4] 8007016: 6e1b ldr r3, [r3, #96] @ 0x60 8007018: f422 7280 bic.w r2, r2, #256 @ 0x100 800701c: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 800701e: 687b ldr r3, [r7, #4] 8007020: 6d9b ldr r3, [r3, #88] @ 0x58 8007022: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 8007024: 687b ldr r3, [r7, #4] 8007026: 6ddb ldr r3, [r3, #92] @ 0x5c 8007028: f003 031f and.w r3, r3, #31 800702c: 2201 movs r2, #1 800702e: 409a lsls r2, r3 8007030: 68fb ldr r3, [r7, #12] 8007032: 605a str r2, [r3, #4] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 8007034: 687b ldr r3, [r7, #4] 8007036: 6e5b ldr r3, [r3, #100] @ 0x64 8007038: 687a ldr r2, [r7, #4] 800703a: 6e92 ldr r2, [r2, #104] @ 0x68 800703c: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 800703e: 687b ldr r3, [r7, #4] 8007040: 6edb ldr r3, [r3, #108] @ 0x6c 8007042: 2b00 cmp r3, #0 8007044: d00c beq.n 8007060 { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 8007046: 687b ldr r3, [r7, #4] 8007048: 6edb ldr r3, [r3, #108] @ 0x6c 800704a: 681a ldr r2, [r3, #0] 800704c: 687b ldr r3, [r7, #4] 800704e: 6edb ldr r3, [r3, #108] @ 0x6c 8007050: f422 7280 bic.w r2, r2, #256 @ 0x100 8007054: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 8007056: 687b ldr r3, [r7, #4] 8007058: 6f1b ldr r3, [r3, #112] @ 0x70 800705a: 687a ldr r2, [r7, #4] 800705c: 6f52 ldr r2, [r2, #116] @ 0x74 800705e: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007060: 687b ldr r3, [r7, #4] 8007062: 2201 movs r2, #1 8007064: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007068: 687b ldr r3, [r7, #4] 800706a: 2200 movs r2, #0 800706c: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Call User Abort callback */ if(hdma->XferAbortCallback != NULL) 8007070: 687b ldr r3, [r7, #4] 8007072: 6d1b ldr r3, [r3, #80] @ 0x50 8007074: 2b00 cmp r3, #0 8007076: d003 beq.n 8007080 { hdma->XferAbortCallback(hdma); 8007078: 687b ldr r3, [r7, #4] 800707a: 6d1b ldr r3, [r3, #80] @ 0x50 800707c: 6878 ldr r0, [r7, #4] 800707e: 4798 blx r3 } } } return HAL_OK; 8007080: 2300 movs r3, #0 } 8007082: 4618 mov r0, r3 8007084: 3710 adds r7, #16 8007086: 46bd mov sp, r7 8007088: bd80 pop {r7, pc} 800708a: bf00 nop 0800708c : * @param hdma: pointer to a DMA_HandleTypeDef structure that contains * the configuration information for the specified DMA Stream. * @retval None */ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma) { 800708c: b580 push {r7, lr} 800708e: b08a sub sp, #40 @ 0x28 8007090: af00 add r7, sp, #0 8007092: 6078 str r0, [r7, #4] uint32_t tmpisr_dma, tmpisr_bdma; uint32_t ccr_reg; __IO uint32_t count = 0U; 8007094: 2300 movs r3, #0 8007096: 60fb str r3, [r7, #12] uint32_t timeout = SystemCoreClock / 9600U; 8007098: 4b67 ldr r3, [pc, #412] @ (8007238 ) 800709a: 681b ldr r3, [r3, #0] 800709c: 4a67 ldr r2, [pc, #412] @ (800723c ) 800709e: fba2 2303 umull r2, r3, r2, r3 80070a2: 0a9b lsrs r3, r3, #10 80070a4: 627b str r3, [r7, #36] @ 0x24 /* calculate DMA base and stream number */ DMA_Base_Registers *regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 80070a6: 687b ldr r3, [r7, #4] 80070a8: 6d9b ldr r3, [r3, #88] @ 0x58 80070aa: 623b str r3, [r7, #32] BDMA_Base_Registers *regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 80070ac: 687b ldr r3, [r7, #4] 80070ae: 6d9b ldr r3, [r3, #88] @ 0x58 80070b0: 61fb str r3, [r7, #28] tmpisr_dma = regs_dma->ISR; 80070b2: 6a3b ldr r3, [r7, #32] 80070b4: 681b ldr r3, [r3, #0] 80070b6: 61bb str r3, [r7, #24] tmpisr_bdma = regs_bdma->ISR; 80070b8: 69fb ldr r3, [r7, #28] 80070ba: 681b ldr r3, [r3, #0] 80070bc: 617b str r3, [r7, #20] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 80070be: 687b ldr r3, [r7, #4] 80070c0: 681b ldr r3, [r3, #0] 80070c2: 4a5f ldr r2, [pc, #380] @ (8007240 ) 80070c4: 4293 cmp r3, r2 80070c6: d04a beq.n 800715e 80070c8: 687b ldr r3, [r7, #4] 80070ca: 681b ldr r3, [r3, #0] 80070cc: 4a5d ldr r2, [pc, #372] @ (8007244 ) 80070ce: 4293 cmp r3, r2 80070d0: d045 beq.n 800715e 80070d2: 687b ldr r3, [r7, #4] 80070d4: 681b ldr r3, [r3, #0] 80070d6: 4a5c ldr r2, [pc, #368] @ (8007248 ) 80070d8: 4293 cmp r3, r2 80070da: d040 beq.n 800715e 80070dc: 687b ldr r3, [r7, #4] 80070de: 681b ldr r3, [r3, #0] 80070e0: 4a5a ldr r2, [pc, #360] @ (800724c ) 80070e2: 4293 cmp r3, r2 80070e4: d03b beq.n 800715e 80070e6: 687b ldr r3, [r7, #4] 80070e8: 681b ldr r3, [r3, #0] 80070ea: 4a59 ldr r2, [pc, #356] @ (8007250 ) 80070ec: 4293 cmp r3, r2 80070ee: d036 beq.n 800715e 80070f0: 687b ldr r3, [r7, #4] 80070f2: 681b ldr r3, [r3, #0] 80070f4: 4a57 ldr r2, [pc, #348] @ (8007254 ) 80070f6: 4293 cmp r3, r2 80070f8: d031 beq.n 800715e 80070fa: 687b ldr r3, [r7, #4] 80070fc: 681b ldr r3, [r3, #0] 80070fe: 4a56 ldr r2, [pc, #344] @ (8007258 ) 8007100: 4293 cmp r3, r2 8007102: d02c beq.n 800715e 8007104: 687b ldr r3, [r7, #4] 8007106: 681b ldr r3, [r3, #0] 8007108: 4a54 ldr r2, [pc, #336] @ (800725c ) 800710a: 4293 cmp r3, r2 800710c: d027 beq.n 800715e 800710e: 687b ldr r3, [r7, #4] 8007110: 681b ldr r3, [r3, #0] 8007112: 4a53 ldr r2, [pc, #332] @ (8007260 ) 8007114: 4293 cmp r3, r2 8007116: d022 beq.n 800715e 8007118: 687b ldr r3, [r7, #4] 800711a: 681b ldr r3, [r3, #0] 800711c: 4a51 ldr r2, [pc, #324] @ (8007264 ) 800711e: 4293 cmp r3, r2 8007120: d01d beq.n 800715e 8007122: 687b ldr r3, [r7, #4] 8007124: 681b ldr r3, [r3, #0] 8007126: 4a50 ldr r2, [pc, #320] @ (8007268 ) 8007128: 4293 cmp r3, r2 800712a: d018 beq.n 800715e 800712c: 687b ldr r3, [r7, #4] 800712e: 681b ldr r3, [r3, #0] 8007130: 4a4e ldr r2, [pc, #312] @ (800726c ) 8007132: 4293 cmp r3, r2 8007134: d013 beq.n 800715e 8007136: 687b ldr r3, [r7, #4] 8007138: 681b ldr r3, [r3, #0] 800713a: 4a4d ldr r2, [pc, #308] @ (8007270 ) 800713c: 4293 cmp r3, r2 800713e: d00e beq.n 800715e 8007140: 687b ldr r3, [r7, #4] 8007142: 681b ldr r3, [r3, #0] 8007144: 4a4b ldr r2, [pc, #300] @ (8007274 ) 8007146: 4293 cmp r3, r2 8007148: d009 beq.n 800715e 800714a: 687b ldr r3, [r7, #4] 800714c: 681b ldr r3, [r3, #0] 800714e: 4a4a ldr r2, [pc, #296] @ (8007278 ) 8007150: 4293 cmp r3, r2 8007152: d004 beq.n 800715e 8007154: 687b ldr r3, [r7, #4] 8007156: 681b ldr r3, [r3, #0] 8007158: 4a48 ldr r2, [pc, #288] @ (800727c ) 800715a: 4293 cmp r3, r2 800715c: d101 bne.n 8007162 800715e: 2301 movs r3, #1 8007160: e000 b.n 8007164 8007162: 2300 movs r3, #0 8007164: 2b00 cmp r3, #0 8007166: f000 842b beq.w 80079c0 { /* Transfer Error Interrupt management ***************************************/ if ((tmpisr_dma & (DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 800716a: 687b ldr r3, [r7, #4] 800716c: 6ddb ldr r3, [r3, #92] @ 0x5c 800716e: f003 031f and.w r3, r3, #31 8007172: 2208 movs r2, #8 8007174: 409a lsls r2, r3 8007176: 69bb ldr r3, [r7, #24] 8007178: 4013 ands r3, r2 800717a: 2b00 cmp r3, #0 800717c: f000 80a2 beq.w 80072c4 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TE) != 0U) 8007180: 687b ldr r3, [r7, #4] 8007182: 681b ldr r3, [r3, #0] 8007184: 4a2e ldr r2, [pc, #184] @ (8007240 ) 8007186: 4293 cmp r3, r2 8007188: d04a beq.n 8007220 800718a: 687b ldr r3, [r7, #4] 800718c: 681b ldr r3, [r3, #0] 800718e: 4a2d ldr r2, [pc, #180] @ (8007244 ) 8007190: 4293 cmp r3, r2 8007192: d045 beq.n 8007220 8007194: 687b ldr r3, [r7, #4] 8007196: 681b ldr r3, [r3, #0] 8007198: 4a2b ldr r2, [pc, #172] @ (8007248 ) 800719a: 4293 cmp r3, r2 800719c: d040 beq.n 8007220 800719e: 687b ldr r3, [r7, #4] 80071a0: 681b ldr r3, [r3, #0] 80071a2: 4a2a ldr r2, [pc, #168] @ (800724c ) 80071a4: 4293 cmp r3, r2 80071a6: d03b beq.n 8007220 80071a8: 687b ldr r3, [r7, #4] 80071aa: 681b ldr r3, [r3, #0] 80071ac: 4a28 ldr r2, [pc, #160] @ (8007250 ) 80071ae: 4293 cmp r3, r2 80071b0: d036 beq.n 8007220 80071b2: 687b ldr r3, [r7, #4] 80071b4: 681b ldr r3, [r3, #0] 80071b6: 4a27 ldr r2, [pc, #156] @ (8007254 ) 80071b8: 4293 cmp r3, r2 80071ba: d031 beq.n 8007220 80071bc: 687b ldr r3, [r7, #4] 80071be: 681b ldr r3, [r3, #0] 80071c0: 4a25 ldr r2, [pc, #148] @ (8007258 ) 80071c2: 4293 cmp r3, r2 80071c4: d02c beq.n 8007220 80071c6: 687b ldr r3, [r7, #4] 80071c8: 681b ldr r3, [r3, #0] 80071ca: 4a24 ldr r2, [pc, #144] @ (800725c ) 80071cc: 4293 cmp r3, r2 80071ce: d027 beq.n 8007220 80071d0: 687b ldr r3, [r7, #4] 80071d2: 681b ldr r3, [r3, #0] 80071d4: 4a22 ldr r2, [pc, #136] @ (8007260 ) 80071d6: 4293 cmp r3, r2 80071d8: d022 beq.n 8007220 80071da: 687b ldr r3, [r7, #4] 80071dc: 681b ldr r3, [r3, #0] 80071de: 4a21 ldr r2, [pc, #132] @ (8007264 ) 80071e0: 4293 cmp r3, r2 80071e2: d01d beq.n 8007220 80071e4: 687b ldr r3, [r7, #4] 80071e6: 681b ldr r3, [r3, #0] 80071e8: 4a1f ldr r2, [pc, #124] @ (8007268 ) 80071ea: 4293 cmp r3, r2 80071ec: d018 beq.n 8007220 80071ee: 687b ldr r3, [r7, #4] 80071f0: 681b ldr r3, [r3, #0] 80071f2: 4a1e ldr r2, [pc, #120] @ (800726c ) 80071f4: 4293 cmp r3, r2 80071f6: d013 beq.n 8007220 80071f8: 687b ldr r3, [r7, #4] 80071fa: 681b ldr r3, [r3, #0] 80071fc: 4a1c ldr r2, [pc, #112] @ (8007270 ) 80071fe: 4293 cmp r3, r2 8007200: d00e beq.n 8007220 8007202: 687b ldr r3, [r7, #4] 8007204: 681b ldr r3, [r3, #0] 8007206: 4a1b ldr r2, [pc, #108] @ (8007274 ) 8007208: 4293 cmp r3, r2 800720a: d009 beq.n 8007220 800720c: 687b ldr r3, [r7, #4] 800720e: 681b ldr r3, [r3, #0] 8007210: 4a19 ldr r2, [pc, #100] @ (8007278 ) 8007212: 4293 cmp r3, r2 8007214: d004 beq.n 8007220 8007216: 687b ldr r3, [r7, #4] 8007218: 681b ldr r3, [r3, #0] 800721a: 4a18 ldr r2, [pc, #96] @ (800727c ) 800721c: 4293 cmp r3, r2 800721e: d12f bne.n 8007280 8007220: 687b ldr r3, [r7, #4] 8007222: 681b ldr r3, [r3, #0] 8007224: 681b ldr r3, [r3, #0] 8007226: f003 0304 and.w r3, r3, #4 800722a: 2b00 cmp r3, #0 800722c: bf14 ite ne 800722e: 2301 movne r3, #1 8007230: 2300 moveq r3, #0 8007232: b2db uxtb r3, r3 8007234: e02e b.n 8007294 8007236: bf00 nop 8007238: 2400000c .word 0x2400000c 800723c: 1b4e81b5 .word 0x1b4e81b5 8007240: 40020010 .word 0x40020010 8007244: 40020028 .word 0x40020028 8007248: 40020040 .word 0x40020040 800724c: 40020058 .word 0x40020058 8007250: 40020070 .word 0x40020070 8007254: 40020088 .word 0x40020088 8007258: 400200a0 .word 0x400200a0 800725c: 400200b8 .word 0x400200b8 8007260: 40020410 .word 0x40020410 8007264: 40020428 .word 0x40020428 8007268: 40020440 .word 0x40020440 800726c: 40020458 .word 0x40020458 8007270: 40020470 .word 0x40020470 8007274: 40020488 .word 0x40020488 8007278: 400204a0 .word 0x400204a0 800727c: 400204b8 .word 0x400204b8 8007280: 687b ldr r3, [r7, #4] 8007282: 681b ldr r3, [r3, #0] 8007284: 681b ldr r3, [r3, #0] 8007286: f003 0308 and.w r3, r3, #8 800728a: 2b00 cmp r3, #0 800728c: bf14 ite ne 800728e: 2301 movne r3, #1 8007290: 2300 moveq r3, #0 8007292: b2db uxtb r3, r3 8007294: 2b00 cmp r3, #0 8007296: d015 beq.n 80072c4 { /* Disable the transfer error interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TE); 8007298: 687b ldr r3, [r7, #4] 800729a: 681b ldr r3, [r3, #0] 800729c: 681a ldr r2, [r3, #0] 800729e: 687b ldr r3, [r7, #4] 80072a0: 681b ldr r3, [r3, #0] 80072a2: f022 0204 bic.w r2, r2, #4 80072a6: 601a str r2, [r3, #0] /* Clear the transfer error flag */ regs_dma->IFCR = DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU); 80072a8: 687b ldr r3, [r7, #4] 80072aa: 6ddb ldr r3, [r3, #92] @ 0x5c 80072ac: f003 031f and.w r3, r3, #31 80072b0: 2208 movs r2, #8 80072b2: 409a lsls r2, r3 80072b4: 6a3b ldr r3, [r7, #32] 80072b6: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_TE; 80072b8: 687b ldr r3, [r7, #4] 80072ba: 6d5b ldr r3, [r3, #84] @ 0x54 80072bc: f043 0201 orr.w r2, r3, #1 80072c0: 687b ldr r3, [r7, #4] 80072c2: 655a str r2, [r3, #84] @ 0x54 } } /* FIFO Error Interrupt management ******************************************/ if ((tmpisr_dma & (DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80072c4: 687b ldr r3, [r7, #4] 80072c6: 6ddb ldr r3, [r3, #92] @ 0x5c 80072c8: f003 031f and.w r3, r3, #31 80072cc: 69ba ldr r2, [r7, #24] 80072ce: fa22 f303 lsr.w r3, r2, r3 80072d2: f003 0301 and.w r3, r3, #1 80072d6: 2b00 cmp r3, #0 80072d8: d06e beq.n 80073b8 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_FE) != 0U) 80072da: 687b ldr r3, [r7, #4] 80072dc: 681b ldr r3, [r3, #0] 80072de: 4a69 ldr r2, [pc, #420] @ (8007484 ) 80072e0: 4293 cmp r3, r2 80072e2: d04a beq.n 800737a 80072e4: 687b ldr r3, [r7, #4] 80072e6: 681b ldr r3, [r3, #0] 80072e8: 4a67 ldr r2, [pc, #412] @ (8007488 ) 80072ea: 4293 cmp r3, r2 80072ec: d045 beq.n 800737a 80072ee: 687b ldr r3, [r7, #4] 80072f0: 681b ldr r3, [r3, #0] 80072f2: 4a66 ldr r2, [pc, #408] @ (800748c ) 80072f4: 4293 cmp r3, r2 80072f6: d040 beq.n 800737a 80072f8: 687b ldr r3, [r7, #4] 80072fa: 681b ldr r3, [r3, #0] 80072fc: 4a64 ldr r2, [pc, #400] @ (8007490 ) 80072fe: 4293 cmp r3, r2 8007300: d03b beq.n 800737a 8007302: 687b ldr r3, [r7, #4] 8007304: 681b ldr r3, [r3, #0] 8007306: 4a63 ldr r2, [pc, #396] @ (8007494 ) 8007308: 4293 cmp r3, r2 800730a: d036 beq.n 800737a 800730c: 687b ldr r3, [r7, #4] 800730e: 681b ldr r3, [r3, #0] 8007310: 4a61 ldr r2, [pc, #388] @ (8007498 ) 8007312: 4293 cmp r3, r2 8007314: d031 beq.n 800737a 8007316: 687b ldr r3, [r7, #4] 8007318: 681b ldr r3, [r3, #0] 800731a: 4a60 ldr r2, [pc, #384] @ (800749c ) 800731c: 4293 cmp r3, r2 800731e: d02c beq.n 800737a 8007320: 687b ldr r3, [r7, #4] 8007322: 681b ldr r3, [r3, #0] 8007324: 4a5e ldr r2, [pc, #376] @ (80074a0 ) 8007326: 4293 cmp r3, r2 8007328: d027 beq.n 800737a 800732a: 687b ldr r3, [r7, #4] 800732c: 681b ldr r3, [r3, #0] 800732e: 4a5d ldr r2, [pc, #372] @ (80074a4 ) 8007330: 4293 cmp r3, r2 8007332: d022 beq.n 800737a 8007334: 687b ldr r3, [r7, #4] 8007336: 681b ldr r3, [r3, #0] 8007338: 4a5b ldr r2, [pc, #364] @ (80074a8 ) 800733a: 4293 cmp r3, r2 800733c: d01d beq.n 800737a 800733e: 687b ldr r3, [r7, #4] 8007340: 681b ldr r3, [r3, #0] 8007342: 4a5a ldr r2, [pc, #360] @ (80074ac ) 8007344: 4293 cmp r3, r2 8007346: d018 beq.n 800737a 8007348: 687b ldr r3, [r7, #4] 800734a: 681b ldr r3, [r3, #0] 800734c: 4a58 ldr r2, [pc, #352] @ (80074b0 ) 800734e: 4293 cmp r3, r2 8007350: d013 beq.n 800737a 8007352: 687b ldr r3, [r7, #4] 8007354: 681b ldr r3, [r3, #0] 8007356: 4a57 ldr r2, [pc, #348] @ (80074b4 ) 8007358: 4293 cmp r3, r2 800735a: d00e beq.n 800737a 800735c: 687b ldr r3, [r7, #4] 800735e: 681b ldr r3, [r3, #0] 8007360: 4a55 ldr r2, [pc, #340] @ (80074b8 ) 8007362: 4293 cmp r3, r2 8007364: d009 beq.n 800737a 8007366: 687b ldr r3, [r7, #4] 8007368: 681b ldr r3, [r3, #0] 800736a: 4a54 ldr r2, [pc, #336] @ (80074bc ) 800736c: 4293 cmp r3, r2 800736e: d004 beq.n 800737a 8007370: 687b ldr r3, [r7, #4] 8007372: 681b ldr r3, [r3, #0] 8007374: 4a52 ldr r2, [pc, #328] @ (80074c0 ) 8007376: 4293 cmp r3, r2 8007378: d10a bne.n 8007390 800737a: 687b ldr r3, [r7, #4] 800737c: 681b ldr r3, [r3, #0] 800737e: 695b ldr r3, [r3, #20] 8007380: f003 0380 and.w r3, r3, #128 @ 0x80 8007384: 2b00 cmp r3, #0 8007386: bf14 ite ne 8007388: 2301 movne r3, #1 800738a: 2300 moveq r3, #0 800738c: b2db uxtb r3, r3 800738e: e003 b.n 8007398 8007390: 687b ldr r3, [r7, #4] 8007392: 681b ldr r3, [r3, #0] 8007394: 681b ldr r3, [r3, #0] 8007396: 2300 movs r3, #0 8007398: 2b00 cmp r3, #0 800739a: d00d beq.n 80073b8 { /* Clear the FIFO error flag */ regs_dma->IFCR = DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU); 800739c: 687b ldr r3, [r7, #4] 800739e: 6ddb ldr r3, [r3, #92] @ 0x5c 80073a0: f003 031f and.w r3, r3, #31 80073a4: 2201 movs r2, #1 80073a6: 409a lsls r2, r3 80073a8: 6a3b ldr r3, [r7, #32] 80073aa: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_FE; 80073ac: 687b ldr r3, [r7, #4] 80073ae: 6d5b ldr r3, [r3, #84] @ 0x54 80073b0: f043 0202 orr.w r2, r3, #2 80073b4: 687b ldr r3, [r7, #4] 80073b6: 655a str r2, [r3, #84] @ 0x54 } } /* Direct Mode Error Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80073b8: 687b ldr r3, [r7, #4] 80073ba: 6ddb ldr r3, [r3, #92] @ 0x5c 80073bc: f003 031f and.w r3, r3, #31 80073c0: 2204 movs r2, #4 80073c2: 409a lsls r2, r3 80073c4: 69bb ldr r3, [r7, #24] 80073c6: 4013 ands r3, r2 80073c8: 2b00 cmp r3, #0 80073ca: f000 808f beq.w 80074ec { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_DME) != 0U) 80073ce: 687b ldr r3, [r7, #4] 80073d0: 681b ldr r3, [r3, #0] 80073d2: 4a2c ldr r2, [pc, #176] @ (8007484 ) 80073d4: 4293 cmp r3, r2 80073d6: d04a beq.n 800746e 80073d8: 687b ldr r3, [r7, #4] 80073da: 681b ldr r3, [r3, #0] 80073dc: 4a2a ldr r2, [pc, #168] @ (8007488 ) 80073de: 4293 cmp r3, r2 80073e0: d045 beq.n 800746e 80073e2: 687b ldr r3, [r7, #4] 80073e4: 681b ldr r3, [r3, #0] 80073e6: 4a29 ldr r2, [pc, #164] @ (800748c ) 80073e8: 4293 cmp r3, r2 80073ea: d040 beq.n 800746e 80073ec: 687b ldr r3, [r7, #4] 80073ee: 681b ldr r3, [r3, #0] 80073f0: 4a27 ldr r2, [pc, #156] @ (8007490 ) 80073f2: 4293 cmp r3, r2 80073f4: d03b beq.n 800746e 80073f6: 687b ldr r3, [r7, #4] 80073f8: 681b ldr r3, [r3, #0] 80073fa: 4a26 ldr r2, [pc, #152] @ (8007494 ) 80073fc: 4293 cmp r3, r2 80073fe: d036 beq.n 800746e 8007400: 687b ldr r3, [r7, #4] 8007402: 681b ldr r3, [r3, #0] 8007404: 4a24 ldr r2, [pc, #144] @ (8007498 ) 8007406: 4293 cmp r3, r2 8007408: d031 beq.n 800746e 800740a: 687b ldr r3, [r7, #4] 800740c: 681b ldr r3, [r3, #0] 800740e: 4a23 ldr r2, [pc, #140] @ (800749c ) 8007410: 4293 cmp r3, r2 8007412: d02c beq.n 800746e 8007414: 687b ldr r3, [r7, #4] 8007416: 681b ldr r3, [r3, #0] 8007418: 4a21 ldr r2, [pc, #132] @ (80074a0 ) 800741a: 4293 cmp r3, r2 800741c: d027 beq.n 800746e 800741e: 687b ldr r3, [r7, #4] 8007420: 681b ldr r3, [r3, #0] 8007422: 4a20 ldr r2, [pc, #128] @ (80074a4 ) 8007424: 4293 cmp r3, r2 8007426: d022 beq.n 800746e 8007428: 687b ldr r3, [r7, #4] 800742a: 681b ldr r3, [r3, #0] 800742c: 4a1e ldr r2, [pc, #120] @ (80074a8 ) 800742e: 4293 cmp r3, r2 8007430: d01d beq.n 800746e 8007432: 687b ldr r3, [r7, #4] 8007434: 681b ldr r3, [r3, #0] 8007436: 4a1d ldr r2, [pc, #116] @ (80074ac ) 8007438: 4293 cmp r3, r2 800743a: d018 beq.n 800746e 800743c: 687b ldr r3, [r7, #4] 800743e: 681b ldr r3, [r3, #0] 8007440: 4a1b ldr r2, [pc, #108] @ (80074b0 ) 8007442: 4293 cmp r3, r2 8007444: d013 beq.n 800746e 8007446: 687b ldr r3, [r7, #4] 8007448: 681b ldr r3, [r3, #0] 800744a: 4a1a ldr r2, [pc, #104] @ (80074b4 ) 800744c: 4293 cmp r3, r2 800744e: d00e beq.n 800746e 8007450: 687b ldr r3, [r7, #4] 8007452: 681b ldr r3, [r3, #0] 8007454: 4a18 ldr r2, [pc, #96] @ (80074b8 ) 8007456: 4293 cmp r3, r2 8007458: d009 beq.n 800746e 800745a: 687b ldr r3, [r7, #4] 800745c: 681b ldr r3, [r3, #0] 800745e: 4a17 ldr r2, [pc, #92] @ (80074bc ) 8007460: 4293 cmp r3, r2 8007462: d004 beq.n 800746e 8007464: 687b ldr r3, [r7, #4] 8007466: 681b ldr r3, [r3, #0] 8007468: 4a15 ldr r2, [pc, #84] @ (80074c0 ) 800746a: 4293 cmp r3, r2 800746c: d12a bne.n 80074c4 800746e: 687b ldr r3, [r7, #4] 8007470: 681b ldr r3, [r3, #0] 8007472: 681b ldr r3, [r3, #0] 8007474: f003 0302 and.w r3, r3, #2 8007478: 2b00 cmp r3, #0 800747a: bf14 ite ne 800747c: 2301 movne r3, #1 800747e: 2300 moveq r3, #0 8007480: b2db uxtb r3, r3 8007482: e023 b.n 80074cc 8007484: 40020010 .word 0x40020010 8007488: 40020028 .word 0x40020028 800748c: 40020040 .word 0x40020040 8007490: 40020058 .word 0x40020058 8007494: 40020070 .word 0x40020070 8007498: 40020088 .word 0x40020088 800749c: 400200a0 .word 0x400200a0 80074a0: 400200b8 .word 0x400200b8 80074a4: 40020410 .word 0x40020410 80074a8: 40020428 .word 0x40020428 80074ac: 40020440 .word 0x40020440 80074b0: 40020458 .word 0x40020458 80074b4: 40020470 .word 0x40020470 80074b8: 40020488 .word 0x40020488 80074bc: 400204a0 .word 0x400204a0 80074c0: 400204b8 .word 0x400204b8 80074c4: 687b ldr r3, [r7, #4] 80074c6: 681b ldr r3, [r3, #0] 80074c8: 681b ldr r3, [r3, #0] 80074ca: 2300 movs r3, #0 80074cc: 2b00 cmp r3, #0 80074ce: d00d beq.n 80074ec { /* Clear the direct mode error flag */ regs_dma->IFCR = DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU); 80074d0: 687b ldr r3, [r7, #4] 80074d2: 6ddb ldr r3, [r3, #92] @ 0x5c 80074d4: f003 031f and.w r3, r3, #31 80074d8: 2204 movs r2, #4 80074da: 409a lsls r2, r3 80074dc: 6a3b ldr r3, [r7, #32] 80074de: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_DME; 80074e0: 687b ldr r3, [r7, #4] 80074e2: 6d5b ldr r3, [r3, #84] @ 0x54 80074e4: f043 0204 orr.w r2, r3, #4 80074e8: 687b ldr r3, [r7, #4] 80074ea: 655a str r2, [r3, #84] @ 0x54 } } /* Half Transfer Complete Interrupt management ******************************/ if ((tmpisr_dma & (DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80074ec: 687b ldr r3, [r7, #4] 80074ee: 6ddb ldr r3, [r3, #92] @ 0x5c 80074f0: f003 031f and.w r3, r3, #31 80074f4: 2210 movs r2, #16 80074f6: 409a lsls r2, r3 80074f8: 69bb ldr r3, [r7, #24] 80074fa: 4013 ands r3, r2 80074fc: 2b00 cmp r3, #0 80074fe: f000 80a6 beq.w 800764e { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_HT) != 0U) 8007502: 687b ldr r3, [r7, #4] 8007504: 681b ldr r3, [r3, #0] 8007506: 4a85 ldr r2, [pc, #532] @ (800771c ) 8007508: 4293 cmp r3, r2 800750a: d04a beq.n 80075a2 800750c: 687b ldr r3, [r7, #4] 800750e: 681b ldr r3, [r3, #0] 8007510: 4a83 ldr r2, [pc, #524] @ (8007720 ) 8007512: 4293 cmp r3, r2 8007514: d045 beq.n 80075a2 8007516: 687b ldr r3, [r7, #4] 8007518: 681b ldr r3, [r3, #0] 800751a: 4a82 ldr r2, [pc, #520] @ (8007724 ) 800751c: 4293 cmp r3, r2 800751e: d040 beq.n 80075a2 8007520: 687b ldr r3, [r7, #4] 8007522: 681b ldr r3, [r3, #0] 8007524: 4a80 ldr r2, [pc, #512] @ (8007728 ) 8007526: 4293 cmp r3, r2 8007528: d03b beq.n 80075a2 800752a: 687b ldr r3, [r7, #4] 800752c: 681b ldr r3, [r3, #0] 800752e: 4a7f ldr r2, [pc, #508] @ (800772c ) 8007530: 4293 cmp r3, r2 8007532: d036 beq.n 80075a2 8007534: 687b ldr r3, [r7, #4] 8007536: 681b ldr r3, [r3, #0] 8007538: 4a7d ldr r2, [pc, #500] @ (8007730 ) 800753a: 4293 cmp r3, r2 800753c: d031 beq.n 80075a2 800753e: 687b ldr r3, [r7, #4] 8007540: 681b ldr r3, [r3, #0] 8007542: 4a7c ldr r2, [pc, #496] @ (8007734 ) 8007544: 4293 cmp r3, r2 8007546: d02c beq.n 80075a2 8007548: 687b ldr r3, [r7, #4] 800754a: 681b ldr r3, [r3, #0] 800754c: 4a7a ldr r2, [pc, #488] @ (8007738 ) 800754e: 4293 cmp r3, r2 8007550: d027 beq.n 80075a2 8007552: 687b ldr r3, [r7, #4] 8007554: 681b ldr r3, [r3, #0] 8007556: 4a79 ldr r2, [pc, #484] @ (800773c ) 8007558: 4293 cmp r3, r2 800755a: d022 beq.n 80075a2 800755c: 687b ldr r3, [r7, #4] 800755e: 681b ldr r3, [r3, #0] 8007560: 4a77 ldr r2, [pc, #476] @ (8007740 ) 8007562: 4293 cmp r3, r2 8007564: d01d beq.n 80075a2 8007566: 687b ldr r3, [r7, #4] 8007568: 681b ldr r3, [r3, #0] 800756a: 4a76 ldr r2, [pc, #472] @ (8007744 ) 800756c: 4293 cmp r3, r2 800756e: d018 beq.n 80075a2 8007570: 687b ldr r3, [r7, #4] 8007572: 681b ldr r3, [r3, #0] 8007574: 4a74 ldr r2, [pc, #464] @ (8007748 ) 8007576: 4293 cmp r3, r2 8007578: d013 beq.n 80075a2 800757a: 687b ldr r3, [r7, #4] 800757c: 681b ldr r3, [r3, #0] 800757e: 4a73 ldr r2, [pc, #460] @ (800774c ) 8007580: 4293 cmp r3, r2 8007582: d00e beq.n 80075a2 8007584: 687b ldr r3, [r7, #4] 8007586: 681b ldr r3, [r3, #0] 8007588: 4a71 ldr r2, [pc, #452] @ (8007750 ) 800758a: 4293 cmp r3, r2 800758c: d009 beq.n 80075a2 800758e: 687b ldr r3, [r7, #4] 8007590: 681b ldr r3, [r3, #0] 8007592: 4a70 ldr r2, [pc, #448] @ (8007754 ) 8007594: 4293 cmp r3, r2 8007596: d004 beq.n 80075a2 8007598: 687b ldr r3, [r7, #4] 800759a: 681b ldr r3, [r3, #0] 800759c: 4a6e ldr r2, [pc, #440] @ (8007758 ) 800759e: 4293 cmp r3, r2 80075a0: d10a bne.n 80075b8 80075a2: 687b ldr r3, [r7, #4] 80075a4: 681b ldr r3, [r3, #0] 80075a6: 681b ldr r3, [r3, #0] 80075a8: f003 0308 and.w r3, r3, #8 80075ac: 2b00 cmp r3, #0 80075ae: bf14 ite ne 80075b0: 2301 movne r3, #1 80075b2: 2300 moveq r3, #0 80075b4: b2db uxtb r3, r3 80075b6: e009 b.n 80075cc 80075b8: 687b ldr r3, [r7, #4] 80075ba: 681b ldr r3, [r3, #0] 80075bc: 681b ldr r3, [r3, #0] 80075be: f003 0304 and.w r3, r3, #4 80075c2: 2b00 cmp r3, #0 80075c4: bf14 ite ne 80075c6: 2301 movne r3, #1 80075c8: 2300 moveq r3, #0 80075ca: b2db uxtb r3, r3 80075cc: 2b00 cmp r3, #0 80075ce: d03e beq.n 800764e { /* Clear the half transfer complete flag */ regs_dma->IFCR = DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU); 80075d0: 687b ldr r3, [r7, #4] 80075d2: 6ddb ldr r3, [r3, #92] @ 0x5c 80075d4: f003 031f and.w r3, r3, #31 80075d8: 2210 movs r2, #16 80075da: 409a lsls r2, r3 80075dc: 6a3b ldr r3, [r7, #32] 80075de: 609a str r2, [r3, #8] /* Multi_Buffering mode enabled */ if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 80075e0: 687b ldr r3, [r7, #4] 80075e2: 681b ldr r3, [r3, #0] 80075e4: 681b ldr r3, [r3, #0] 80075e6: f403 2380 and.w r3, r3, #262144 @ 0x40000 80075ea: 2b00 cmp r3, #0 80075ec: d018 beq.n 8007620 { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 80075ee: 687b ldr r3, [r7, #4] 80075f0: 681b ldr r3, [r3, #0] 80075f2: 681b ldr r3, [r3, #0] 80075f4: f403 2300 and.w r3, r3, #524288 @ 0x80000 80075f8: 2b00 cmp r3, #0 80075fa: d108 bne.n 800760e { if(hdma->XferHalfCpltCallback != NULL) 80075fc: 687b ldr r3, [r7, #4] 80075fe: 6c1b ldr r3, [r3, #64] @ 0x40 8007600: 2b00 cmp r3, #0 8007602: d024 beq.n 800764e { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8007604: 687b ldr r3, [r7, #4] 8007606: 6c1b ldr r3, [r3, #64] @ 0x40 8007608: 6878 ldr r0, [r7, #4] 800760a: 4798 blx r3 800760c: e01f b.n 800764e } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferM1HalfCpltCallback != NULL) 800760e: 687b ldr r3, [r7, #4] 8007610: 6c9b ldr r3, [r3, #72] @ 0x48 8007612: 2b00 cmp r3, #0 8007614: d01b beq.n 800764e { /* Half transfer callback */ hdma->XferM1HalfCpltCallback(hdma); 8007616: 687b ldr r3, [r7, #4] 8007618: 6c9b ldr r3, [r3, #72] @ 0x48 800761a: 6878 ldr r0, [r7, #4] 800761c: 4798 blx r3 800761e: e016 b.n 800764e } } else { /* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 8007620: 687b ldr r3, [r7, #4] 8007622: 681b ldr r3, [r3, #0] 8007624: 681b ldr r3, [r3, #0] 8007626: f403 7380 and.w r3, r3, #256 @ 0x100 800762a: 2b00 cmp r3, #0 800762c: d107 bne.n 800763e { /* Disable the half transfer interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 800762e: 687b ldr r3, [r7, #4] 8007630: 681b ldr r3, [r3, #0] 8007632: 681a ldr r2, [r3, #0] 8007634: 687b ldr r3, [r7, #4] 8007636: 681b ldr r3, [r3, #0] 8007638: f022 0208 bic.w r2, r2, #8 800763c: 601a str r2, [r3, #0] } if(hdma->XferHalfCpltCallback != NULL) 800763e: 687b ldr r3, [r7, #4] 8007640: 6c1b ldr r3, [r3, #64] @ 0x40 8007642: 2b00 cmp r3, #0 8007644: d003 beq.n 800764e { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8007646: 687b ldr r3, [r7, #4] 8007648: 6c1b ldr r3, [r3, #64] @ 0x40 800764a: 6878 ldr r0, [r7, #4] 800764c: 4798 blx r3 } } } } /* Transfer Complete Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 800764e: 687b ldr r3, [r7, #4] 8007650: 6ddb ldr r3, [r3, #92] @ 0x5c 8007652: f003 031f and.w r3, r3, #31 8007656: 2220 movs r2, #32 8007658: 409a lsls r2, r3 800765a: 69bb ldr r3, [r7, #24] 800765c: 4013 ands r3, r2 800765e: 2b00 cmp r3, #0 8007660: f000 8110 beq.w 8007884 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TC) != 0U) 8007664: 687b ldr r3, [r7, #4] 8007666: 681b ldr r3, [r3, #0] 8007668: 4a2c ldr r2, [pc, #176] @ (800771c ) 800766a: 4293 cmp r3, r2 800766c: d04a beq.n 8007704 800766e: 687b ldr r3, [r7, #4] 8007670: 681b ldr r3, [r3, #0] 8007672: 4a2b ldr r2, [pc, #172] @ (8007720 ) 8007674: 4293 cmp r3, r2 8007676: d045 beq.n 8007704 8007678: 687b ldr r3, [r7, #4] 800767a: 681b ldr r3, [r3, #0] 800767c: 4a29 ldr r2, [pc, #164] @ (8007724 ) 800767e: 4293 cmp r3, r2 8007680: d040 beq.n 8007704 8007682: 687b ldr r3, [r7, #4] 8007684: 681b ldr r3, [r3, #0] 8007686: 4a28 ldr r2, [pc, #160] @ (8007728 ) 8007688: 4293 cmp r3, r2 800768a: d03b beq.n 8007704 800768c: 687b ldr r3, [r7, #4] 800768e: 681b ldr r3, [r3, #0] 8007690: 4a26 ldr r2, [pc, #152] @ (800772c ) 8007692: 4293 cmp r3, r2 8007694: d036 beq.n 8007704 8007696: 687b ldr r3, [r7, #4] 8007698: 681b ldr r3, [r3, #0] 800769a: 4a25 ldr r2, [pc, #148] @ (8007730 ) 800769c: 4293 cmp r3, r2 800769e: d031 beq.n 8007704 80076a0: 687b ldr r3, [r7, #4] 80076a2: 681b ldr r3, [r3, #0] 80076a4: 4a23 ldr r2, [pc, #140] @ (8007734 ) 80076a6: 4293 cmp r3, r2 80076a8: d02c beq.n 8007704 80076aa: 687b ldr r3, [r7, #4] 80076ac: 681b ldr r3, [r3, #0] 80076ae: 4a22 ldr r2, [pc, #136] @ (8007738 ) 80076b0: 4293 cmp r3, r2 80076b2: d027 beq.n 8007704 80076b4: 687b ldr r3, [r7, #4] 80076b6: 681b ldr r3, [r3, #0] 80076b8: 4a20 ldr r2, [pc, #128] @ (800773c ) 80076ba: 4293 cmp r3, r2 80076bc: d022 beq.n 8007704 80076be: 687b ldr r3, [r7, #4] 80076c0: 681b ldr r3, [r3, #0] 80076c2: 4a1f ldr r2, [pc, #124] @ (8007740 ) 80076c4: 4293 cmp r3, r2 80076c6: d01d beq.n 8007704 80076c8: 687b ldr r3, [r7, #4] 80076ca: 681b ldr r3, [r3, #0] 80076cc: 4a1d ldr r2, [pc, #116] @ (8007744 ) 80076ce: 4293 cmp r3, r2 80076d0: d018 beq.n 8007704 80076d2: 687b ldr r3, [r7, #4] 80076d4: 681b ldr r3, [r3, #0] 80076d6: 4a1c ldr r2, [pc, #112] @ (8007748 ) 80076d8: 4293 cmp r3, r2 80076da: d013 beq.n 8007704 80076dc: 687b ldr r3, [r7, #4] 80076de: 681b ldr r3, [r3, #0] 80076e0: 4a1a ldr r2, [pc, #104] @ (800774c ) 80076e2: 4293 cmp r3, r2 80076e4: d00e beq.n 8007704 80076e6: 687b ldr r3, [r7, #4] 80076e8: 681b ldr r3, [r3, #0] 80076ea: 4a19 ldr r2, [pc, #100] @ (8007750 ) 80076ec: 4293 cmp r3, r2 80076ee: d009 beq.n 8007704 80076f0: 687b ldr r3, [r7, #4] 80076f2: 681b ldr r3, [r3, #0] 80076f4: 4a17 ldr r2, [pc, #92] @ (8007754 ) 80076f6: 4293 cmp r3, r2 80076f8: d004 beq.n 8007704 80076fa: 687b ldr r3, [r7, #4] 80076fc: 681b ldr r3, [r3, #0] 80076fe: 4a16 ldr r2, [pc, #88] @ (8007758 ) 8007700: 4293 cmp r3, r2 8007702: d12b bne.n 800775c 8007704: 687b ldr r3, [r7, #4] 8007706: 681b ldr r3, [r3, #0] 8007708: 681b ldr r3, [r3, #0] 800770a: f003 0310 and.w r3, r3, #16 800770e: 2b00 cmp r3, #0 8007710: bf14 ite ne 8007712: 2301 movne r3, #1 8007714: 2300 moveq r3, #0 8007716: b2db uxtb r3, r3 8007718: e02a b.n 8007770 800771a: bf00 nop 800771c: 40020010 .word 0x40020010 8007720: 40020028 .word 0x40020028 8007724: 40020040 .word 0x40020040 8007728: 40020058 .word 0x40020058 800772c: 40020070 .word 0x40020070 8007730: 40020088 .word 0x40020088 8007734: 400200a0 .word 0x400200a0 8007738: 400200b8 .word 0x400200b8 800773c: 40020410 .word 0x40020410 8007740: 40020428 .word 0x40020428 8007744: 40020440 .word 0x40020440 8007748: 40020458 .word 0x40020458 800774c: 40020470 .word 0x40020470 8007750: 40020488 .word 0x40020488 8007754: 400204a0 .word 0x400204a0 8007758: 400204b8 .word 0x400204b8 800775c: 687b ldr r3, [r7, #4] 800775e: 681b ldr r3, [r3, #0] 8007760: 681b ldr r3, [r3, #0] 8007762: f003 0302 and.w r3, r3, #2 8007766: 2b00 cmp r3, #0 8007768: bf14 ite ne 800776a: 2301 movne r3, #1 800776c: 2300 moveq r3, #0 800776e: b2db uxtb r3, r3 8007770: 2b00 cmp r3, #0 8007772: f000 8087 beq.w 8007884 { /* Clear the transfer complete flag */ regs_dma->IFCR = DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU); 8007776: 687b ldr r3, [r7, #4] 8007778: 6ddb ldr r3, [r3, #92] @ 0x5c 800777a: f003 031f and.w r3, r3, #31 800777e: 2220 movs r2, #32 8007780: 409a lsls r2, r3 8007782: 6a3b ldr r3, [r7, #32] 8007784: 609a str r2, [r3, #8] if(HAL_DMA_STATE_ABORT == hdma->State) 8007786: 687b ldr r3, [r7, #4] 8007788: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 800778c: b2db uxtb r3, r3 800778e: 2b04 cmp r3, #4 8007790: d139 bne.n 8007806 { /* Disable all the transfer interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME); 8007792: 687b ldr r3, [r7, #4] 8007794: 681b ldr r3, [r3, #0] 8007796: 681a ldr r2, [r3, #0] 8007798: 687b ldr r3, [r7, #4] 800779a: 681b ldr r3, [r3, #0] 800779c: f022 0216 bic.w r2, r2, #22 80077a0: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 80077a2: 687b ldr r3, [r7, #4] 80077a4: 681b ldr r3, [r3, #0] 80077a6: 695a ldr r2, [r3, #20] 80077a8: 687b ldr r3, [r7, #4] 80077aa: 681b ldr r3, [r3, #0] 80077ac: f022 0280 bic.w r2, r2, #128 @ 0x80 80077b0: 615a str r2, [r3, #20] if((hdma->XferHalfCpltCallback != NULL) || (hdma->XferM1HalfCpltCallback != NULL)) 80077b2: 687b ldr r3, [r7, #4] 80077b4: 6c1b ldr r3, [r3, #64] @ 0x40 80077b6: 2b00 cmp r3, #0 80077b8: d103 bne.n 80077c2 80077ba: 687b ldr r3, [r7, #4] 80077bc: 6c9b ldr r3, [r3, #72] @ 0x48 80077be: 2b00 cmp r3, #0 80077c0: d007 beq.n 80077d2 { ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 80077c2: 687b ldr r3, [r7, #4] 80077c4: 681b ldr r3, [r3, #0] 80077c6: 681a ldr r2, [r3, #0] 80077c8: 687b ldr r3, [r7, #4] 80077ca: 681b ldr r3, [r3, #0] 80077cc: f022 0208 bic.w r2, r2, #8 80077d0: 601a str r2, [r3, #0] } /* Clear all interrupt flags at correct offset within the register */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 80077d2: 687b ldr r3, [r7, #4] 80077d4: 6ddb ldr r3, [r3, #92] @ 0x5c 80077d6: f003 031f and.w r3, r3, #31 80077da: 223f movs r2, #63 @ 0x3f 80077dc: 409a lsls r2, r3 80077de: 6a3b ldr r3, [r7, #32] 80077e0: 609a str r2, [r3, #8] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80077e2: 687b ldr r3, [r7, #4] 80077e4: 2201 movs r2, #1 80077e6: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80077ea: 687b ldr r3, [r7, #4] 80077ec: 2200 movs r2, #0 80077ee: f883 2034 strb.w r2, [r3, #52] @ 0x34 if(hdma->XferAbortCallback != NULL) 80077f2: 687b ldr r3, [r7, #4] 80077f4: 6d1b ldr r3, [r3, #80] @ 0x50 80077f6: 2b00 cmp r3, #0 80077f8: f000 834a beq.w 8007e90 { hdma->XferAbortCallback(hdma); 80077fc: 687b ldr r3, [r7, #4] 80077fe: 6d1b ldr r3, [r3, #80] @ 0x50 8007800: 6878 ldr r0, [r7, #4] 8007802: 4798 blx r3 } return; 8007804: e344 b.n 8007e90 } if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 8007806: 687b ldr r3, [r7, #4] 8007808: 681b ldr r3, [r3, #0] 800780a: 681b ldr r3, [r3, #0] 800780c: f403 2380 and.w r3, r3, #262144 @ 0x40000 8007810: 2b00 cmp r3, #0 8007812: d018 beq.n 8007846 { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 8007814: 687b ldr r3, [r7, #4] 8007816: 681b ldr r3, [r3, #0] 8007818: 681b ldr r3, [r3, #0] 800781a: f403 2300 and.w r3, r3, #524288 @ 0x80000 800781e: 2b00 cmp r3, #0 8007820: d108 bne.n 8007834 { if(hdma->XferM1CpltCallback != NULL) 8007822: 687b ldr r3, [r7, #4] 8007824: 6c5b ldr r3, [r3, #68] @ 0x44 8007826: 2b00 cmp r3, #0 8007828: d02c beq.n 8007884 { /* Transfer complete Callback for memory1 */ hdma->XferM1CpltCallback(hdma); 800782a: 687b ldr r3, [r7, #4] 800782c: 6c5b ldr r3, [r3, #68] @ 0x44 800782e: 6878 ldr r0, [r7, #4] 8007830: 4798 blx r3 8007832: e027 b.n 8007884 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 8007834: 687b ldr r3, [r7, #4] 8007836: 6bdb ldr r3, [r3, #60] @ 0x3c 8007838: 2b00 cmp r3, #0 800783a: d023 beq.n 8007884 { /* Transfer complete Callback for memory0 */ hdma->XferCpltCallback(hdma); 800783c: 687b ldr r3, [r7, #4] 800783e: 6bdb ldr r3, [r3, #60] @ 0x3c 8007840: 6878 ldr r0, [r7, #4] 8007842: 4798 blx r3 8007844: e01e b.n 8007884 } } /* Disable the transfer complete interrupt if the DMA mode is not CIRCULAR */ else { if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 8007846: 687b ldr r3, [r7, #4] 8007848: 681b ldr r3, [r3, #0] 800784a: 681b ldr r3, [r3, #0] 800784c: f403 7380 and.w r3, r3, #256 @ 0x100 8007850: 2b00 cmp r3, #0 8007852: d10f bne.n 8007874 { /* Disable the transfer complete interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC); 8007854: 687b ldr r3, [r7, #4] 8007856: 681b ldr r3, [r3, #0] 8007858: 681a ldr r2, [r3, #0] 800785a: 687b ldr r3, [r7, #4] 800785c: 681b ldr r3, [r3, #0] 800785e: f022 0210 bic.w r2, r2, #16 8007862: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007864: 687b ldr r3, [r7, #4] 8007866: 2201 movs r2, #1 8007868: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 800786c: 687b ldr r3, [r7, #4] 800786e: 2200 movs r2, #0 8007870: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 8007874: 687b ldr r3, [r7, #4] 8007876: 6bdb ldr r3, [r3, #60] @ 0x3c 8007878: 2b00 cmp r3, #0 800787a: d003 beq.n 8007884 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 800787c: 687b ldr r3, [r7, #4] 800787e: 6bdb ldr r3, [r3, #60] @ 0x3c 8007880: 6878 ldr r0, [r7, #4] 8007882: 4798 blx r3 } } } /* manage error case */ if(hdma->ErrorCode != HAL_DMA_ERROR_NONE) 8007884: 687b ldr r3, [r7, #4] 8007886: 6d5b ldr r3, [r3, #84] @ 0x54 8007888: 2b00 cmp r3, #0 800788a: f000 8306 beq.w 8007e9a { if((hdma->ErrorCode & HAL_DMA_ERROR_TE) != 0U) 800788e: 687b ldr r3, [r7, #4] 8007890: 6d5b ldr r3, [r3, #84] @ 0x54 8007892: f003 0301 and.w r3, r3, #1 8007896: 2b00 cmp r3, #0 8007898: f000 8088 beq.w 80079ac { hdma->State = HAL_DMA_STATE_ABORT; 800789c: 687b ldr r3, [r7, #4] 800789e: 2204 movs r2, #4 80078a0: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 80078a4: 687b ldr r3, [r7, #4] 80078a6: 681b ldr r3, [r3, #0] 80078a8: 4a7a ldr r2, [pc, #488] @ (8007a94 ) 80078aa: 4293 cmp r3, r2 80078ac: d04a beq.n 8007944 80078ae: 687b ldr r3, [r7, #4] 80078b0: 681b ldr r3, [r3, #0] 80078b2: 4a79 ldr r2, [pc, #484] @ (8007a98 ) 80078b4: 4293 cmp r3, r2 80078b6: d045 beq.n 8007944 80078b8: 687b ldr r3, [r7, #4] 80078ba: 681b ldr r3, [r3, #0] 80078bc: 4a77 ldr r2, [pc, #476] @ (8007a9c ) 80078be: 4293 cmp r3, r2 80078c0: d040 beq.n 8007944 80078c2: 687b ldr r3, [r7, #4] 80078c4: 681b ldr r3, [r3, #0] 80078c6: 4a76 ldr r2, [pc, #472] @ (8007aa0 ) 80078c8: 4293 cmp r3, r2 80078ca: d03b beq.n 8007944 80078cc: 687b ldr r3, [r7, #4] 80078ce: 681b ldr r3, [r3, #0] 80078d0: 4a74 ldr r2, [pc, #464] @ (8007aa4 ) 80078d2: 4293 cmp r3, r2 80078d4: d036 beq.n 8007944 80078d6: 687b ldr r3, [r7, #4] 80078d8: 681b ldr r3, [r3, #0] 80078da: 4a73 ldr r2, [pc, #460] @ (8007aa8 ) 80078dc: 4293 cmp r3, r2 80078de: d031 beq.n 8007944 80078e0: 687b ldr r3, [r7, #4] 80078e2: 681b ldr r3, [r3, #0] 80078e4: 4a71 ldr r2, [pc, #452] @ (8007aac ) 80078e6: 4293 cmp r3, r2 80078e8: d02c beq.n 8007944 80078ea: 687b ldr r3, [r7, #4] 80078ec: 681b ldr r3, [r3, #0] 80078ee: 4a70 ldr r2, [pc, #448] @ (8007ab0 ) 80078f0: 4293 cmp r3, r2 80078f2: d027 beq.n 8007944 80078f4: 687b ldr r3, [r7, #4] 80078f6: 681b ldr r3, [r3, #0] 80078f8: 4a6e ldr r2, [pc, #440] @ (8007ab4 ) 80078fa: 4293 cmp r3, r2 80078fc: d022 beq.n 8007944 80078fe: 687b ldr r3, [r7, #4] 8007900: 681b ldr r3, [r3, #0] 8007902: 4a6d ldr r2, [pc, #436] @ (8007ab8 ) 8007904: 4293 cmp r3, r2 8007906: d01d beq.n 8007944 8007908: 687b ldr r3, [r7, #4] 800790a: 681b ldr r3, [r3, #0] 800790c: 4a6b ldr r2, [pc, #428] @ (8007abc ) 800790e: 4293 cmp r3, r2 8007910: d018 beq.n 8007944 8007912: 687b ldr r3, [r7, #4] 8007914: 681b ldr r3, [r3, #0] 8007916: 4a6a ldr r2, [pc, #424] @ (8007ac0 ) 8007918: 4293 cmp r3, r2 800791a: d013 beq.n 8007944 800791c: 687b ldr r3, [r7, #4] 800791e: 681b ldr r3, [r3, #0] 8007920: 4a68 ldr r2, [pc, #416] @ (8007ac4 ) 8007922: 4293 cmp r3, r2 8007924: d00e beq.n 8007944 8007926: 687b ldr r3, [r7, #4] 8007928: 681b ldr r3, [r3, #0] 800792a: 4a67 ldr r2, [pc, #412] @ (8007ac8 ) 800792c: 4293 cmp r3, r2 800792e: d009 beq.n 8007944 8007930: 687b ldr r3, [r7, #4] 8007932: 681b ldr r3, [r3, #0] 8007934: 4a65 ldr r2, [pc, #404] @ (8007acc ) 8007936: 4293 cmp r3, r2 8007938: d004 beq.n 8007944 800793a: 687b ldr r3, [r7, #4] 800793c: 681b ldr r3, [r3, #0] 800793e: 4a64 ldr r2, [pc, #400] @ (8007ad0 ) 8007940: 4293 cmp r3, r2 8007942: d108 bne.n 8007956 8007944: 687b ldr r3, [r7, #4] 8007946: 681b ldr r3, [r3, #0] 8007948: 681a ldr r2, [r3, #0] 800794a: 687b ldr r3, [r7, #4] 800794c: 681b ldr r3, [r3, #0] 800794e: f022 0201 bic.w r2, r2, #1 8007952: 601a str r2, [r3, #0] 8007954: e007 b.n 8007966 8007956: 687b ldr r3, [r7, #4] 8007958: 681b ldr r3, [r3, #0] 800795a: 681a ldr r2, [r3, #0] 800795c: 687b ldr r3, [r7, #4] 800795e: 681b ldr r3, [r3, #0] 8007960: f022 0201 bic.w r2, r2, #1 8007964: 601a str r2, [r3, #0] do { if (++count > timeout) 8007966: 68fb ldr r3, [r7, #12] 8007968: 3301 adds r3, #1 800796a: 60fb str r3, [r7, #12] 800796c: 6a7a ldr r2, [r7, #36] @ 0x24 800796e: 429a cmp r2, r3 8007970: d307 bcc.n 8007982 { break; } } while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U); 8007972: 687b ldr r3, [r7, #4] 8007974: 681b ldr r3, [r3, #0] 8007976: 681b ldr r3, [r3, #0] 8007978: f003 0301 and.w r3, r3, #1 800797c: 2b00 cmp r3, #0 800797e: d1f2 bne.n 8007966 8007980: e000 b.n 8007984 break; 8007982: bf00 nop if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8007984: 687b ldr r3, [r7, #4] 8007986: 681b ldr r3, [r3, #0] 8007988: 681b ldr r3, [r3, #0] 800798a: f003 0301 and.w r3, r3, #1 800798e: 2b00 cmp r3, #0 8007990: d004 beq.n 800799c { /* Change the DMA state to error if DMA disable fails */ hdma->State = HAL_DMA_STATE_ERROR; 8007992: 687b ldr r3, [r7, #4] 8007994: 2203 movs r2, #3 8007996: f883 2035 strb.w r2, [r3, #53] @ 0x35 800799a: e003 b.n 80079a4 } else { /* Change the DMA state to Ready if DMA disable success */ hdma->State = HAL_DMA_STATE_READY; 800799c: 687b ldr r3, [r7, #4] 800799e: 2201 movs r2, #1 80079a0: f883 2035 strb.w r2, [r3, #53] @ 0x35 } /* Process Unlocked */ __HAL_UNLOCK(hdma); 80079a4: 687b ldr r3, [r7, #4] 80079a6: 2200 movs r2, #0 80079a8: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferErrorCallback != NULL) 80079ac: 687b ldr r3, [r7, #4] 80079ae: 6cdb ldr r3, [r3, #76] @ 0x4c 80079b0: 2b00 cmp r3, #0 80079b2: f000 8272 beq.w 8007e9a { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 80079b6: 687b ldr r3, [r7, #4] 80079b8: 6cdb ldr r3, [r3, #76] @ 0x4c 80079ba: 6878 ldr r0, [r7, #4] 80079bc: 4798 blx r3 80079be: e26c b.n 8007e9a } } } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 80079c0: 687b ldr r3, [r7, #4] 80079c2: 681b ldr r3, [r3, #0] 80079c4: 4a43 ldr r2, [pc, #268] @ (8007ad4 ) 80079c6: 4293 cmp r3, r2 80079c8: d022 beq.n 8007a10 80079ca: 687b ldr r3, [r7, #4] 80079cc: 681b ldr r3, [r3, #0] 80079ce: 4a42 ldr r2, [pc, #264] @ (8007ad8 ) 80079d0: 4293 cmp r3, r2 80079d2: d01d beq.n 8007a10 80079d4: 687b ldr r3, [r7, #4] 80079d6: 681b ldr r3, [r3, #0] 80079d8: 4a40 ldr r2, [pc, #256] @ (8007adc ) 80079da: 4293 cmp r3, r2 80079dc: d018 beq.n 8007a10 80079de: 687b ldr r3, [r7, #4] 80079e0: 681b ldr r3, [r3, #0] 80079e2: 4a3f ldr r2, [pc, #252] @ (8007ae0 ) 80079e4: 4293 cmp r3, r2 80079e6: d013 beq.n 8007a10 80079e8: 687b ldr r3, [r7, #4] 80079ea: 681b ldr r3, [r3, #0] 80079ec: 4a3d ldr r2, [pc, #244] @ (8007ae4 ) 80079ee: 4293 cmp r3, r2 80079f0: d00e beq.n 8007a10 80079f2: 687b ldr r3, [r7, #4] 80079f4: 681b ldr r3, [r3, #0] 80079f6: 4a3c ldr r2, [pc, #240] @ (8007ae8 ) 80079f8: 4293 cmp r3, r2 80079fa: d009 beq.n 8007a10 80079fc: 687b ldr r3, [r7, #4] 80079fe: 681b ldr r3, [r3, #0] 8007a00: 4a3a ldr r2, [pc, #232] @ (8007aec ) 8007a02: 4293 cmp r3, r2 8007a04: d004 beq.n 8007a10 8007a06: 687b ldr r3, [r7, #4] 8007a08: 681b ldr r3, [r3, #0] 8007a0a: 4a39 ldr r2, [pc, #228] @ (8007af0 ) 8007a0c: 4293 cmp r3, r2 8007a0e: d101 bne.n 8007a14 8007a10: 2301 movs r3, #1 8007a12: e000 b.n 8007a16 8007a14: 2300 movs r3, #0 8007a16: 2b00 cmp r3, #0 8007a18: f000 823f beq.w 8007e9a { ccr_reg = (((BDMA_Channel_TypeDef *)hdma->Instance)->CCR); 8007a1c: 687b ldr r3, [r7, #4] 8007a1e: 681b ldr r3, [r3, #0] 8007a20: 681b ldr r3, [r3, #0] 8007a22: 613b str r3, [r7, #16] /* Half Transfer Complete Interrupt management ******************************/ if (((tmpisr_bdma & (BDMA_FLAG_HT0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_HTIE) != 0U)) 8007a24: 687b ldr r3, [r7, #4] 8007a26: 6ddb ldr r3, [r3, #92] @ 0x5c 8007a28: f003 031f and.w r3, r3, #31 8007a2c: 2204 movs r2, #4 8007a2e: 409a lsls r2, r3 8007a30: 697b ldr r3, [r7, #20] 8007a32: 4013 ands r3, r2 8007a34: 2b00 cmp r3, #0 8007a36: f000 80cd beq.w 8007bd4 8007a3a: 693b ldr r3, [r7, #16] 8007a3c: f003 0304 and.w r3, r3, #4 8007a40: 2b00 cmp r3, #0 8007a42: f000 80c7 beq.w 8007bd4 { /* Clear the half transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_HTIF0 << (hdma->StreamIndex & 0x1FU)); 8007a46: 687b ldr r3, [r7, #4] 8007a48: 6ddb ldr r3, [r3, #92] @ 0x5c 8007a4a: f003 031f and.w r3, r3, #31 8007a4e: 2204 movs r2, #4 8007a50: 409a lsls r2, r3 8007a52: 69fb ldr r3, [r7, #28] 8007a54: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007a56: 693b ldr r3, [r7, #16] 8007a58: f403 4300 and.w r3, r3, #32768 @ 0x8000 8007a5c: 2b00 cmp r3, #0 8007a5e: d049 beq.n 8007af4 { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 8007a60: 693b ldr r3, [r7, #16] 8007a62: f403 3380 and.w r3, r3, #65536 @ 0x10000 8007a66: 2b00 cmp r3, #0 8007a68: d109 bne.n 8007a7e { if(hdma->XferM1HalfCpltCallback != NULL) 8007a6a: 687b ldr r3, [r7, #4] 8007a6c: 6c9b ldr r3, [r3, #72] @ 0x48 8007a6e: 2b00 cmp r3, #0 8007a70: f000 8210 beq.w 8007e94 { /* Half transfer Callback for Memory 1 */ hdma->XferM1HalfCpltCallback(hdma); 8007a74: 687b ldr r3, [r7, #4] 8007a76: 6c9b ldr r3, [r3, #72] @ 0x48 8007a78: 6878 ldr r0, [r7, #4] 8007a7a: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007a7c: e20a b.n 8007e94 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferHalfCpltCallback != NULL) 8007a7e: 687b ldr r3, [r7, #4] 8007a80: 6c1b ldr r3, [r3, #64] @ 0x40 8007a82: 2b00 cmp r3, #0 8007a84: f000 8206 beq.w 8007e94 { /* Half transfer Callback for Memory 0 */ hdma->XferHalfCpltCallback(hdma); 8007a88: 687b ldr r3, [r7, #4] 8007a8a: 6c1b ldr r3, [r3, #64] @ 0x40 8007a8c: 6878 ldr r0, [r7, #4] 8007a8e: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007a90: e200 b.n 8007e94 8007a92: bf00 nop 8007a94: 40020010 .word 0x40020010 8007a98: 40020028 .word 0x40020028 8007a9c: 40020040 .word 0x40020040 8007aa0: 40020058 .word 0x40020058 8007aa4: 40020070 .word 0x40020070 8007aa8: 40020088 .word 0x40020088 8007aac: 400200a0 .word 0x400200a0 8007ab0: 400200b8 .word 0x400200b8 8007ab4: 40020410 .word 0x40020410 8007ab8: 40020428 .word 0x40020428 8007abc: 40020440 .word 0x40020440 8007ac0: 40020458 .word 0x40020458 8007ac4: 40020470 .word 0x40020470 8007ac8: 40020488 .word 0x40020488 8007acc: 400204a0 .word 0x400204a0 8007ad0: 400204b8 .word 0x400204b8 8007ad4: 58025408 .word 0x58025408 8007ad8: 5802541c .word 0x5802541c 8007adc: 58025430 .word 0x58025430 8007ae0: 58025444 .word 0x58025444 8007ae4: 58025458 .word 0x58025458 8007ae8: 5802546c .word 0x5802546c 8007aec: 58025480 .word 0x58025480 8007af0: 58025494 .word 0x58025494 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 8007af4: 693b ldr r3, [r7, #16] 8007af6: f003 0320 and.w r3, r3, #32 8007afa: 2b00 cmp r3, #0 8007afc: d160 bne.n 8007bc0 { /* Disable the half transfer interrupt */ __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT); 8007afe: 687b ldr r3, [r7, #4] 8007b00: 681b ldr r3, [r3, #0] 8007b02: 4a7f ldr r2, [pc, #508] @ (8007d00 ) 8007b04: 4293 cmp r3, r2 8007b06: d04a beq.n 8007b9e 8007b08: 687b ldr r3, [r7, #4] 8007b0a: 681b ldr r3, [r3, #0] 8007b0c: 4a7d ldr r2, [pc, #500] @ (8007d04 ) 8007b0e: 4293 cmp r3, r2 8007b10: d045 beq.n 8007b9e 8007b12: 687b ldr r3, [r7, #4] 8007b14: 681b ldr r3, [r3, #0] 8007b16: 4a7c ldr r2, [pc, #496] @ (8007d08 ) 8007b18: 4293 cmp r3, r2 8007b1a: d040 beq.n 8007b9e 8007b1c: 687b ldr r3, [r7, #4] 8007b1e: 681b ldr r3, [r3, #0] 8007b20: 4a7a ldr r2, [pc, #488] @ (8007d0c ) 8007b22: 4293 cmp r3, r2 8007b24: d03b beq.n 8007b9e 8007b26: 687b ldr r3, [r7, #4] 8007b28: 681b ldr r3, [r3, #0] 8007b2a: 4a79 ldr r2, [pc, #484] @ (8007d10 ) 8007b2c: 4293 cmp r3, r2 8007b2e: d036 beq.n 8007b9e 8007b30: 687b ldr r3, [r7, #4] 8007b32: 681b ldr r3, [r3, #0] 8007b34: 4a77 ldr r2, [pc, #476] @ (8007d14 ) 8007b36: 4293 cmp r3, r2 8007b38: d031 beq.n 8007b9e 8007b3a: 687b ldr r3, [r7, #4] 8007b3c: 681b ldr r3, [r3, #0] 8007b3e: 4a76 ldr r2, [pc, #472] @ (8007d18 ) 8007b40: 4293 cmp r3, r2 8007b42: d02c beq.n 8007b9e 8007b44: 687b ldr r3, [r7, #4] 8007b46: 681b ldr r3, [r3, #0] 8007b48: 4a74 ldr r2, [pc, #464] @ (8007d1c ) 8007b4a: 4293 cmp r3, r2 8007b4c: d027 beq.n 8007b9e 8007b4e: 687b ldr r3, [r7, #4] 8007b50: 681b ldr r3, [r3, #0] 8007b52: 4a73 ldr r2, [pc, #460] @ (8007d20 ) 8007b54: 4293 cmp r3, r2 8007b56: d022 beq.n 8007b9e 8007b58: 687b ldr r3, [r7, #4] 8007b5a: 681b ldr r3, [r3, #0] 8007b5c: 4a71 ldr r2, [pc, #452] @ (8007d24 ) 8007b5e: 4293 cmp r3, r2 8007b60: d01d beq.n 8007b9e 8007b62: 687b ldr r3, [r7, #4] 8007b64: 681b ldr r3, [r3, #0] 8007b66: 4a70 ldr r2, [pc, #448] @ (8007d28 ) 8007b68: 4293 cmp r3, r2 8007b6a: d018 beq.n 8007b9e 8007b6c: 687b ldr r3, [r7, #4] 8007b6e: 681b ldr r3, [r3, #0] 8007b70: 4a6e ldr r2, [pc, #440] @ (8007d2c ) 8007b72: 4293 cmp r3, r2 8007b74: d013 beq.n 8007b9e 8007b76: 687b ldr r3, [r7, #4] 8007b78: 681b ldr r3, [r3, #0] 8007b7a: 4a6d ldr r2, [pc, #436] @ (8007d30 ) 8007b7c: 4293 cmp r3, r2 8007b7e: d00e beq.n 8007b9e 8007b80: 687b ldr r3, [r7, #4] 8007b82: 681b ldr r3, [r3, #0] 8007b84: 4a6b ldr r2, [pc, #428] @ (8007d34 ) 8007b86: 4293 cmp r3, r2 8007b88: d009 beq.n 8007b9e 8007b8a: 687b ldr r3, [r7, #4] 8007b8c: 681b ldr r3, [r3, #0] 8007b8e: 4a6a ldr r2, [pc, #424] @ (8007d38 ) 8007b90: 4293 cmp r3, r2 8007b92: d004 beq.n 8007b9e 8007b94: 687b ldr r3, [r7, #4] 8007b96: 681b ldr r3, [r3, #0] 8007b98: 4a68 ldr r2, [pc, #416] @ (8007d3c ) 8007b9a: 4293 cmp r3, r2 8007b9c: d108 bne.n 8007bb0 8007b9e: 687b ldr r3, [r7, #4] 8007ba0: 681b ldr r3, [r3, #0] 8007ba2: 681a ldr r2, [r3, #0] 8007ba4: 687b ldr r3, [r7, #4] 8007ba6: 681b ldr r3, [r3, #0] 8007ba8: f022 0208 bic.w r2, r2, #8 8007bac: 601a str r2, [r3, #0] 8007bae: e007 b.n 8007bc0 8007bb0: 687b ldr r3, [r7, #4] 8007bb2: 681b ldr r3, [r3, #0] 8007bb4: 681a ldr r2, [r3, #0] 8007bb6: 687b ldr r3, [r7, #4] 8007bb8: 681b ldr r3, [r3, #0] 8007bba: f022 0204 bic.w r2, r2, #4 8007bbe: 601a str r2, [r3, #0] } /* DMA peripheral state is not updated in Half Transfer */ /* but in Transfer Complete case */ if(hdma->XferHalfCpltCallback != NULL) 8007bc0: 687b ldr r3, [r7, #4] 8007bc2: 6c1b ldr r3, [r3, #64] @ 0x40 8007bc4: 2b00 cmp r3, #0 8007bc6: f000 8165 beq.w 8007e94 { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8007bca: 687b ldr r3, [r7, #4] 8007bcc: 6c1b ldr r3, [r3, #64] @ 0x40 8007bce: 6878 ldr r0, [r7, #4] 8007bd0: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007bd2: e15f b.n 8007e94 } } } /* Transfer Complete Interrupt management ***********************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TC0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TCIE) != 0U)) 8007bd4: 687b ldr r3, [r7, #4] 8007bd6: 6ddb ldr r3, [r3, #92] @ 0x5c 8007bd8: f003 031f and.w r3, r3, #31 8007bdc: 2202 movs r2, #2 8007bde: 409a lsls r2, r3 8007be0: 697b ldr r3, [r7, #20] 8007be2: 4013 ands r3, r2 8007be4: 2b00 cmp r3, #0 8007be6: f000 80c5 beq.w 8007d74 8007bea: 693b ldr r3, [r7, #16] 8007bec: f003 0302 and.w r3, r3, #2 8007bf0: 2b00 cmp r3, #0 8007bf2: f000 80bf beq.w 8007d74 { /* Clear the transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_TCIF0) << (hdma->StreamIndex & 0x1FU); 8007bf6: 687b ldr r3, [r7, #4] 8007bf8: 6ddb ldr r3, [r3, #92] @ 0x5c 8007bfa: f003 031f and.w r3, r3, #31 8007bfe: 2202 movs r2, #2 8007c00: 409a lsls r2, r3 8007c02: 69fb ldr r3, [r7, #28] 8007c04: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007c06: 693b ldr r3, [r7, #16] 8007c08: f403 4300 and.w r3, r3, #32768 @ 0x8000 8007c0c: 2b00 cmp r3, #0 8007c0e: d018 beq.n 8007c42 { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 8007c10: 693b ldr r3, [r7, #16] 8007c12: f403 3380 and.w r3, r3, #65536 @ 0x10000 8007c16: 2b00 cmp r3, #0 8007c18: d109 bne.n 8007c2e { if(hdma->XferM1CpltCallback != NULL) 8007c1a: 687b ldr r3, [r7, #4] 8007c1c: 6c5b ldr r3, [r3, #68] @ 0x44 8007c1e: 2b00 cmp r3, #0 8007c20: f000 813a beq.w 8007e98 { /* Transfer complete Callback for Memory 1 */ hdma->XferM1CpltCallback(hdma); 8007c24: 687b ldr r3, [r7, #4] 8007c26: 6c5b ldr r3, [r3, #68] @ 0x44 8007c28: 6878 ldr r0, [r7, #4] 8007c2a: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007c2c: e134 b.n 8007e98 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 8007c2e: 687b ldr r3, [r7, #4] 8007c30: 6bdb ldr r3, [r3, #60] @ 0x3c 8007c32: 2b00 cmp r3, #0 8007c34: f000 8130 beq.w 8007e98 { /* Transfer complete Callback for Memory 0 */ hdma->XferCpltCallback(hdma); 8007c38: 687b ldr r3, [r7, #4] 8007c3a: 6bdb ldr r3, [r3, #60] @ 0x3c 8007c3c: 6878 ldr r0, [r7, #4] 8007c3e: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007c40: e12a b.n 8007e98 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 8007c42: 693b ldr r3, [r7, #16] 8007c44: f003 0320 and.w r3, r3, #32 8007c48: 2b00 cmp r3, #0 8007c4a: f040 8089 bne.w 8007d60 { /* Disable the transfer complete and error interrupt, if the DMA mode is not CIRCULAR */ __HAL_DMA_DISABLE_IT(hdma, DMA_IT_TE | DMA_IT_TC); 8007c4e: 687b ldr r3, [r7, #4] 8007c50: 681b ldr r3, [r3, #0] 8007c52: 4a2b ldr r2, [pc, #172] @ (8007d00 ) 8007c54: 4293 cmp r3, r2 8007c56: d04a beq.n 8007cee 8007c58: 687b ldr r3, [r7, #4] 8007c5a: 681b ldr r3, [r3, #0] 8007c5c: 4a29 ldr r2, [pc, #164] @ (8007d04 ) 8007c5e: 4293 cmp r3, r2 8007c60: d045 beq.n 8007cee 8007c62: 687b ldr r3, [r7, #4] 8007c64: 681b ldr r3, [r3, #0] 8007c66: 4a28 ldr r2, [pc, #160] @ (8007d08 ) 8007c68: 4293 cmp r3, r2 8007c6a: d040 beq.n 8007cee 8007c6c: 687b ldr r3, [r7, #4] 8007c6e: 681b ldr r3, [r3, #0] 8007c70: 4a26 ldr r2, [pc, #152] @ (8007d0c ) 8007c72: 4293 cmp r3, r2 8007c74: d03b beq.n 8007cee 8007c76: 687b ldr r3, [r7, #4] 8007c78: 681b ldr r3, [r3, #0] 8007c7a: 4a25 ldr r2, [pc, #148] @ (8007d10 ) 8007c7c: 4293 cmp r3, r2 8007c7e: d036 beq.n 8007cee 8007c80: 687b ldr r3, [r7, #4] 8007c82: 681b ldr r3, [r3, #0] 8007c84: 4a23 ldr r2, [pc, #140] @ (8007d14 ) 8007c86: 4293 cmp r3, r2 8007c88: d031 beq.n 8007cee 8007c8a: 687b ldr r3, [r7, #4] 8007c8c: 681b ldr r3, [r3, #0] 8007c8e: 4a22 ldr r2, [pc, #136] @ (8007d18 ) 8007c90: 4293 cmp r3, r2 8007c92: d02c beq.n 8007cee 8007c94: 687b ldr r3, [r7, #4] 8007c96: 681b ldr r3, [r3, #0] 8007c98: 4a20 ldr r2, [pc, #128] @ (8007d1c ) 8007c9a: 4293 cmp r3, r2 8007c9c: d027 beq.n 8007cee 8007c9e: 687b ldr r3, [r7, #4] 8007ca0: 681b ldr r3, [r3, #0] 8007ca2: 4a1f ldr r2, [pc, #124] @ (8007d20 ) 8007ca4: 4293 cmp r3, r2 8007ca6: d022 beq.n 8007cee 8007ca8: 687b ldr r3, [r7, #4] 8007caa: 681b ldr r3, [r3, #0] 8007cac: 4a1d ldr r2, [pc, #116] @ (8007d24 ) 8007cae: 4293 cmp r3, r2 8007cb0: d01d beq.n 8007cee 8007cb2: 687b ldr r3, [r7, #4] 8007cb4: 681b ldr r3, [r3, #0] 8007cb6: 4a1c ldr r2, [pc, #112] @ (8007d28 ) 8007cb8: 4293 cmp r3, r2 8007cba: d018 beq.n 8007cee 8007cbc: 687b ldr r3, [r7, #4] 8007cbe: 681b ldr r3, [r3, #0] 8007cc0: 4a1a ldr r2, [pc, #104] @ (8007d2c ) 8007cc2: 4293 cmp r3, r2 8007cc4: d013 beq.n 8007cee 8007cc6: 687b ldr r3, [r7, #4] 8007cc8: 681b ldr r3, [r3, #0] 8007cca: 4a19 ldr r2, [pc, #100] @ (8007d30 ) 8007ccc: 4293 cmp r3, r2 8007cce: d00e beq.n 8007cee 8007cd0: 687b ldr r3, [r7, #4] 8007cd2: 681b ldr r3, [r3, #0] 8007cd4: 4a17 ldr r2, [pc, #92] @ (8007d34 ) 8007cd6: 4293 cmp r3, r2 8007cd8: d009 beq.n 8007cee 8007cda: 687b ldr r3, [r7, #4] 8007cdc: 681b ldr r3, [r3, #0] 8007cde: 4a16 ldr r2, [pc, #88] @ (8007d38 ) 8007ce0: 4293 cmp r3, r2 8007ce2: d004 beq.n 8007cee 8007ce4: 687b ldr r3, [r7, #4] 8007ce6: 681b ldr r3, [r3, #0] 8007ce8: 4a14 ldr r2, [pc, #80] @ (8007d3c ) 8007cea: 4293 cmp r3, r2 8007cec: d128 bne.n 8007d40 8007cee: 687b ldr r3, [r7, #4] 8007cf0: 681b ldr r3, [r3, #0] 8007cf2: 681a ldr r2, [r3, #0] 8007cf4: 687b ldr r3, [r7, #4] 8007cf6: 681b ldr r3, [r3, #0] 8007cf8: f022 0214 bic.w r2, r2, #20 8007cfc: 601a str r2, [r3, #0] 8007cfe: e027 b.n 8007d50 8007d00: 40020010 .word 0x40020010 8007d04: 40020028 .word 0x40020028 8007d08: 40020040 .word 0x40020040 8007d0c: 40020058 .word 0x40020058 8007d10: 40020070 .word 0x40020070 8007d14: 40020088 .word 0x40020088 8007d18: 400200a0 .word 0x400200a0 8007d1c: 400200b8 .word 0x400200b8 8007d20: 40020410 .word 0x40020410 8007d24: 40020428 .word 0x40020428 8007d28: 40020440 .word 0x40020440 8007d2c: 40020458 .word 0x40020458 8007d30: 40020470 .word 0x40020470 8007d34: 40020488 .word 0x40020488 8007d38: 400204a0 .word 0x400204a0 8007d3c: 400204b8 .word 0x400204b8 8007d40: 687b ldr r3, [r7, #4] 8007d42: 681b ldr r3, [r3, #0] 8007d44: 681a ldr r2, [r3, #0] 8007d46: 687b ldr r3, [r7, #4] 8007d48: 681b ldr r3, [r3, #0] 8007d4a: f022 020a bic.w r2, r2, #10 8007d4e: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007d50: 687b ldr r3, [r7, #4] 8007d52: 2201 movs r2, #1 8007d54: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007d58: 687b ldr r3, [r7, #4] 8007d5a: 2200 movs r2, #0 8007d5c: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 8007d60: 687b ldr r3, [r7, #4] 8007d62: 6bdb ldr r3, [r3, #60] @ 0x3c 8007d64: 2b00 cmp r3, #0 8007d66: f000 8097 beq.w 8007e98 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 8007d6a: 687b ldr r3, [r7, #4] 8007d6c: 6bdb ldr r3, [r3, #60] @ 0x3c 8007d6e: 6878 ldr r0, [r7, #4] 8007d70: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007d72: e091 b.n 8007e98 } } } /* Transfer Error Interrupt management **************************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TE0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TEIE) != 0U)) 8007d74: 687b ldr r3, [r7, #4] 8007d76: 6ddb ldr r3, [r3, #92] @ 0x5c 8007d78: f003 031f and.w r3, r3, #31 8007d7c: 2208 movs r2, #8 8007d7e: 409a lsls r2, r3 8007d80: 697b ldr r3, [r7, #20] 8007d82: 4013 ands r3, r2 8007d84: 2b00 cmp r3, #0 8007d86: f000 8088 beq.w 8007e9a 8007d8a: 693b ldr r3, [r7, #16] 8007d8c: f003 0308 and.w r3, r3, #8 8007d90: 2b00 cmp r3, #0 8007d92: f000 8082 beq.w 8007e9a { /* When a DMA transfer error occurs */ /* A hardware clear of its EN bits is performed */ /* Disable ALL DMA IT */ __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE)); 8007d96: 687b ldr r3, [r7, #4] 8007d98: 681b ldr r3, [r3, #0] 8007d9a: 4a41 ldr r2, [pc, #260] @ (8007ea0 ) 8007d9c: 4293 cmp r3, r2 8007d9e: d04a beq.n 8007e36 8007da0: 687b ldr r3, [r7, #4] 8007da2: 681b ldr r3, [r3, #0] 8007da4: 4a3f ldr r2, [pc, #252] @ (8007ea4 ) 8007da6: 4293 cmp r3, r2 8007da8: d045 beq.n 8007e36 8007daa: 687b ldr r3, [r7, #4] 8007dac: 681b ldr r3, [r3, #0] 8007dae: 4a3e ldr r2, [pc, #248] @ (8007ea8 ) 8007db0: 4293 cmp r3, r2 8007db2: d040 beq.n 8007e36 8007db4: 687b ldr r3, [r7, #4] 8007db6: 681b ldr r3, [r3, #0] 8007db8: 4a3c ldr r2, [pc, #240] @ (8007eac ) 8007dba: 4293 cmp r3, r2 8007dbc: d03b beq.n 8007e36 8007dbe: 687b ldr r3, [r7, #4] 8007dc0: 681b ldr r3, [r3, #0] 8007dc2: 4a3b ldr r2, [pc, #236] @ (8007eb0 ) 8007dc4: 4293 cmp r3, r2 8007dc6: d036 beq.n 8007e36 8007dc8: 687b ldr r3, [r7, #4] 8007dca: 681b ldr r3, [r3, #0] 8007dcc: 4a39 ldr r2, [pc, #228] @ (8007eb4 ) 8007dce: 4293 cmp r3, r2 8007dd0: d031 beq.n 8007e36 8007dd2: 687b ldr r3, [r7, #4] 8007dd4: 681b ldr r3, [r3, #0] 8007dd6: 4a38 ldr r2, [pc, #224] @ (8007eb8 ) 8007dd8: 4293 cmp r3, r2 8007dda: d02c beq.n 8007e36 8007ddc: 687b ldr r3, [r7, #4] 8007dde: 681b ldr r3, [r3, #0] 8007de0: 4a36 ldr r2, [pc, #216] @ (8007ebc ) 8007de2: 4293 cmp r3, r2 8007de4: d027 beq.n 8007e36 8007de6: 687b ldr r3, [r7, #4] 8007de8: 681b ldr r3, [r3, #0] 8007dea: 4a35 ldr r2, [pc, #212] @ (8007ec0 ) 8007dec: 4293 cmp r3, r2 8007dee: d022 beq.n 8007e36 8007df0: 687b ldr r3, [r7, #4] 8007df2: 681b ldr r3, [r3, #0] 8007df4: 4a33 ldr r2, [pc, #204] @ (8007ec4 ) 8007df6: 4293 cmp r3, r2 8007df8: d01d beq.n 8007e36 8007dfa: 687b ldr r3, [r7, #4] 8007dfc: 681b ldr r3, [r3, #0] 8007dfe: 4a32 ldr r2, [pc, #200] @ (8007ec8 ) 8007e00: 4293 cmp r3, r2 8007e02: d018 beq.n 8007e36 8007e04: 687b ldr r3, [r7, #4] 8007e06: 681b ldr r3, [r3, #0] 8007e08: 4a30 ldr r2, [pc, #192] @ (8007ecc ) 8007e0a: 4293 cmp r3, r2 8007e0c: d013 beq.n 8007e36 8007e0e: 687b ldr r3, [r7, #4] 8007e10: 681b ldr r3, [r3, #0] 8007e12: 4a2f ldr r2, [pc, #188] @ (8007ed0 ) 8007e14: 4293 cmp r3, r2 8007e16: d00e beq.n 8007e36 8007e18: 687b ldr r3, [r7, #4] 8007e1a: 681b ldr r3, [r3, #0] 8007e1c: 4a2d ldr r2, [pc, #180] @ (8007ed4 ) 8007e1e: 4293 cmp r3, r2 8007e20: d009 beq.n 8007e36 8007e22: 687b ldr r3, [r7, #4] 8007e24: 681b ldr r3, [r3, #0] 8007e26: 4a2c ldr r2, [pc, #176] @ (8007ed8 ) 8007e28: 4293 cmp r3, r2 8007e2a: d004 beq.n 8007e36 8007e2c: 687b ldr r3, [r7, #4] 8007e2e: 681b ldr r3, [r3, #0] 8007e30: 4a2a ldr r2, [pc, #168] @ (8007edc ) 8007e32: 4293 cmp r3, r2 8007e34: d108 bne.n 8007e48 8007e36: 687b ldr r3, [r7, #4] 8007e38: 681b ldr r3, [r3, #0] 8007e3a: 681a ldr r2, [r3, #0] 8007e3c: 687b ldr r3, [r7, #4] 8007e3e: 681b ldr r3, [r3, #0] 8007e40: f022 021c bic.w r2, r2, #28 8007e44: 601a str r2, [r3, #0] 8007e46: e007 b.n 8007e58 8007e48: 687b ldr r3, [r7, #4] 8007e4a: 681b ldr r3, [r3, #0] 8007e4c: 681a ldr r2, [r3, #0] 8007e4e: 687b ldr r3, [r7, #4] 8007e50: 681b ldr r3, [r3, #0] 8007e52: f022 020e bic.w r2, r2, #14 8007e56: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma->IFCR = (BDMA_ISR_GIF0) << (hdma->StreamIndex & 0x1FU); 8007e58: 687b ldr r3, [r7, #4] 8007e5a: 6ddb ldr r3, [r3, #92] @ 0x5c 8007e5c: f003 031f and.w r3, r3, #31 8007e60: 2201 movs r2, #1 8007e62: 409a lsls r2, r3 8007e64: 69fb ldr r3, [r7, #28] 8007e66: 605a str r2, [r3, #4] /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TE; 8007e68: 687b ldr r3, [r7, #4] 8007e6a: 2201 movs r2, #1 8007e6c: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007e6e: 687b ldr r3, [r7, #4] 8007e70: 2201 movs r2, #1 8007e72: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007e76: 687b ldr r3, [r7, #4] 8007e78: 2200 movs r2, #0 8007e7a: f883 2034 strb.w r2, [r3, #52] @ 0x34 if (hdma->XferErrorCallback != NULL) 8007e7e: 687b ldr r3, [r7, #4] 8007e80: 6cdb ldr r3, [r3, #76] @ 0x4c 8007e82: 2b00 cmp r3, #0 8007e84: d009 beq.n 8007e9a { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 8007e86: 687b ldr r3, [r7, #4] 8007e88: 6cdb ldr r3, [r3, #76] @ 0x4c 8007e8a: 6878 ldr r0, [r7, #4] 8007e8c: 4798 blx r3 8007e8e: e004 b.n 8007e9a return; 8007e90: bf00 nop 8007e92: e002 b.n 8007e9a if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007e94: bf00 nop 8007e96: e000 b.n 8007e9a if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007e98: bf00 nop } else { /* Nothing To Do */ } } 8007e9a: 3728 adds r7, #40 @ 0x28 8007e9c: 46bd mov sp, r7 8007e9e: bd80 pop {r7, pc} 8007ea0: 40020010 .word 0x40020010 8007ea4: 40020028 .word 0x40020028 8007ea8: 40020040 .word 0x40020040 8007eac: 40020058 .word 0x40020058 8007eb0: 40020070 .word 0x40020070 8007eb4: 40020088 .word 0x40020088 8007eb8: 400200a0 .word 0x400200a0 8007ebc: 400200b8 .word 0x400200b8 8007ec0: 40020410 .word 0x40020410 8007ec4: 40020428 .word 0x40020428 8007ec8: 40020440 .word 0x40020440 8007ecc: 40020458 .word 0x40020458 8007ed0: 40020470 .word 0x40020470 8007ed4: 40020488 .word 0x40020488 8007ed8: 400204a0 .word 0x400204a0 8007edc: 400204b8 .word 0x400204b8 08007ee0 : * @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) { 8007ee0: b480 push {r7} 8007ee2: b085 sub sp, #20 8007ee4: af00 add r7, sp, #0 8007ee6: 6078 str r0, [r7, #4] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8007ee8: 687b ldr r3, [r7, #4] 8007eea: 681b ldr r3, [r3, #0] 8007eec: 4a42 ldr r2, [pc, #264] @ (8007ff8 ) 8007eee: 4293 cmp r3, r2 8007ef0: d04a beq.n 8007f88 8007ef2: 687b ldr r3, [r7, #4] 8007ef4: 681b ldr r3, [r3, #0] 8007ef6: 4a41 ldr r2, [pc, #260] @ (8007ffc ) 8007ef8: 4293 cmp r3, r2 8007efa: d045 beq.n 8007f88 8007efc: 687b ldr r3, [r7, #4] 8007efe: 681b ldr r3, [r3, #0] 8007f00: 4a3f ldr r2, [pc, #252] @ (8008000 ) 8007f02: 4293 cmp r3, r2 8007f04: d040 beq.n 8007f88 8007f06: 687b ldr r3, [r7, #4] 8007f08: 681b ldr r3, [r3, #0] 8007f0a: 4a3e ldr r2, [pc, #248] @ (8008004 ) 8007f0c: 4293 cmp r3, r2 8007f0e: d03b beq.n 8007f88 8007f10: 687b ldr r3, [r7, #4] 8007f12: 681b ldr r3, [r3, #0] 8007f14: 4a3c ldr r2, [pc, #240] @ (8008008 ) 8007f16: 4293 cmp r3, r2 8007f18: d036 beq.n 8007f88 8007f1a: 687b ldr r3, [r7, #4] 8007f1c: 681b ldr r3, [r3, #0] 8007f1e: 4a3b ldr r2, [pc, #236] @ (800800c ) 8007f20: 4293 cmp r3, r2 8007f22: d031 beq.n 8007f88 8007f24: 687b ldr r3, [r7, #4] 8007f26: 681b ldr r3, [r3, #0] 8007f28: 4a39 ldr r2, [pc, #228] @ (8008010 ) 8007f2a: 4293 cmp r3, r2 8007f2c: d02c beq.n 8007f88 8007f2e: 687b ldr r3, [r7, #4] 8007f30: 681b ldr r3, [r3, #0] 8007f32: 4a38 ldr r2, [pc, #224] @ (8008014 ) 8007f34: 4293 cmp r3, r2 8007f36: d027 beq.n 8007f88 8007f38: 687b ldr r3, [r7, #4] 8007f3a: 681b ldr r3, [r3, #0] 8007f3c: 4a36 ldr r2, [pc, #216] @ (8008018 ) 8007f3e: 4293 cmp r3, r2 8007f40: d022 beq.n 8007f88 8007f42: 687b ldr r3, [r7, #4] 8007f44: 681b ldr r3, [r3, #0] 8007f46: 4a35 ldr r2, [pc, #212] @ (800801c ) 8007f48: 4293 cmp r3, r2 8007f4a: d01d beq.n 8007f88 8007f4c: 687b ldr r3, [r7, #4] 8007f4e: 681b ldr r3, [r3, #0] 8007f50: 4a33 ldr r2, [pc, #204] @ (8008020 ) 8007f52: 4293 cmp r3, r2 8007f54: d018 beq.n 8007f88 8007f56: 687b ldr r3, [r7, #4] 8007f58: 681b ldr r3, [r3, #0] 8007f5a: 4a32 ldr r2, [pc, #200] @ (8008024 ) 8007f5c: 4293 cmp r3, r2 8007f5e: d013 beq.n 8007f88 8007f60: 687b ldr r3, [r7, #4] 8007f62: 681b ldr r3, [r3, #0] 8007f64: 4a30 ldr r2, [pc, #192] @ (8008028 ) 8007f66: 4293 cmp r3, r2 8007f68: d00e beq.n 8007f88 8007f6a: 687b ldr r3, [r7, #4] 8007f6c: 681b ldr r3, [r3, #0] 8007f6e: 4a2f ldr r2, [pc, #188] @ (800802c ) 8007f70: 4293 cmp r3, r2 8007f72: d009 beq.n 8007f88 8007f74: 687b ldr r3, [r7, #4] 8007f76: 681b ldr r3, [r3, #0] 8007f78: 4a2d ldr r2, [pc, #180] @ (8008030 ) 8007f7a: 4293 cmp r3, r2 8007f7c: d004 beq.n 8007f88 8007f7e: 687b ldr r3, [r7, #4] 8007f80: 681b ldr r3, [r3, #0] 8007f82: 4a2c ldr r2, [pc, #176] @ (8008034 ) 8007f84: 4293 cmp r3, r2 8007f86: d101 bne.n 8007f8c 8007f88: 2301 movs r3, #1 8007f8a: e000 b.n 8007f8e 8007f8c: 2300 movs r3, #0 8007f8e: 2b00 cmp r3, #0 8007f90: d024 beq.n 8007fdc { uint32_t stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 8007f92: 687b ldr r3, [r7, #4] 8007f94: 681b ldr r3, [r3, #0] 8007f96: b2db uxtb r3, r3 8007f98: 3b10 subs r3, #16 8007f9a: 4a27 ldr r2, [pc, #156] @ (8008038 ) 8007f9c: fba2 2303 umull r2, r3, r2, r3 8007fa0: 091b lsrs r3, r3, #4 8007fa2: 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 & 0x7U]; 8007fa4: 68fb ldr r3, [r7, #12] 8007fa6: f003 0307 and.w r3, r3, #7 8007faa: 4a24 ldr r2, [pc, #144] @ (800803c ) 8007fac: 5cd3 ldrb r3, [r2, r3] 8007fae: 461a mov r2, r3 8007fb0: 687b ldr r3, [r7, #4] 8007fb2: 65da str r2, [r3, #92] @ 0x5c if (stream_number > 3U) 8007fb4: 68fb ldr r3, [r7, #12] 8007fb6: 2b03 cmp r3, #3 8007fb8: d908 bls.n 8007fcc { /* return pointer to HISR and HIFCR */ hdma->StreamBaseAddress = (((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)) + 4U); 8007fba: 687b ldr r3, [r7, #4] 8007fbc: 681b ldr r3, [r3, #0] 8007fbe: 461a mov r2, r3 8007fc0: 4b1f ldr r3, [pc, #124] @ (8008040 ) 8007fc2: 4013 ands r3, r2 8007fc4: 1d1a adds r2, r3, #4 8007fc6: 687b ldr r3, [r7, #4] 8007fc8: 659a str r2, [r3, #88] @ 0x58 8007fca: e00d b.n 8007fe8 } else { /* return pointer to LISR and LIFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)); 8007fcc: 687b ldr r3, [r7, #4] 8007fce: 681b ldr r3, [r3, #0] 8007fd0: 461a mov r2, r3 8007fd2: 4b1b ldr r3, [pc, #108] @ (8008040 ) 8007fd4: 4013 ands r3, r2 8007fd6: 687a ldr r2, [r7, #4] 8007fd8: 6593 str r3, [r2, #88] @ 0x58 8007fda: e005 b.n 8007fe8 } } else /* BDMA instance(s) */ { /* return pointer to ISR and IFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0xFFU)); 8007fdc: 687b ldr r3, [r7, #4] 8007fde: 681b ldr r3, [r3, #0] 8007fe0: f023 02ff bic.w r2, r3, #255 @ 0xff 8007fe4: 687b ldr r3, [r7, #4] 8007fe6: 659a str r2, [r3, #88] @ 0x58 } return hdma->StreamBaseAddress; 8007fe8: 687b ldr r3, [r7, #4] 8007fea: 6d9b ldr r3, [r3, #88] @ 0x58 } 8007fec: 4618 mov r0, r3 8007fee: 3714 adds r7, #20 8007ff0: 46bd mov sp, r7 8007ff2: f85d 7b04 ldr.w r7, [sp], #4 8007ff6: 4770 bx lr 8007ff8: 40020010 .word 0x40020010 8007ffc: 40020028 .word 0x40020028 8008000: 40020040 .word 0x40020040 8008004: 40020058 .word 0x40020058 8008008: 40020070 .word 0x40020070 800800c: 40020088 .word 0x40020088 8008010: 400200a0 .word 0x400200a0 8008014: 400200b8 .word 0x400200b8 8008018: 40020410 .word 0x40020410 800801c: 40020428 .word 0x40020428 8008020: 40020440 .word 0x40020440 8008024: 40020458 .word 0x40020458 8008028: 40020470 .word 0x40020470 800802c: 40020488 .word 0x40020488 8008030: 400204a0 .word 0x400204a0 8008034: 400204b8 .word 0x400204b8 8008038: aaaaaaab .word 0xaaaaaaab 800803c: 08031a9c .word 0x08031a9c 8008040: fffffc00 .word 0xfffffc00 08008044 : * @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) { 8008044: b480 push {r7} 8008046: b085 sub sp, #20 8008048: af00 add r7, sp, #0 800804a: 6078 str r0, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 800804c: 2300 movs r3, #0 800804e: 73fb strb r3, [r7, #15] /* Memory Data size equal to Byte */ if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE) 8008050: 687b ldr r3, [r7, #4] 8008052: 699b ldr r3, [r3, #24] 8008054: 2b00 cmp r3, #0 8008056: d120 bne.n 800809a { switch (hdma->Init.FIFOThreshold) 8008058: 687b ldr r3, [r7, #4] 800805a: 6a9b ldr r3, [r3, #40] @ 0x28 800805c: 2b03 cmp r3, #3 800805e: d858 bhi.n 8008112 8008060: a201 add r2, pc, #4 @ (adr r2, 8008068 ) 8008062: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8008066: bf00 nop 8008068: 08008079 .word 0x08008079 800806c: 0800808b .word 0x0800808b 8008070: 08008079 .word 0x08008079 8008074: 08008113 .word 0x08008113 { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 8008078: 687b ldr r3, [r7, #4] 800807a: 6adb ldr r3, [r3, #44] @ 0x2c 800807c: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8008080: 2b00 cmp r3, #0 8008082: d048 beq.n 8008116 { status = HAL_ERROR; 8008084: 2301 movs r3, #1 8008086: 73fb strb r3, [r7, #15] } break; 8008088: e045 b.n 8008116 case DMA_FIFO_THRESHOLD_HALFFULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 800808a: 687b ldr r3, [r7, #4] 800808c: 6adb ldr r3, [r3, #44] @ 0x2c 800808e: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 8008092: d142 bne.n 800811a { status = HAL_ERROR; 8008094: 2301 movs r3, #1 8008096: 73fb strb r3, [r7, #15] } break; 8008098: e03f b.n 800811a break; } } /* Memory Data size equal to Half-Word */ else if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_HALFWORD) 800809a: 687b ldr r3, [r7, #4] 800809c: 699b ldr r3, [r3, #24] 800809e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 80080a2: d123 bne.n 80080ec { switch (hdma->Init.FIFOThreshold) 80080a4: 687b ldr r3, [r7, #4] 80080a6: 6a9b ldr r3, [r3, #40] @ 0x28 80080a8: 2b03 cmp r3, #3 80080aa: d838 bhi.n 800811e 80080ac: a201 add r2, pc, #4 @ (adr r2, 80080b4 ) 80080ae: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80080b2: bf00 nop 80080b4: 080080c5 .word 0x080080c5 80080b8: 080080cb .word 0x080080cb 80080bc: 080080c5 .word 0x080080c5 80080c0: 080080dd .word 0x080080dd { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: status = HAL_ERROR; 80080c4: 2301 movs r3, #1 80080c6: 73fb strb r3, [r7, #15] break; 80080c8: e030 b.n 800812c case DMA_FIFO_THRESHOLD_HALFFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 80080ca: 687b ldr r3, [r7, #4] 80080cc: 6adb ldr r3, [r3, #44] @ 0x2c 80080ce: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 80080d2: 2b00 cmp r3, #0 80080d4: d025 beq.n 8008122 { status = HAL_ERROR; 80080d6: 2301 movs r3, #1 80080d8: 73fb strb r3, [r7, #15] } break; 80080da: e022 b.n 8008122 case DMA_FIFO_THRESHOLD_FULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 80080dc: 687b ldr r3, [r7, #4] 80080de: 6adb ldr r3, [r3, #44] @ 0x2c 80080e0: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 80080e4: d11f bne.n 8008126 { status = HAL_ERROR; 80080e6: 2301 movs r3, #1 80080e8: 73fb strb r3, [r7, #15] } break; 80080ea: e01c b.n 8008126 } /* Memory Data size equal to Word */ else { switch (hdma->Init.FIFOThreshold) 80080ec: 687b ldr r3, [r7, #4] 80080ee: 6a9b ldr r3, [r3, #40] @ 0x28 80080f0: 2b02 cmp r3, #2 80080f2: d902 bls.n 80080fa 80080f4: 2b03 cmp r3, #3 80080f6: d003 beq.n 8008100 status = HAL_ERROR; } break; default: break; 80080f8: e018 b.n 800812c status = HAL_ERROR; 80080fa: 2301 movs r3, #1 80080fc: 73fb strb r3, [r7, #15] break; 80080fe: e015 b.n 800812c if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 8008100: 687b ldr r3, [r7, #4] 8008102: 6adb ldr r3, [r3, #44] @ 0x2c 8008104: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8008108: 2b00 cmp r3, #0 800810a: d00e beq.n 800812a status = HAL_ERROR; 800810c: 2301 movs r3, #1 800810e: 73fb strb r3, [r7, #15] break; 8008110: e00b b.n 800812a break; 8008112: bf00 nop 8008114: e00a b.n 800812c break; 8008116: bf00 nop 8008118: e008 b.n 800812c break; 800811a: bf00 nop 800811c: e006 b.n 800812c break; 800811e: bf00 nop 8008120: e004 b.n 800812c break; 8008122: bf00 nop 8008124: e002 b.n 800812c break; 8008126: bf00 nop 8008128: e000 b.n 800812c break; 800812a: bf00 nop } } return status; 800812c: 7bfb ldrb r3, [r7, #15] } 800812e: 4618 mov r0, r3 8008130: 3714 adds r7, #20 8008132: 46bd mov sp, r7 8008134: f85d 7b04 ldr.w r7, [sp], #4 8008138: 4770 bx lr 800813a: bf00 nop 0800813c : * @param hdma: pointer to a DMA_HandleTypeDef structure that contains * the configuration information for the specified DMA Stream. * @retval HAL status */ static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma) { 800813c: b480 push {r7} 800813e: b085 sub sp, #20 8008140: af00 add r7, sp, #0 8008142: 6078 str r0, [r7, #4] uint32_t stream_number; uint32_t stream_baseaddress = (uint32_t)((uint32_t*)hdma->Instance); 8008144: 687b ldr r3, [r7, #4] 8008146: 681b ldr r3, [r3, #0] 8008148: 60bb str r3, [r7, #8] if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 800814a: 687b ldr r3, [r7, #4] 800814c: 681b ldr r3, [r3, #0] 800814e: 4a38 ldr r2, [pc, #224] @ (8008230 ) 8008150: 4293 cmp r3, r2 8008152: d022 beq.n 800819a 8008154: 687b ldr r3, [r7, #4] 8008156: 681b ldr r3, [r3, #0] 8008158: 4a36 ldr r2, [pc, #216] @ (8008234 ) 800815a: 4293 cmp r3, r2 800815c: d01d beq.n 800819a 800815e: 687b ldr r3, [r7, #4] 8008160: 681b ldr r3, [r3, #0] 8008162: 4a35 ldr r2, [pc, #212] @ (8008238 ) 8008164: 4293 cmp r3, r2 8008166: d018 beq.n 800819a 8008168: 687b ldr r3, [r7, #4] 800816a: 681b ldr r3, [r3, #0] 800816c: 4a33 ldr r2, [pc, #204] @ (800823c ) 800816e: 4293 cmp r3, r2 8008170: d013 beq.n 800819a 8008172: 687b ldr r3, [r7, #4] 8008174: 681b ldr r3, [r3, #0] 8008176: 4a32 ldr r2, [pc, #200] @ (8008240 ) 8008178: 4293 cmp r3, r2 800817a: d00e beq.n 800819a 800817c: 687b ldr r3, [r7, #4] 800817e: 681b ldr r3, [r3, #0] 8008180: 4a30 ldr r2, [pc, #192] @ (8008244 ) 8008182: 4293 cmp r3, r2 8008184: d009 beq.n 800819a 8008186: 687b ldr r3, [r7, #4] 8008188: 681b ldr r3, [r3, #0] 800818a: 4a2f ldr r2, [pc, #188] @ (8008248 ) 800818c: 4293 cmp r3, r2 800818e: d004 beq.n 800819a 8008190: 687b ldr r3, [r7, #4] 8008192: 681b ldr r3, [r3, #0] 8008194: 4a2d ldr r2, [pc, #180] @ (800824c ) 8008196: 4293 cmp r3, r2 8008198: d101 bne.n 800819e 800819a: 2301 movs r3, #1 800819c: e000 b.n 80081a0 800819e: 2300 movs r3, #0 80081a0: 2b00 cmp r3, #0 80081a2: d01a beq.n 80081da { /* BDMA Channels are connected to DMAMUX2 channels */ stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 8U) / 20U; 80081a4: 687b ldr r3, [r7, #4] 80081a6: 681b ldr r3, [r3, #0] 80081a8: b2db uxtb r3, r3 80081aa: 3b08 subs r3, #8 80081ac: 4a28 ldr r2, [pc, #160] @ (8008250 ) 80081ae: fba2 2303 umull r2, r3, r2, r3 80081b2: 091b lsrs r3, r3, #4 80081b4: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_Channel0) + (stream_number * 4U))); 80081b6: 68fa ldr r2, [r7, #12] 80081b8: 4b26 ldr r3, [pc, #152] @ (8008254 ) 80081ba: 4413 add r3, r2 80081bc: 009b lsls r3, r3, #2 80081be: 461a mov r2, r3 80081c0: 687b ldr r3, [r7, #4] 80081c2: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX2_ChannelStatus; 80081c4: 687b ldr r3, [r7, #4] 80081c6: 4a24 ldr r2, [pc, #144] @ (8008258 ) 80081c8: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 80081ca: 68fb ldr r3, [r7, #12] 80081cc: f003 031f and.w r3, r3, #31 80081d0: 2201 movs r2, #1 80081d2: 409a lsls r2, r3 80081d4: 687b ldr r3, [r7, #4] 80081d6: 669a str r2, [r3, #104] @ 0x68 } hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_Channel0) + (stream_number * 4U))); hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus; hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); } } 80081d8: e024 b.n 8008224 stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 80081da: 687b ldr r3, [r7, #4] 80081dc: 681b ldr r3, [r3, #0] 80081de: b2db uxtb r3, r3 80081e0: 3b10 subs r3, #16 80081e2: 4a1e ldr r2, [pc, #120] @ (800825c ) 80081e4: fba2 2303 umull r2, r3, r2, r3 80081e8: 091b lsrs r3, r3, #4 80081ea: 60fb str r3, [r7, #12] if((stream_baseaddress <= ((uint32_t)DMA2_Stream7) ) && \ 80081ec: 68bb ldr r3, [r7, #8] 80081ee: 4a1c ldr r2, [pc, #112] @ (8008260 ) 80081f0: 4293 cmp r3, r2 80081f2: d806 bhi.n 8008202 80081f4: 68bb ldr r3, [r7, #8] 80081f6: 4a1b ldr r2, [pc, #108] @ (8008264 ) 80081f8: 4293 cmp r3, r2 80081fa: d902 bls.n 8008202 stream_number += 8U; 80081fc: 68fb ldr r3, [r7, #12] 80081fe: 3308 adds r3, #8 8008200: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_Channel0) + (stream_number * 4U))); 8008202: 68fa ldr r2, [r7, #12] 8008204: 4b18 ldr r3, [pc, #96] @ (8008268 ) 8008206: 4413 add r3, r2 8008208: 009b lsls r3, r3, #2 800820a: 461a mov r2, r3 800820c: 687b ldr r3, [r7, #4] 800820e: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus; 8008210: 687b ldr r3, [r7, #4] 8008212: 4a16 ldr r2, [pc, #88] @ (800826c ) 8008214: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 8008216: 68fb ldr r3, [r7, #12] 8008218: f003 031f and.w r3, r3, #31 800821c: 2201 movs r2, #1 800821e: 409a lsls r2, r3 8008220: 687b ldr r3, [r7, #4] 8008222: 669a str r2, [r3, #104] @ 0x68 } 8008224: bf00 nop 8008226: 3714 adds r7, #20 8008228: 46bd mov sp, r7 800822a: f85d 7b04 ldr.w r7, [sp], #4 800822e: 4770 bx lr 8008230: 58025408 .word 0x58025408 8008234: 5802541c .word 0x5802541c 8008238: 58025430 .word 0x58025430 800823c: 58025444 .word 0x58025444 8008240: 58025458 .word 0x58025458 8008244: 5802546c .word 0x5802546c 8008248: 58025480 .word 0x58025480 800824c: 58025494 .word 0x58025494 8008250: cccccccd .word 0xcccccccd 8008254: 16009600 .word 0x16009600 8008258: 58025880 .word 0x58025880 800825c: aaaaaaab .word 0xaaaaaaab 8008260: 400204b8 .word 0x400204b8 8008264: 4002040f .word 0x4002040f 8008268: 10008200 .word 0x10008200 800826c: 40020880 .word 0x40020880 08008270 : * @param hdma: pointer to a DMA_HandleTypeDef structure that contains * the configuration information for the specified DMA Stream. * @retval HAL status */ static void DMA_CalcDMAMUXRequestGenBaseAndMask(DMA_HandleTypeDef *hdma) { 8008270: b480 push {r7} 8008272: b085 sub sp, #20 8008274: af00 add r7, sp, #0 8008276: 6078 str r0, [r7, #4] uint32_t request = hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID; 8008278: 687b ldr r3, [r7, #4] 800827a: 685b ldr r3, [r3, #4] 800827c: b2db uxtb r3, r3 800827e: 60fb str r3, [r7, #12] if((request >= DMA_REQUEST_GENERATOR0) && (request <= DMA_REQUEST_GENERATOR7)) 8008280: 68fb ldr r3, [r7, #12] 8008282: 2b00 cmp r3, #0 8008284: d04a beq.n 800831c 8008286: 68fb ldr r3, [r7, #12] 8008288: 2b08 cmp r3, #8 800828a: d847 bhi.n 800831c { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 800828c: 687b ldr r3, [r7, #4] 800828e: 681b ldr r3, [r3, #0] 8008290: 4a25 ldr r2, [pc, #148] @ (8008328 ) 8008292: 4293 cmp r3, r2 8008294: d022 beq.n 80082dc 8008296: 687b ldr r3, [r7, #4] 8008298: 681b ldr r3, [r3, #0] 800829a: 4a24 ldr r2, [pc, #144] @ (800832c ) 800829c: 4293 cmp r3, r2 800829e: d01d beq.n 80082dc 80082a0: 687b ldr r3, [r7, #4] 80082a2: 681b ldr r3, [r3, #0] 80082a4: 4a22 ldr r2, [pc, #136] @ (8008330 ) 80082a6: 4293 cmp r3, r2 80082a8: d018 beq.n 80082dc 80082aa: 687b ldr r3, [r7, #4] 80082ac: 681b ldr r3, [r3, #0] 80082ae: 4a21 ldr r2, [pc, #132] @ (8008334 ) 80082b0: 4293 cmp r3, r2 80082b2: d013 beq.n 80082dc 80082b4: 687b ldr r3, [r7, #4] 80082b6: 681b ldr r3, [r3, #0] 80082b8: 4a1f ldr r2, [pc, #124] @ (8008338 ) 80082ba: 4293 cmp r3, r2 80082bc: d00e beq.n 80082dc 80082be: 687b ldr r3, [r7, #4] 80082c0: 681b ldr r3, [r3, #0] 80082c2: 4a1e ldr r2, [pc, #120] @ (800833c ) 80082c4: 4293 cmp r3, r2 80082c6: d009 beq.n 80082dc 80082c8: 687b ldr r3, [r7, #4] 80082ca: 681b ldr r3, [r3, #0] 80082cc: 4a1c ldr r2, [pc, #112] @ (8008340 ) 80082ce: 4293 cmp r3, r2 80082d0: d004 beq.n 80082dc 80082d2: 687b ldr r3, [r7, #4] 80082d4: 681b ldr r3, [r3, #0] 80082d6: 4a1b ldr r2, [pc, #108] @ (8008344 ) 80082d8: 4293 cmp r3, r2 80082da: d101 bne.n 80082e0 80082dc: 2301 movs r3, #1 80082de: e000 b.n 80082e2 80082e0: 2300 movs r3, #0 80082e2: 2b00 cmp r3, #0 80082e4: d00a beq.n 80082fc { /* BDMA Channels are connected to DMAMUX2 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_RequestGenerator0) + ((request - 1U) * 4U))); 80082e6: 68fa ldr r2, [r7, #12] 80082e8: 4b17 ldr r3, [pc, #92] @ (8008348 ) 80082ea: 4413 add r3, r2 80082ec: 009b lsls r3, r3, #2 80082ee: 461a mov r2, r3 80082f0: 687b ldr r3, [r7, #4] 80082f2: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX2_RequestGenStatus; 80082f4: 687b ldr r3, [r7, #4] 80082f6: 4a15 ldr r2, [pc, #84] @ (800834c ) 80082f8: 671a str r2, [r3, #112] @ 0x70 80082fa: e009 b.n 8008310 } else { /* DMA1 and DMA2 Streams use DMAMUX1 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_RequestGenerator0) + ((request - 1U) * 4U))); 80082fc: 68fa ldr r2, [r7, #12] 80082fe: 4b14 ldr r3, [pc, #80] @ (8008350 ) 8008300: 4413 add r3, r2 8008302: 009b lsls r3, r3, #2 8008304: 461a mov r2, r3 8008306: 687b ldr r3, [r7, #4] 8008308: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX1_RequestGenStatus; 800830a: 687b ldr r3, [r7, #4] 800830c: 4a11 ldr r2, [pc, #68] @ (8008354 ) 800830e: 671a str r2, [r3, #112] @ 0x70 } hdma->DMAmuxRequestGenStatusMask = 1UL << (request - 1U); 8008310: 68fb ldr r3, [r7, #12] 8008312: 3b01 subs r3, #1 8008314: 2201 movs r2, #1 8008316: 409a lsls r2, r3 8008318: 687b ldr r3, [r7, #4] 800831a: 675a str r2, [r3, #116] @ 0x74 } } 800831c: bf00 nop 800831e: 3714 adds r7, #20 8008320: 46bd mov sp, r7 8008322: f85d 7b04 ldr.w r7, [sp], #4 8008326: 4770 bx lr 8008328: 58025408 .word 0x58025408 800832c: 5802541c .word 0x5802541c 8008330: 58025430 .word 0x58025430 8008334: 58025444 .word 0x58025444 8008338: 58025458 .word 0x58025458 800833c: 5802546c .word 0x5802546c 8008340: 58025480 .word 0x58025480 8008344: 58025494 .word 0x58025494 8008348: 1600963f .word 0x1600963f 800834c: 58025940 .word 0x58025940 8008350: 1000823f .word 0x1000823f 8008354: 40020940 .word 0x40020940 08008358 : * @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) { 8008358: b580 push {r7, lr} 800835a: b084 sub sp, #16 800835c: af00 add r7, sp, #0 800835e: 6078 str r0, [r7, #4] uint32_t tickstart; if (heth == NULL) 8008360: 687b ldr r3, [r7, #4] 8008362: 2b00 cmp r3, #0 8008364: d101 bne.n 800836a { return HAL_ERROR; 8008366: 2301 movs r3, #1 8008368: e0e3 b.n 8008532 } if (heth->gState == HAL_ETH_STATE_RESET) 800836a: 687b ldr r3, [r7, #4] 800836c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008370: 2b00 cmp r3, #0 8008372: d106 bne.n 8008382 { heth->gState = HAL_ETH_STATE_BUSY; 8008374: 687b ldr r3, [r7, #4] 8008376: 2223 movs r2, #35 @ 0x23 8008378: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Init the low level hardware */ heth->MspInitCallback(heth); #else /* Init the low level hardware : GPIO, CLOCK, NVIC. */ HAL_ETH_MspInit(heth); 800837c: 6878 ldr r0, [r7, #4] 800837e: f008 fbb9 bl 8010af4 #endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */ } __HAL_RCC_SYSCFG_CLK_ENABLE(); 8008382: 4b6e ldr r3, [pc, #440] @ (800853c ) 8008384: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8008388: 4a6c ldr r2, [pc, #432] @ (800853c ) 800838a: f043 0302 orr.w r3, r3, #2 800838e: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8008392: 4b6a ldr r3, [pc, #424] @ (800853c ) 8008394: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8008398: f003 0302 and.w r3, r3, #2 800839c: 60bb str r3, [r7, #8] 800839e: 68bb ldr r3, [r7, #8] if (heth->Init.MediaInterface == HAL_ETH_MII_MODE) 80083a0: 687b ldr r3, [r7, #4] 80083a2: 7a1b ldrb r3, [r3, #8] 80083a4: 2b00 cmp r3, #0 80083a6: d103 bne.n 80083b0 { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII); 80083a8: 2000 movs r0, #0 80083aa: f7fd fa3d bl 8005828 80083ae: e003 b.n 80083b8 } else { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII); 80083b0: f44f 0000 mov.w r0, #8388608 @ 0x800000 80083b4: f7fd fa38 bl 8005828 } /* Dummy read to sync with ETH */ (void)SYSCFG->PMCR; 80083b8: 4b61 ldr r3, [pc, #388] @ (8008540 ) 80083ba: 685b ldr r3, [r3, #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 */ SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); 80083bc: 687b ldr r3, [r7, #4] 80083be: 681b ldr r3, [r3, #0] 80083c0: f503 5380 add.w r3, r3, #4096 @ 0x1000 80083c4: 681b ldr r3, [r3, #0] 80083c6: 687a ldr r2, [r7, #4] 80083c8: 6812 ldr r2, [r2, #0] 80083ca: f043 0301 orr.w r3, r3, #1 80083ce: f502 5280 add.w r2, r2, #4096 @ 0x1000 80083d2: 6013 str r3, [r2, #0] /* Get tick */ tickstart = HAL_GetTick(); 80083d4: f7fd f9ec bl 80057b0 80083d8: 60f8 str r0, [r7, #12] /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 80083da: e011 b.n 8008400 { if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) 80083dc: f7fd f9e8 bl 80057b0 80083e0: 4602 mov r2, r0 80083e2: 68fb ldr r3, [r7, #12] 80083e4: 1ad3 subs r3, r2, r3 80083e6: f5b3 7ffa cmp.w r3, #500 @ 0x1f4 80083ea: d909 bls.n 8008400 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; 80083ec: 687b ldr r3, [r7, #4] 80083ee: 2204 movs r2, #4 80083f0: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 80083f4: 687b ldr r3, [r7, #4] 80083f6: 22e0 movs r2, #224 @ 0xe0 80083f8: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 80083fc: 2301 movs r3, #1 80083fe: e098 b.n 8008532 while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 8008400: 687b ldr r3, [r7, #4] 8008402: 681b ldr r3, [r3, #0] 8008404: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008408: 681b ldr r3, [r3, #0] 800840a: f003 0301 and.w r3, r3, #1 800840e: 2b00 cmp r3, #0 8008410: d1e4 bne.n 80083dc } } /*------------------ MDIO CSR Clock Range Configuration --------------------*/ HAL_ETH_SetMDIOClockRange(heth); 8008412: 6878 ldr r0, [r7, #4] 8008414: f000 ff1c bl 8009250 /*------------------ MAC LPI 1US Tic Counter Configuration --------------------*/ WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U)); 8008418: f002 ffb0 bl 800b37c 800841c: 4603 mov r3, r0 800841e: 4a49 ldr r2, [pc, #292] @ (8008544 ) 8008420: fba2 2303 umull r2, r3, r2, r3 8008424: 0c9a lsrs r2, r3, #18 8008426: 687b ldr r3, [r7, #4] 8008428: 681b ldr r3, [r3, #0] 800842a: 3a01 subs r2, #1 800842c: f8c3 20dc str.w r2, [r3, #220] @ 0xdc /*------------------ MAC, MTL and DMA default Configuration ----------------*/ ETH_MACDMAConfig(heth); 8008430: 6878 ldr r0, [r7, #4] 8008432: f001 f90d bl 8009650 /* SET DSL to 64 bit */ MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT); 8008436: 687b ldr r3, [r7, #4] 8008438: 681b ldr r3, [r3, #0] 800843a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800843e: f8d3 3100 ldr.w r3, [r3, #256] @ 0x100 8008442: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000 8008446: 687a ldr r2, [r7, #4] 8008448: 6812 ldr r2, [r2, #0] 800844a: f443 2300 orr.w r3, r3, #524288 @ 0x80000 800844e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008452: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /* Set Receive Buffers Length (must be a multiple of 4) */ if ((heth->Init.RxBuffLen % 0x4U) != 0x0U) 8008456: 687b ldr r3, [r7, #4] 8008458: 695b ldr r3, [r3, #20] 800845a: f003 0303 and.w r3, r3, #3 800845e: 2b00 cmp r3, #0 8008460: d009 beq.n 8008476 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_PARAM; 8008462: 687b ldr r3, [r7, #4] 8008464: 2201 movs r2, #1 8008466: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 800846a: 687b ldr r3, [r7, #4] 800846c: 22e0 movs r2, #224 @ 0xe0 800846e: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 8008472: 2301 movs r3, #1 8008474: e05d b.n 8008532 } else { MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1)); 8008476: 687b ldr r3, [r7, #4] 8008478: 681b ldr r3, [r3, #0] 800847a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800847e: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 8008482: 4b31 ldr r3, [pc, #196] @ (8008548 ) 8008484: 4013 ands r3, r2 8008486: 687a ldr r2, [r7, #4] 8008488: 6952 ldr r2, [r2, #20] 800848a: 0051 lsls r1, r2, #1 800848c: 687a ldr r2, [r7, #4] 800848e: 6812 ldr r2, [r2, #0] 8008490: 430b orrs r3, r1 8008492: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008496: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } /*------------------ DMA Tx Descriptors Configuration ----------------------*/ ETH_DMATxDescListInit(heth); 800849a: 6878 ldr r0, [r7, #4] 800849c: f001 f975 bl 800978a /*------------------ DMA Rx Descriptors Configuration ----------------------*/ ETH_DMARxDescListInit(heth); 80084a0: 6878 ldr r0, [r7, #4] 80084a2: f001 f9bb bl 800981c /*--------------------- ETHERNET MAC Address Configuration ------------------*/ /* Set MAC addr bits 32 to 47 */ heth->Instance->MACA0HR = (((uint32_t)(heth->Init.MACAddr[5]) << 8) | (uint32_t)heth->Init.MACAddr[4]); 80084a6: 687b ldr r3, [r7, #4] 80084a8: 685b ldr r3, [r3, #4] 80084aa: 3305 adds r3, #5 80084ac: 781b ldrb r3, [r3, #0] 80084ae: 021a lsls r2, r3, #8 80084b0: 687b ldr r3, [r7, #4] 80084b2: 685b ldr r3, [r3, #4] 80084b4: 3304 adds r3, #4 80084b6: 781b ldrb r3, [r3, #0] 80084b8: 4619 mov r1, r3 80084ba: 687b ldr r3, [r7, #4] 80084bc: 681b ldr r3, [r3, #0] 80084be: 430a orrs r2, r1 80084c0: f8c3 2300 str.w r2, [r3, #768] @ 0x300 /* Set MAC addr bits 0 to 31 */ heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80084c4: 687b ldr r3, [r7, #4] 80084c6: 685b ldr r3, [r3, #4] 80084c8: 3303 adds r3, #3 80084ca: 781b ldrb r3, [r3, #0] 80084cc: 061a lsls r2, r3, #24 80084ce: 687b ldr r3, [r7, #4] 80084d0: 685b ldr r3, [r3, #4] 80084d2: 3302 adds r3, #2 80084d4: 781b ldrb r3, [r3, #0] 80084d6: 041b lsls r3, r3, #16 80084d8: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80084da: 687b ldr r3, [r7, #4] 80084dc: 685b ldr r3, [r3, #4] 80084de: 3301 adds r3, #1 80084e0: 781b ldrb r3, [r3, #0] 80084e2: 021b lsls r3, r3, #8 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80084e4: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80084e6: 687b ldr r3, [r7, #4] 80084e8: 685b ldr r3, [r3, #4] 80084ea: 781b ldrb r3, [r3, #0] 80084ec: 4619 mov r1, r3 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80084ee: 687b ldr r3, [r7, #4] 80084f0: 681b ldr r3, [r3, #0] ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 80084f2: 430a orrs r2, r1 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 80084f4: f8c3 2304 str.w r2, [r3, #772] @ 0x304 /* Disable Rx MMC Interrupts */ SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \ 80084f8: 687b ldr r3, [r7, #4] 80084fa: 681b ldr r3, [r3, #0] 80084fc: f8d3 170c ldr.w r1, [r3, #1804] @ 0x70c 8008500: 687b ldr r3, [r7, #4] 8008502: 681a ldr r2, [r3, #0] 8008504: 4b11 ldr r3, [pc, #68] @ (800854c ) 8008506: 430b orrs r3, r1 8008508: f8c2 370c str.w r3, [r2, #1804] @ 0x70c ETH_MMCRIMR_RXUCGPIM | ETH_MMCRIMR_RXALGNERPIM | ETH_MMCRIMR_RXCRCERPIM); /* Disable Tx MMC Interrupts */ SET_BIT(heth->Instance->MMCTIMR, ETH_MMCTIMR_TXLPITRCIM | ETH_MMCTIMR_TXLPIUSCIM | \ 800850c: 687b ldr r3, [r7, #4] 800850e: 681b ldr r3, [r3, #0] 8008510: f8d3 1710 ldr.w r1, [r3, #1808] @ 0x710 8008514: 687b ldr r3, [r7, #4] 8008516: 681a ldr r2, [r3, #0] 8008518: 4b0d ldr r3, [pc, #52] @ (8008550 ) 800851a: 430b orrs r3, r1 800851c: f8c2 3710 str.w r3, [r2, #1808] @ 0x710 ETH_MMCTIMR_TXGPKTIM | ETH_MMCTIMR_TXMCOLGPIM | ETH_MMCTIMR_TXSCOLGPIM); heth->ErrorCode = HAL_ETH_ERROR_NONE; 8008520: 687b ldr r3, [r7, #4] 8008522: 2200 movs r2, #0 8008524: f8c3 2088 str.w r2, [r3, #136] @ 0x88 heth->gState = HAL_ETH_STATE_READY; 8008528: 687b ldr r3, [r7, #4] 800852a: 2210 movs r2, #16 800852c: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 8008530: 2300 movs r3, #0 } 8008532: 4618 mov r0, r3 8008534: 3710 adds r7, #16 8008536: 46bd mov sp, r7 8008538: bd80 pop {r7, pc} 800853a: bf00 nop 800853c: 58024400 .word 0x58024400 8008540: 58000400 .word 0x58000400 8008544: 431bde83 .word 0x431bde83 8008548: ffff8001 .word 0xffff8001 800854c: 0c020060 .word 0x0c020060 8008550: 0c20c000 .word 0x0c20c000 08008554 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Start_IT(ETH_HandleTypeDef *heth) { 8008554: b580 push {r7, lr} 8008556: b082 sub sp, #8 8008558: af00 add r7, sp, #0 800855a: 6078 str r0, [r7, #4] if (heth->gState == HAL_ETH_STATE_READY) 800855c: 687b ldr r3, [r7, #4] 800855e: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008562: 2b10 cmp r3, #16 8008564: d165 bne.n 8008632 { heth->gState = HAL_ETH_STATE_BUSY; 8008566: 687b ldr r3, [r7, #4] 8008568: 2223 movs r2, #35 @ 0x23 800856a: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* save IT mode to ETH Handle */ heth->RxDescList.ItMode = 1U; 800856e: 687b ldr r3, [r7, #4] 8008570: 2201 movs r2, #1 8008572: 659a str r2, [r3, #88] @ 0x58 /* Set number of descriptors to build */ heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT; 8008574: 687b ldr r3, [r7, #4] 8008576: 2204 movs r2, #4 8008578: 66da str r2, [r3, #108] @ 0x6c /* Build all descriptors */ ETH_UpdateDescriptor(heth); 800857a: 6878 ldr r0, [r7, #4] 800857c: f000 f9e4 bl 8008948 /* Enable the DMA transmission */ SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 8008580: 687b ldr r3, [r7, #4] 8008582: 681b ldr r3, [r3, #0] 8008584: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008588: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 800858c: 687a ldr r2, [r7, #4] 800858e: 6812 ldr r2, [r2, #0] 8008590: f043 0301 orr.w r3, r3, #1 8008594: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008598: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Enable the DMA reception */ SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800859c: 687b ldr r3, [r7, #4] 800859e: 681b ldr r3, [r3, #0] 80085a0: f503 5380 add.w r3, r3, #4096 @ 0x1000 80085a4: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 80085a8: 687a ldr r2, [r7, #4] 80085aa: 6812 ldr r2, [r2, #0] 80085ac: f043 0301 orr.w r3, r3, #1 80085b0: f502 5280 add.w r2, r2, #4096 @ 0x1000 80085b4: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Clear Tx and Rx process stopped flags */ heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); 80085b8: 687b ldr r3, [r7, #4] 80085ba: 681b ldr r3, [r3, #0] 80085bc: f503 5380 add.w r3, r3, #4096 @ 0x1000 80085c0: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 80085c4: 687a ldr r2, [r7, #4] 80085c6: 6812 ldr r2, [r2, #0] 80085c8: f443 7381 orr.w r3, r3, #258 @ 0x102 80085cc: f502 5280 add.w r2, r2, #4096 @ 0x1000 80085d0: f8c2 3160 str.w r3, [r2, #352] @ 0x160 /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 80085d4: 687b ldr r3, [r7, #4] 80085d6: 681b ldr r3, [r3, #0] 80085d8: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 80085dc: 687b ldr r3, [r7, #4] 80085de: 681b ldr r3, [r3, #0] 80085e0: f042 0201 orr.w r2, r2, #1 80085e4: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Enable the MAC transmission */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 80085e8: 687b ldr r3, [r7, #4] 80085ea: 681b ldr r3, [r3, #0] 80085ec: 681a ldr r2, [r3, #0] 80085ee: 687b ldr r3, [r7, #4] 80085f0: 681b ldr r3, [r3, #0] 80085f2: f042 0202 orr.w r2, r2, #2 80085f6: 601a str r2, [r3, #0] /* Enable the MAC reception */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 80085f8: 687b ldr r3, [r7, #4] 80085fa: 681b ldr r3, [r3, #0] 80085fc: 681a ldr r2, [r3, #0] 80085fe: 687b ldr r3, [r7, #4] 8008600: 681b ldr r3, [r3, #0] 8008602: f042 0201 orr.w r2, r2, #1 8008606: 601a str r2, [r3, #0] /* Enable ETH DMA interrupts: - Tx complete interrupt - Rx complete interrupt - Fatal bus interrupt */ __HAL_ETH_DMA_ENABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | 8008608: 687b ldr r3, [r7, #4] 800860a: 681b ldr r3, [r3, #0] 800860c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008610: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 8008614: 687b ldr r3, [r7, #4] 8008616: 681a ldr r2, [r3, #0] 8008618: f24d 03c1 movw r3, #53441 @ 0xd0c1 800861c: 430b orrs r3, r1 800861e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008622: f8c2 3134 str.w r3, [r2, #308] @ 0x134 ETH_DMACIER_FBEE | ETH_DMACIER_AIE | ETH_DMACIER_RBUE)); heth->gState = HAL_ETH_STATE_STARTED; 8008626: 687b ldr r3, [r7, #4] 8008628: 2223 movs r2, #35 @ 0x23 800862a: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 800862e: 2300 movs r3, #0 8008630: e000 b.n 8008634 } else { return HAL_ERROR; 8008632: 2301 movs r3, #1 } } 8008634: 4618 mov r0, r3 8008636: 3708 adds r7, #8 8008638: 46bd mov sp, r7 800863a: bd80 pop {r7, pc} 0800863c : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Stop_IT(ETH_HandleTypeDef *heth) { 800863c: b480 push {r7} 800863e: b085 sub sp, #20 8008640: af00 add r7, sp, #0 8008642: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t descindex; if (heth->gState == HAL_ETH_STATE_STARTED) 8008644: 687b ldr r3, [r7, #4] 8008646: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800864a: 2b23 cmp r3, #35 @ 0x23 800864c: d165 bne.n 800871a { /* Set the ETH peripheral state to BUSY */ heth->gState = HAL_ETH_STATE_BUSY; 800864e: 687b ldr r3, [r7, #4] 8008650: 2223 movs r2, #35 @ 0x23 8008652: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Disable interrupts: - Tx complete interrupt - Rx complete interrupt - Fatal bus interrupt */ __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | 8008656: 687b ldr r3, [r7, #4] 8008658: 681b ldr r3, [r3, #0] 800865a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800865e: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 8008662: 687b ldr r3, [r7, #4] 8008664: 681a ldr r2, [r3, #0] 8008666: 4b30 ldr r3, [pc, #192] @ (8008728 ) 8008668: 400b ands r3, r1 800866a: f502 5280 add.w r2, r2, #4096 @ 0x1000 800866e: f8c2 3134 str.w r3, [r2, #308] @ 0x134 ETH_DMACIER_FBEE | ETH_DMACIER_AIE | ETH_DMACIER_RBUE)); /* Disable the DMA transmission */ CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 8008672: 687b ldr r3, [r7, #4] 8008674: 681b ldr r3, [r3, #0] 8008676: f503 5380 add.w r3, r3, #4096 @ 0x1000 800867a: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 800867e: 687a ldr r2, [r7, #4] 8008680: 6812 ldr r2, [r2, #0] 8008682: f023 0301 bic.w r3, r3, #1 8008686: f502 5280 add.w r2, r2, #4096 @ 0x1000 800868a: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Disable the DMA reception */ CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800868e: 687b ldr r3, [r7, #4] 8008690: 681b ldr r3, [r3, #0] 8008692: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008696: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 800869a: 687a ldr r2, [r7, #4] 800869c: 6812 ldr r2, [r2, #0] 800869e: f023 0301 bic.w r3, r3, #1 80086a2: f502 5280 add.w r2, r2, #4096 @ 0x1000 80086a6: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Disable the MAC reception */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 80086aa: 687b ldr r3, [r7, #4] 80086ac: 681b ldr r3, [r3, #0] 80086ae: 681a ldr r2, [r3, #0] 80086b0: 687b ldr r3, [r7, #4] 80086b2: 681b ldr r3, [r3, #0] 80086b4: f022 0201 bic.w r2, r2, #1 80086b8: 601a str r2, [r3, #0] /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 80086ba: 687b ldr r3, [r7, #4] 80086bc: 681b ldr r3, [r3, #0] 80086be: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 80086c2: 687b ldr r3, [r7, #4] 80086c4: 681b ldr r3, [r3, #0] 80086c6: f042 0201 orr.w r2, r2, #1 80086ca: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Disable the MAC transmission */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 80086ce: 687b ldr r3, [r7, #4] 80086d0: 681b ldr r3, [r3, #0] 80086d2: 681a ldr r2, [r3, #0] 80086d4: 687b ldr r3, [r7, #4] 80086d6: 681b ldr r3, [r3, #0] 80086d8: f022 0202 bic.w r2, r2, #2 80086dc: 601a str r2, [r3, #0] /* Clear IOC bit to all Rx descriptors */ for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 80086de: 2300 movs r3, #0 80086e0: 60fb str r3, [r7, #12] 80086e2: e00e b.n 8008702 { dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; 80086e4: 687b ldr r3, [r7, #4] 80086e6: 68fa ldr r2, [r7, #12] 80086e8: 3212 adds r2, #18 80086ea: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80086ee: 60bb str r3, [r7, #8] CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); 80086f0: 68bb ldr r3, [r7, #8] 80086f2: 68db ldr r3, [r3, #12] 80086f4: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 80086f8: 68bb ldr r3, [r7, #8] 80086fa: 60da str r2, [r3, #12] for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 80086fc: 68fb ldr r3, [r7, #12] 80086fe: 3301 adds r3, #1 8008700: 60fb str r3, [r7, #12] 8008702: 68fb ldr r3, [r7, #12] 8008704: 2b03 cmp r3, #3 8008706: d9ed bls.n 80086e4 } heth->RxDescList.ItMode = 0U; 8008708: 687b ldr r3, [r7, #4] 800870a: 2200 movs r2, #0 800870c: 659a str r2, [r3, #88] @ 0x58 heth->gState = HAL_ETH_STATE_READY; 800870e: 687b ldr r3, [r7, #4] 8008710: 2210 movs r2, #16 8008712: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return function status */ return HAL_OK; 8008716: 2300 movs r3, #0 8008718: e000 b.n 800871c } else { return HAL_ERROR; 800871a: 2301 movs r3, #1 } } 800871c: 4618 mov r0, r3 800871e: 3714 adds r7, #20 8008720: 46bd mov sp, r7 8008722: f85d 7b04 ldr.w r7, [sp], #4 8008726: 4770 bx lr 8008728: ffff2f3e .word 0xffff2f3e 0800872c : * the configuration information for ETHERNET module * @param pTxConfig: Hold the configuration of packet to be transmitted * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Transmit_IT(ETH_HandleTypeDef *heth, ETH_TxPacketConfigTypeDef *pTxConfig) { 800872c: b580 push {r7, lr} 800872e: b082 sub sp, #8 8008730: af00 add r7, sp, #0 8008732: 6078 str r0, [r7, #4] 8008734: 6039 str r1, [r7, #0] if (pTxConfig == NULL) 8008736: 683b ldr r3, [r7, #0] 8008738: 2b00 cmp r3, #0 800873a: d109 bne.n 8008750 { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 800873c: 687b ldr r3, [r7, #4] 800873e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008742: f043 0201 orr.w r2, r3, #1 8008746: 687b ldr r3, [r7, #4] 8008748: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 800874c: 2301 movs r3, #1 800874e: e03a b.n 80087c6 } if (heth->gState == HAL_ETH_STATE_STARTED) 8008750: 687b ldr r3, [r7, #4] 8008752: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008756: 2b23 cmp r3, #35 @ 0x23 8008758: d134 bne.n 80087c4 { /* Save the packet pointer to release. */ heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData; 800875a: 683b ldr r3, [r7, #0] 800875c: 6b5a ldr r2, [r3, #52] @ 0x34 800875e: 687b ldr r3, [r7, #4] 8008760: 63da str r2, [r3, #60] @ 0x3c /* Config DMA Tx descriptor by Tx Packet info */ if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 1) != HAL_ETH_ERROR_NONE) 8008762: 2201 movs r2, #1 8008764: 6839 ldr r1, [r7, #0] 8008766: 6878 ldr r0, [r7, #4] 8008768: f001 f8b6 bl 80098d8 800876c: 4603 mov r3, r0 800876e: 2b00 cmp r3, #0 8008770: d009 beq.n 8008786 { heth->ErrorCode |= HAL_ETH_ERROR_BUSY; 8008772: 687b ldr r3, [r7, #4] 8008774: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008778: f043 0202 orr.w r2, r3, #2 800877c: 687b ldr r3, [r7, #4] 800877e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 8008782: 2301 movs r3, #1 8008784: e01f b.n 80087c6 __ASM volatile ("dsb 0xF":::"memory"); 8008786: f3bf 8f4f dsb sy } 800878a: bf00 nop /* Ensure completion of descriptor preparation before transmission start */ __DSB(); /* Incr current tx desc index */ INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U); 800878c: 687b ldr r3, [r7, #4] 800878e: 6a9b ldr r3, [r3, #40] @ 0x28 8008790: 1c5a adds r2, r3, #1 8008792: 687b ldr r3, [r7, #4] 8008794: 629a str r2, [r3, #40] @ 0x28 8008796: 687b ldr r3, [r7, #4] 8008798: 6a9b ldr r3, [r3, #40] @ 0x28 800879a: 2b03 cmp r3, #3 800879c: d904 bls.n 80087a8 800879e: 687b ldr r3, [r7, #4] 80087a0: 6a9b ldr r3, [r3, #40] @ 0x28 80087a2: 1f1a subs r2, r3, #4 80087a4: 687b ldr r3, [r7, #4] 80087a6: 629a str r2, [r3, #40] @ 0x28 /* Start transmission */ /* issue a poll command to Tx DMA by writing address of next immediate free descriptor */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc])); 80087a8: 687b ldr r3, [r7, #4] 80087aa: 6a99 ldr r1, [r3, #40] @ 0x28 80087ac: 687b ldr r3, [r7, #4] 80087ae: 681a ldr r2, [r3, #0] 80087b0: 687b ldr r3, [r7, #4] 80087b2: 3106 adds r1, #6 80087b4: f853 3021 ldr.w r3, [r3, r1, lsl #2] 80087b8: f502 5280 add.w r2, r2, #4096 @ 0x1000 80087bc: f8c2 3120 str.w r3, [r2, #288] @ 0x120 return HAL_OK; 80087c0: 2300 movs r3, #0 80087c2: e000 b.n 80087c6 } else { return HAL_ERROR; 80087c4: 2301 movs r3, #1 } } 80087c6: 4618 mov r0, r3 80087c8: 3708 adds r7, #8 80087ca: 46bd mov sp, r7 80087cc: bd80 pop {r7, pc} 080087ce : * the configuration information for ETHERNET module * @param pAppBuff: Pointer to an application buffer to receive the packet. * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ReadData(ETH_HandleTypeDef *heth, void **pAppBuff) { 80087ce: b580 push {r7, lr} 80087d0: b088 sub sp, #32 80087d2: af00 add r7, sp, #0 80087d4: 6078 str r0, [r7, #4] 80087d6: 6039 str r1, [r7, #0] uint32_t descidx; ETH_DMADescTypeDef *dmarxdesc; uint32_t desccnt = 0U; 80087d8: 2300 movs r3, #0 80087da: 617b str r3, [r7, #20] uint32_t desccntmax; uint32_t bufflength; uint8_t rxdataready = 0U; 80087dc: 2300 movs r3, #0 80087de: 74fb strb r3, [r7, #19] if (pAppBuff == NULL) 80087e0: 683b ldr r3, [r7, #0] 80087e2: 2b00 cmp r3, #0 80087e4: d109 bne.n 80087fa { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 80087e6: 687b ldr r3, [r7, #4] 80087e8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 80087ec: f043 0201 orr.w r2, r3, #1 80087f0: 687b ldr r3, [r7, #4] 80087f2: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 80087f6: 2301 movs r3, #1 80087f8: e0a2 b.n 8008940 } if (heth->gState != HAL_ETH_STATE_STARTED) 80087fa: 687b ldr r3, [r7, #4] 80087fc: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8008800: 2b23 cmp r3, #35 @ 0x23 8008802: d001 beq.n 8008808 { return HAL_ERROR; 8008804: 2301 movs r3, #1 8008806: e09b b.n 8008940 } descidx = heth->RxDescList.RxDescIdx; 8008808: 687b ldr r3, [r7, #4] 800880a: 6ddb ldr r3, [r3, #92] @ 0x5c 800880c: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800880e: 687b ldr r3, [r7, #4] 8008810: 69fa ldr r2, [r7, #28] 8008812: 3212 adds r2, #18 8008814: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008818: 61bb str r3, [r7, #24] desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt; 800881a: 687b ldr r3, [r7, #4] 800881c: 6edb ldr r3, [r3, #108] @ 0x6c 800881e: f1c3 0304 rsb r3, r3, #4 8008822: 60fb str r3, [r7, #12] /* Check if descriptor is not owned by DMA */ while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8008824: e064 b.n 80088f0 && (rxdataready == 0U)) { if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET) 8008826: 69bb ldr r3, [r7, #24] 8008828: 68db ldr r3, [r3, #12] 800882a: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 800882e: 2b00 cmp r3, #0 8008830: d007 beq.n 8008842 { /* Get timestamp high */ heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1; 8008832: 69bb ldr r3, [r7, #24] 8008834: 685a ldr r2, [r3, #4] 8008836: 687b ldr r3, [r7, #4] 8008838: 679a str r2, [r3, #120] @ 0x78 /* Get timestamp low */ heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0; 800883a: 69bb ldr r3, [r7, #24] 800883c: 681a ldr r2, [r3, #0] 800883e: 687b ldr r3, [r7, #4] 8008840: 675a str r2, [r3, #116] @ 0x74 } if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL)) 8008842: 69bb ldr r3, [r7, #24] 8008844: 68db ldr r3, [r3, #12] 8008846: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800884a: 2b00 cmp r3, #0 800884c: d103 bne.n 8008856 800884e: 687b ldr r3, [r7, #4] 8008850: 6fdb ldr r3, [r3, #124] @ 0x7c 8008852: 2b00 cmp r3, #0 8008854: d03a beq.n 80088cc { /* Check if first descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) 8008856: 69bb ldr r3, [r7, #24] 8008858: 68db ldr r3, [r3, #12] 800885a: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800885e: 2b00 cmp r3, #0 8008860: d005 beq.n 800886e { heth->RxDescList.RxDescCnt = 0; 8008862: 687b ldr r3, [r7, #4] 8008864: 2200 movs r2, #0 8008866: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength = 0; 8008868: 687b ldr r3, [r7, #4] 800886a: 2200 movs r2, #0 800886c: 665a str r2, [r3, #100] @ 0x64 } /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ bufflength = READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_PL) - heth->RxDescList.RxDataLength; 800886e: 69bb ldr r3, [r7, #24] 8008870: 68db ldr r3, [r3, #12] 8008872: f3c3 020e ubfx r2, r3, #0, #15 8008876: 687b ldr r3, [r7, #4] 8008878: 6e5b ldr r3, [r3, #100] @ 0x64 800887a: 1ad3 subs r3, r2, r3 800887c: 60bb str r3, [r7, #8] /* Check if last descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET) 800887e: 69bb ldr r3, [r7, #24] 8008880: 68db ldr r3, [r3, #12] 8008882: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 8008886: 2b00 cmp r3, #0 8008888: d005 beq.n 8008896 { /* Save Last descriptor index */ heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3; 800888a: 69bb ldr r3, [r7, #24] 800888c: 68da ldr r2, [r3, #12] 800888e: 687b ldr r3, [r7, #4] 8008890: 671a str r2, [r3, #112] @ 0x70 /* Packet ready */ rxdataready = 1; 8008892: 2301 movs r3, #1 8008894: 74fb strb r3, [r7, #19] /*Call registered Link callback*/ heth->rxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, (uint8_t *)dmarxdesc->BackupAddr0, bufflength); #else /* Link callback */ HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 8008896: 687b ldr r3, [r7, #4] 8008898: f103 007c add.w r0, r3, #124 @ 0x7c 800889c: 687b ldr r3, [r7, #4] 800889e: f103 0180 add.w r1, r3, #128 @ 0x80 (uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength); 80088a2: 69bb ldr r3, [r7, #24] 80088a4: 691b ldr r3, [r3, #16] HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 80088a6: 461a mov r2, r3 80088a8: 68bb ldr r3, [r7, #8] 80088aa: b29b uxth r3, r3 80088ac: f008 fb24 bl 8010ef8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->RxDescList.RxDescCnt++; 80088b0: 687b ldr r3, [r7, #4] 80088b2: 6e1b ldr r3, [r3, #96] @ 0x60 80088b4: 1c5a adds r2, r3, #1 80088b6: 687b ldr r3, [r7, #4] 80088b8: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength += bufflength; 80088ba: 687b ldr r3, [r7, #4] 80088bc: 6e5a ldr r2, [r3, #100] @ 0x64 80088be: 68bb ldr r3, [r7, #8] 80088c0: 441a add r2, r3 80088c2: 687b ldr r3, [r7, #4] 80088c4: 665a str r2, [r3, #100] @ 0x64 /* Clear buffer pointer */ dmarxdesc->BackupAddr0 = 0; 80088c6: 69bb ldr r3, [r7, #24] 80088c8: 2200 movs r2, #0 80088ca: 611a str r2, [r3, #16] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 80088cc: 69fb ldr r3, [r7, #28] 80088ce: 3301 adds r3, #1 80088d0: 61fb str r3, [r7, #28] 80088d2: 69fb ldr r3, [r7, #28] 80088d4: 2b03 cmp r3, #3 80088d6: d902 bls.n 80088de 80088d8: 69fb ldr r3, [r7, #28] 80088da: 3b04 subs r3, #4 80088dc: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80088de: 687b ldr r3, [r7, #4] 80088e0: 69fa ldr r2, [r7, #28] 80088e2: 3212 adds r2, #18 80088e4: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80088e8: 61bb str r3, [r7, #24] desccnt++; 80088ea: 697b ldr r3, [r7, #20] 80088ec: 3301 adds r3, #1 80088ee: 617b str r3, [r7, #20] while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 80088f0: 69bb ldr r3, [r7, #24] 80088f2: 68db ldr r3, [r3, #12] && (rxdataready == 0U)) 80088f4: 2b00 cmp r3, #0 80088f6: db06 blt.n 8008906 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 80088f8: 697a ldr r2, [r7, #20] 80088fa: 68fb ldr r3, [r7, #12] 80088fc: 429a cmp r2, r3 80088fe: d202 bcs.n 8008906 && (rxdataready == 0U)) 8008900: 7cfb ldrb r3, [r7, #19] 8008902: 2b00 cmp r3, #0 8008904: d08f beq.n 8008826 } heth->RxDescList.RxBuildDescCnt += desccnt; 8008906: 687b ldr r3, [r7, #4] 8008908: 6eda ldr r2, [r3, #108] @ 0x6c 800890a: 697b ldr r3, [r7, #20] 800890c: 441a add r2, r3 800890e: 687b ldr r3, [r7, #4] 8008910: 66da str r2, [r3, #108] @ 0x6c if ((heth->RxDescList.RxBuildDescCnt) != 0U) 8008912: 687b ldr r3, [r7, #4] 8008914: 6edb ldr r3, [r3, #108] @ 0x6c 8008916: 2b00 cmp r3, #0 8008918: d002 beq.n 8008920 { /* Update Descriptors */ ETH_UpdateDescriptor(heth); 800891a: 6878 ldr r0, [r7, #4] 800891c: f000 f814 bl 8008948 } heth->RxDescList.RxDescIdx = descidx; 8008920: 687b ldr r3, [r7, #4] 8008922: 69fa ldr r2, [r7, #28] 8008924: 65da str r2, [r3, #92] @ 0x5c if (rxdataready == 1U) 8008926: 7cfb ldrb r3, [r7, #19] 8008928: 2b01 cmp r3, #1 800892a: d108 bne.n 800893e { /* Return received packet */ *pAppBuff = heth->RxDescList.pRxStart; 800892c: 687b ldr r3, [r7, #4] 800892e: 6fda ldr r2, [r3, #124] @ 0x7c 8008930: 683b ldr r3, [r7, #0] 8008932: 601a str r2, [r3, #0] /* Reset first element */ heth->RxDescList.pRxStart = NULL; 8008934: 687b ldr r3, [r7, #4] 8008936: 2200 movs r2, #0 8008938: 67da str r2, [r3, #124] @ 0x7c return HAL_OK; 800893a: 2300 movs r3, #0 800893c: e000 b.n 8008940 } /* Packet not ready */ return HAL_ERROR; 800893e: 2301 movs r3, #1 } 8008940: 4618 mov r0, r3 8008942: 3720 adds r7, #32 8008944: 46bd mov sp, r7 8008946: bd80 pop {r7, pc} 08008948 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth) { 8008948: b580 push {r7, lr} 800894a: b088 sub sp, #32 800894c: af00 add r7, sp, #0 800894e: 6078 str r0, [r7, #4] uint32_t descidx; uint32_t tailidx; uint32_t desccount; ETH_DMADescTypeDef *dmarxdesc; uint8_t *buff = NULL; 8008950: 2300 movs r3, #0 8008952: 60bb str r3, [r7, #8] uint8_t allocStatus = 1U; 8008954: 2301 movs r3, #1 8008956: 74fb strb r3, [r7, #19] descidx = heth->RxDescList.RxBuildDescIdx; 8008958: 687b ldr r3, [r7, #4] 800895a: 6e9b ldr r3, [r3, #104] @ 0x68 800895c: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800895e: 687b ldr r3, [r7, #4] 8008960: 69fa ldr r2, [r7, #28] 8008962: 3212 adds r2, #18 8008964: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008968: 617b str r3, [r7, #20] desccount = heth->RxDescList.RxBuildDescCnt; 800896a: 687b ldr r3, [r7, #4] 800896c: 6edb ldr r3, [r3, #108] @ 0x6c 800896e: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 8008970: e038 b.n 80089e4 { /* Check if a buffer's attached the descriptor */ if (READ_REG(dmarxdesc->BackupAddr0) == 0U) 8008972: 697b ldr r3, [r7, #20] 8008974: 691b ldr r3, [r3, #16] 8008976: 2b00 cmp r3, #0 8008978: d112 bne.n 80089a0 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Allocate callback*/ heth->rxAllocateCallback(&buff); #else /* Allocate callback */ HAL_ETH_RxAllocateCallback(&buff); 800897a: f107 0308 add.w r3, r7, #8 800897e: 4618 mov r0, r3 8008980: f008 fa8a bl 8010e98 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ if (buff == NULL) 8008984: 68bb ldr r3, [r7, #8] 8008986: 2b00 cmp r3, #0 8008988: d102 bne.n 8008990 { allocStatus = 0U; 800898a: 2300 movs r3, #0 800898c: 74fb strb r3, [r7, #19] 800898e: e007 b.n 80089a0 } else { WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff); 8008990: 68bb ldr r3, [r7, #8] 8008992: 461a mov r2, r3 8008994: 697b ldr r3, [r7, #20] 8008996: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff); 8008998: 68bb ldr r3, [r7, #8] 800899a: 461a mov r2, r3 800899c: 697b ldr r3, [r7, #20] 800899e: 601a str r2, [r3, #0] } } if (allocStatus != 0U) 80089a0: 7cfb ldrb r3, [r7, #19] 80089a2: 2b00 cmp r3, #0 80089a4: d01e beq.n 80089e4 { if (heth->RxDescList.ItMode != 0U) 80089a6: 687b ldr r3, [r7, #4] 80089a8: 6d9b ldr r3, [r3, #88] @ 0x58 80089aa: 2b00 cmp r3, #0 80089ac: d004 beq.n 80089b8 { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); 80089ae: 697b ldr r3, [r7, #20] 80089b0: f04f 4241 mov.w r2, #3238002688 @ 0xc1000000 80089b4: 60da str r2, [r3, #12] 80089b6: e003 b.n 80089c0 } else { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V); 80089b8: 697b ldr r3, [r7, #20] 80089ba: f04f 4201 mov.w r2, #2164260864 @ 0x81000000 80089be: 60da str r2, [r3, #12] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 80089c0: 69fb ldr r3, [r7, #28] 80089c2: 3301 adds r3, #1 80089c4: 61fb str r3, [r7, #28] 80089c6: 69fb ldr r3, [r7, #28] 80089c8: 2b03 cmp r3, #3 80089ca: d902 bls.n 80089d2 80089cc: 69fb ldr r3, [r7, #28] 80089ce: 3b04 subs r3, #4 80089d0: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80089d2: 687b ldr r3, [r7, #4] 80089d4: 69fa ldr r2, [r7, #28] 80089d6: 3212 adds r2, #18 80089d8: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80089dc: 617b str r3, [r7, #20] desccount--; 80089de: 69bb ldr r3, [r7, #24] 80089e0: 3b01 subs r3, #1 80089e2: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 80089e4: 69bb ldr r3, [r7, #24] 80089e6: 2b00 cmp r3, #0 80089e8: d002 beq.n 80089f0 80089ea: 7cfb ldrb r3, [r7, #19] 80089ec: 2b00 cmp r3, #0 80089ee: d1c0 bne.n 8008972 } } if (heth->RxDescList.RxBuildDescCnt != desccount) 80089f0: 687b ldr r3, [r7, #4] 80089f2: 6edb ldr r3, [r3, #108] @ 0x6c 80089f4: 69ba ldr r2, [r7, #24] 80089f6: 429a cmp r2, r3 80089f8: d01b beq.n 8008a32 { /* Set the tail pointer index */ tailidx = (descidx + 1U) % ETH_RX_DESC_CNT; 80089fa: 69fb ldr r3, [r7, #28] 80089fc: 3301 adds r3, #1 80089fe: f003 0303 and.w r3, r3, #3 8008a02: 60fb str r3, [r7, #12] __ASM volatile ("dmb 0xF":::"memory"); 8008a04: f3bf 8f5f dmb sy } 8008a08: bf00 nop /* DMB instruction to avoid race condition */ __DMB(); /* Set the Tail pointer address */ WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (tailidx)))); 8008a0a: 687b ldr r3, [r7, #4] 8008a0c: 6919 ldr r1, [r3, #16] 8008a0e: 68fa ldr r2, [r7, #12] 8008a10: 4613 mov r3, r2 8008a12: 005b lsls r3, r3, #1 8008a14: 4413 add r3, r2 8008a16: 00db lsls r3, r3, #3 8008a18: 18ca adds r2, r1, r3 8008a1a: 687b ldr r3, [r7, #4] 8008a1c: 681b ldr r3, [r3, #0] 8008a1e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008a22: f8c3 2128 str.w r2, [r3, #296] @ 0x128 heth->RxDescList.RxBuildDescIdx = descidx; 8008a26: 687b ldr r3, [r7, #4] 8008a28: 69fa ldr r2, [r7, #28] 8008a2a: 669a str r2, [r3, #104] @ 0x68 heth->RxDescList.RxBuildDescCnt = desccount; 8008a2c: 687b ldr r3, [r7, #4] 8008a2e: 69ba ldr r2, [r7, #24] 8008a30: 66da str r2, [r3, #108] @ 0x6c } } 8008a32: bf00 nop 8008a34: 3720 adds r7, #32 8008a36: 46bd mov sp, r7 8008a38: bd80 pop {r7, pc} 08008a3a : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ReleaseTxPacket(ETH_HandleTypeDef *heth) { 8008a3a: b580 push {r7, lr} 8008a3c: b086 sub sp, #24 8008a3e: af00 add r7, sp, #0 8008a40: 6078 str r0, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 8008a42: 687b ldr r3, [r7, #4] 8008a44: 3318 adds r3, #24 8008a46: 60bb str r3, [r7, #8] uint32_t numOfBuf = dmatxdesclist->BuffersInUse; 8008a48: 68bb ldr r3, [r7, #8] 8008a4a: 6a9b ldr r3, [r3, #40] @ 0x28 8008a4c: 617b str r3, [r7, #20] uint32_t idx = dmatxdesclist->releaseIndex; 8008a4e: 68bb ldr r3, [r7, #8] 8008a50: 6adb ldr r3, [r3, #44] @ 0x2c 8008a52: 613b str r3, [r7, #16] uint8_t pktTxStatus = 1U; 8008a54: 2301 movs r3, #1 8008a56: 73fb strb r3, [r7, #15] #ifdef HAL_ETH_USE_PTP ETH_TimeStampTypeDef *timestamp = &heth->TxTimestamp; #endif /* HAL_ETH_USE_PTP */ /* Loop through buffers in use. */ while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 8008a58: e047 b.n 8008aea { pktInUse = 1U; 8008a5a: 2301 movs r3, #1 8008a5c: 73bb strb r3, [r7, #14] numOfBuf--; 8008a5e: 697b ldr r3, [r7, #20] 8008a60: 3b01 subs r3, #1 8008a62: 617b str r3, [r7, #20] /* If no packet, just examine the next packet. */ if (dmatxdesclist->PacketAddress[idx] == NULL) 8008a64: 68ba ldr r2, [r7, #8] 8008a66: 693b ldr r3, [r7, #16] 8008a68: 3304 adds r3, #4 8008a6a: 009b lsls r3, r3, #2 8008a6c: 4413 add r3, r2 8008a6e: 685b ldr r3, [r3, #4] 8008a70: 2b00 cmp r3, #0 8008a72: d10a bne.n 8008a8a { /* No packet in use, skip to next. */ INCR_TX_DESC_INDEX(idx, 1U); 8008a74: 693b ldr r3, [r7, #16] 8008a76: 3301 adds r3, #1 8008a78: 613b str r3, [r7, #16] 8008a7a: 693b ldr r3, [r7, #16] 8008a7c: 2b03 cmp r3, #3 8008a7e: d902 bls.n 8008a86 8008a80: 693b ldr r3, [r7, #16] 8008a82: 3b04 subs r3, #4 8008a84: 613b str r3, [r7, #16] pktInUse = 0U; 8008a86: 2300 movs r3, #0 8008a88: 73bb strb r3, [r7, #14] } if (pktInUse != 0U) 8008a8a: 7bbb ldrb r3, [r7, #14] 8008a8c: 2b00 cmp r3, #0 8008a8e: d02c beq.n 8008aea { /* Determine if the packet has been transmitted. */ if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U) 8008a90: 687b ldr r3, [r7, #4] 8008a92: 68d9 ldr r1, [r3, #12] 8008a94: 693a ldr r2, [r7, #16] 8008a96: 4613 mov r3, r2 8008a98: 005b lsls r3, r3, #1 8008a9a: 4413 add r3, r2 8008a9c: 00db lsls r3, r3, #3 8008a9e: 440b add r3, r1 8008aa0: 68db ldr r3, [r3, #12] 8008aa2: 2b00 cmp r3, #0 8008aa4: db1f blt.n 8008ae6 { HAL_ETH_TxPtpCallback(dmatxdesclist->PacketAddress[idx], timestamp); } #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]); 8008aa6: 68ba ldr r2, [r7, #8] 8008aa8: 693b ldr r3, [r7, #16] 8008aaa: 3304 adds r3, #4 8008aac: 009b lsls r3, r3, #2 8008aae: 4413 add r3, r2 8008ab0: 685b ldr r3, [r3, #4] 8008ab2: 4618 mov r0, r3 8008ab4: f008 fa88 bl 8010fc8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ /* Clear the entry in the in-use array. */ dmatxdesclist->PacketAddress[idx] = NULL; 8008ab8: 68ba ldr r2, [r7, #8] 8008aba: 693b ldr r3, [r7, #16] 8008abc: 3304 adds r3, #4 8008abe: 009b lsls r3, r3, #2 8008ac0: 4413 add r3, r2 8008ac2: 2200 movs r2, #0 8008ac4: 605a str r2, [r3, #4] /* Update the transmit relesae index and number of buffers in use. */ INCR_TX_DESC_INDEX(idx, 1U); 8008ac6: 693b ldr r3, [r7, #16] 8008ac8: 3301 adds r3, #1 8008aca: 613b str r3, [r7, #16] 8008acc: 693b ldr r3, [r7, #16] 8008ace: 2b03 cmp r3, #3 8008ad0: d902 bls.n 8008ad8 8008ad2: 693b ldr r3, [r7, #16] 8008ad4: 3b04 subs r3, #4 8008ad6: 613b str r3, [r7, #16] dmatxdesclist->BuffersInUse = numOfBuf; 8008ad8: 68bb ldr r3, [r7, #8] 8008ada: 697a ldr r2, [r7, #20] 8008adc: 629a str r2, [r3, #40] @ 0x28 dmatxdesclist->releaseIndex = idx; 8008ade: 68bb ldr r3, [r7, #8] 8008ae0: 693a ldr r2, [r7, #16] 8008ae2: 62da str r2, [r3, #44] @ 0x2c 8008ae4: e001 b.n 8008aea } else { /* Get out of the loop! */ pktTxStatus = 0U; 8008ae6: 2300 movs r3, #0 8008ae8: 73fb strb r3, [r7, #15] while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 8008aea: 697b ldr r3, [r7, #20] 8008aec: 2b00 cmp r3, #0 8008aee: d002 beq.n 8008af6 8008af0: 7bfb ldrb r3, [r7, #15] 8008af2: 2b00 cmp r3, #0 8008af4: d1b1 bne.n 8008a5a } } } return HAL_OK; 8008af6: 2300 movs r3, #0 } 8008af8: 4618 mov r0, r3 8008afa: 3718 adds r7, #24 8008afc: 46bd mov sp, r7 8008afe: bd80 pop {r7, pc} 08008b00 : * @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) { 8008b00: b580 push {r7, lr} 8008b02: b086 sub sp, #24 8008b04: af00 add r7, sp, #0 8008b06: 6078 str r0, [r7, #4] uint32_t mac_flag = READ_REG(heth->Instance->MACISR); 8008b08: 687b ldr r3, [r7, #4] 8008b0a: 681b ldr r3, [r3, #0] 8008b0c: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 8008b10: 617b str r3, [r7, #20] uint32_t dma_flag = READ_REG(heth->Instance->DMACSR); 8008b12: 687b ldr r3, [r7, #4] 8008b14: 681b ldr r3, [r3, #0] 8008b16: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008b1a: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008b1e: 613b str r3, [r7, #16] uint32_t dma_itsource = READ_REG(heth->Instance->DMACIER); 8008b20: 687b ldr r3, [r7, #4] 8008b22: 681b ldr r3, [r3, #0] 8008b24: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008b28: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 8008b2c: 60fb str r3, [r7, #12] uint32_t exti_d1_flag = READ_REG(EXTI_D1->PR3); 8008b2e: 4b6d ldr r3, [pc, #436] @ (8008ce4 ) 8008b30: 6a9b ldr r3, [r3, #40] @ 0x28 8008b32: 60bb str r3, [r7, #8] #if defined(DUAL_CORE) uint32_t exti_d2_flag = READ_REG(EXTI_D2->PR3); #endif /* DUAL_CORE */ /* Packet received */ if (((dma_flag & ETH_DMACSR_RI) != 0U) && ((dma_itsource & ETH_DMACIER_RIE) != 0U)) 8008b34: 693b ldr r3, [r7, #16] 8008b36: f003 0340 and.w r3, r3, #64 @ 0x40 8008b3a: 2b00 cmp r3, #0 8008b3c: d010 beq.n 8008b60 8008b3e: 68fb ldr r3, [r7, #12] 8008b40: f003 0340 and.w r3, r3, #64 @ 0x40 8008b44: 2b00 cmp r3, #0 8008b46: d00b beq.n 8008b60 { /* Clear the Eth DMA Rx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS); 8008b48: 687b ldr r3, [r7, #4] 8008b4a: 681b ldr r3, [r3, #0] 8008b4c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008b50: 461a mov r2, r3 8008b52: f248 0340 movw r3, #32832 @ 0x8040 8008b56: f8c2 3160 str.w r3, [r2, #352] @ 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Receive complete callback*/ heth->RxCpltCallback(heth); #else /* Receive complete callback */ HAL_ETH_RxCpltCallback(heth); 8008b5a: 6878 ldr r0, [r7, #4] 8008b5c: f007 fd24 bl 80105a8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* Packet transmitted */ if (((dma_flag & ETH_DMACSR_TI) != 0U) && ((dma_itsource & ETH_DMACIER_TIE) != 0U)) 8008b60: 693b ldr r3, [r7, #16] 8008b62: f003 0301 and.w r3, r3, #1 8008b66: 2b00 cmp r3, #0 8008b68: d010 beq.n 8008b8c 8008b6a: 68fb ldr r3, [r7, #12] 8008b6c: f003 0301 and.w r3, r3, #1 8008b70: 2b00 cmp r3, #0 8008b72: d00b beq.n 8008b8c { /* Clear the Eth DMA Tx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS); 8008b74: 687b ldr r3, [r7, #4] 8008b76: 681b ldr r3, [r3, #0] 8008b78: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008b7c: 461a mov r2, r3 8008b7e: f248 0301 movw r3, #32769 @ 0x8001 8008b82: f8c2 3160 str.w r3, [r2, #352] @ 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Transmit complete callback*/ heth->TxCpltCallback(heth); #else /* Transfer complete callback */ HAL_ETH_TxCpltCallback(heth); 8008b86: 6878 ldr r0, [r7, #4] 8008b88: f007 fd1e bl 80105c8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH DMA Error */ if (((dma_flag & ETH_DMACSR_AIS) != 0U) && ((dma_itsource & ETH_DMACIER_AIE) != 0U)) 8008b8c: 693b ldr r3, [r7, #16] 8008b8e: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008b92: 2b00 cmp r3, #0 8008b94: d047 beq.n 8008c26 8008b96: 68fb ldr r3, [r7, #12] 8008b98: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008b9c: 2b00 cmp r3, #0 8008b9e: d042 beq.n 8008c26 { heth->ErrorCode |= HAL_ETH_ERROR_DMA; 8008ba0: 687b ldr r3, [r7, #4] 8008ba2: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008ba6: f043 0208 orr.w r2, r3, #8 8008baa: 687b ldr r3, [r7, #4] 8008bac: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* if fatal bus error occurred */ if ((dma_flag & ETH_DMACSR_FBE) != 0U) 8008bb0: 693b ldr r3, [r7, #16] 8008bb2: f403 5380 and.w r3, r3, #4096 @ 0x1000 8008bb6: 2b00 cmp r3, #0 8008bb8: d01e beq.n 8008bf8 { /* Get DMA error code */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS)); 8008bba: 687b ldr r3, [r7, #4] 8008bbc: 681b ldr r3, [r3, #0] 8008bbe: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008bc2: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 8008bc6: f241 1302 movw r3, #4354 @ 0x1102 8008bca: 4013 ands r3, r2 8008bcc: 687a ldr r2, [r7, #4] 8008bce: f8c2 308c str.w r3, [r2, #140] @ 0x8c /* Disable all interrupts */ __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE); 8008bd2: 687b ldr r3, [r7, #4] 8008bd4: 681b ldr r3, [r3, #0] 8008bd6: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008bda: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 8008bde: 687a ldr r2, [r7, #4] 8008be0: 6812 ldr r2, [r2, #0] 8008be2: f423 4340 bic.w r3, r3, #49152 @ 0xc000 8008be6: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008bea: f8c2 3134 str.w r3, [r2, #308] @ 0x134 /* Set HAL state to ERROR */ heth->gState = HAL_ETH_STATE_ERROR; 8008bee: 687b ldr r3, [r7, #4] 8008bf0: 22e0 movs r2, #224 @ 0xe0 8008bf2: f8c3 2084 str.w r2, [r3, #132] @ 0x84 8008bf6: e013 b.n 8008c20 } else { /* Get DMA error status */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8008bf8: 687b ldr r3, [r7, #4] 8008bfa: 681b ldr r3, [r3, #0] 8008bfc: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c00: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008c04: f403 42cd and.w r2, r3, #26240 @ 0x6680 8008c08: 687b ldr r3, [r7, #4] 8008c0a: f8c3 208c str.w r2, [r3, #140] @ 0x8c ETH_DMACSR_RBU | ETH_DMACSR_AIS)); /* Clear the interrupt summary flag */ __HAL_ETH_DMA_CLEAR_IT(heth, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8008c0e: 687b ldr r3, [r7, #4] 8008c10: 681b ldr r3, [r3, #0] 8008c12: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c16: 461a mov r2, r3 8008c18: f44f 43cd mov.w r3, #26240 @ 0x6680 8008c1c: f8c2 3160 str.w r3, [r2, #352] @ 0x160 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered Error callback*/ heth->ErrorCallback(heth); #else /* Ethernet DMA Error callback */ HAL_ETH_ErrorCallback(heth); 8008c20: 6878 ldr r0, [r7, #4] 8008c22: f007 fce1 bl 80105e8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH MAC Error IT */ if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8008c26: 697b ldr r3, [r7, #20] 8008c28: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008c2c: 2b00 cmp r3, #0 8008c2e: d104 bne.n 8008c3a ((mac_flag & ETH_MACIER_TXSTSIE) == ETH_MACIER_TXSTSIE)) 8008c30: 697b ldr r3, [r7, #20] 8008c32: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8008c36: 2b00 cmp r3, #0 8008c38: d019 beq.n 8008c6e { heth->ErrorCode |= HAL_ETH_ERROR_MAC; 8008c3a: 687b ldr r3, [r7, #4] 8008c3c: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008c40: f043 0210 orr.w r2, r3, #16 8008c44: 687b ldr r3, [r7, #4] 8008c46: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Get MAC Rx Tx status and clear Status register pending bit */ heth->MACErrorCode = READ_REG(heth->Instance->MACRXTXSR); 8008c4a: 687b ldr r3, [r7, #4] 8008c4c: 681b ldr r3, [r3, #0] 8008c4e: f8d3 20b8 ldr.w r2, [r3, #184] @ 0xb8 8008c52: 687b ldr r3, [r7, #4] 8008c54: f8c3 2090 str.w r2, [r3, #144] @ 0x90 heth->gState = HAL_ETH_STATE_ERROR; 8008c58: 687b ldr r3, [r7, #4] 8008c5a: 22e0 movs r2, #224 @ 0xe0 8008c5c: f8c3 2084 str.w r2, [r3, #132] @ 0x84 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered Error callback*/ heth->ErrorCallback(heth); #else /* Ethernet Error callback */ HAL_ETH_ErrorCallback(heth); 8008c60: 6878 ldr r0, [r7, #4] 8008c62: f007 fcc1 bl 80105e8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACErrorCode = (uint32_t)(0x0U); 8008c66: 687b ldr r3, [r7, #4] 8008c68: 2200 movs r2, #0 8008c6a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* ETH PMT IT */ if ((mac_flag & ETH_MAC_PMT_IT) != 0U) 8008c6e: 697b ldr r3, [r7, #20] 8008c70: f003 0310 and.w r3, r3, #16 8008c74: 2b00 cmp r3, #0 8008c76: d00f beq.n 8008c98 { /* Get MAC Wake-up source and clear the status register pending bit */ heth->MACWakeUpEvent = READ_BIT(heth->Instance->MACPCSR, (ETH_MACPCSR_RWKPRCVD | ETH_MACPCSR_MGKPRCVD)); 8008c78: 687b ldr r3, [r7, #4] 8008c7a: 681b ldr r3, [r3, #0] 8008c7c: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0 8008c80: f003 0260 and.w r2, r3, #96 @ 0x60 8008c84: 687b ldr r3, [r7, #4] 8008c86: f8c3 2094 str.w r2, [r3, #148] @ 0x94 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered PMT callback*/ heth->PMTCallback(heth); #else /* Ethernet PMT callback */ HAL_ETH_PMTCallback(heth); 8008c8a: 6878 ldr r0, [r7, #4] 8008c8c: f000 f82c bl 8008ce8 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACWakeUpEvent = (uint32_t)(0x0U); 8008c90: 687b ldr r3, [r7, #4] 8008c92: 2200 movs r2, #0 8008c94: f8c3 2094 str.w r2, [r3, #148] @ 0x94 } /* ETH EEE IT */ if ((mac_flag & ETH_MAC_LPI_IT) != 0U) 8008c98: 697b ldr r3, [r7, #20] 8008c9a: f003 0320 and.w r3, r3, #32 8008c9e: 2b00 cmp r3, #0 8008ca0: d00f beq.n 8008cc2 { /* Get MAC LPI interrupt source and clear the status register pending bit */ heth->MACLPIEvent = READ_BIT(heth->Instance->MACLCSR, 0x0000000FU); 8008ca2: 687b ldr r3, [r7, #4] 8008ca4: 681b ldr r3, [r3, #0] 8008ca6: f8d3 30d0 ldr.w r3, [r3, #208] @ 0xd0 8008caa: f003 020f and.w r2, r3, #15 8008cae: 687b ldr r3, [r7, #4] 8008cb0: f8c3 2098 str.w r2, [r3, #152] @ 0x98 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered EEE callback*/ heth->EEECallback(heth); #else /* Ethernet EEE callback */ HAL_ETH_EEECallback(heth); 8008cb4: 6878 ldr r0, [r7, #4] 8008cb6: f000 f821 bl 8008cfc #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACLPIEvent = (uint32_t)(0x0U); 8008cba: 687b ldr r3, [r7, #4] 8008cbc: 2200 movs r2, #0 8008cbe: f8c3 2098 str.w r2, [r3, #152] @ 0x98 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } } #else /* DUAL_CORE not defined */ /* check ETH WAKEUP exti flag */ if ((exti_d1_flag & ETH_WAKEUP_EXTI_LINE) != 0U) 8008cc2: 68bb ldr r3, [r7, #8] 8008cc4: f403 0380 and.w r3, r3, #4194304 @ 0x400000 8008cc8: 2b00 cmp r3, #0 8008cca: d006 beq.n 8008cda { /* Clear ETH WAKEUP Exti pending bit */ __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 8008ccc: 4b05 ldr r3, [pc, #20] @ (8008ce4 ) 8008cce: f44f 0280 mov.w r2, #4194304 @ 0x400000 8008cd2: 629a str r2, [r3, #40] @ 0x28 #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /* Call registered WakeUp callback*/ heth->WakeUpCallback(heth); #else /* ETH WAKEUP callback */ HAL_ETH_WakeUpCallback(heth); 8008cd4: 6878 ldr r0, [r7, #4] 8008cd6: f000 f81b bl 8008d10 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } #endif /* DUAL_CORE */ } 8008cda: bf00 nop 8008cdc: 3718 adds r7, #24 8008cde: 46bd mov sp, r7 8008ce0: bd80 pop {r7, pc} 8008ce2: bf00 nop 8008ce4: 58000080 .word 0x58000080 08008ce8 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_PMTCallback(ETH_HandleTypeDef *heth) { 8008ce8: b480 push {r7} 8008cea: b083 sub sp, #12 8008cec: af00 add r7, sp, #0 8008cee: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_PMTCallback could be implemented in the user file */ } 8008cf0: bf00 nop 8008cf2: 370c adds r7, #12 8008cf4: 46bd mov sp, r7 8008cf6: f85d 7b04 ldr.w r7, [sp], #4 8008cfa: 4770 bx lr 08008cfc : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_EEECallback(ETH_HandleTypeDef *heth) { 8008cfc: b480 push {r7} 8008cfe: b083 sub sp, #12 8008d00: af00 add r7, sp, #0 8008d02: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_EEECallback could be implemented in the user file */ } 8008d04: bf00 nop 8008d06: 370c adds r7, #12 8008d08: 46bd mov sp, r7 8008d0a: f85d 7b04 ldr.w r7, [sp], #4 8008d0e: 4770 bx lr 08008d10 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_WakeUpCallback(ETH_HandleTypeDef *heth) { 8008d10: b480 push {r7} 8008d12: b083 sub sp, #12 8008d14: af00 add r7, sp, #0 8008d16: 6078 str r0, [r7, #4] /* Prevent unused argument(s) compilation warning */ UNUSED(heth); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_ETH_WakeUpCallback could be implemented in the user file */ } 8008d18: bf00 nop 8008d1a: 370c adds r7, #12 8008d1c: 46bd mov sp, r7 8008d1e: f85d 7b04 ldr.w r7, [sp], #4 8008d22: 4770 bx lr 08008d24 : * @param pRegValue: parameter to hold read value * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t *pRegValue) { 8008d24: b580 push {r7, lr} 8008d26: b086 sub sp, #24 8008d28: af00 add r7, sp, #0 8008d2a: 60f8 str r0, [r7, #12] 8008d2c: 60b9 str r1, [r7, #8] 8008d2e: 607a str r2, [r7, #4] 8008d30: 603b str r3, [r7, #0] uint32_t tickstart; uint32_t tmpreg; /* Check for the Busy flag */ if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8008d32: 68fb ldr r3, [r7, #12] 8008d34: 681b ldr r3, [r3, #0] 8008d36: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008d3a: f003 0301 and.w r3, r3, #1 8008d3e: 2b00 cmp r3, #0 8008d40: d001 beq.n 8008d46 { return HAL_ERROR; 8008d42: 2301 movs r3, #1 8008d44: e03e b.n 8008dc4 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8008d46: 68fb ldr r3, [r7, #12] 8008d48: 681b ldr r3, [r3, #0] 8008d4a: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008d4e: 617b str r3, [r7, #20] - Set the PHY device address - Set the PHY register address - Set the read mode - Set the MII Busy bit */ MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8008d50: 697b ldr r3, [r7, #20] 8008d52: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 8008d56: 68bb ldr r3, [r7, #8] 8008d58: 055b lsls r3, r3, #21 8008d5a: 4313 orrs r3, r2 8008d5c: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8008d5e: 697b ldr r3, [r7, #20] 8008d60: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 8008d64: 687b ldr r3, [r7, #4] 8008d66: 041b lsls r3, r3, #16 8008d68: 4313 orrs r3, r2 8008d6a: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_RD); 8008d6c: 697b ldr r3, [r7, #20] 8008d6e: f043 030c orr.w r3, r3, #12 8008d72: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8008d74: 697b ldr r3, [r7, #20] 8008d76: f043 0301 orr.w r3, r3, #1 8008d7a: 617b str r3, [r7, #20] /* Write the result value into the MDII Address register */ WRITE_REG(heth->Instance->MACMDIOAR, tmpreg); 8008d7c: 68fb ldr r3, [r7, #12] 8008d7e: 681b ldr r3, [r3, #0] 8008d80: 697a ldr r2, [r7, #20] 8008d82: f8c3 2200 str.w r2, [r3, #512] @ 0x200 tickstart = HAL_GetTick(); 8008d86: f7fc fd13 bl 80057b0 8008d8a: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008d8c: e009 b.n 8008da2 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8008d8e: f7fc fd0f bl 80057b0 8008d92: 4602 mov r2, r0 8008d94: 693b ldr r3, [r7, #16] 8008d96: 1ad3 subs r3, r2, r3 8008d98: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8008d9c: d901 bls.n 8008da2 { return HAL_ERROR; 8008d9e: 2301 movs r3, #1 8008da0: e010 b.n 8008dc4 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008da2: 68fb ldr r3, [r7, #12] 8008da4: 681b ldr r3, [r3, #0] 8008da6: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008daa: f003 0301 and.w r3, r3, #1 8008dae: 2b00 cmp r3, #0 8008db0: d1ed bne.n 8008d8e } } /* Get MACMIIDR value */ WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR); 8008db2: 68fb ldr r3, [r7, #12] 8008db4: 681b ldr r3, [r3, #0] 8008db6: f8d3 3204 ldr.w r3, [r3, #516] @ 0x204 8008dba: b29b uxth r3, r3 8008dbc: 461a mov r2, r3 8008dbe: 683b ldr r3, [r7, #0] 8008dc0: 601a str r2, [r3, #0] return HAL_OK; 8008dc2: 2300 movs r3, #0 } 8008dc4: 4618 mov r0, r3 8008dc6: 3718 adds r7, #24 8008dc8: 46bd mov sp, r7 8008dca: bd80 pop {r7, pc} 08008dcc : * @param RegValue: the value to write * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_WritePHYRegister(const ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t RegValue) { 8008dcc: b580 push {r7, lr} 8008dce: b086 sub sp, #24 8008dd0: af00 add r7, sp, #0 8008dd2: 60f8 str r0, [r7, #12] 8008dd4: 60b9 str r1, [r7, #8] 8008dd6: 607a str r2, [r7, #4] 8008dd8: 603b str r3, [r7, #0] uint32_t tickstart; uint32_t tmpreg; /* Check for the Busy flag */ if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8008dda: 68fb ldr r3, [r7, #12] 8008ddc: 681b ldr r3, [r3, #0] 8008dde: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008de2: f003 0301 and.w r3, r3, #1 8008de6: 2b00 cmp r3, #0 8008de8: d001 beq.n 8008dee { return HAL_ERROR; 8008dea: 2301 movs r3, #1 8008dec: e03c b.n 8008e68 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8008dee: 68fb ldr r3, [r7, #12] 8008df0: 681b ldr r3, [r3, #0] 8008df2: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008df6: 617b str r3, [r7, #20] - Set the PHY device address - Set the PHY register address - Set the write mode - Set the MII Busy bit */ MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8008df8: 697b ldr r3, [r7, #20] 8008dfa: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 8008dfe: 68bb ldr r3, [r7, #8] 8008e00: 055b lsls r3, r3, #21 8008e02: 4313 orrs r3, r2 8008e04: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8008e06: 697b ldr r3, [r7, #20] 8008e08: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 8008e0c: 687b ldr r3, [r7, #4] 8008e0e: 041b lsls r3, r3, #16 8008e10: 4313 orrs r3, r2 8008e12: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR); 8008e14: 697b ldr r3, [r7, #20] 8008e16: f023 030c bic.w r3, r3, #12 8008e1a: f043 0304 orr.w r3, r3, #4 8008e1e: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8008e20: 697b ldr r3, [r7, #20] 8008e22: f043 0301 orr.w r3, r3, #1 8008e26: 617b str r3, [r7, #20] /* Give the value to the MII data register */ WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue); 8008e28: 683b ldr r3, [r7, #0] 8008e2a: b29a uxth r2, r3 8008e2c: 4b10 ldr r3, [pc, #64] @ (8008e70 ) 8008e2e: f8c3 2204 str.w r2, [r3, #516] @ 0x204 /* Write the result value into the MII Address register */ WRITE_REG(ETH->MACMDIOAR, tmpreg); 8008e32: 4a0f ldr r2, [pc, #60] @ (8008e70 ) 8008e34: 697b ldr r3, [r7, #20] 8008e36: f8c2 3200 str.w r3, [r2, #512] @ 0x200 tickstart = HAL_GetTick(); 8008e3a: f7fc fcb9 bl 80057b0 8008e3e: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008e40: e009 b.n 8008e56 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8008e42: f7fc fcb5 bl 80057b0 8008e46: 4602 mov r2, r0 8008e48: 693b ldr r3, [r7, #16] 8008e4a: 1ad3 subs r3, r2, r3 8008e4c: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8008e50: d901 bls.n 8008e56 { return HAL_ERROR; 8008e52: 2301 movs r3, #1 8008e54: e008 b.n 8008e68 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008e56: 68fb ldr r3, [r7, #12] 8008e58: 681b ldr r3, [r3, #0] 8008e5a: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008e5e: f003 0301 and.w r3, r3, #1 8008e62: 2b00 cmp r3, #0 8008e64: d1ed bne.n 8008e42 } } return HAL_OK; 8008e66: 2300 movs r3, #0 } 8008e68: 4618 mov r0, r3 8008e6a: 3718 adds r7, #24 8008e6c: 46bd mov sp, r7 8008e6e: bd80 pop {r7, pc} 8008e70: 40028000 .word 0x40028000 08008e74 : * @param macconf: pointer to a ETH_MACConfigTypeDef structure that will hold * the configuration of the MAC. * @retval HAL Status */ HAL_StatusTypeDef HAL_ETH_GetMACConfig(const ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf) { 8008e74: b480 push {r7} 8008e76: b083 sub sp, #12 8008e78: af00 add r7, sp, #0 8008e7a: 6078 str r0, [r7, #4] 8008e7c: 6039 str r1, [r7, #0] if (macconf == NULL) 8008e7e: 683b ldr r3, [r7, #0] 8008e80: 2b00 cmp r3, #0 8008e82: d101 bne.n 8008e88 { return HAL_ERROR; 8008e84: 2301 movs r3, #1 8008e86: e1c3 b.n 8009210 } /* Get MAC parameters */ macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN); 8008e88: 687b ldr r3, [r7, #4] 8008e8a: 681b ldr r3, [r3, #0] 8008e8c: 681b ldr r3, [r3, #0] 8008e8e: f003 020c and.w r2, r3, #12 8008e92: 683b ldr r3, [r7, #0] 8008e94: 62da str r2, [r3, #44] @ 0x2c macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE; 8008e96: 687b ldr r3, [r7, #4] 8008e98: 681b ldr r3, [r3, #0] 8008e9a: 681b ldr r3, [r3, #0] 8008e9c: f003 0310 and.w r3, r3, #16 8008ea0: 2b00 cmp r3, #0 8008ea2: bf14 ite ne 8008ea4: 2301 movne r3, #1 8008ea6: 2300 moveq r3, #0 8008ea8: b2db uxtb r3, r3 8008eaa: 461a mov r2, r3 8008eac: 683b ldr r3, [r7, #0] 8008eae: f883 2028 strb.w r2, [r3, #40] @ 0x28 macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL); 8008eb2: 687b ldr r3, [r7, #4] 8008eb4: 681b ldr r3, [r3, #0] 8008eb6: 681b ldr r3, [r3, #0] 8008eb8: f003 0260 and.w r2, r3, #96 @ 0x60 8008ebc: 683b ldr r3, [r7, #0] 8008ebe: 625a str r2, [r3, #36] @ 0x24 macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE; 8008ec0: 687b ldr r3, [r7, #4] 8008ec2: 681b ldr r3, [r3, #0] 8008ec4: 681b ldr r3, [r3, #0] 8008ec6: f403 7380 and.w r3, r3, #256 @ 0x100 8008eca: 2b00 cmp r3, #0 8008ecc: bf0c ite eq 8008ece: 2301 moveq r3, #1 8008ed0: 2300 movne r3, #0 8008ed2: b2db uxtb r3, r3 8008ed4: 461a mov r2, r3 8008ed6: 683b ldr r3, [r7, #0] 8008ed8: f883 2020 strb.w r2, [r3, #32] macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8008edc: 687b ldr r3, [r7, #4] 8008ede: 681b ldr r3, [r3, #0] 8008ee0: 681b ldr r3, [r3, #0] 8008ee2: f403 7300 and.w r3, r3, #512 @ 0x200 ? ENABLE : DISABLE; 8008ee6: 2b00 cmp r3, #0 8008ee8: bf14 ite ne 8008eea: 2301 movne r3, #1 8008eec: 2300 moveq r3, #0 8008eee: b2db uxtb r3, r3 8008ef0: 461a mov r2, r3 macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8008ef2: 683b ldr r3, [r7, #0] 8008ef4: 77da strb r2, [r3, #31] macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE; 8008ef6: 687b ldr r3, [r7, #4] 8008ef8: 681b ldr r3, [r3, #0] 8008efa: 681b ldr r3, [r3, #0] 8008efc: f403 6380 and.w r3, r3, #1024 @ 0x400 8008f00: 2b00 cmp r3, #0 8008f02: bf0c ite eq 8008f04: 2301 moveq r3, #1 8008f06: 2300 movne r3, #0 8008f08: b2db uxtb r3, r3 8008f0a: 461a mov r2, r3 8008f0c: 683b ldr r3, [r7, #0] 8008f0e: 779a strb r2, [r3, #30] macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8008f10: 687b ldr r3, [r7, #4] 8008f12: 681b ldr r3, [r3, #0] 8008f14: 681b ldr r3, [r3, #0] ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE; 8008f16: f403 6300 and.w r3, r3, #2048 @ 0x800 8008f1a: 2b00 cmp r3, #0 8008f1c: bf14 ite ne 8008f1e: 2301 movne r3, #1 8008f20: 2300 moveq r3, #0 8008f22: b2db uxtb r3, r3 8008f24: 461a mov r2, r3 macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8008f26: 683b ldr r3, [r7, #0] 8008f28: 775a strb r2, [r3, #29] macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE; 8008f2a: 687b ldr r3, [r7, #4] 8008f2c: 681b ldr r3, [r3, #0] 8008f2e: 681b ldr r3, [r3, #0] 8008f30: f403 5380 and.w r3, r3, #4096 @ 0x1000 8008f34: 2b00 cmp r3, #0 8008f36: bf14 ite ne 8008f38: 2301 movne r3, #1 8008f3a: 2300 moveq r3, #0 8008f3c: b2db uxtb r3, r3 8008f3e: 461a mov r2, r3 8008f40: 683b ldr r3, [r7, #0] 8008f42: 771a strb r2, [r3, #28] macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM); 8008f44: 687b ldr r3, [r7, #4] 8008f46: 681b ldr r3, [r3, #0] 8008f48: 681b ldr r3, [r3, #0] 8008f4a: f403 5200 and.w r2, r3, #8192 @ 0x2000 8008f4e: 683b ldr r3, [r7, #0] 8008f50: 619a str r2, [r3, #24] macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES); 8008f52: 687b ldr r3, [r7, #4] 8008f54: 681b ldr r3, [r3, #0] 8008f56: 681b ldr r3, [r3, #0] 8008f58: f403 4280 and.w r2, r3, #16384 @ 0x4000 8008f5c: 683b ldr r3, [r7, #0] 8008f5e: 615a str r2, [r3, #20] macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE; 8008f60: 687b ldr r3, [r7, #4] 8008f62: 681b ldr r3, [r3, #0] 8008f64: 681b ldr r3, [r3, #0] 8008f66: f403 3380 and.w r3, r3, #65536 @ 0x10000 8008f6a: 2b00 cmp r3, #0 8008f6c: bf14 ite ne 8008f6e: 2301 movne r3, #1 8008f70: 2300 moveq r3, #0 8008f72: b2db uxtb r3, r3 8008f74: 461a mov r2, r3 8008f76: 683b ldr r3, [r7, #0] 8008f78: 749a strb r2, [r3, #18] macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE; 8008f7a: 687b ldr r3, [r7, #4] 8008f7c: 681b ldr r3, [r3, #0] 8008f7e: 681b ldr r3, [r3, #0] 8008f80: f403 3300 and.w r3, r3, #131072 @ 0x20000 8008f84: 2b00 cmp r3, #0 8008f86: bf0c ite eq 8008f88: 2301 moveq r3, #1 8008f8a: 2300 movne r3, #0 8008f8c: b2db uxtb r3, r3 8008f8e: 461a mov r2, r3 8008f90: 683b ldr r3, [r7, #0] 8008f92: 745a strb r2, [r3, #17] macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE; 8008f94: 687b ldr r3, [r7, #4] 8008f96: 681b ldr r3, [r3, #0] 8008f98: 681b ldr r3, [r3, #0] 8008f9a: f403 2300 and.w r3, r3, #524288 @ 0x80000 8008f9e: 2b00 cmp r3, #0 8008fa0: bf0c ite eq 8008fa2: 2301 moveq r3, #1 8008fa4: 2300 movne r3, #0 8008fa6: b2db uxtb r3, r3 8008fa8: 461a mov r2, r3 8008faa: 683b ldr r3, [r7, #0] 8008fac: 741a strb r2, [r3, #16] macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE; 8008fae: 687b ldr r3, [r7, #4] 8008fb0: 681b ldr r3, [r3, #0] 8008fb2: 681b ldr r3, [r3, #0] 8008fb4: f403 1380 and.w r3, r3, #1048576 @ 0x100000 8008fb8: 2b00 cmp r3, #0 8008fba: bf14 ite ne 8008fbc: 2301 movne r3, #1 8008fbe: 2300 moveq r3, #0 8008fc0: b2db uxtb r3, r3 8008fc2: 461a mov r2, r3 8008fc4: 683b ldr r3, [r7, #0] 8008fc6: 73da strb r2, [r3, #15] macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE; 8008fc8: 687b ldr r3, [r7, #4] 8008fca: 681b ldr r3, [r3, #0] 8008fcc: 681b ldr r3, [r3, #0] 8008fce: f403 1300 and.w r3, r3, #2097152 @ 0x200000 8008fd2: 2b00 cmp r3, #0 8008fd4: bf14 ite ne 8008fd6: 2301 movne r3, #1 8008fd8: 2300 moveq r3, #0 8008fda: b2db uxtb r3, r3 8008fdc: 461a mov r2, r3 8008fde: 683b ldr r3, [r7, #0] 8008fe0: 739a strb r2, [r3, #14] macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE; 8008fe2: 687b ldr r3, [r7, #4] 8008fe4: 681b ldr r3, [r3, #0] 8008fe6: 681b ldr r3, [r3, #0] 8008fe8: f403 0380 and.w r3, r3, #4194304 @ 0x400000 8008fec: 2b00 cmp r3, #0 8008fee: bf14 ite ne 8008ff0: 2301 movne r3, #1 8008ff2: 2300 moveq r3, #0 8008ff4: b2db uxtb r3, r3 8008ff6: 461a mov r2, r3 8008ff8: 683b ldr r3, [r7, #0] 8008ffa: 735a strb r2, [r3, #13] macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8008ffc: 687b ldr r3, [r7, #4] 8008ffe: 681b ldr r3, [r3, #0] 8009000: 681b ldr r3, [r3, #0] ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE; 8009002: f403 0300 and.w r3, r3, #8388608 @ 0x800000 8009006: 2b00 cmp r3, #0 8009008: bf14 ite ne 800900a: 2301 movne r3, #1 800900c: 2300 moveq r3, #0 800900e: b2db uxtb r3, r3 8009010: 461a mov r2, r3 macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8009012: 683b ldr r3, [r7, #0] 8009014: 731a strb r2, [r3, #12] macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG); 8009016: 687b ldr r3, [r7, #4] 8009018: 681b ldr r3, [r3, #0] 800901a: 681b ldr r3, [r3, #0] 800901c: f003 62e0 and.w r2, r3, #117440512 @ 0x7000000 8009020: 683b ldr r3, [r7, #0] 8009022: 609a str r2, [r3, #8] macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE; 8009024: 687b ldr r3, [r7, #4] 8009026: 681b ldr r3, [r3, #0] 8009028: 681b ldr r3, [r3, #0] 800902a: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800902e: 2b00 cmp r3, #0 8009030: bf14 ite ne 8009032: 2301 movne r3, #1 8009034: 2300 moveq r3, #0 8009036: b2db uxtb r3, r3 8009038: 461a mov r2, r3 800903a: 683b ldr r3, [r7, #0] 800903c: 711a strb r2, [r3, #4] macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC); 800903e: 687b ldr r3, [r7, #4] 8009040: 681b ldr r3, [r3, #0] 8009042: 681b ldr r3, [r3, #0] 8009044: f003 42e0 and.w r2, r3, #1879048192 @ 0x70000000 8009048: 683b ldr r3, [r7, #0] 800904a: 601a str r2, [r3, #0] macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL); 800904c: 687b ldr r3, [r7, #4] 800904e: 681b ldr r3, [r3, #0] 8009050: 685b ldr r3, [r3, #4] 8009052: f3c3 020d ubfx r2, r3, #0, #14 8009056: 683b ldr r3, [r7, #0] 8009058: 635a str r2, [r3, #52] @ 0x34 macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE; 800905a: 687b ldr r3, [r7, #4] 800905c: 681b ldr r3, [r3, #0] 800905e: 685b ldr r3, [r3, #4] 8009060: f403 3380 and.w r3, r3, #65536 @ 0x10000 8009064: 2b00 cmp r3, #0 8009066: bf0c ite eq 8009068: 2301 moveq r3, #1 800906a: 2300 movne r3, #0 800906c: b2db uxtb r3, r3 800906e: 461a mov r2, r3 8009070: 683b ldr r3, [r7, #0] 8009072: f883 2032 strb.w r2, [r3, #50] @ 0x32 macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE; 8009076: 687b ldr r3, [r7, #4] 8009078: 681b ldr r3, [r3, #0] 800907a: 685b ldr r3, [r3, #4] 800907c: f403 3300 and.w r3, r3, #131072 @ 0x20000 8009080: 2b00 cmp r3, #0 8009082: bf14 ite ne 8009084: 2301 movne r3, #1 8009086: 2300 moveq r3, #0 8009088: b2db uxtb r3, r3 800908a: 461a mov r2, r3 800908c: 683b ldr r3, [r7, #0] 800908e: f883 2031 strb.w r2, [r3, #49] @ 0x31 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8009092: 687b ldr r3, [r7, #4] 8009094: 681b ldr r3, [r3, #0] 8009096: 685b ldr r3, [r3, #4] ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE; 8009098: f403 2380 and.w r3, r3, #262144 @ 0x40000 800909c: 2b00 cmp r3, #0 800909e: bf14 ite ne 80090a0: 2301 movne r3, #1 80090a2: 2300 moveq r3, #0 80090a4: b2db uxtb r3, r3 80090a6: 461a mov r2, r3 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 80090a8: 683b ldr r3, [r7, #0] 80090aa: f883 2030 strb.w r2, [r3, #48] @ 0x30 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 80090ae: 687b ldr r3, [r7, #4] 80090b0: 681b ldr r3, [r3, #0] 80090b2: 685b ldr r3, [r3, #4] 80090b4: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 ? ENABLE : DISABLE; 80090b8: 2b00 cmp r3, #0 80090ba: bf14 ite ne 80090bc: 2301 movne r3, #1 80090be: 2300 moveq r3, #0 80090c0: b2db uxtb r3, r3 80090c2: 461a mov r2, r3 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 80090c4: 683b ldr r3, [r7, #0] 80090c6: f883 2038 strb.w r2, [r3, #56] @ 0x38 macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25; 80090ca: 687b ldr r3, [r7, #4] 80090cc: 681b ldr r3, [r3, #0] 80090ce: 685b ldr r3, [r3, #4] 80090d0: 0e5b lsrs r3, r3, #25 80090d2: f003 021f and.w r2, r3, #31 80090d6: 683b ldr r3, [r7, #0] 80090d8: 63da str r2, [r3, #60] @ 0x3c macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE; 80090da: 687b ldr r3, [r7, #4] 80090dc: 681b ldr r3, [r3, #0] 80090de: 68db ldr r3, [r3, #12] 80090e0: f403 7380 and.w r3, r3, #256 @ 0x100 80090e4: 2b00 cmp r3, #0 80090e6: bf14 ite ne 80090e8: 2301 movne r3, #1 80090ea: 2300 moveq r3, #0 80090ec: b2db uxtb r3, r3 80090ee: 461a mov r2, r3 80090f0: 683b ldr r3, [r7, #0] 80090f2: f883 2040 strb.w r2, [r3, #64] @ 0x40 macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO); 80090f6: 687b ldr r3, [r7, #4] 80090f8: 681b ldr r3, [r3, #0] 80090fa: 68db ldr r3, [r3, #12] 80090fc: f003 020f and.w r2, r3, #15 8009100: 683b ldr r3, [r7, #0] 8009102: 645a str r2, [r3, #68] @ 0x44 macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE; 8009104: 687b ldr r3, [r7, #4] 8009106: 681b ldr r3, [r3, #0] 8009108: 6f1b ldr r3, [r3, #112] @ 0x70 800910a: f003 0302 and.w r3, r3, #2 800910e: 2b00 cmp r3, #0 8009110: bf14 ite ne 8009112: 2301 movne r3, #1 8009114: 2300 moveq r3, #0 8009116: b2db uxtb r3, r3 8009118: 461a mov r2, r3 800911a: 683b ldr r3, [r7, #0] 800911c: f883 2054 strb.w r2, [r3, #84] @ 0x54 macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE; 8009120: 687b ldr r3, [r7, #4] 8009122: 681b ldr r3, [r3, #0] 8009124: 6f1b ldr r3, [r3, #112] @ 0x70 8009126: f003 0380 and.w r3, r3, #128 @ 0x80 800912a: 2b00 cmp r3, #0 800912c: bf0c ite eq 800912e: 2301 moveq r3, #1 8009130: 2300 movne r3, #0 8009132: b2db uxtb r3, r3 8009134: 461a mov r2, r3 8009136: 683b ldr r3, [r7, #0] 8009138: f883 204c strb.w r2, [r3, #76] @ 0x4c macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT); 800913c: 687b ldr r3, [r7, #4] 800913e: 681b ldr r3, [r3, #0] 8009140: 6f1b ldr r3, [r3, #112] @ 0x70 8009142: f003 0270 and.w r2, r3, #112 @ 0x70 8009146: 683b ldr r3, [r7, #0] 8009148: 651a str r2, [r3, #80] @ 0x50 macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16); 800914a: 687b ldr r3, [r7, #4] 800914c: 681b ldr r3, [r3, #0] 800914e: 6f1b ldr r3, [r3, #112] @ 0x70 8009150: 0c1b lsrs r3, r3, #16 8009152: b29a uxth r2, r3 8009154: 683b ldr r3, [r7, #0] 8009156: 649a str r2, [r3, #72] @ 0x48 macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE; 8009158: 687b ldr r3, [r7, #4] 800915a: 681b ldr r3, [r3, #0] 800915c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 8009160: f003 0301 and.w r3, r3, #1 8009164: 2b00 cmp r3, #0 8009166: bf14 ite ne 8009168: 2301 movne r3, #1 800916a: 2300 moveq r3, #0 800916c: b2db uxtb r3, r3 800916e: 461a mov r2, r3 8009170: 683b ldr r3, [r7, #0] 8009172: f883 2056 strb.w r2, [r3, #86] @ 0x56 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8009176: 687b ldr r3, [r7, #4] 8009178: 681b ldr r3, [r3, #0] 800917a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800917e: f003 0302 and.w r3, r3, #2 ? ENABLE : DISABLE; 8009182: 2b00 cmp r3, #0 8009184: bf14 ite ne 8009186: 2301 movne r3, #1 8009188: 2300 moveq r3, #0 800918a: b2db uxtb r3, r3 800918c: 461a mov r2, r3 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 800918e: 683b ldr r3, [r7, #0] 8009190: f883 2055 strb.w r2, [r3, #85] @ 0x55 macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF)); 8009194: 687b ldr r3, [r7, #4] 8009196: 681b ldr r3, [r3, #0] 8009198: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 800919c: f003 0272 and.w r2, r3, #114 @ 0x72 80091a0: 683b ldr r3, [r7, #0] 80091a2: 659a str r2, [r3, #88] @ 0x58 macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF)); 80091a4: 687b ldr r3, [r7, #4] 80091a6: 681b ldr r3, [r3, #0] 80091a8: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 80091ac: f003 0223 and.w r2, r3, #35 @ 0x23 80091b0: 683b ldr r3, [r7, #0] 80091b2: 65da str r2, [r3, #92] @ 0x5c macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 80091b4: 687b ldr r3, [r7, #4] 80091b6: 681b ldr r3, [r3, #0] 80091b8: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE; 80091bc: f003 0308 and.w r3, r3, #8 80091c0: 2b00 cmp r3, #0 80091c2: bf14 ite ne 80091c4: 2301 movne r3, #1 80091c6: 2300 moveq r3, #0 80091c8: b2db uxtb r3, r3 80091ca: 461a mov r2, r3 macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 80091cc: 683b ldr r3, [r7, #0] 80091ce: f883 2062 strb.w r2, [r3, #98] @ 0x62 macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE; 80091d2: 687b ldr r3, [r7, #4] 80091d4: 681b ldr r3, [r3, #0] 80091d6: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 80091da: f003 0310 and.w r3, r3, #16 80091de: 2b00 cmp r3, #0 80091e0: bf14 ite ne 80091e2: 2301 movne r3, #1 80091e4: 2300 moveq r3, #0 80091e6: b2db uxtb r3, r3 80091e8: 461a mov r2, r3 80091ea: 683b ldr r3, [r7, #0] 80091ec: f883 2061 strb.w r2, [r3, #97] @ 0x61 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 80091f0: 687b ldr r3, [r7, #4] 80091f2: 681b ldr r3, [r3, #0] 80091f4: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE; 80091f8: f003 0340 and.w r3, r3, #64 @ 0x40 80091fc: 2b00 cmp r3, #0 80091fe: bf0c ite eq 8009200: 2301 moveq r3, #1 8009202: 2300 movne r3, #0 8009204: b2db uxtb r3, r3 8009206: 461a mov r2, r3 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8009208: 683b ldr r3, [r7, #0] 800920a: f883 2060 strb.w r2, [r3, #96] @ 0x60 return HAL_OK; 800920e: 2300 movs r3, #0 } 8009210: 4618 mov r0, r3 8009212: 370c adds r7, #12 8009214: 46bd mov sp, r7 8009216: f85d 7b04 ldr.w r7, [sp], #4 800921a: 4770 bx lr 0800921c : * @param macconf: pointer to a ETH_MACConfigTypeDef structure that contains * the configuration of the MAC. * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf) { 800921c: b580 push {r7, lr} 800921e: b082 sub sp, #8 8009220: af00 add r7, sp, #0 8009222: 6078 str r0, [r7, #4] 8009224: 6039 str r1, [r7, #0] if (macconf == NULL) 8009226: 683b ldr r3, [r7, #0] 8009228: 2b00 cmp r3, #0 800922a: d101 bne.n 8009230 { return HAL_ERROR; 800922c: 2301 movs r3, #1 800922e: e00b b.n 8009248 } if (heth->gState == HAL_ETH_STATE_READY) 8009230: 687b ldr r3, [r7, #4] 8009232: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 8009236: 2b10 cmp r3, #16 8009238: d105 bne.n 8009246 { ETH_SetMACConfig(heth, macconf); 800923a: 6839 ldr r1, [r7, #0] 800923c: 6878 ldr r0, [r7, #4] 800923e: f000 f865 bl 800930c return HAL_OK; 8009242: 2300 movs r3, #0 8009244: e000 b.n 8009248 } else { return HAL_ERROR; 8009246: 2301 movs r3, #1 } } 8009248: 4618 mov r0, r3 800924a: 3708 adds r7, #8 800924c: 46bd mov sp, r7 800924e: bd80 pop {r7, pc} 08009250 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ void HAL_ETH_SetMDIOClockRange(ETH_HandleTypeDef *heth) { 8009250: b580 push {r7, lr} 8009252: b084 sub sp, #16 8009254: af00 add r7, sp, #0 8009256: 6078 str r0, [r7, #4] uint32_t hclk; uint32_t tmpreg; /* Get the ETHERNET MACMDIOAR value */ tmpreg = (heth->Instance)->MACMDIOAR; 8009258: 687b ldr r3, [r7, #4] 800925a: 681b ldr r3, [r3, #0] 800925c: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8009260: 60fb str r3, [r7, #12] /* Clear CSR Clock Range bits */ tmpreg &= ~ETH_MACMDIOAR_CR; 8009262: 68fb ldr r3, [r7, #12] 8009264: f423 6370 bic.w r3, r3, #3840 @ 0xf00 8009268: 60fb str r3, [r7, #12] /* Get hclk frequency value */ hclk = HAL_RCC_GetHCLKFreq(); 800926a: f002 f887 bl 800b37c 800926e: 60b8 str r0, [r7, #8] /* Set CR bits depending on hclk value */ if (hclk < 35000000U) 8009270: 68bb ldr r3, [r7, #8] 8009272: 4a1a ldr r2, [pc, #104] @ (80092dc ) 8009274: 4293 cmp r3, r2 8009276: d804 bhi.n 8009282 { /* CSR Clock Range between 0-35 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16; 8009278: 68fb ldr r3, [r7, #12] 800927a: f443 7300 orr.w r3, r3, #512 @ 0x200 800927e: 60fb str r3, [r7, #12] 8009280: e022 b.n 80092c8 } else if (hclk < 60000000U) 8009282: 68bb ldr r3, [r7, #8] 8009284: 4a16 ldr r2, [pc, #88] @ (80092e0 ) 8009286: 4293 cmp r3, r2 8009288: d204 bcs.n 8009294 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26; 800928a: 68fb ldr r3, [r7, #12] 800928c: f443 7340 orr.w r3, r3, #768 @ 0x300 8009290: 60fb str r3, [r7, #12] 8009292: e019 b.n 80092c8 } else if (hclk < 100000000U) 8009294: 68bb ldr r3, [r7, #8] 8009296: 4a13 ldr r2, [pc, #76] @ (80092e4 ) 8009298: 4293 cmp r3, r2 800929a: d915 bls.n 80092c8 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV42; } else if (hclk < 150000000U) 800929c: 68bb ldr r3, [r7, #8] 800929e: 4a12 ldr r2, [pc, #72] @ (80092e8 ) 80092a0: 4293 cmp r3, r2 80092a2: d804 bhi.n 80092ae { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62; 80092a4: 68fb ldr r3, [r7, #12] 80092a6: f443 7380 orr.w r3, r3, #256 @ 0x100 80092aa: 60fb str r3, [r7, #12] 80092ac: e00c b.n 80092c8 } else if (hclk < 250000000U) 80092ae: 68bb ldr r3, [r7, #8] 80092b0: 4a0e ldr r2, [pc, #56] @ (80092ec ) 80092b2: 4293 cmp r3, r2 80092b4: d804 bhi.n 80092c0 { /* CSR Clock Range between 150-250 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102; 80092b6: 68fb ldr r3, [r7, #12] 80092b8: f443 6380 orr.w r3, r3, #1024 @ 0x400 80092bc: 60fb str r3, [r7, #12] 80092be: e003 b.n 80092c8 } else /* (hclk >= 250000000U) */ { /* CSR Clock >= 250 MHz */ tmpreg |= (uint32_t)(ETH_MACMDIOAR_CR_DIV124); 80092c0: 68fb ldr r3, [r7, #12] 80092c2: f443 63a0 orr.w r3, r3, #1280 @ 0x500 80092c6: 60fb str r3, [r7, #12] } /* Configure the CSR Clock Range */ (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg; 80092c8: 687b ldr r3, [r7, #4] 80092ca: 681b ldr r3, [r3, #0] 80092cc: 68fa ldr r2, [r7, #12] 80092ce: f8c3 2200 str.w r2, [r3, #512] @ 0x200 } 80092d2: bf00 nop 80092d4: 3710 adds r7, #16 80092d6: 46bd mov sp, r7 80092d8: bd80 pop {r7, pc} 80092da: bf00 nop 80092dc: 02160ebf .word 0x02160ebf 80092e0: 03938700 .word 0x03938700 80092e4: 05f5e0ff .word 0x05f5e0ff 80092e8: 08f0d17f .word 0x08f0d17f 80092ec: 0ee6b27f .word 0x0ee6b27f 080092f0 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval ETH DMA Error Code */ uint32_t HAL_ETH_GetDMAError(const ETH_HandleTypeDef *heth) { 80092f0: b480 push {r7} 80092f2: b083 sub sp, #12 80092f4: af00 add r7, sp, #0 80092f6: 6078 str r0, [r7, #4] return heth->DMAErrorCode; 80092f8: 687b ldr r3, [r7, #4] 80092fa: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c } 80092fe: 4618 mov r0, r3 8009300: 370c adds r7, #12 8009302: 46bd mov sp, r7 8009304: f85d 7b04 ldr.w r7, [sp], #4 8009308: 4770 bx lr ... 0800930c : /** @addtogroup ETH_Private_Functions ETH Private Functions * @{ */ static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, const ETH_MACConfigTypeDef *macconf) { 800930c: b480 push {r7} 800930e: b085 sub sp, #20 8009310: af00 add r7, sp, #0 8009312: 6078 str r0, [r7, #4] 8009314: 6039 str r1, [r7, #0] uint32_t macregval; /*------------------------ MACCR Configuration --------------------*/ macregval = (macconf->InterPacketGapVal | 8009316: 683b ldr r3, [r7, #0] 8009318: 689a ldr r2, [r3, #8] macconf->SourceAddrControl | 800931a: 683b ldr r3, [r7, #0] 800931c: 681b ldr r3, [r3, #0] macregval = (macconf->InterPacketGapVal | 800931e: 431a orrs r2, r3 ((uint32_t)macconf->ChecksumOffload << 27) | 8009320: 683b ldr r3, [r7, #0] 8009322: 791b ldrb r3, [r3, #4] 8009324: 06db lsls r3, r3, #27 macconf->SourceAddrControl | 8009326: 431a orrs r2, r3 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 8009328: 683b ldr r3, [r7, #0] 800932a: 7b1b ldrb r3, [r3, #12] 800932c: 05db lsls r3, r3, #23 ((uint32_t)macconf->ChecksumOffload << 27) | 800932e: 431a orrs r2, r3 ((uint32_t)macconf->Support2KPacket << 22) | 8009330: 683b ldr r3, [r7, #0] 8009332: 7b5b ldrb r3, [r3, #13] 8009334: 059b lsls r3, r3, #22 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 8009336: 431a orrs r2, r3 ((uint32_t)macconf->CRCStripTypePacket << 21) | 8009338: 683b ldr r3, [r7, #0] 800933a: 7b9b ldrb r3, [r3, #14] 800933c: 055b lsls r3, r3, #21 ((uint32_t)macconf->Support2KPacket << 22) | 800933e: 431a orrs r2, r3 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 8009340: 683b ldr r3, [r7, #0] 8009342: 7bdb ldrb r3, [r3, #15] 8009344: 051b lsls r3, r3, #20 ((uint32_t)macconf->CRCStripTypePacket << 21) | 8009346: 4313 orrs r3, r2 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 8009348: 683a ldr r2, [r7, #0] 800934a: 7c12 ldrb r2, [r2, #16] 800934c: 2a00 cmp r2, #0 800934e: d102 bne.n 8009356 8009350: f44f 2200 mov.w r2, #524288 @ 0x80000 8009354: e000 b.n 8009358 8009356: 2200 movs r2, #0 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 8009358: 4313 orrs r3, r2 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 800935a: 683a ldr r2, [r7, #0] 800935c: 7c52 ldrb r2, [r2, #17] 800935e: 2a00 cmp r2, #0 8009360: d102 bne.n 8009368 8009362: f44f 3200 mov.w r2, #131072 @ 0x20000 8009366: e000 b.n 800936a 8009368: 2200 movs r2, #0 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 800936a: 431a orrs r2, r3 ((uint32_t)macconf->JumboPacket << 16) | 800936c: 683b ldr r3, [r7, #0] 800936e: 7c9b ldrb r3, [r3, #18] 8009370: 041b lsls r3, r3, #16 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 8009372: 431a orrs r2, r3 macconf->Speed | 8009374: 683b ldr r3, [r7, #0] 8009376: 695b ldr r3, [r3, #20] ((uint32_t)macconf->JumboPacket << 16) | 8009378: 431a orrs r2, r3 macconf->DuplexMode | 800937a: 683b ldr r3, [r7, #0] 800937c: 699b ldr r3, [r3, #24] macconf->Speed | 800937e: 431a orrs r2, r3 ((uint32_t)macconf->LoopbackMode << 12) | 8009380: 683b ldr r3, [r7, #0] 8009382: 7f1b ldrb r3, [r3, #28] 8009384: 031b lsls r3, r3, #12 macconf->DuplexMode | 8009386: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8009388: 683b ldr r3, [r7, #0] 800938a: 7f5b ldrb r3, [r3, #29] 800938c: 02db lsls r3, r3, #11 ((uint32_t)macconf->LoopbackMode << 12) | 800938e: 4313 orrs r3, r2 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8009390: 683a ldr r2, [r7, #0] 8009392: 7f92 ldrb r2, [r2, #30] 8009394: 2a00 cmp r2, #0 8009396: d102 bne.n 800939e 8009398: f44f 6280 mov.w r2, #1024 @ 0x400 800939c: e000 b.n 80093a0 800939e: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 80093a0: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 80093a2: 683b ldr r3, [r7, #0] 80093a4: 7fdb ldrb r3, [r3, #31] 80093a6: 025b lsls r3, r3, #9 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 80093a8: 4313 orrs r3, r2 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 80093aa: 683a ldr r2, [r7, #0] 80093ac: f892 2020 ldrb.w r2, [r2, #32] 80093b0: 2a00 cmp r2, #0 80093b2: d102 bne.n 80093ba 80093b4: f44f 7280 mov.w r2, #256 @ 0x100 80093b8: e000 b.n 80093bc 80093ba: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 80093bc: 431a orrs r2, r3 macconf->BackOffLimit | 80093be: 683b ldr r3, [r7, #0] 80093c0: 6a5b ldr r3, [r3, #36] @ 0x24 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 80093c2: 431a orrs r2, r3 ((uint32_t)macconf->DeferralCheck << 4) | 80093c4: 683b ldr r3, [r7, #0] 80093c6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80093ca: 011b lsls r3, r3, #4 macconf->BackOffLimit | 80093cc: 431a orrs r2, r3 macconf->PreambleLength); 80093ce: 683b ldr r3, [r7, #0] 80093d0: 6adb ldr r3, [r3, #44] @ 0x2c macregval = (macconf->InterPacketGapVal | 80093d2: 4313 orrs r3, r2 80093d4: 60fb str r3, [r7, #12] /* Write to MACCR */ MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval); 80093d6: 687b ldr r3, [r7, #4] 80093d8: 681b ldr r3, [r3, #0] 80093da: 681a ldr r2, [r3, #0] 80093dc: 4b56 ldr r3, [pc, #344] @ (8009538 ) 80093de: 4013 ands r3, r2 80093e0: 687a ldr r2, [r7, #4] 80093e2: 6812 ldr r2, [r2, #0] 80093e4: 68f9 ldr r1, [r7, #12] 80093e6: 430b orrs r3, r1 80093e8: 6013 str r3, [r2, #0] /*------------------------ MACECR Configuration --------------------*/ macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 80093ea: 683b ldr r3, [r7, #0] 80093ec: 6bdb ldr r3, [r3, #60] @ 0x3c 80093ee: 065a lsls r2, r3, #25 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 80093f0: 683b ldr r3, [r7, #0] 80093f2: f893 3038 ldrb.w r3, [r3, #56] @ 0x38 80093f6: 061b lsls r3, r3, #24 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 80093f8: 431a orrs r2, r3 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 80093fa: 683b ldr r3, [r7, #0] 80093fc: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8009400: 049b lsls r3, r3, #18 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8009402: 431a orrs r2, r3 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8009404: 683b ldr r3, [r7, #0] 8009406: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 800940a: 045b lsls r3, r3, #17 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 800940c: 4313 orrs r3, r2 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 800940e: 683a ldr r2, [r7, #0] 8009410: f892 2032 ldrb.w r2, [r2, #50] @ 0x32 8009414: 2a00 cmp r2, #0 8009416: d102 bne.n 800941e 8009418: f44f 3280 mov.w r2, #65536 @ 0x10000 800941c: e000 b.n 8009420 800941e: 2200 movs r2, #0 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8009420: 431a orrs r2, r3 macconf->GiantPacketSizeLimit); 8009422: 683b ldr r3, [r7, #0] 8009424: 6b5b ldr r3, [r3, #52] @ 0x34 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8009426: 4313 orrs r3, r2 8009428: 60fb str r3, [r7, #12] /* Write to MACECR */ MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval); 800942a: 687b ldr r3, [r7, #4] 800942c: 681b ldr r3, [r3, #0] 800942e: 685a ldr r2, [r3, #4] 8009430: 4b42 ldr r3, [pc, #264] @ (800953c ) 8009432: 4013 ands r3, r2 8009434: 687a ldr r2, [r7, #4] 8009436: 6812 ldr r2, [r2, #0] 8009438: 68f9 ldr r1, [r7, #12] 800943a: 430b orrs r3, r1 800943c: 6053 str r3, [r2, #4] /*------------------------ MACWTR Configuration --------------------*/ macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 800943e: 683b ldr r3, [r7, #0] 8009440: f893 3040 ldrb.w r3, [r3, #64] @ 0x40 8009444: 021a lsls r2, r3, #8 macconf->WatchdogTimeout); 8009446: 683b ldr r3, [r7, #0] 8009448: 6c5b ldr r3, [r3, #68] @ 0x44 macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 800944a: 4313 orrs r3, r2 800944c: 60fb str r3, [r7, #12] /* Write to MACWTR */ MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval); 800944e: 687b ldr r3, [r7, #4] 8009450: 681b ldr r3, [r3, #0] 8009452: 68da ldr r2, [r3, #12] 8009454: 4b3a ldr r3, [pc, #232] @ (8009540 ) 8009456: 4013 ands r3, r2 8009458: 687a ldr r2, [r7, #4] 800945a: 6812 ldr r2, [r2, #0] 800945c: 68f9 ldr r1, [r7, #12] 800945e: 430b orrs r3, r1 8009460: 60d3 str r3, [r2, #12] /*------------------------ MACTFCR Configuration --------------------*/ macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8009462: 683b ldr r3, [r7, #0] 8009464: f893 3054 ldrb.w r3, [r3, #84] @ 0x54 8009468: 005a lsls r2, r3, #1 macconf->PauseLowThreshold | 800946a: 683b ldr r3, [r7, #0] 800946c: 6d1b ldr r3, [r3, #80] @ 0x50 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 800946e: 4313 orrs r3, r2 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 8009470: 683a ldr r2, [r7, #0] 8009472: f892 204c ldrb.w r2, [r2, #76] @ 0x4c 8009476: 2a00 cmp r2, #0 8009478: d101 bne.n 800947e 800947a: 2280 movs r2, #128 @ 0x80 800947c: e000 b.n 8009480 800947e: 2200 movs r2, #0 macconf->PauseLowThreshold | 8009480: 431a orrs r2, r3 (macconf->PauseTime << 16)); 8009482: 683b ldr r3, [r7, #0] 8009484: 6c9b ldr r3, [r3, #72] @ 0x48 8009486: 041b lsls r3, r3, #16 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8009488: 4313 orrs r3, r2 800948a: 60fb str r3, [r7, #12] /* Write to MACTFCR */ MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval); 800948c: 687b ldr r3, [r7, #4] 800948e: 681b ldr r3, [r3, #0] 8009490: 6f1a ldr r2, [r3, #112] @ 0x70 8009492: f64f 730d movw r3, #65293 @ 0xff0d 8009496: 4013 ands r3, r2 8009498: 687a ldr r2, [r7, #4] 800949a: 6812 ldr r2, [r2, #0] 800949c: 68f9 ldr r1, [r7, #12] 800949e: 430b orrs r3, r1 80094a0: 6713 str r3, [r2, #112] @ 0x70 /*------------------------ MACRFCR Configuration --------------------*/ macregval = ((uint32_t)macconf->ReceiveFlowControl | 80094a2: 683b ldr r3, [r7, #0] 80094a4: f893 3056 ldrb.w r3, [r3, #86] @ 0x56 80094a8: 461a mov r2, r3 ((uint32_t)macconf->UnicastPausePacketDetect << 1)); 80094aa: 683b ldr r3, [r7, #0] 80094ac: f893 3055 ldrb.w r3, [r3, #85] @ 0x55 80094b0: 005b lsls r3, r3, #1 macregval = ((uint32_t)macconf->ReceiveFlowControl | 80094b2: 4313 orrs r3, r2 80094b4: 60fb str r3, [r7, #12] /* Write to MACRFCR */ MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval); 80094b6: 687b ldr r3, [r7, #4] 80094b8: 681b ldr r3, [r3, #0] 80094ba: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 80094be: f023 0103 bic.w r1, r3, #3 80094c2: 687b ldr r3, [r7, #4] 80094c4: 681b ldr r3, [r3, #0] 80094c6: 68fa ldr r2, [r7, #12] 80094c8: 430a orrs r2, r1 80094ca: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /*------------------------ MTLTQOMR Configuration --------------------*/ /* Write to MTLTQOMR */ MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode); 80094ce: 687b ldr r3, [r7, #4] 80094d0: 681b ldr r3, [r3, #0] 80094d2: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 80094d6: f023 0172 bic.w r1, r3, #114 @ 0x72 80094da: 683b ldr r3, [r7, #0] 80094dc: 6d9a ldr r2, [r3, #88] @ 0x58 80094de: 687b ldr r3, [r7, #4] 80094e0: 681b ldr r3, [r3, #0] 80094e2: 430a orrs r2, r1 80094e4: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /*------------------------ MTLRQOMR Configuration --------------------*/ macregval = (macconf->ReceiveQueueMode | 80094e8: 683b ldr r3, [r7, #0] 80094ea: 6ddb ldr r3, [r3, #92] @ 0x5c ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 80094ec: 683a ldr r2, [r7, #0] 80094ee: f892 2060 ldrb.w r2, [r2, #96] @ 0x60 80094f2: 2a00 cmp r2, #0 80094f4: d101 bne.n 80094fa 80094f6: 2240 movs r2, #64 @ 0x40 80094f8: e000 b.n 80094fc 80094fa: 2200 movs r2, #0 macregval = (macconf->ReceiveQueueMode | 80094fc: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxErrorPacket << 4) | 80094fe: 683b ldr r3, [r7, #0] 8009500: f893 3061 ldrb.w r3, [r3, #97] @ 0x61 8009504: 011b lsls r3, r3, #4 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8009506: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3)); 8009508: 683b ldr r3, [r7, #0] 800950a: f893 3062 ldrb.w r3, [r3, #98] @ 0x62 800950e: 00db lsls r3, r3, #3 macregval = (macconf->ReceiveQueueMode | 8009510: 4313 orrs r3, r2 8009512: 60fb str r3, [r7, #12] /* Write to MTLRQOMR */ MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval); 8009514: 687b ldr r3, [r7, #4] 8009516: 681b ldr r3, [r3, #0] 8009518: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 800951c: f023 017b bic.w r1, r3, #123 @ 0x7b 8009520: 687b ldr r3, [r7, #4] 8009522: 681b ldr r3, [r3, #0] 8009524: 68fa ldr r2, [r7, #12] 8009526: 430a orrs r2, r1 8009528: f8c3 2d30 str.w r2, [r3, #3376] @ 0xd30 } 800952c: bf00 nop 800952e: 3714 adds r7, #20 8009530: 46bd mov sp, r7 8009532: f85d 7b04 ldr.w r7, [sp], #4 8009536: 4770 bx lr 8009538: 00048083 .word 0x00048083 800953c: c0f88000 .word 0xc0f88000 8009540: fffffef0 .word 0xfffffef0 08009544 : static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, const ETH_DMAConfigTypeDef *dmaconf) { 8009544: b480 push {r7} 8009546: b085 sub sp, #20 8009548: af00 add r7, sp, #0 800954a: 6078 str r0, [r7, #4] 800954c: 6039 str r1, [r7, #0] uint32_t dmaregval; /*------------------------ DMAMR Configuration --------------------*/ MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration); 800954e: 687b ldr r3, [r7, #4] 8009550: 681b ldr r3, [r3, #0] 8009552: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009556: 681a ldr r2, [r3, #0] 8009558: 4b38 ldr r3, [pc, #224] @ (800963c ) 800955a: 4013 ands r3, r2 800955c: 683a ldr r2, [r7, #0] 800955e: 6811 ldr r1, [r2, #0] 8009560: 687a ldr r2, [r7, #4] 8009562: 6812 ldr r2, [r2, #0] 8009564: 430b orrs r3, r1 8009566: f502 5280 add.w r2, r2, #4096 @ 0x1000 800956a: 6013 str r3, [r2, #0] /*------------------------ DMASBMR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 800956c: 683b ldr r3, [r7, #0] 800956e: 791b ldrb r3, [r3, #4] 8009570: 031a lsls r2, r3, #12 dmaconf->BurstMode | 8009572: 683b ldr r3, [r7, #0] 8009574: 689b ldr r3, [r3, #8] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8009576: 431a orrs r2, r3 ((uint32_t)dmaconf->RebuildINCRxBurst << 15)); 8009578: 683b ldr r3, [r7, #0] 800957a: 7b1b ldrb r3, [r3, #12] 800957c: 03db lsls r3, r3, #15 dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 800957e: 4313 orrs r3, r2 8009580: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval); 8009582: 687b ldr r3, [r7, #4] 8009584: 681b ldr r3, [r3, #0] 8009586: f503 5380 add.w r3, r3, #4096 @ 0x1000 800958a: 685a ldr r2, [r3, #4] 800958c: 4b2c ldr r3, [pc, #176] @ (8009640 ) 800958e: 4013 ands r3, r2 8009590: 687a ldr r2, [r7, #4] 8009592: 6812 ldr r2, [r2, #0] 8009594: 68f9 ldr r1, [r7, #12] 8009596: 430b orrs r3, r1 8009598: f502 5280 add.w r2, r2, #4096 @ 0x1000 800959c: 6053 str r3, [r2, #4] /*------------------------ DMACCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 800959e: 683b ldr r3, [r7, #0] 80095a0: 7b5b ldrb r3, [r3, #13] 80095a2: 041a lsls r2, r3, #16 dmaconf->MaximumSegmentSize); 80095a4: 683b ldr r3, [r7, #0] 80095a6: 6a1b ldr r3, [r3, #32] dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 80095a8: 4313 orrs r3, r2 80095aa: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval); 80095ac: 687b ldr r3, [r7, #4] 80095ae: 681b ldr r3, [r3, #0] 80095b0: f503 5380 add.w r3, r3, #4096 @ 0x1000 80095b4: f8d3 2100 ldr.w r2, [r3, #256] @ 0x100 80095b8: 4b22 ldr r3, [pc, #136] @ (8009644 ) 80095ba: 4013 ands r3, r2 80095bc: 687a ldr r2, [r7, #4] 80095be: 6812 ldr r2, [r2, #0] 80095c0: 68f9 ldr r1, [r7, #12] 80095c2: 430b orrs r3, r1 80095c4: f502 5280 add.w r2, r2, #4096 @ 0x1000 80095c8: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /*------------------------ DMACTCR Configuration --------------------*/ dmaregval = (dmaconf->TxDMABurstLength | 80095cc: 683b ldr r3, [r7, #0] 80095ce: 691a ldr r2, [r3, #16] ((uint32_t)dmaconf->SecondPacketOperate << 4) | 80095d0: 683b ldr r3, [r7, #0] 80095d2: 7d1b ldrb r3, [r3, #20] 80095d4: 011b lsls r3, r3, #4 dmaregval = (dmaconf->TxDMABurstLength | 80095d6: 431a orrs r2, r3 ((uint32_t)dmaconf->TCPSegmentation << 12)); 80095d8: 683b ldr r3, [r7, #0] 80095da: 7f5b ldrb r3, [r3, #29] 80095dc: 031b lsls r3, r3, #12 dmaregval = (dmaconf->TxDMABurstLength | 80095de: 4313 orrs r3, r2 80095e0: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval); 80095e2: 687b ldr r3, [r7, #4] 80095e4: 681b ldr r3, [r3, #0] 80095e6: f503 5380 add.w r3, r3, #4096 @ 0x1000 80095ea: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104 80095ee: 4b16 ldr r3, [pc, #88] @ (8009648 ) 80095f0: 4013 ands r3, r2 80095f2: 687a ldr r2, [r7, #4] 80095f4: 6812 ldr r2, [r2, #0] 80095f6: 68f9 ldr r1, [r7, #12] 80095f8: 430b orrs r3, r1 80095fa: f502 5280 add.w r2, r2, #4096 @ 0x1000 80095fe: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /*------------------------ DMACRCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 8009602: 683b ldr r3, [r7, #0] 8009604: 7f1b ldrb r3, [r3, #28] 8009606: 07da lsls r2, r3, #31 dmaconf->RxDMABurstLength); 8009608: 683b ldr r3, [r7, #0] 800960a: 699b ldr r3, [r3, #24] dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 800960c: 4313 orrs r3, r2 800960e: 60fb str r3, [r7, #12] /* Write to DMACRCR */ MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval); 8009610: 687b ldr r3, [r7, #4] 8009612: 681b ldr r3, [r3, #0] 8009614: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009618: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 800961c: 4b0b ldr r3, [pc, #44] @ (800964c ) 800961e: 4013 ands r3, r2 8009620: 687a ldr r2, [r7, #4] 8009622: 6812 ldr r2, [r2, #0] 8009624: 68f9 ldr r1, [r7, #12] 8009626: 430b orrs r3, r1 8009628: f502 5280 add.w r2, r2, #4096 @ 0x1000 800962c: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } 8009630: bf00 nop 8009632: 3714 adds r7, #20 8009634: 46bd mov sp, r7 8009636: f85d 7b04 ldr.w r7, [sp], #4 800963a: 4770 bx lr 800963c: ffff87fd .word 0xffff87fd 8009640: ffff2ffe .word 0xffff2ffe 8009644: fffec000 .word 0xfffec000 8009648: ffc0efef .word 0xffc0efef 800964c: 7fc0ffff .word 0x7fc0ffff 08009650 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth) { 8009650: b580 push {r7, lr} 8009652: b0a4 sub sp, #144 @ 0x90 8009654: af00 add r7, sp, #0 8009656: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef macDefaultConf; ETH_DMAConfigTypeDef dmaDefaultConf; /*--------------- ETHERNET MAC registers default Configuration --------------*/ macDefaultConf.AutomaticPadCRCStrip = ENABLE; 8009658: 2301 movs r3, #1 800965a: f887 303b strb.w r3, [r7, #59] @ 0x3b macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10; 800965e: 2300 movs r3, #0 8009660: 653b str r3, [r7, #80] @ 0x50 macDefaultConf.CarrierSenseBeforeTransmit = DISABLE; 8009662: 2300 movs r3, #0 8009664: f887 3049 strb.w r3, [r7, #73] @ 0x49 macDefaultConf.CarrierSenseDuringTransmit = DISABLE; 8009668: 2300 movs r3, #0 800966a: f887 304b strb.w r3, [r7, #75] @ 0x4b macDefaultConf.ChecksumOffload = ENABLE; 800966e: 2301 movs r3, #1 8009670: f887 3030 strb.w r3, [r7, #48] @ 0x30 macDefaultConf.CRCCheckingRxPackets = ENABLE; 8009674: 2301 movs r3, #1 8009676: f887 305e strb.w r3, [r7, #94] @ 0x5e macDefaultConf.CRCStripTypePacket = ENABLE; 800967a: 2301 movs r3, #1 800967c: f887 303a strb.w r3, [r7, #58] @ 0x3a macDefaultConf.DeferralCheck = DISABLE; 8009680: 2300 movs r3, #0 8009682: f887 3054 strb.w r3, [r7, #84] @ 0x54 macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE; 8009686: 2301 movs r3, #1 8009688: f887 308c strb.w r3, [r7, #140] @ 0x8c macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE; 800968c: f44f 5300 mov.w r3, #8192 @ 0x2000 8009690: 647b str r3, [r7, #68] @ 0x44 macDefaultConf.ExtendedInterPacketGap = DISABLE; 8009692: 2300 movs r3, #0 8009694: f887 3064 strb.w r3, [r7, #100] @ 0x64 macDefaultConf.ExtendedInterPacketGapVal = 0x0U; 8009698: 2300 movs r3, #0 800969a: 66bb str r3, [r7, #104] @ 0x68 macDefaultConf.ForwardRxErrorPacket = DISABLE; 800969c: 2300 movs r3, #0 800969e: f887 308d strb.w r3, [r7, #141] @ 0x8d macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE; 80096a2: 2300 movs r3, #0 80096a4: f887 308e strb.w r3, [r7, #142] @ 0x8e macDefaultConf.GiantPacketSizeLimit = 0x618U; 80096a8: f44f 63c3 mov.w r3, #1560 @ 0x618 80096ac: 663b str r3, [r7, #96] @ 0x60 macDefaultConf.GiantPacketSizeLimitControl = DISABLE; 80096ae: 2300 movs r3, #0 80096b0: f887 3038 strb.w r3, [r7, #56] @ 0x38 macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT; 80096b4: 2300 movs r3, #0 80096b6: 637b str r3, [r7, #52] @ 0x34 macDefaultConf.Jabber = ENABLE; 80096b8: 2301 movs r3, #1 80096ba: f887 303d strb.w r3, [r7, #61] @ 0x3d macDefaultConf.JumboPacket = DISABLE; 80096be: 2300 movs r3, #0 80096c0: f887 303e strb.w r3, [r7, #62] @ 0x3e macDefaultConf.LoopbackMode = DISABLE; 80096c4: 2300 movs r3, #0 80096c6: f887 3048 strb.w r3, [r7, #72] @ 0x48 macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4; 80096ca: 2300 movs r3, #0 80096cc: 67fb str r3, [r7, #124] @ 0x7c macDefaultConf.PauseTime = 0x0U; 80096ce: 2300 movs r3, #0 80096d0: 677b str r3, [r7, #116] @ 0x74 macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7; 80096d2: 2300 movs r3, #0 80096d4: 65bb str r3, [r7, #88] @ 0x58 macDefaultConf.ProgrammableWatchdog = DISABLE; 80096d6: 2300 movs r3, #0 80096d8: f887 306c strb.w r3, [r7, #108] @ 0x6c macDefaultConf.ReceiveFlowControl = DISABLE; 80096dc: 2300 movs r3, #0 80096de: f887 3082 strb.w r3, [r7, #130] @ 0x82 macDefaultConf.ReceiveOwn = ENABLE; 80096e2: 2301 movs r3, #1 80096e4: f887 304a strb.w r3, [r7, #74] @ 0x4a macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD; 80096e8: 2320 movs r3, #32 80096ea: f8c7 3088 str.w r3, [r7, #136] @ 0x88 macDefaultConf.RetryTransmission = ENABLE; 80096ee: 2301 movs r3, #1 80096f0: f887 304c strb.w r3, [r7, #76] @ 0x4c macDefaultConf.SlowProtocolDetect = DISABLE; 80096f4: 2300 movs r3, #0 80096f6: f887 305d strb.w r3, [r7, #93] @ 0x5d macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0; 80096fa: f04f 5340 mov.w r3, #805306368 @ 0x30000000 80096fe: 62fb str r3, [r7, #44] @ 0x2c macDefaultConf.Speed = ETH_SPEED_100M; 8009700: f44f 4380 mov.w r3, #16384 @ 0x4000 8009704: 643b str r3, [r7, #64] @ 0x40 macDefaultConf.Support2KPacket = DISABLE; 8009706: 2300 movs r3, #0 8009708: f887 3039 strb.w r3, [r7, #57] @ 0x39 macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD; 800970c: 2302 movs r3, #2 800970e: f8c7 3084 str.w r3, [r7, #132] @ 0x84 macDefaultConf.TransmitFlowControl = DISABLE; 8009712: 2300 movs r3, #0 8009714: f887 3080 strb.w r3, [r7, #128] @ 0x80 macDefaultConf.UnicastPausePacketDetect = DISABLE; 8009718: 2300 movs r3, #0 800971a: f887 3081 strb.w r3, [r7, #129] @ 0x81 macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE; 800971e: 2300 movs r3, #0 8009720: f887 305c strb.w r3, [r7, #92] @ 0x5c macDefaultConf.Watchdog = ENABLE; 8009724: 2301 movs r3, #1 8009726: f887 303c strb.w r3, [r7, #60] @ 0x3c macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB; 800972a: 2300 movs r3, #0 800972c: 673b str r3, [r7, #112] @ 0x70 macDefaultConf.ZeroQuantaPause = ENABLE; 800972e: 2301 movs r3, #1 8009730: f887 3078 strb.w r3, [r7, #120] @ 0x78 /* MAC default configuration */ ETH_SetMACConfig(heth, &macDefaultConf); 8009734: f107 032c add.w r3, r7, #44 @ 0x2c 8009738: 4619 mov r1, r3 800973a: 6878 ldr r0, [r7, #4] 800973c: f7ff fde6 bl 800930c /*--------------- ETHERNET DMA registers default Configuration --------------*/ dmaDefaultConf.AddressAlignedBeats = ENABLE; 8009740: 2301 movs r3, #1 8009742: 733b strb r3, [r7, #12] dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED; 8009744: 2301 movs r3, #1 8009746: 613b str r3, [r7, #16] dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1; 8009748: 2300 movs r3, #0 800974a: 60bb str r3, [r7, #8] dmaDefaultConf.FlushRxPacket = DISABLE; 800974c: 2300 movs r3, #0 800974e: f887 3024 strb.w r3, [r7, #36] @ 0x24 dmaDefaultConf.PBLx8Mode = DISABLE; 8009752: 2300 movs r3, #0 8009754: 757b strb r3, [r7, #21] dmaDefaultConf.RebuildINCRxBurst = DISABLE; 8009756: 2300 movs r3, #0 8009758: 753b strb r3, [r7, #20] dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; 800975a: f44f 1300 mov.w r3, #2097152 @ 0x200000 800975e: 623b str r3, [r7, #32] dmaDefaultConf.SecondPacketOperate = DISABLE; 8009760: 2300 movs r3, #0 8009762: 773b strb r3, [r7, #28] dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; 8009764: f44f 1300 mov.w r3, #2097152 @ 0x200000 8009768: 61bb str r3, [r7, #24] dmaDefaultConf.TCPSegmentation = DISABLE; 800976a: 2300 movs r3, #0 800976c: f887 3025 strb.w r3, [r7, #37] @ 0x25 dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT; 8009770: f44f 7306 mov.w r3, #536 @ 0x218 8009774: 62bb str r3, [r7, #40] @ 0x28 /* DMA default configuration */ ETH_SetDMAConfig(heth, &dmaDefaultConf); 8009776: f107 0308 add.w r3, r7, #8 800977a: 4619 mov r1, r3 800977c: 6878 ldr r0, [r7, #4] 800977e: f7ff fee1 bl 8009544 } 8009782: bf00 nop 8009784: 3790 adds r7, #144 @ 0x90 8009786: 46bd mov sp, r7 8009788: bd80 pop {r7, pc} 0800978a : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth) { 800978a: b480 push {r7} 800978c: b085 sub sp, #20 800978e: af00 add r7, sp, #0 8009790: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmatxdesc; uint32_t i; /* Fill each DMATxDesc descriptor with the right values */ for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 8009792: 2300 movs r3, #0 8009794: 60fb str r3, [r7, #12] 8009796: e01d b.n 80097d4 { dmatxdesc = heth->Init.TxDesc + i; 8009798: 687b ldr r3, [r7, #4] 800979a: 68d9 ldr r1, [r3, #12] 800979c: 68fa ldr r2, [r7, #12] 800979e: 4613 mov r3, r2 80097a0: 005b lsls r3, r3, #1 80097a2: 4413 add r3, r2 80097a4: 00db lsls r3, r3, #3 80097a6: 440b add r3, r1 80097a8: 60bb str r3, [r7, #8] WRITE_REG(dmatxdesc->DESC0, 0x0U); 80097aa: 68bb ldr r3, [r7, #8] 80097ac: 2200 movs r2, #0 80097ae: 601a str r2, [r3, #0] WRITE_REG(dmatxdesc->DESC1, 0x0U); 80097b0: 68bb ldr r3, [r7, #8] 80097b2: 2200 movs r2, #0 80097b4: 605a str r2, [r3, #4] WRITE_REG(dmatxdesc->DESC2, 0x0U); 80097b6: 68bb ldr r3, [r7, #8] 80097b8: 2200 movs r2, #0 80097ba: 609a str r2, [r3, #8] WRITE_REG(dmatxdesc->DESC3, 0x0U); 80097bc: 68bb ldr r3, [r7, #8] 80097be: 2200 movs r2, #0 80097c0: 60da str r2, [r3, #12] WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc); 80097c2: 68b9 ldr r1, [r7, #8] 80097c4: 687b ldr r3, [r7, #4] 80097c6: 68fa ldr r2, [r7, #12] 80097c8: 3206 adds r2, #6 80097ca: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 80097ce: 68fb ldr r3, [r7, #12] 80097d0: 3301 adds r3, #1 80097d2: 60fb str r3, [r7, #12] 80097d4: 68fb ldr r3, [r7, #12] 80097d6: 2b03 cmp r3, #3 80097d8: d9de bls.n 8009798 } heth->TxDescList.CurTxDesc = 0; 80097da: 687b ldr r3, [r7, #4] 80097dc: 2200 movs r2, #0 80097de: 629a str r2, [r3, #40] @ 0x28 /* Set Transmit Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U)); 80097e0: 687b ldr r3, [r7, #4] 80097e2: 681b ldr r3, [r3, #0] 80097e4: f503 5380 add.w r3, r3, #4096 @ 0x1000 80097e8: 461a mov r2, r3 80097ea: 2303 movs r3, #3 80097ec: f8c2 312c str.w r3, [r2, #300] @ 0x12c /* Set Transmit Descriptor List Address */ WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc); 80097f0: 687b ldr r3, [r7, #4] 80097f2: 68da ldr r2, [r3, #12] 80097f4: 687b ldr r3, [r7, #4] 80097f6: 681b ldr r3, [r3, #0] 80097f8: f503 5380 add.w r3, r3, #4096 @ 0x1000 80097fc: f8c3 2114 str.w r2, [r3, #276] @ 0x114 /* Set Transmit Descriptor Tail pointer */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc); 8009800: 687b ldr r3, [r7, #4] 8009802: 68da ldr r2, [r3, #12] 8009804: 687b ldr r3, [r7, #4] 8009806: 681b ldr r3, [r3, #0] 8009808: f503 5380 add.w r3, r3, #4096 @ 0x1000 800980c: f8c3 2120 str.w r2, [r3, #288] @ 0x120 } 8009810: bf00 nop 8009812: 3714 adds r7, #20 8009814: 46bd mov sp, r7 8009816: f85d 7b04 ldr.w r7, [sp], #4 800981a: 4770 bx lr 0800981c : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth) { 800981c: b480 push {r7} 800981e: b085 sub sp, #20 8009820: af00 add r7, sp, #0 8009822: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t i; for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 8009824: 2300 movs r3, #0 8009826: 60fb str r3, [r7, #12] 8009828: e023 b.n 8009872 { dmarxdesc = heth->Init.RxDesc + i; 800982a: 687b ldr r3, [r7, #4] 800982c: 6919 ldr r1, [r3, #16] 800982e: 68fa ldr r2, [r7, #12] 8009830: 4613 mov r3, r2 8009832: 005b lsls r3, r3, #1 8009834: 4413 add r3, r2 8009836: 00db lsls r3, r3, #3 8009838: 440b add r3, r1 800983a: 60bb str r3, [r7, #8] WRITE_REG(dmarxdesc->DESC0, 0x0U); 800983c: 68bb ldr r3, [r7, #8] 800983e: 2200 movs r2, #0 8009840: 601a str r2, [r3, #0] WRITE_REG(dmarxdesc->DESC1, 0x0U); 8009842: 68bb ldr r3, [r7, #8] 8009844: 2200 movs r2, #0 8009846: 605a str r2, [r3, #4] WRITE_REG(dmarxdesc->DESC2, 0x0U); 8009848: 68bb ldr r3, [r7, #8] 800984a: 2200 movs r2, #0 800984c: 609a str r2, [r3, #8] WRITE_REG(dmarxdesc->DESC3, 0x0U); 800984e: 68bb ldr r3, [r7, #8] 8009850: 2200 movs r2, #0 8009852: 60da str r2, [r3, #12] WRITE_REG(dmarxdesc->BackupAddr0, 0x0U); 8009854: 68bb ldr r3, [r7, #8] 8009856: 2200 movs r2, #0 8009858: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->BackupAddr1, 0x0U); 800985a: 68bb ldr r3, [r7, #8] 800985c: 2200 movs r2, #0 800985e: 615a str r2, [r3, #20] /* Set Rx descritors addresses */ WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc); 8009860: 68b9 ldr r1, [r7, #8] 8009862: 687b ldr r3, [r7, #4] 8009864: 68fa ldr r2, [r7, #12] 8009866: 3212 adds r2, #18 8009868: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 800986c: 68fb ldr r3, [r7, #12] 800986e: 3301 adds r3, #1 8009870: 60fb str r3, [r7, #12] 8009872: 68fb ldr r3, [r7, #12] 8009874: 2b03 cmp r3, #3 8009876: d9d8 bls.n 800982a } WRITE_REG(heth->RxDescList.RxDescIdx, 0U); 8009878: 687b ldr r3, [r7, #4] 800987a: 2200 movs r2, #0 800987c: 65da str r2, [r3, #92] @ 0x5c WRITE_REG(heth->RxDescList.RxDescCnt, 0U); 800987e: 687b ldr r3, [r7, #4] 8009880: 2200 movs r2, #0 8009882: 661a str r2, [r3, #96] @ 0x60 WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0U); 8009884: 687b ldr r3, [r7, #4] 8009886: 2200 movs r2, #0 8009888: 669a str r2, [r3, #104] @ 0x68 WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0U); 800988a: 687b ldr r3, [r7, #4] 800988c: 2200 movs r2, #0 800988e: 66da str r2, [r3, #108] @ 0x6c WRITE_REG(heth->RxDescList.ItMode, 0U); 8009890: 687b ldr r3, [r7, #4] 8009892: 2200 movs r2, #0 8009894: 659a str r2, [r3, #88] @ 0x58 /* Set Receive Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U))); 8009896: 687b ldr r3, [r7, #4] 8009898: 681b ldr r3, [r3, #0] 800989a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800989e: 461a mov r2, r3 80098a0: 2303 movs r3, #3 80098a2: f8c2 3130 str.w r3, [r2, #304] @ 0x130 /* Set Receive Descriptor List Address */ WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); 80098a6: 687b ldr r3, [r7, #4] 80098a8: 691a ldr r2, [r3, #16] 80098aa: 687b ldr r3, [r7, #4] 80098ac: 681b ldr r3, [r3, #0] 80098ae: f503 5380 add.w r3, r3, #4096 @ 0x1000 80098b2: f8c3 211c str.w r2, [r3, #284] @ 0x11c /* Set Receive Descriptor Tail pointer Address */ WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U)))); 80098b6: 687b ldr r3, [r7, #4] 80098b8: 691b ldr r3, [r3, #16] 80098ba: f103 0248 add.w r2, r3, #72 @ 0x48 80098be: 687b ldr r3, [r7, #4] 80098c0: 681b ldr r3, [r3, #0] 80098c2: f503 5380 add.w r3, r3, #4096 @ 0x1000 80098c6: f8c3 2128 str.w r2, [r3, #296] @ 0x128 } 80098ca: bf00 nop 80098cc: 3714 adds r7, #20 80098ce: 46bd mov sp, r7 80098d0: f85d 7b04 ldr.w r7, [sp], #4 80098d4: 4770 bx lr ... 080098d8 : * @param ItMode: Enable or disable Tx EOT interrept * @retval Status */ static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, const ETH_TxPacketConfigTypeDef *pTxConfig, uint32_t ItMode) { 80098d8: b480 push {r7} 80098da: b091 sub sp, #68 @ 0x44 80098dc: af00 add r7, sp, #0 80098de: 60f8 str r0, [r7, #12] 80098e0: 60b9 str r1, [r7, #8] 80098e2: 607a str r2, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 80098e4: 68fb ldr r3, [r7, #12] 80098e6: 3318 adds r3, #24 80098e8: 627b str r3, [r7, #36] @ 0x24 uint32_t descidx = dmatxdesclist->CurTxDesc; 80098ea: 6a7b ldr r3, [r7, #36] @ 0x24 80098ec: 691b ldr r3, [r3, #16] 80098ee: 63fb str r3, [r7, #60] @ 0x3c uint32_t firstdescidx = dmatxdesclist->CurTxDesc; 80098f0: 6a7b ldr r3, [r7, #36] @ 0x24 80098f2: 691b ldr r3, [r3, #16] 80098f4: 623b str r3, [r7, #32] uint32_t idx; uint32_t descnbr = 0; 80098f6: 2300 movs r3, #0 80098f8: 637b str r3, [r7, #52] @ 0x34 ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80098fa: 6a7b ldr r3, [r7, #36] @ 0x24 80098fc: 6bfa ldr r2, [r7, #60] @ 0x3c 80098fe: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009902: 633b str r3, [r7, #48] @ 0x30 ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 8009904: 68bb ldr r3, [r7, #8] 8009906: 689b ldr r3, [r3, #8] 8009908: 62fb str r3, [r7, #44] @ 0x2c uint32_t bd_count = 0; 800990a: 2300 movs r3, #0 800990c: 62bb str r3, [r7, #40] @ 0x28 uint32_t primask_bit; /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 800990e: 6b3b ldr r3, [r7, #48] @ 0x30 8009910: 68db ldr r3, [r3, #12] 8009912: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009916: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 800991a: d007 beq.n 800992c || (dmatxdesclist->PacketAddress[descidx] != NULL)) 800991c: 6a7a ldr r2, [r7, #36] @ 0x24 800991e: 6bfb ldr r3, [r7, #60] @ 0x3c 8009920: 3304 adds r3, #4 8009922: 009b lsls r3, r3, #2 8009924: 4413 add r3, r2 8009926: 685b ldr r3, [r3, #4] 8009928: 2b00 cmp r3, #0 800992a: d001 beq.n 8009930 { return HAL_ETH_ERROR_BUSY; 800992c: 2302 movs r3, #2 800992e: e266 b.n 8009dfe /***************************************************************************/ /***************** Context descriptor configuration (Optional) **********/ /***************************************************************************/ /* If VLAN tag is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8009930: 68bb ldr r3, [r7, #8] 8009932: 681b ldr r3, [r3, #0] 8009934: f003 0304 and.w r3, r3, #4 8009938: 2b00 cmp r3, #0 800993a: d044 beq.n 80099c6 { /* Set vlan tag value */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag); 800993c: 6b3b ldr r3, [r7, #48] @ 0x30 800993e: 68da ldr r2, [r3, #12] 8009940: 4b75 ldr r3, [pc, #468] @ (8009b18 ) 8009942: 4013 ands r3, r2 8009944: 68ba ldr r2, [r7, #8] 8009946: 6a52 ldr r2, [r2, #36] @ 0x24 8009948: 431a orrs r2, r3 800994a: 6b3b ldr r3, [r7, #48] @ 0x30 800994c: 60da str r2, [r3, #12] /* Set vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV); 800994e: 6b3b ldr r3, [r7, #48] @ 0x30 8009950: 68db ldr r3, [r3, #12] 8009952: f443 3280 orr.w r2, r3, #65536 @ 0x10000 8009956: 6b3b ldr r3, [r7, #48] @ 0x30 8009958: 60da str r2, [r3, #12] /* Set the descriptor as the vlan input source */ SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI); 800995a: 68fb ldr r3, [r7, #12] 800995c: 681b ldr r3, [r3, #0] 800995e: 6e1a ldr r2, [r3, #96] @ 0x60 8009960: 68fb ldr r3, [r7, #12] 8009962: 681b ldr r3, [r3, #0] 8009964: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 8009968: 661a str r2, [r3, #96] @ 0x60 /* if inner VLAN is enabled */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET) 800996a: 68bb ldr r3, [r7, #8] 800996c: 681b ldr r3, [r3, #0] 800996e: f003 0308 and.w r3, r3, #8 8009972: 2b00 cmp r3, #0 8009974: d027 beq.n 80099c6 { /* Set inner vlan tag value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16)); 8009976: 6b3b ldr r3, [r7, #48] @ 0x30 8009978: 689b ldr r3, [r3, #8] 800997a: b29a uxth r2, r3 800997c: 68bb ldr r3, [r7, #8] 800997e: 6adb ldr r3, [r3, #44] @ 0x2c 8009980: 041b lsls r3, r3, #16 8009982: 431a orrs r2, r3 8009984: 6b3b ldr r3, [r7, #48] @ 0x30 8009986: 609a str r2, [r3, #8] /* Set inner vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV); 8009988: 6b3b ldr r3, [r7, #48] @ 0x30 800998a: 68db ldr r3, [r3, #12] 800998c: f443 3200 orr.w r2, r3, #131072 @ 0x20000 8009990: 6b3b ldr r3, [r7, #48] @ 0x30 8009992: 60da str r2, [r3, #12] /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl); 8009994: 6b3b ldr r3, [r7, #48] @ 0x30 8009996: 68db ldr r3, [r3, #12] 8009998: f423 2240 bic.w r2, r3, #786432 @ 0xc0000 800999c: 68bb ldr r3, [r7, #8] 800999e: 6b1b ldr r3, [r3, #48] @ 0x30 80099a0: 431a orrs r2, r3 80099a2: 6b3b ldr r3, [r7, #48] @ 0x30 80099a4: 60da str r2, [r3, #12] /* Set the descriptor as the inner vlan input source */ SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI); 80099a6: 68fb ldr r3, [r7, #12] 80099a8: 681b ldr r3, [r3, #0] 80099aa: 6e5a ldr r2, [r3, #100] @ 0x64 80099ac: 68fb ldr r3, [r7, #12] 80099ae: 681b ldr r3, [r3, #0] 80099b0: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 80099b4: 665a str r2, [r3, #100] @ 0x64 /* Enable double VLAN processing */ SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP); 80099b6: 68fb ldr r3, [r7, #12] 80099b8: 681b ldr r3, [r3, #0] 80099ba: 6d1a ldr r2, [r3, #80] @ 0x50 80099bc: 68fb ldr r3, [r7, #12] 80099be: 681b ldr r3, [r3, #0] 80099c0: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000 80099c4: 651a str r2, [r3, #80] @ 0x50 } } /* if tcp segmentation is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 80099c6: 68bb ldr r3, [r7, #8] 80099c8: 681b ldr r3, [r3, #0] 80099ca: f003 0310 and.w r3, r3, #16 80099ce: 2b00 cmp r3, #0 80099d0: d00e beq.n 80099f0 { /* Set MSS value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize); 80099d2: 6b3b ldr r3, [r7, #48] @ 0x30 80099d4: 689a ldr r2, [r3, #8] 80099d6: 4b51 ldr r3, [pc, #324] @ (8009b1c ) 80099d8: 4013 ands r3, r2 80099da: 68ba ldr r2, [r7, #8] 80099dc: 6992 ldr r2, [r2, #24] 80099de: 431a orrs r2, r3 80099e0: 6b3b ldr r3, [r7, #48] @ 0x30 80099e2: 609a str r2, [r3, #8] /* Set MSS valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV); 80099e4: 6b3b ldr r3, [r7, #48] @ 0x30 80099e6: 68db ldr r3, [r3, #12] 80099e8: f043 6280 orr.w r2, r3, #67108864 @ 0x4000000 80099ec: 6b3b ldr r3, [r7, #48] @ 0x30 80099ee: 60da str r2, [r3, #12] } if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 80099f0: 68bb ldr r3, [r7, #8] 80099f2: 681b ldr r3, [r3, #0] 80099f4: f003 0304 and.w r3, r3, #4 80099f8: 2b00 cmp r3, #0 80099fa: d105 bne.n 8009a08 || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)) 80099fc: 68bb ldr r3, [r7, #8] 80099fe: 681b ldr r3, [r3, #0] 8009a00: f003 0310 and.w r3, r3, #16 8009a04: 2b00 cmp r3, #0 8009a06: d036 beq.n 8009a76 { /* Set as context descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT); 8009a08: 6b3b ldr r3, [r7, #48] @ 0x30 8009a0a: 68db ldr r3, [r3, #12] 8009a0c: f043 4280 orr.w r2, r3, #1073741824 @ 0x40000000 8009a10: 6b3b ldr r3, [r7, #48] @ 0x30 8009a12: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 8009a14: f3bf 8f5f dmb sy } 8009a18: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 8009a1a: 6b3b ldr r3, [r7, #48] @ 0x30 8009a1c: 68db ldr r3, [r3, #12] 8009a1e: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009a22: 6b3b ldr r3, [r7, #48] @ 0x30 8009a24: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009a26: 6bfb ldr r3, [r7, #60] @ 0x3c 8009a28: 3301 adds r3, #1 8009a2a: 63fb str r3, [r7, #60] @ 0x3c 8009a2c: 6bfb ldr r3, [r7, #60] @ 0x3c 8009a2e: 2b03 cmp r3, #3 8009a30: d902 bls.n 8009a38 8009a32: 6bfb ldr r3, [r7, #60] @ 0x3c 8009a34: 3b04 subs r3, #4 8009a36: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009a38: 6a7b ldr r3, [r7, #36] @ 0x24 8009a3a: 6bfa ldr r2, [r7, #60] @ 0x3c 8009a3c: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009a40: 633b str r3, [r7, #48] @ 0x30 descnbr += 1U; 8009a42: 6b7b ldr r3, [r7, #52] @ 0x34 8009a44: 3301 adds r3, #1 8009a46: 637b str r3, [r7, #52] @ 0x34 /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if (READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 8009a48: 6b3b ldr r3, [r7, #48] @ 0x30 8009a4a: 68db ldr r3, [r3, #12] 8009a4c: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009a50: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 8009a54: d10f bne.n 8009a76 { dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx]; 8009a56: 6a7b ldr r3, [r7, #36] @ 0x24 8009a58: 6a3a ldr r2, [r7, #32] 8009a5a: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009a5e: 633b str r3, [r7, #48] @ 0x30 __ASM volatile ("dmb 0xF":::"memory"); 8009a60: f3bf 8f5f dmb sy } 8009a64: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Clear own bit */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 8009a66: 6b3b ldr r3, [r7, #48] @ 0x30 8009a68: 68db ldr r3, [r3, #12] 8009a6a: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009a6e: 6b3b ldr r3, [r7, #48] @ 0x30 8009a70: 60da str r2, [r3, #12] return HAL_ETH_ERROR_BUSY; 8009a72: 2302 movs r3, #2 8009a74: e1c3 b.n 8009dfe /***************************************************************************/ /***************** Normal descriptors configuration *****************/ /***************************************************************************/ descnbr += 1U; 8009a76: 6b7b ldr r3, [r7, #52] @ 0x34 8009a78: 3301 adds r3, #1 8009a7a: 637b str r3, [r7, #52] @ 0x34 /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8009a7c: 6afb ldr r3, [r7, #44] @ 0x2c 8009a7e: 681b ldr r3, [r3, #0] 8009a80: 461a mov r2, r3 8009a82: 6b3b ldr r3, [r7, #48] @ 0x30 8009a84: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8009a86: 6b3b ldr r3, [r7, #48] @ 0x30 8009a88: 689a ldr r2, [r3, #8] 8009a8a: 4b24 ldr r3, [pc, #144] @ (8009b1c ) 8009a8c: 4013 ands r3, r2 8009a8e: 6afa ldr r2, [r7, #44] @ 0x2c 8009a90: 6852 ldr r2, [r2, #4] 8009a92: 431a orrs r2, r3 8009a94: 6b3b ldr r3, [r7, #48] @ 0x30 8009a96: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8009a98: 6afb ldr r3, [r7, #44] @ 0x2c 8009a9a: 689b ldr r3, [r3, #8] 8009a9c: 2b00 cmp r3, #0 8009a9e: d012 beq.n 8009ac6 { txbuffer = txbuffer->next; 8009aa0: 6afb ldr r3, [r7, #44] @ 0x2c 8009aa2: 689b ldr r3, [r3, #8] 8009aa4: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8009aa6: 6afb ldr r3, [r7, #44] @ 0x2c 8009aa8: 681b ldr r3, [r3, #0] 8009aaa: 461a mov r2, r3 8009aac: 6b3b ldr r3, [r7, #48] @ 0x30 8009aae: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009ab0: 6b3b ldr r3, [r7, #48] @ 0x30 8009ab2: 689a ldr r2, [r3, #8] 8009ab4: 4b1a ldr r3, [pc, #104] @ (8009b20 ) 8009ab6: 4013 ands r3, r2 8009ab8: 6afa ldr r2, [r7, #44] @ 0x2c 8009aba: 6852 ldr r2, [r2, #4] 8009abc: 0412 lsls r2, r2, #16 8009abe: 431a orrs r2, r3 8009ac0: 6b3b ldr r3, [r7, #48] @ 0x30 8009ac2: 609a str r2, [r3, #8] 8009ac4: e008 b.n 8009ad8 } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009ac6: 6b3b ldr r3, [r7, #48] @ 0x30 8009ac8: 2200 movs r2, #0 8009aca: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8009acc: 6b3b ldr r3, [r7, #48] @ 0x30 8009ace: 689a ldr r2, [r3, #8] 8009ad0: 4b13 ldr r3, [pc, #76] @ (8009b20 ) 8009ad2: 4013 ands r3, r2 8009ad4: 6b3a ldr r2, [r7, #48] @ 0x30 8009ad6: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8009ad8: 68bb ldr r3, [r7, #8] 8009ada: 681b ldr r3, [r3, #0] 8009adc: f003 0310 and.w r3, r3, #16 8009ae0: 2b00 cmp r3, #0 8009ae2: d021 beq.n 8009b28 { /* Set TCP Header length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19)); 8009ae4: 6b3b ldr r3, [r7, #48] @ 0x30 8009ae6: 68db ldr r3, [r3, #12] 8009ae8: f423 02f0 bic.w r2, r3, #7864320 @ 0x780000 8009aec: 68bb ldr r3, [r7, #8] 8009aee: 6a1b ldr r3, [r3, #32] 8009af0: 04db lsls r3, r3, #19 8009af2: 431a orrs r2, r3 8009af4: 6b3b ldr r3, [r7, #48] @ 0x30 8009af6: 60da str r2, [r3, #12] /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8009af8: 6b3b ldr r3, [r7, #48] @ 0x30 8009afa: 68da ldr r2, [r3, #12] 8009afc: 4b09 ldr r3, [pc, #36] @ (8009b24 ) 8009afe: 4013 ands r3, r2 8009b00: 68ba ldr r2, [r7, #8] 8009b02: 69d2 ldr r2, [r2, #28] 8009b04: 431a orrs r2, r3 8009b06: 6b3b ldr r3, [r7, #48] @ 0x30 8009b08: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8009b0a: 6b3b ldr r3, [r7, #48] @ 0x30 8009b0c: 68db ldr r3, [r3, #12] 8009b0e: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009b12: 6b3b ldr r3, [r7, #48] @ 0x30 8009b14: 60da str r2, [r3, #12] 8009b16: e02e b.n 8009b76 8009b18: ffff0000 .word 0xffff0000 8009b1c: ffffc000 .word 0xffffc000 8009b20: c000ffff .word 0xc000ffff 8009b24: fffc0000 .word 0xfffc0000 } else { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8009b28: 6b3b ldr r3, [r7, #48] @ 0x30 8009b2a: 68da ldr r2, [r3, #12] 8009b2c: 4b7b ldr r3, [pc, #492] @ (8009d1c ) 8009b2e: 4013 ands r3, r2 8009b30: 68ba ldr r2, [r7, #8] 8009b32: 6852 ldr r2, [r2, #4] 8009b34: 431a orrs r2, r3 8009b36: 6b3b ldr r3, [r7, #48] @ 0x30 8009b38: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8009b3a: 68bb ldr r3, [r7, #8] 8009b3c: 681b ldr r3, [r3, #0] 8009b3e: f003 0301 and.w r3, r3, #1 8009b42: 2b00 cmp r3, #0 8009b44: d008 beq.n 8009b58 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8009b46: 6b3b ldr r3, [r7, #48] @ 0x30 8009b48: 68db ldr r3, [r3, #12] 8009b4a: f423 3240 bic.w r2, r3, #196608 @ 0x30000 8009b4e: 68bb ldr r3, [r7, #8] 8009b50: 695b ldr r3, [r3, #20] 8009b52: 431a orrs r2, r3 8009b54: 6b3b ldr r3, [r7, #48] @ 0x30 8009b56: 60da str r2, [r3, #12] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET) 8009b58: 68bb ldr r3, [r7, #8] 8009b5a: 681b ldr r3, [r3, #0] 8009b5c: f003 0320 and.w r3, r3, #32 8009b60: 2b00 cmp r3, #0 8009b62: d008 beq.n 8009b76 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); 8009b64: 6b3b ldr r3, [r7, #48] @ 0x30 8009b66: 68db ldr r3, [r3, #12] 8009b68: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000 8009b6c: 68bb ldr r3, [r7, #8] 8009b6e: 691b ldr r3, [r3, #16] 8009b70: 431a orrs r2, r3 8009b72: 6b3b ldr r3, [r7, #48] @ 0x30 8009b74: 60da str r2, [r3, #12] } } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8009b76: 68bb ldr r3, [r7, #8] 8009b78: 681b ldr r3, [r3, #0] 8009b7a: f003 0304 and.w r3, r3, #4 8009b7e: 2b00 cmp r3, #0 8009b80: d008 beq.n 8009b94 { /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl); 8009b82: 6b3b ldr r3, [r7, #48] @ 0x30 8009b84: 689b ldr r3, [r3, #8] 8009b86: f423 4240 bic.w r2, r3, #49152 @ 0xc000 8009b8a: 68bb ldr r3, [r7, #8] 8009b8c: 6a9b ldr r3, [r3, #40] @ 0x28 8009b8e: 431a orrs r2, r3 8009b90: 6b3b ldr r3, [r7, #48] @ 0x30 8009b92: 609a str r2, [r3, #8] } /* Mark it as First Descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009b94: 6b3b ldr r3, [r7, #48] @ 0x30 8009b96: 68db ldr r3, [r3, #12] 8009b98: f043 5200 orr.w r2, r3, #536870912 @ 0x20000000 8009b9c: 6b3b ldr r3, [r7, #48] @ 0x30 8009b9e: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8009ba0: 6b3b ldr r3, [r7, #48] @ 0x30 8009ba2: 68db ldr r3, [r3, #12] 8009ba4: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8009ba8: 6b3b ldr r3, [r7, #48] @ 0x30 8009baa: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 8009bac: f3bf 8f5f dmb sy } 8009bb0: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* set OWN bit of FIRST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8009bb2: 6b3b ldr r3, [r7, #48] @ 0x30 8009bb4: 68db ldr r3, [r3, #12] 8009bb6: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009bba: 6b3b ldr r3, [r7, #48] @ 0x30 8009bbc: 60da str r2, [r3, #12] /* If source address insertion/replacement is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_SAIC) != (uint32_t)RESET) 8009bbe: 68bb ldr r3, [r7, #8] 8009bc0: 681b ldr r3, [r3, #0] 8009bc2: f003 0302 and.w r3, r3, #2 8009bc6: 2b00 cmp r3, #0 8009bc8: f000 80da beq.w 8009d80 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl); 8009bcc: 6b3b ldr r3, [r7, #48] @ 0x30 8009bce: 68db ldr r3, [r3, #12] 8009bd0: f023 7260 bic.w r2, r3, #58720256 @ 0x3800000 8009bd4: 68bb ldr r3, [r7, #8] 8009bd6: 68db ldr r3, [r3, #12] 8009bd8: 431a orrs r2, r3 8009bda: 6b3b ldr r3, [r7, #48] @ 0x30 8009bdc: 60da str r2, [r3, #12] } /* only if the packet is split into more than one descriptors > 1 */ while (txbuffer->next != NULL) 8009bde: e0cf b.n 8009d80 { /* Clear the LD bit of previous descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8009be0: 6b3b ldr r3, [r7, #48] @ 0x30 8009be2: 68db ldr r3, [r3, #12] 8009be4: f023 5280 bic.w r2, r3, #268435456 @ 0x10000000 8009be8: 6b3b ldr r3, [r7, #48] @ 0x30 8009bea: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009bec: 6bfb ldr r3, [r7, #60] @ 0x3c 8009bee: 3301 adds r3, #1 8009bf0: 63fb str r3, [r7, #60] @ 0x3c 8009bf2: 6bfb ldr r3, [r7, #60] @ 0x3c 8009bf4: 2b03 cmp r3, #3 8009bf6: d902 bls.n 8009bfe 8009bf8: 6bfb ldr r3, [r7, #60] @ 0x3c 8009bfa: 3b04 subs r3, #4 8009bfc: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009bfe: 6a7b ldr r3, [r7, #36] @ 0x24 8009c00: 6bfa ldr r2, [r7, #60] @ 0x3c 8009c02: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009c06: 633b str r3, [r7, #48] @ 0x30 /* Clear the FD bit of new Descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009c08: 6b3b ldr r3, [r7, #48] @ 0x30 8009c0a: 68db ldr r3, [r3, #12] 8009c0c: f023 5200 bic.w r2, r3, #536870912 @ 0x20000000 8009c10: 6b3b ldr r3, [r7, #48] @ 0x30 8009c12: 60da str r2, [r3, #12] /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN) == ETH_DMATXNDESCRF_OWN) 8009c14: 6b3b ldr r3, [r7, #48] @ 0x30 8009c16: 68db ldr r3, [r3, #12] 8009c18: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009c1c: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 8009c20: d007 beq.n 8009c32 || (dmatxdesclist->PacketAddress[descidx] != NULL)) 8009c22: 6a7a ldr r2, [r7, #36] @ 0x24 8009c24: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c26: 3304 adds r3, #4 8009c28: 009b lsls r3, r3, #2 8009c2a: 4413 add r3, r2 8009c2c: 685b ldr r3, [r3, #4] 8009c2e: 2b00 cmp r3, #0 8009c30: d029 beq.n 8009c86 { descidx = firstdescidx; 8009c32: 6a3b ldr r3, [r7, #32] 8009c34: 63fb str r3, [r7, #60] @ 0x3c dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009c36: 6a7b ldr r3, [r7, #36] @ 0x24 8009c38: 6bfa ldr r2, [r7, #60] @ 0x3c 8009c3a: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009c3e: 633b str r3, [r7, #48] @ 0x30 /* clear previous desc own bit */ for (idx = 0; idx < descnbr; idx ++) 8009c40: 2300 movs r3, #0 8009c42: 63bb str r3, [r7, #56] @ 0x38 8009c44: e019 b.n 8009c7a __ASM volatile ("dmb 0xF":::"memory"); 8009c46: f3bf 8f5f dmb sy } 8009c4a: bf00 nop { /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8009c4c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c4e: 68db ldr r3, [r3, #12] 8009c50: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009c54: 6b3b ldr r3, [r7, #48] @ 0x30 8009c56: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009c58: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c5a: 3301 adds r3, #1 8009c5c: 63fb str r3, [r7, #60] @ 0x3c 8009c5e: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c60: 2b03 cmp r3, #3 8009c62: d902 bls.n 8009c6a 8009c64: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c66: 3b04 subs r3, #4 8009c68: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009c6a: 6a7b ldr r3, [r7, #36] @ 0x24 8009c6c: 6bfa ldr r2, [r7, #60] @ 0x3c 8009c6e: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009c72: 633b str r3, [r7, #48] @ 0x30 for (idx = 0; idx < descnbr; idx ++) 8009c74: 6bbb ldr r3, [r7, #56] @ 0x38 8009c76: 3301 adds r3, #1 8009c78: 63bb str r3, [r7, #56] @ 0x38 8009c7a: 6bba ldr r2, [r7, #56] @ 0x38 8009c7c: 6b7b ldr r3, [r7, #52] @ 0x34 8009c7e: 429a cmp r2, r3 8009c80: d3e1 bcc.n 8009c46 } return HAL_ETH_ERROR_BUSY; 8009c82: 2302 movs r3, #2 8009c84: e0bb b.n 8009dfe } descnbr += 1U; 8009c86: 6b7b ldr r3, [r7, #52] @ 0x34 8009c88: 3301 adds r3, #1 8009c8a: 637b str r3, [r7, #52] @ 0x34 /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8009c8c: 6afb ldr r3, [r7, #44] @ 0x2c 8009c8e: 689b ldr r3, [r3, #8] 8009c90: 62fb str r3, [r7, #44] @ 0x2c /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8009c92: 6afb ldr r3, [r7, #44] @ 0x2c 8009c94: 681b ldr r3, [r3, #0] 8009c96: 461a mov r2, r3 8009c98: 6b3b ldr r3, [r7, #48] @ 0x30 8009c9a: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8009c9c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c9e: 689a ldr r2, [r3, #8] 8009ca0: 4b1f ldr r3, [pc, #124] @ (8009d20 ) 8009ca2: 4013 ands r3, r2 8009ca4: 6afa ldr r2, [r7, #44] @ 0x2c 8009ca6: 6852 ldr r2, [r2, #4] 8009ca8: 431a orrs r2, r3 8009caa: 6b3b ldr r3, [r7, #48] @ 0x30 8009cac: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8009cae: 6afb ldr r3, [r7, #44] @ 0x2c 8009cb0: 689b ldr r3, [r3, #8] 8009cb2: 2b00 cmp r3, #0 8009cb4: d012 beq.n 8009cdc { /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8009cb6: 6afb ldr r3, [r7, #44] @ 0x2c 8009cb8: 689b ldr r3, [r3, #8] 8009cba: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8009cbc: 6afb ldr r3, [r7, #44] @ 0x2c 8009cbe: 681b ldr r3, [r3, #0] 8009cc0: 461a mov r2, r3 8009cc2: 6b3b ldr r3, [r7, #48] @ 0x30 8009cc4: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009cc6: 6b3b ldr r3, [r7, #48] @ 0x30 8009cc8: 689a ldr r2, [r3, #8] 8009cca: 4b16 ldr r3, [pc, #88] @ (8009d24 ) 8009ccc: 4013 ands r3, r2 8009cce: 6afa ldr r2, [r7, #44] @ 0x2c 8009cd0: 6852 ldr r2, [r2, #4] 8009cd2: 0412 lsls r2, r2, #16 8009cd4: 431a orrs r2, r3 8009cd6: 6b3b ldr r3, [r7, #48] @ 0x30 8009cd8: 609a str r2, [r3, #8] 8009cda: e008 b.n 8009cee } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009cdc: 6b3b ldr r3, [r7, #48] @ 0x30 8009cde: 2200 movs r2, #0 8009ce0: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8009ce2: 6b3b ldr r3, [r7, #48] @ 0x30 8009ce4: 689a ldr r2, [r3, #8] 8009ce6: 4b0f ldr r3, [pc, #60] @ (8009d24 ) 8009ce8: 4013 ands r3, r2 8009cea: 6b3a ldr r2, [r7, #48] @ 0x30 8009cec: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8009cee: 68bb ldr r3, [r7, #8] 8009cf0: 681b ldr r3, [r3, #0] 8009cf2: f003 0310 and.w r3, r3, #16 8009cf6: 2b00 cmp r3, #0 8009cf8: d018 beq.n 8009d2c { /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8009cfa: 6b3b ldr r3, [r7, #48] @ 0x30 8009cfc: 68da ldr r2, [r3, #12] 8009cfe: 4b0a ldr r3, [pc, #40] @ (8009d28 ) 8009d00: 4013 ands r3, r2 8009d02: 68ba ldr r2, [r7, #8] 8009d04: 69d2 ldr r2, [r2, #28] 8009d06: 431a orrs r2, r3 8009d08: 6b3b ldr r3, [r7, #48] @ 0x30 8009d0a: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8009d0c: 6b3b ldr r3, [r7, #48] @ 0x30 8009d0e: 68db ldr r3, [r3, #12] 8009d10: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009d14: 6b3b ldr r3, [r7, #48] @ 0x30 8009d16: 60da str r2, [r3, #12] 8009d18: e020 b.n 8009d5c 8009d1a: bf00 nop 8009d1c: ffff8000 .word 0xffff8000 8009d20: ffffc000 .word 0xffffc000 8009d24: c000ffff .word 0xc000ffff 8009d28: fffc0000 .word 0xfffc0000 } else { /* Set the packet length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8009d2c: 6b3b ldr r3, [r7, #48] @ 0x30 8009d2e: 68da ldr r2, [r3, #12] 8009d30: 4b36 ldr r3, [pc, #216] @ (8009e0c ) 8009d32: 4013 ands r3, r2 8009d34: 68ba ldr r2, [r7, #8] 8009d36: 6852 ldr r2, [r2, #4] 8009d38: 431a orrs r2, r3 8009d3a: 6b3b ldr r3, [r7, #48] @ 0x30 8009d3c: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8009d3e: 68bb ldr r3, [r7, #8] 8009d40: 681b ldr r3, [r3, #0] 8009d42: f003 0301 and.w r3, r3, #1 8009d46: 2b00 cmp r3, #0 8009d48: d008 beq.n 8009d5c { /* Checksum Insertion Control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8009d4a: 6b3b ldr r3, [r7, #48] @ 0x30 8009d4c: 68db ldr r3, [r3, #12] 8009d4e: f423 3240 bic.w r2, r3, #196608 @ 0x30000 8009d52: 68bb ldr r3, [r7, #8] 8009d54: 695b ldr r3, [r3, #20] 8009d56: 431a orrs r2, r3 8009d58: 6b3b ldr r3, [r7, #48] @ 0x30 8009d5a: 60da str r2, [r3, #12] } } bd_count += 1U; 8009d5c: 6abb ldr r3, [r7, #40] @ 0x28 8009d5e: 3301 adds r3, #1 8009d60: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("dmb 0xF":::"memory"); 8009d62: f3bf 8f5f dmb sy } 8009d66: bf00 nop /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set Own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8009d68: 6b3b ldr r3, [r7, #48] @ 0x30 8009d6a: 68db ldr r3, [r3, #12] 8009d6c: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009d70: 6b3b ldr r3, [r7, #48] @ 0x30 8009d72: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8009d74: 6b3b ldr r3, [r7, #48] @ 0x30 8009d76: 68db ldr r3, [r3, #12] 8009d78: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8009d7c: 6b3b ldr r3, [r7, #48] @ 0x30 8009d7e: 60da str r2, [r3, #12] while (txbuffer->next != NULL) 8009d80: 6afb ldr r3, [r7, #44] @ 0x2c 8009d82: 689b ldr r3, [r3, #8] 8009d84: 2b00 cmp r3, #0 8009d86: f47f af2b bne.w 8009be0 } if (ItMode != ((uint32_t)RESET)) 8009d8a: 687b ldr r3, [r7, #4] 8009d8c: 2b00 cmp r3, #0 8009d8e: d006 beq.n 8009d9e { /* Set Interrupt on completion bit */ SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8009d90: 6b3b ldr r3, [r7, #48] @ 0x30 8009d92: 689b ldr r3, [r3, #8] 8009d94: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009d98: 6b3b ldr r3, [r7, #48] @ 0x30 8009d9a: 609a str r2, [r3, #8] 8009d9c: e005 b.n 8009daa } else { /* Clear Interrupt on completion bit */ CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8009d9e: 6b3b ldr r3, [r7, #48] @ 0x30 8009da0: 689b ldr r3, [r3, #8] 8009da2: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009da6: 6b3b ldr r3, [r7, #48] @ 0x30 8009da8: 609a str r2, [r3, #8] } /* Mark it as LAST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8009daa: 6b3b ldr r3, [r7, #48] @ 0x30 8009dac: 68db ldr r3, [r3, #12] 8009dae: f043 5280 orr.w r2, r3, #268435456 @ 0x10000000 8009db2: 6b3b ldr r3, [r7, #48] @ 0x30 8009db4: 60da str r2, [r3, #12] /* Save the current packet address to expose it to the application */ dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress; 8009db6: 6a7b ldr r3, [r7, #36] @ 0x24 8009db8: 6a5a ldr r2, [r3, #36] @ 0x24 8009dba: 6a79 ldr r1, [r7, #36] @ 0x24 8009dbc: 6bfb ldr r3, [r7, #60] @ 0x3c 8009dbe: 3304 adds r3, #4 8009dc0: 009b lsls r3, r3, #2 8009dc2: 440b add r3, r1 8009dc4: 605a str r2, [r3, #4] dmatxdesclist->CurTxDesc = descidx; 8009dc6: 6a7b ldr r3, [r7, #36] @ 0x24 8009dc8: 6bfa ldr r2, [r7, #60] @ 0x3c 8009dca: 611a str r2, [r3, #16] __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); 8009dcc: f3ef 8310 mrs r3, PRIMASK 8009dd0: 613b str r3, [r7, #16] return(result); 8009dd2: 693b ldr r3, [r7, #16] /* Enter critical section */ primask_bit = __get_PRIMASK(); 8009dd4: 61fb str r3, [r7, #28] 8009dd6: 2301 movs r3, #1 8009dd8: 617b str r3, [r7, #20] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 8009dda: 697b ldr r3, [r7, #20] 8009ddc: f383 8810 msr PRIMASK, r3 } 8009de0: bf00 nop __set_PRIMASK(1); dmatxdesclist->BuffersInUse += bd_count + 1U; 8009de2: 6a7b ldr r3, [r7, #36] @ 0x24 8009de4: 6a9a ldr r2, [r3, #40] @ 0x28 8009de6: 6abb ldr r3, [r7, #40] @ 0x28 8009de8: 4413 add r3, r2 8009dea: 1c5a adds r2, r3, #1 8009dec: 6a7b ldr r3, [r7, #36] @ 0x24 8009dee: 629a str r2, [r3, #40] @ 0x28 8009df0: 69fb ldr r3, [r7, #28] 8009df2: 61bb str r3, [r7, #24] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 8009df4: 69bb ldr r3, [r7, #24] 8009df6: f383 8810 msr PRIMASK, r3 } 8009dfa: bf00 nop /* Exit critical section: restore previous priority mask */ __set_PRIMASK(primask_bit); /* Return function status */ return HAL_ETH_ERROR_NONE; 8009dfc: 2300 movs r3, #0 } 8009dfe: 4618 mov r0, r3 8009e00: 3744 adds r7, #68 @ 0x44 8009e02: 46bd mov sp, r7 8009e04: f85d 7b04 ldr.w r7, [sp], #4 8009e08: 4770 bx lr 8009e0a: bf00 nop 8009e0c: ffff8000 .word 0xffff8000 08009e10 : * @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) { 8009e10: b480 push {r7} 8009e12: b089 sub sp, #36 @ 0x24 8009e14: af00 add r7, sp, #0 8009e16: 6078 str r0, [r7, #4] 8009e18: 6039 str r1, [r7, #0] uint32_t position = 0x00U; 8009e1a: 2300 movs r3, #0 8009e1c: 61fb str r3, [r7, #28] EXTI_Core_TypeDef *EXTI_CurrentCPU; #if defined(DUAL_CORE) && defined(CORE_CM4) EXTI_CurrentCPU = EXTI_D2; /* EXTI for CM4 CPU */ #else EXTI_CurrentCPU = EXTI_D1; /* EXTI for CM7 CPU */ 8009e1e: 4b89 ldr r3, [pc, #548] @ (800a044 ) 8009e20: 617b str r3, [r7, #20] assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Init->Pin)); assert_param(IS_GPIO_MODE(GPIO_Init->Mode)); /* Configure the port pins */ while (((GPIO_Init->Pin) >> position) != 0x00U) 8009e22: e194 b.n 800a14e { /* Get current io position */ iocurrent = (GPIO_Init->Pin) & (1UL << position); 8009e24: 683b ldr r3, [r7, #0] 8009e26: 681a ldr r2, [r3, #0] 8009e28: 2101 movs r1, #1 8009e2a: 69fb ldr r3, [r7, #28] 8009e2c: fa01 f303 lsl.w r3, r1, r3 8009e30: 4013 ands r3, r2 8009e32: 613b str r3, [r7, #16] if (iocurrent != 0x00U) 8009e34: 693b ldr r3, [r7, #16] 8009e36: 2b00 cmp r3, #0 8009e38: f000 8186 beq.w 800a148 { /*--------------------- GPIO Mode Configuration ------------------------*/ /* In case of Output or Alternate function mode selection */ if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) 8009e3c: 683b ldr r3, [r7, #0] 8009e3e: 685b ldr r3, [r3, #4] 8009e40: f003 0303 and.w r3, r3, #3 8009e44: 2b01 cmp r3, #1 8009e46: d005 beq.n 8009e54 8009e48: 683b ldr r3, [r7, #0] 8009e4a: 685b ldr r3, [r3, #4] 8009e4c: f003 0303 and.w r3, r3, #3 8009e50: 2b02 cmp r3, #2 8009e52: d130 bne.n 8009eb6 { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 8009e54: 687b ldr r3, [r7, #4] 8009e56: 689b ldr r3, [r3, #8] 8009e58: 61bb str r3, [r7, #24] temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U)); 8009e5a: 69fb ldr r3, [r7, #28] 8009e5c: 005b lsls r3, r3, #1 8009e5e: 2203 movs r2, #3 8009e60: fa02 f303 lsl.w r3, r2, r3 8009e64: 43db mvns r3, r3 8009e66: 69ba ldr r2, [r7, #24] 8009e68: 4013 ands r3, r2 8009e6a: 61bb str r3, [r7, #24] temp |= (GPIO_Init->Speed << (position * 2U)); 8009e6c: 683b ldr r3, [r7, #0] 8009e6e: 68da ldr r2, [r3, #12] 8009e70: 69fb ldr r3, [r7, #28] 8009e72: 005b lsls r3, r3, #1 8009e74: fa02 f303 lsl.w r3, r2, r3 8009e78: 69ba ldr r2, [r7, #24] 8009e7a: 4313 orrs r3, r2 8009e7c: 61bb str r3, [r7, #24] GPIOx->OSPEEDR = temp; 8009e7e: 687b ldr r3, [r7, #4] 8009e80: 69ba ldr r2, [r7, #24] 8009e82: 609a str r2, [r3, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 8009e84: 687b ldr r3, [r7, #4] 8009e86: 685b ldr r3, [r3, #4] 8009e88: 61bb str r3, [r7, #24] temp &= ~(GPIO_OTYPER_OT0 << position) ; 8009e8a: 2201 movs r2, #1 8009e8c: 69fb ldr r3, [r7, #28] 8009e8e: fa02 f303 lsl.w r3, r2, r3 8009e92: 43db mvns r3, r3 8009e94: 69ba ldr r2, [r7, #24] 8009e96: 4013 ands r3, r2 8009e98: 61bb str r3, [r7, #24] temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 8009e9a: 683b ldr r3, [r7, #0] 8009e9c: 685b ldr r3, [r3, #4] 8009e9e: 091b lsrs r3, r3, #4 8009ea0: f003 0201 and.w r2, r3, #1 8009ea4: 69fb ldr r3, [r7, #28] 8009ea6: fa02 f303 lsl.w r3, r2, r3 8009eaa: 69ba ldr r2, [r7, #24] 8009eac: 4313 orrs r3, r2 8009eae: 61bb str r3, [r7, #24] GPIOx->OTYPER = temp; 8009eb0: 687b ldr r3, [r7, #4] 8009eb2: 69ba ldr r2, [r7, #24] 8009eb4: 605a str r2, [r3, #4] } if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8009eb6: 683b ldr r3, [r7, #0] 8009eb8: 685b ldr r3, [r3, #4] 8009eba: f003 0303 and.w r3, r3, #3 8009ebe: 2b03 cmp r3, #3 8009ec0: d017 beq.n 8009ef2 { /* Check the Pull parameter */ assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); /* Activate the Pull-up or Pull down resistor for the current IO */ temp = GPIOx->PUPDR; 8009ec2: 687b ldr r3, [r7, #4] 8009ec4: 68db ldr r3, [r3, #12] 8009ec6: 61bb str r3, [r7, #24] temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); 8009ec8: 69fb ldr r3, [r7, #28] 8009eca: 005b lsls r3, r3, #1 8009ecc: 2203 movs r2, #3 8009ece: fa02 f303 lsl.w r3, r2, r3 8009ed2: 43db mvns r3, r3 8009ed4: 69ba ldr r2, [r7, #24] 8009ed6: 4013 ands r3, r2 8009ed8: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Pull) << (position * 2U)); 8009eda: 683b ldr r3, [r7, #0] 8009edc: 689a ldr r2, [r3, #8] 8009ede: 69fb ldr r3, [r7, #28] 8009ee0: 005b lsls r3, r3, #1 8009ee2: fa02 f303 lsl.w r3, r2, r3 8009ee6: 69ba ldr r2, [r7, #24] 8009ee8: 4313 orrs r3, r2 8009eea: 61bb str r3, [r7, #24] GPIOx->PUPDR = temp; 8009eec: 687b ldr r3, [r7, #4] 8009eee: 69ba ldr r2, [r7, #24] 8009ef0: 60da str r2, [r3, #12] } /* In case of Alternate function mode selection */ if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 8009ef2: 683b ldr r3, [r7, #0] 8009ef4: 685b ldr r3, [r3, #4] 8009ef6: f003 0303 and.w r3, r3, #3 8009efa: 2b02 cmp r3, #2 8009efc: d123 bne.n 8009f46 /* Check the Alternate function parameters */ assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); assert_param(IS_GPIO_AF(GPIO_Init->Alternate)); /* Configure Alternate function mapped with the current IO */ temp = GPIOx->AFR[position >> 3U]; 8009efe: 69fb ldr r3, [r7, #28] 8009f00: 08da lsrs r2, r3, #3 8009f02: 687b ldr r3, [r7, #4] 8009f04: 3208 adds r2, #8 8009f06: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009f0a: 61bb str r3, [r7, #24] temp &= ~(0xFU << ((position & 0x07U) * 4U)); 8009f0c: 69fb ldr r3, [r7, #28] 8009f0e: f003 0307 and.w r3, r3, #7 8009f12: 009b lsls r3, r3, #2 8009f14: 220f movs r2, #15 8009f16: fa02 f303 lsl.w r3, r2, r3 8009f1a: 43db mvns r3, r3 8009f1c: 69ba ldr r2, [r7, #24] 8009f1e: 4013 ands r3, r2 8009f20: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U)); 8009f22: 683b ldr r3, [r7, #0] 8009f24: 691a ldr r2, [r3, #16] 8009f26: 69fb ldr r3, [r7, #28] 8009f28: f003 0307 and.w r3, r3, #7 8009f2c: 009b lsls r3, r3, #2 8009f2e: fa02 f303 lsl.w r3, r2, r3 8009f32: 69ba ldr r2, [r7, #24] 8009f34: 4313 orrs r3, r2 8009f36: 61bb str r3, [r7, #24] GPIOx->AFR[position >> 3U] = temp; 8009f38: 69fb ldr r3, [r7, #28] 8009f3a: 08da lsrs r2, r3, #3 8009f3c: 687b ldr r3, [r7, #4] 8009f3e: 3208 adds r2, #8 8009f40: 69b9 ldr r1, [r7, #24] 8009f42: f843 1022 str.w r1, [r3, r2, lsl #2] } /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ temp = GPIOx->MODER; 8009f46: 687b ldr r3, [r7, #4] 8009f48: 681b ldr r3, [r3, #0] 8009f4a: 61bb str r3, [r7, #24] temp &= ~(GPIO_MODER_MODE0 << (position * 2U)); 8009f4c: 69fb ldr r3, [r7, #28] 8009f4e: 005b lsls r3, r3, #1 8009f50: 2203 movs r2, #3 8009f52: fa02 f303 lsl.w r3, r2, r3 8009f56: 43db mvns r3, r3 8009f58: 69ba ldr r2, [r7, #24] 8009f5a: 4013 ands r3, r2 8009f5c: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U)); 8009f5e: 683b ldr r3, [r7, #0] 8009f60: 685b ldr r3, [r3, #4] 8009f62: f003 0203 and.w r2, r3, #3 8009f66: 69fb ldr r3, [r7, #28] 8009f68: 005b lsls r3, r3, #1 8009f6a: fa02 f303 lsl.w r3, r2, r3 8009f6e: 69ba ldr r2, [r7, #24] 8009f70: 4313 orrs r3, r2 8009f72: 61bb str r3, [r7, #24] GPIOx->MODER = temp; 8009f74: 687b ldr r3, [r7, #4] 8009f76: 69ba ldr r2, [r7, #24] 8009f78: 601a str r2, [r3, #0] /*--------------------- EXTI Mode Configuration ------------------------*/ /* Configure the External Interrupt or event for the current IO */ if ((GPIO_Init->Mode & EXTI_MODE) != 0x00U) 8009f7a: 683b ldr r3, [r7, #0] 8009f7c: 685b ldr r3, [r3, #4] 8009f7e: f403 3340 and.w r3, r3, #196608 @ 0x30000 8009f82: 2b00 cmp r3, #0 8009f84: f000 80e0 beq.w 800a148 { /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8009f88: 4b2f ldr r3, [pc, #188] @ (800a048 ) 8009f8a: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8009f8e: 4a2e ldr r2, [pc, #184] @ (800a048 ) 8009f90: f043 0302 orr.w r3, r3, #2 8009f94: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8009f98: 4b2b ldr r3, [pc, #172] @ (800a048 ) 8009f9a: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8009f9e: f003 0302 and.w r3, r3, #2 8009fa2: 60fb str r3, [r7, #12] 8009fa4: 68fb ldr r3, [r7, #12] temp = SYSCFG->EXTICR[position >> 2U]; 8009fa6: 4a29 ldr r2, [pc, #164] @ (800a04c ) 8009fa8: 69fb ldr r3, [r7, #28] 8009faa: 089b lsrs r3, r3, #2 8009fac: 3302 adds r3, #2 8009fae: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8009fb2: 61bb str r3, [r7, #24] temp &= ~(0x0FUL << (4U * (position & 0x03U))); 8009fb4: 69fb ldr r3, [r7, #28] 8009fb6: f003 0303 and.w r3, r3, #3 8009fba: 009b lsls r3, r3, #2 8009fbc: 220f movs r2, #15 8009fbe: fa02 f303 lsl.w r3, r2, r3 8009fc2: 43db mvns r3, r3 8009fc4: 69ba ldr r2, [r7, #24] 8009fc6: 4013 ands r3, r2 8009fc8: 61bb str r3, [r7, #24] temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 8009fca: 687b ldr r3, [r7, #4] 8009fcc: 4a20 ldr r2, [pc, #128] @ (800a050 ) 8009fce: 4293 cmp r3, r2 8009fd0: d052 beq.n 800a078 8009fd2: 687b ldr r3, [r7, #4] 8009fd4: 4a1f ldr r2, [pc, #124] @ (800a054 ) 8009fd6: 4293 cmp r3, r2 8009fd8: d031 beq.n 800a03e 8009fda: 687b ldr r3, [r7, #4] 8009fdc: 4a1e ldr r2, [pc, #120] @ (800a058 ) 8009fde: 4293 cmp r3, r2 8009fe0: d02b beq.n 800a03a 8009fe2: 687b ldr r3, [r7, #4] 8009fe4: 4a1d ldr r2, [pc, #116] @ (800a05c ) 8009fe6: 4293 cmp r3, r2 8009fe8: d025 beq.n 800a036 8009fea: 687b ldr r3, [r7, #4] 8009fec: 4a1c ldr r2, [pc, #112] @ (800a060 ) 8009fee: 4293 cmp r3, r2 8009ff0: d01f beq.n 800a032 8009ff2: 687b ldr r3, [r7, #4] 8009ff4: 4a1b ldr r2, [pc, #108] @ (800a064 ) 8009ff6: 4293 cmp r3, r2 8009ff8: d019 beq.n 800a02e 8009ffa: 687b ldr r3, [r7, #4] 8009ffc: 4a1a ldr r2, [pc, #104] @ (800a068 ) 8009ffe: 4293 cmp r3, r2 800a000: d013 beq.n 800a02a 800a002: 687b ldr r3, [r7, #4] 800a004: 4a19 ldr r2, [pc, #100] @ (800a06c ) 800a006: 4293 cmp r3, r2 800a008: d00d beq.n 800a026 800a00a: 687b ldr r3, [r7, #4] 800a00c: 4a18 ldr r2, [pc, #96] @ (800a070 ) 800a00e: 4293 cmp r3, r2 800a010: d007 beq.n 800a022 800a012: 687b ldr r3, [r7, #4] 800a014: 4a17 ldr r2, [pc, #92] @ (800a074 ) 800a016: 4293 cmp r3, r2 800a018: d101 bne.n 800a01e 800a01a: 2309 movs r3, #9 800a01c: e02d b.n 800a07a 800a01e: 230a movs r3, #10 800a020: e02b b.n 800a07a 800a022: 2308 movs r3, #8 800a024: e029 b.n 800a07a 800a026: 2307 movs r3, #7 800a028: e027 b.n 800a07a 800a02a: 2306 movs r3, #6 800a02c: e025 b.n 800a07a 800a02e: 2305 movs r3, #5 800a030: e023 b.n 800a07a 800a032: 2304 movs r3, #4 800a034: e021 b.n 800a07a 800a036: 2303 movs r3, #3 800a038: e01f b.n 800a07a 800a03a: 2302 movs r3, #2 800a03c: e01d b.n 800a07a 800a03e: 2301 movs r3, #1 800a040: e01b b.n 800a07a 800a042: bf00 nop 800a044: 58000080 .word 0x58000080 800a048: 58024400 .word 0x58024400 800a04c: 58000400 .word 0x58000400 800a050: 58020000 .word 0x58020000 800a054: 58020400 .word 0x58020400 800a058: 58020800 .word 0x58020800 800a05c: 58020c00 .word 0x58020c00 800a060: 58021000 .word 0x58021000 800a064: 58021400 .word 0x58021400 800a068: 58021800 .word 0x58021800 800a06c: 58021c00 .word 0x58021c00 800a070: 58022000 .word 0x58022000 800a074: 58022400 .word 0x58022400 800a078: 2300 movs r3, #0 800a07a: 69fa ldr r2, [r7, #28] 800a07c: f002 0203 and.w r2, r2, #3 800a080: 0092 lsls r2, r2, #2 800a082: 4093 lsls r3, r2 800a084: 69ba ldr r2, [r7, #24] 800a086: 4313 orrs r3, r2 800a088: 61bb str r3, [r7, #24] SYSCFG->EXTICR[position >> 2U] = temp; 800a08a: 4938 ldr r1, [pc, #224] @ (800a16c ) 800a08c: 69fb ldr r3, [r7, #28] 800a08e: 089b lsrs r3, r3, #2 800a090: 3302 adds r3, #2 800a092: 69ba ldr r2, [r7, #24] 800a094: f841 2023 str.w r2, [r1, r3, lsl #2] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR1; 800a098: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a09c: 681b ldr r3, [r3, #0] 800a09e: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a0a0: 693b ldr r3, [r7, #16] 800a0a2: 43db mvns r3, r3 800a0a4: 69ba ldr r2, [r7, #24] 800a0a6: 4013 ands r3, r2 800a0a8: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U) 800a0aa: 683b ldr r3, [r7, #0] 800a0ac: 685b ldr r3, [r3, #4] 800a0ae: f403 1380 and.w r3, r3, #1048576 @ 0x100000 800a0b2: 2b00 cmp r3, #0 800a0b4: d003 beq.n 800a0be { temp |= iocurrent; 800a0b6: 69ba ldr r2, [r7, #24] 800a0b8: 693b ldr r3, [r7, #16] 800a0ba: 4313 orrs r3, r2 800a0bc: 61bb str r3, [r7, #24] } EXTI->RTSR1 = temp; 800a0be: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a0c2: 69bb ldr r3, [r7, #24] 800a0c4: 6013 str r3, [r2, #0] temp = EXTI->FTSR1; 800a0c6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a0ca: 685b ldr r3, [r3, #4] 800a0cc: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a0ce: 693b ldr r3, [r7, #16] 800a0d0: 43db mvns r3, r3 800a0d2: 69ba ldr r2, [r7, #24] 800a0d4: 4013 ands r3, r2 800a0d6: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U) 800a0d8: 683b ldr r3, [r7, #0] 800a0da: 685b ldr r3, [r3, #4] 800a0dc: f403 1300 and.w r3, r3, #2097152 @ 0x200000 800a0e0: 2b00 cmp r3, #0 800a0e2: d003 beq.n 800a0ec { temp |= iocurrent; 800a0e4: 69ba ldr r2, [r7, #24] 800a0e6: 693b ldr r3, [r7, #16] 800a0e8: 4313 orrs r3, r2 800a0ea: 61bb str r3, [r7, #24] } EXTI->FTSR1 = temp; 800a0ec: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a0f0: 69bb ldr r3, [r7, #24] 800a0f2: 6053 str r3, [r2, #4] temp = EXTI_CurrentCPU->EMR1; 800a0f4: 697b ldr r3, [r7, #20] 800a0f6: 685b ldr r3, [r3, #4] 800a0f8: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a0fa: 693b ldr r3, [r7, #16] 800a0fc: 43db mvns r3, r3 800a0fe: 69ba ldr r2, [r7, #24] 800a100: 4013 ands r3, r2 800a102: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U) 800a104: 683b ldr r3, [r7, #0] 800a106: 685b ldr r3, [r3, #4] 800a108: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a10c: 2b00 cmp r3, #0 800a10e: d003 beq.n 800a118 { temp |= iocurrent; 800a110: 69ba ldr r2, [r7, #24] 800a112: 693b ldr r3, [r7, #16] 800a114: 4313 orrs r3, r2 800a116: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->EMR1 = temp; 800a118: 697b ldr r3, [r7, #20] 800a11a: 69ba ldr r2, [r7, #24] 800a11c: 605a str r2, [r3, #4] /* Clear EXTI line configuration */ temp = EXTI_CurrentCPU->IMR1; 800a11e: 697b ldr r3, [r7, #20] 800a120: 681b ldr r3, [r3, #0] 800a122: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a124: 693b ldr r3, [r7, #16] 800a126: 43db mvns r3, r3 800a128: 69ba ldr r2, [r7, #24] 800a12a: 4013 ands r3, r2 800a12c: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_IT) != 0x00U) 800a12e: 683b ldr r3, [r7, #0] 800a130: 685b ldr r3, [r3, #4] 800a132: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a136: 2b00 cmp r3, #0 800a138: d003 beq.n 800a142 { temp |= iocurrent; 800a13a: 69ba ldr r2, [r7, #24] 800a13c: 693b ldr r3, [r7, #16] 800a13e: 4313 orrs r3, r2 800a140: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->IMR1 = temp; 800a142: 697b ldr r3, [r7, #20] 800a144: 69ba ldr r2, [r7, #24] 800a146: 601a str r2, [r3, #0] } } position++; 800a148: 69fb ldr r3, [r7, #28] 800a14a: 3301 adds r3, #1 800a14c: 61fb str r3, [r7, #28] while (((GPIO_Init->Pin) >> position) != 0x00U) 800a14e: 683b ldr r3, [r7, #0] 800a150: 681a ldr r2, [r3, #0] 800a152: 69fb ldr r3, [r7, #28] 800a154: fa22 f303 lsr.w r3, r2, r3 800a158: 2b00 cmp r3, #0 800a15a: f47f ae63 bne.w 8009e24 } } 800a15e: bf00 nop 800a160: bf00 nop 800a162: 3724 adds r7, #36 @ 0x24 800a164: 46bd mov sp, r7 800a166: f85d 7b04 ldr.w r7, [sp], #4 800a16a: 4770 bx lr 800a16c: 58000400 .word 0x58000400 0800a170 : * @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) { 800a170: b480 push {r7} 800a172: b085 sub sp, #20 800a174: af00 add r7, sp, #0 800a176: 6078 str r0, [r7, #4] 800a178: 460b mov r3, r1 800a17a: 807b strh r3, [r7, #2] GPIO_PinState bitstatus; /* Check the parameters */ assert_param(IS_GPIO_PIN(GPIO_Pin)); if ((GPIOx->IDR & GPIO_Pin) != 0x00U) 800a17c: 687b ldr r3, [r7, #4] 800a17e: 691a ldr r2, [r3, #16] 800a180: 887b ldrh r3, [r7, #2] 800a182: 4013 ands r3, r2 800a184: 2b00 cmp r3, #0 800a186: d002 beq.n 800a18e { bitstatus = GPIO_PIN_SET; 800a188: 2301 movs r3, #1 800a18a: 73fb strb r3, [r7, #15] 800a18c: e001 b.n 800a192 } else { bitstatus = GPIO_PIN_RESET; 800a18e: 2300 movs r3, #0 800a190: 73fb strb r3, [r7, #15] } return bitstatus; 800a192: 7bfb ldrb r3, [r7, #15] } 800a194: 4618 mov r0, r3 800a196: 3714 adds r7, #20 800a198: 46bd mov sp, r7 800a19a: f85d 7b04 ldr.w r7, [sp], #4 800a19e: 4770 bx lr 0800a1a0 : * @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) { 800a1a0: b480 push {r7} 800a1a2: b083 sub sp, #12 800a1a4: af00 add r7, sp, #0 800a1a6: 6078 str r0, [r7, #4] 800a1a8: 460b mov r3, r1 800a1aa: 807b strh r3, [r7, #2] 800a1ac: 4613 mov r3, r2 800a1ae: 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) 800a1b0: 787b ldrb r3, [r7, #1] 800a1b2: 2b00 cmp r3, #0 800a1b4: d003 beq.n 800a1be { GPIOx->BSRR = GPIO_Pin; 800a1b6: 887a ldrh r2, [r7, #2] 800a1b8: 687b ldr r3, [r7, #4] 800a1ba: 619a str r2, [r3, #24] } else { GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; } } 800a1bc: e003 b.n 800a1c6 GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; 800a1be: 887b ldrh r3, [r7, #2] 800a1c0: 041a lsls r2, r3, #16 800a1c2: 687b ldr r3, [r7, #4] 800a1c4: 619a str r2, [r3, #24] } 800a1c6: bf00 nop 800a1c8: 370c adds r7, #12 800a1ca: 46bd mov sp, r7 800a1cc: f85d 7b04 ldr.w r7, [sp], #4 800a1d0: 4770 bx lr ... 0800a1d4 : * driver. All combination are allowed: wake up only Cortex-M7, wake up * only Cortex-M4 or wake up Cortex-M7 and Cortex-M4. * @retval None. */ void HAL_PWR_ConfigPVD (PWR_PVDTypeDef *sConfigPVD) { 800a1d4: b480 push {r7} 800a1d6: b083 sub sp, #12 800a1d8: af00 add r7, sp, #0 800a1da: 6078 str r0, [r7, #4] /* Check the PVD configuration parameter */ if (sConfigPVD == NULL) 800a1dc: 687b ldr r3, [r7, #4] 800a1de: 2b00 cmp r3, #0 800a1e0: d069 beq.n 800a2b6 /* Check the parameters */ assert_param (IS_PWR_PVD_LEVEL (sConfigPVD->PVDLevel)); assert_param (IS_PWR_PVD_MODE (sConfigPVD->Mode)); /* Set PLS[7:5] bits according to PVDLevel value */ MODIFY_REG (PWR->CR1, PWR_CR1_PLS, sConfigPVD->PVDLevel); 800a1e2: 4b38 ldr r3, [pc, #224] @ (800a2c4 ) 800a1e4: 681b ldr r3, [r3, #0] 800a1e6: f023 02e0 bic.w r2, r3, #224 @ 0xe0 800a1ea: 687b ldr r3, [r7, #4] 800a1ec: 681b ldr r3, [r3, #0] 800a1ee: 4935 ldr r1, [pc, #212] @ (800a2c4 ) 800a1f0: 4313 orrs r3, r2 800a1f2: 600b str r3, [r1, #0] /* Clear previous config */ #if !defined (DUAL_CORE) __HAL_PWR_PVD_EXTI_DISABLE_EVENT (); 800a1f4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a1f8: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a1fc: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a200: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a204: f8c2 3084 str.w r3, [r2, #132] @ 0x84 __HAL_PWR_PVD_EXTI_DISABLE_IT (); 800a208: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a20c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a210: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a214: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a218: f8c2 3080 str.w r3, [r2, #128] @ 0x80 #endif /* !defined (DUAL_CORE) */ __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE (); 800a21c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a220: 681b ldr r3, [r3, #0] 800a222: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a226: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a22a: 6013 str r3, [r2, #0] __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE (); 800a22c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a230: 685b ldr r3, [r3, #4] 800a232: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a236: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a23a: 6053 str r3, [r2, #4] #if !defined (DUAL_CORE) /* Interrupt mode configuration */ if ((sConfigPVD->Mode & PVD_MODE_IT) == PVD_MODE_IT) 800a23c: 687b ldr r3, [r7, #4] 800a23e: 685b ldr r3, [r3, #4] 800a240: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a244: 2b00 cmp r3, #0 800a246: d009 beq.n 800a25c { __HAL_PWR_PVD_EXTI_ENABLE_IT (); 800a248: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a24c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a250: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a254: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a258: f8c2 3080 str.w r3, [r2, #128] @ 0x80 } /* Event mode configuration */ if ((sConfigPVD->Mode & PVD_MODE_EVT) == PVD_MODE_EVT) 800a25c: 687b ldr r3, [r7, #4] 800a25e: 685b ldr r3, [r3, #4] 800a260: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a264: 2b00 cmp r3, #0 800a266: d009 beq.n 800a27c { __HAL_PWR_PVD_EXTI_ENABLE_EVENT (); 800a268: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a26c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a270: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a274: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a278: f8c2 3084 str.w r3, [r2, #132] @ 0x84 } #endif /* !defined (DUAL_CORE) */ /* Rising edge configuration */ if ((sConfigPVD->Mode & PVD_RISING_EDGE) == PVD_RISING_EDGE) 800a27c: 687b ldr r3, [r7, #4] 800a27e: 685b ldr r3, [r3, #4] 800a280: f003 0301 and.w r3, r3, #1 800a284: 2b00 cmp r3, #0 800a286: d007 beq.n 800a298 { __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE (); 800a288: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a28c: 681b ldr r3, [r3, #0] 800a28e: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a292: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a296: 6013 str r3, [r2, #0] } /* Falling edge configuration */ if ((sConfigPVD->Mode & PVD_FALLING_EDGE) == PVD_FALLING_EDGE) 800a298: 687b ldr r3, [r7, #4] 800a29a: 685b ldr r3, [r3, #4] 800a29c: f003 0302 and.w r3, r3, #2 800a2a0: 2b00 cmp r3, #0 800a2a2: d009 beq.n 800a2b8 { __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE (); 800a2a4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a2a8: 685b ldr r3, [r3, #4] 800a2aa: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a2ae: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a2b2: 6053 str r3, [r2, #4] 800a2b4: e000 b.n 800a2b8 return; 800a2b6: bf00 nop } } 800a2b8: 370c adds r7, #12 800a2ba: 46bd mov sp, r7 800a2bc: f85d 7b04 ldr.w r7, [sp], #4 800a2c0: 4770 bx lr 800a2c2: bf00 nop 800a2c4: 58024800 .word 0x58024800 0800a2c8 : /** * @brief Enable the Programmable Voltage Detector (PVD). * @retval None. */ void HAL_PWR_EnablePVD (void) { 800a2c8: b480 push {r7} 800a2ca: af00 add r7, sp, #0 /* Enable the power voltage detector */ SET_BIT (PWR->CR1, PWR_CR1_PVDEN); 800a2cc: 4b05 ldr r3, [pc, #20] @ (800a2e4 ) 800a2ce: 681b ldr r3, [r3, #0] 800a2d0: 4a04 ldr r2, [pc, #16] @ (800a2e4 ) 800a2d2: f043 0310 orr.w r3, r3, #16 800a2d6: 6013 str r3, [r2, #0] } 800a2d8: bf00 nop 800a2da: 46bd mov sp, r7 800a2dc: f85d 7b04 ldr.w r7, [sp], #4 800a2e0: 4770 bx lr 800a2e2: bf00 nop 800a2e4: 58024800 .word 0x58024800 0800a2e8 : * PWR_SMPS_2V5_SUPPLIES_EXT are used only for lines that supports SMPS * regulator. * @retval HAL status. */ HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource) { 800a2e8: b580 push {r7, lr} 800a2ea: b084 sub sp, #16 800a2ec: af00 add r7, sp, #0 800a2ee: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param (IS_PWR_SUPPLY (SupplySource)); /* Check if supply source was configured */ #if defined (PWR_FLAG_SCUEN) if (__HAL_PWR_GET_FLAG (PWR_FLAG_SCUEN) == 0U) 800a2f0: 4b19 ldr r3, [pc, #100] @ (800a358 ) 800a2f2: 68db ldr r3, [r3, #12] 800a2f4: f003 0304 and.w r3, r3, #4 800a2f8: 2b04 cmp r3, #4 800a2fa: d00a beq.n 800a312 #else if ((PWR->CR3 & (PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)) != (PWR_CR3_SMPSEN | PWR_CR3_LDOEN)) #endif /* defined (PWR_FLAG_SCUEN) */ { /* Check supply configuration */ if ((PWR->CR3 & PWR_SUPPLY_CONFIG_MASK) != SupplySource) 800a2fc: 4b16 ldr r3, [pc, #88] @ (800a358 ) 800a2fe: 68db ldr r3, [r3, #12] 800a300: f003 0307 and.w r3, r3, #7 800a304: 687a ldr r2, [r7, #4] 800a306: 429a cmp r2, r3 800a308: d001 beq.n 800a30e { /* Supply configuration update locked, can't apply a new supply config */ return HAL_ERROR; 800a30a: 2301 movs r3, #1 800a30c: e01f b.n 800a34e else { /* Supply configuration update locked, but new supply configuration matches with old supply configuration : nothing to do */ return HAL_OK; 800a30e: 2300 movs r3, #0 800a310: e01d b.n 800a34e } } /* Set the power supply configuration */ MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource); 800a312: 4b11 ldr r3, [pc, #68] @ (800a358 ) 800a314: 68db ldr r3, [r3, #12] 800a316: f023 0207 bic.w r2, r3, #7 800a31a: 490f ldr r1, [pc, #60] @ (800a358 ) 800a31c: 687b ldr r3, [r7, #4] 800a31e: 4313 orrs r3, r2 800a320: 60cb str r3, [r1, #12] /* Get tick */ tickstart = HAL_GetTick (); 800a322: f7fb fa45 bl 80057b0 800a326: 60f8 str r0, [r7, #12] /* Wait till voltage level flag is set */ while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800a328: e009 b.n 800a33e { if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 800a32a: f7fb fa41 bl 80057b0 800a32e: 4602 mov r2, r0 800a330: 68fb ldr r3, [r7, #12] 800a332: 1ad3 subs r3, r2, r3 800a334: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 800a338: d901 bls.n 800a33e { return HAL_ERROR; 800a33a: 2301 movs r3, #1 800a33c: e007 b.n 800a34e while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800a33e: 4b06 ldr r3, [pc, #24] @ (800a358 ) 800a340: 685b ldr r3, [r3, #4] 800a342: f403 5300 and.w r3, r3, #8192 @ 0x2000 800a346: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800a34a: d1ee bne.n 800a32a } } } #endif /* defined (SMPS) */ return HAL_OK; 800a34c: 2300 movs r3, #0 } 800a34e: 4618 mov r0, r3 800a350: 3710 adds r7, #16 800a352: 46bd mov sp, r7 800a354: bd80 pop {r7, pc} 800a356: bf00 nop 800a358: 58024800 .word 0x58024800 0800a35c : * driver. All combination are allowed: wake up only Cortex-M7, wake up * only Cortex-M4 and wake up Cortex-M7 and Cortex-M4. * @retval None. */ void HAL_PWREx_ConfigAVD (PWREx_AVDTypeDef *sConfigAVD) { 800a35c: b480 push {r7} 800a35e: b083 sub sp, #12 800a360: af00 add r7, sp, #0 800a362: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param (IS_PWR_AVD_LEVEL (sConfigAVD->AVDLevel)); assert_param (IS_PWR_AVD_MODE (sConfigAVD->Mode)); /* Set the ALS[18:17] bits according to AVDLevel value */ MODIFY_REG (PWR->CR1, PWR_CR1_ALS, sConfigAVD->AVDLevel); 800a364: 4b37 ldr r3, [pc, #220] @ (800a444 ) 800a366: 681b ldr r3, [r3, #0] 800a368: f423 22c0 bic.w r2, r3, #393216 @ 0x60000 800a36c: 687b ldr r3, [r7, #4] 800a36e: 681b ldr r3, [r3, #0] 800a370: 4934 ldr r1, [pc, #208] @ (800a444 ) 800a372: 4313 orrs r3, r2 800a374: 600b str r3, [r1, #0] /* Clear any previous config */ #if !defined (DUAL_CORE) __HAL_PWR_AVD_EXTI_DISABLE_EVENT (); 800a376: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a37a: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a37e: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a382: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a386: f8c2 3084 str.w r3, [r2, #132] @ 0x84 __HAL_PWR_AVD_EXTI_DISABLE_IT (); 800a38a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a38e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a392: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a396: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a39a: f8c2 3080 str.w r3, [r2, #128] @ 0x80 #endif /* !defined (DUAL_CORE) */ __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE (); 800a39e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3a2: 681b ldr r3, [r3, #0] 800a3a4: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3a8: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a3ac: 6013 str r3, [r2, #0] __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE (); 800a3ae: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3b2: 685b ldr r3, [r3, #4] 800a3b4: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3b8: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a3bc: 6053 str r3, [r2, #4] #if !defined (DUAL_CORE) /* Configure the interrupt mode */ if ((sConfigAVD->Mode & AVD_MODE_IT) == AVD_MODE_IT) 800a3be: 687b ldr r3, [r7, #4] 800a3c0: 685b ldr r3, [r3, #4] 800a3c2: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a3c6: 2b00 cmp r3, #0 800a3c8: d009 beq.n 800a3de { __HAL_PWR_AVD_EXTI_ENABLE_IT (); 800a3ca: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3ce: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a3d2: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3d6: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3da: f8c2 3080 str.w r3, [r2, #128] @ 0x80 } /* Configure the event mode */ if ((sConfigAVD->Mode & AVD_MODE_EVT) == AVD_MODE_EVT) 800a3de: 687b ldr r3, [r7, #4] 800a3e0: 685b ldr r3, [r3, #4] 800a3e2: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a3e6: 2b00 cmp r3, #0 800a3e8: d009 beq.n 800a3fe { __HAL_PWR_AVD_EXTI_ENABLE_EVENT (); 800a3ea: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3ee: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a3f2: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3f6: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3fa: f8c2 3084 str.w r3, [r2, #132] @ 0x84 } #endif /* !defined (DUAL_CORE) */ /* Rising edge configuration */ if ((sConfigAVD->Mode & AVD_RISING_EDGE) == AVD_RISING_EDGE) 800a3fe: 687b ldr r3, [r7, #4] 800a400: 685b ldr r3, [r3, #4] 800a402: f003 0301 and.w r3, r3, #1 800a406: 2b00 cmp r3, #0 800a408: d007 beq.n 800a41a { __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE (); 800a40a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a40e: 681b ldr r3, [r3, #0] 800a410: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a414: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a418: 6013 str r3, [r2, #0] } /* Falling edge configuration */ if ((sConfigAVD->Mode & AVD_FALLING_EDGE) == AVD_FALLING_EDGE) 800a41a: 687b ldr r3, [r7, #4] 800a41c: 685b ldr r3, [r3, #4] 800a41e: f003 0302 and.w r3, r3, #2 800a422: 2b00 cmp r3, #0 800a424: d007 beq.n 800a436 { __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE (); 800a426: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a42a: 685b ldr r3, [r3, #4] 800a42c: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a430: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a434: 6053 str r3, [r2, #4] } } 800a436: bf00 nop 800a438: 370c adds r7, #12 800a43a: 46bd mov sp, r7 800a43c: f85d 7b04 ldr.w r7, [sp], #4 800a440: 4770 bx lr 800a442: bf00 nop 800a444: 58024800 .word 0x58024800 0800a448 : /** * @brief Enable the Analog Voltage Detector (AVD). * @retval None. */ void HAL_PWREx_EnableAVD (void) { 800a448: b480 push {r7} 800a44a: af00 add r7, sp, #0 /* Enable the Analog Voltage Detector */ SET_BIT (PWR->CR1, PWR_CR1_AVDEN); 800a44c: 4b05 ldr r3, [pc, #20] @ (800a464 ) 800a44e: 681b ldr r3, [r3, #0] 800a450: 4a04 ldr r2, [pc, #16] @ (800a464 ) 800a452: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a456: 6013 str r3, [r2, #0] } 800a458: bf00 nop 800a45a: 46bd mov sp, r7 800a45c: f85d 7b04 ldr.w r7, [sp], #4 800a460: 4770 bx lr 800a462: bf00 nop 800a464: 58024800 .word 0x58024800 0800a468 : * supported by this function. User should request a transition to HSE Off * first and then HSE On or HSE Bypass. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) { 800a468: b580 push {r7, lr} 800a46a: b08c sub sp, #48 @ 0x30 800a46c: af00 add r7, sp, #0 800a46e: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t temp1_pllckcfg, temp2_pllckcfg; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 800a470: 687b ldr r3, [r7, #4] 800a472: 2b00 cmp r3, #0 800a474: d102 bne.n 800a47c { return HAL_ERROR; 800a476: 2301 movs r3, #1 800a478: f000 bc48 b.w 800ad0c } /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 800a47c: 687b ldr r3, [r7, #4] 800a47e: 681b ldr r3, [r3, #0] 800a480: f003 0301 and.w r3, r3, #1 800a484: 2b00 cmp r3, #0 800a486: f000 8088 beq.w 800a59a { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 800a48a: 4b99 ldr r3, [pc, #612] @ (800a6f0 ) 800a48c: 691b ldr r3, [r3, #16] 800a48e: f003 0338 and.w r3, r3, #56 @ 0x38 800a492: 62fb str r3, [r7, #44] @ 0x2c const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a494: 4b96 ldr r3, [pc, #600] @ (800a6f0 ) 800a496: 6a9b ldr r3, [r3, #40] @ 0x28 800a498: 62bb str r3, [r7, #40] @ 0x28 /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */ if ((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE))) 800a49a: 6afb ldr r3, [r7, #44] @ 0x2c 800a49c: 2b10 cmp r3, #16 800a49e: d007 beq.n 800a4b0 800a4a0: 6afb ldr r3, [r7, #44] @ 0x2c 800a4a2: 2b18 cmp r3, #24 800a4a4: d111 bne.n 800a4ca 800a4a6: 6abb ldr r3, [r7, #40] @ 0x28 800a4a8: f003 0303 and.w r3, r3, #3 800a4ac: 2b02 cmp r3, #2 800a4ae: d10c bne.n 800a4ca { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800a4b0: 4b8f ldr r3, [pc, #572] @ (800a6f0 ) 800a4b2: 681b ldr r3, [r3, #0] 800a4b4: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a4b8: 2b00 cmp r3, #0 800a4ba: d06d beq.n 800a598 800a4bc: 687b ldr r3, [r7, #4] 800a4be: 685b ldr r3, [r3, #4] 800a4c0: 2b00 cmp r3, #0 800a4c2: d169 bne.n 800a598 { return HAL_ERROR; 800a4c4: 2301 movs r3, #1 800a4c6: f000 bc21 b.w 800ad0c } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 800a4ca: 687b ldr r3, [r7, #4] 800a4cc: 685b ldr r3, [r3, #4] 800a4ce: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800a4d2: d106 bne.n 800a4e2 800a4d4: 4b86 ldr r3, [pc, #536] @ (800a6f0 ) 800a4d6: 681b ldr r3, [r3, #0] 800a4d8: 4a85 ldr r2, [pc, #532] @ (800a6f0 ) 800a4da: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a4de: 6013 str r3, [r2, #0] 800a4e0: e02e b.n 800a540 800a4e2: 687b ldr r3, [r7, #4] 800a4e4: 685b ldr r3, [r3, #4] 800a4e6: 2b00 cmp r3, #0 800a4e8: d10c bne.n 800a504 800a4ea: 4b81 ldr r3, [pc, #516] @ (800a6f0 ) 800a4ec: 681b ldr r3, [r3, #0] 800a4ee: 4a80 ldr r2, [pc, #512] @ (800a6f0 ) 800a4f0: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a4f4: 6013 str r3, [r2, #0] 800a4f6: 4b7e ldr r3, [pc, #504] @ (800a6f0 ) 800a4f8: 681b ldr r3, [r3, #0] 800a4fa: 4a7d ldr r2, [pc, #500] @ (800a6f0 ) 800a4fc: f423 2380 bic.w r3, r3, #262144 @ 0x40000 800a500: 6013 str r3, [r2, #0] 800a502: e01d b.n 800a540 800a504: 687b ldr r3, [r7, #4] 800a506: 685b ldr r3, [r3, #4] 800a508: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800a50c: d10c bne.n 800a528 800a50e: 4b78 ldr r3, [pc, #480] @ (800a6f0 ) 800a510: 681b ldr r3, [r3, #0] 800a512: 4a77 ldr r2, [pc, #476] @ (800a6f0 ) 800a514: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800a518: 6013 str r3, [r2, #0] 800a51a: 4b75 ldr r3, [pc, #468] @ (800a6f0 ) 800a51c: 681b ldr r3, [r3, #0] 800a51e: 4a74 ldr r2, [pc, #464] @ (800a6f0 ) 800a520: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a524: 6013 str r3, [r2, #0] 800a526: e00b b.n 800a540 800a528: 4b71 ldr r3, [pc, #452] @ (800a6f0 ) 800a52a: 681b ldr r3, [r3, #0] 800a52c: 4a70 ldr r2, [pc, #448] @ (800a6f0 ) 800a52e: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a532: 6013 str r3, [r2, #0] 800a534: 4b6e ldr r3, [pc, #440] @ (800a6f0 ) 800a536: 681b ldr r3, [r3, #0] 800a538: 4a6d ldr r2, [pc, #436] @ (800a6f0 ) 800a53a: f423 2380 bic.w r3, r3, #262144 @ 0x40000 800a53e: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 800a540: 687b ldr r3, [r7, #4] 800a542: 685b ldr r3, [r3, #4] 800a544: 2b00 cmp r3, #0 800a546: d013 beq.n 800a570 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a548: f7fb f932 bl 80057b0 800a54c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800a54e: e008 b.n 800a562 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 800a550: f7fb f92e bl 80057b0 800a554: 4602 mov r2, r0 800a556: 6a7b ldr r3, [r7, #36] @ 0x24 800a558: 1ad3 subs r3, r2, r3 800a55a: 2b64 cmp r3, #100 @ 0x64 800a55c: d901 bls.n 800a562 { return HAL_TIMEOUT; 800a55e: 2303 movs r3, #3 800a560: e3d4 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800a562: 4b63 ldr r3, [pc, #396] @ (800a6f0 ) 800a564: 681b ldr r3, [r3, #0] 800a566: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a56a: 2b00 cmp r3, #0 800a56c: d0f0 beq.n 800a550 800a56e: e014 b.n 800a59a } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a570: f7fb f91e bl 80057b0 800a574: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800a576: e008 b.n 800a58a { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 800a578: f7fb f91a bl 80057b0 800a57c: 4602 mov r2, r0 800a57e: 6a7b ldr r3, [r7, #36] @ 0x24 800a580: 1ad3 subs r3, r2, r3 800a582: 2b64 cmp r3, #100 @ 0x64 800a584: d901 bls.n 800a58a { return HAL_TIMEOUT; 800a586: 2303 movs r3, #3 800a588: e3c0 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800a58a: 4b59 ldr r3, [pc, #356] @ (800a6f0 ) 800a58c: 681b ldr r3, [r3, #0] 800a58e: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a592: 2b00 cmp r3, #0 800a594: d1f0 bne.n 800a578 800a596: e000 b.n 800a59a if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800a598: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 800a59a: 687b ldr r3, [r7, #4] 800a59c: 681b ldr r3, [r3, #0] 800a59e: f003 0302 and.w r3, r3, #2 800a5a2: 2b00 cmp r3, #0 800a5a4: f000 80ca beq.w 800a73c /* Check the parameters */ assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); assert_param(IS_RCC_HSICALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); /* When the HSI is used as system clock it will not be disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 800a5a8: 4b51 ldr r3, [pc, #324] @ (800a6f0 ) 800a5aa: 691b ldr r3, [r3, #16] 800a5ac: f003 0338 and.w r3, r3, #56 @ 0x38 800a5b0: 623b str r3, [r7, #32] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a5b2: 4b4f ldr r3, [pc, #316] @ (800a6f0 ) 800a5b4: 6a9b ldr r3, [r3, #40] @ 0x28 800a5b6: 61fb str r3, [r7, #28] if ((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI))) 800a5b8: 6a3b ldr r3, [r7, #32] 800a5ba: 2b00 cmp r3, #0 800a5bc: d007 beq.n 800a5ce 800a5be: 6a3b ldr r3, [r7, #32] 800a5c0: 2b18 cmp r3, #24 800a5c2: d156 bne.n 800a672 800a5c4: 69fb ldr r3, [r7, #28] 800a5c6: f003 0303 and.w r3, r3, #3 800a5ca: 2b00 cmp r3, #0 800a5cc: d151 bne.n 800a672 { /* When HSI is used as system clock it will not be disabled */ if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a5ce: 4b48 ldr r3, [pc, #288] @ (800a6f0 ) 800a5d0: 681b ldr r3, [r3, #0] 800a5d2: f003 0304 and.w r3, r3, #4 800a5d6: 2b00 cmp r3, #0 800a5d8: d005 beq.n 800a5e6 800a5da: 687b ldr r3, [r7, #4] 800a5dc: 68db ldr r3, [r3, #12] 800a5de: 2b00 cmp r3, #0 800a5e0: d101 bne.n 800a5e6 { return HAL_ERROR; 800a5e2: 2301 movs r3, #1 800a5e4: e392 b.n 800ad0c } /* Otherwise, only HSI division and calibration are allowed */ else { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2, HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 800a5e6: 4b42 ldr r3, [pc, #264] @ (800a6f0 ) 800a5e8: 681b ldr r3, [r3, #0] 800a5ea: f023 0219 bic.w r2, r3, #25 800a5ee: 687b ldr r3, [r7, #4] 800a5f0: 68db ldr r3, [r3, #12] 800a5f2: 493f ldr r1, [pc, #252] @ (800a6f0 ) 800a5f4: 4313 orrs r3, r2 800a5f6: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a5f8: f7fb f8da bl 80057b0 800a5fc: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a5fe: e008 b.n 800a612 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a600: f7fb f8d6 bl 80057b0 800a604: 4602 mov r2, r0 800a606: 6a7b ldr r3, [r7, #36] @ 0x24 800a608: 1ad3 subs r3, r2, r3 800a60a: 2b02 cmp r3, #2 800a60c: d901 bls.n 800a612 { return HAL_TIMEOUT; 800a60e: 2303 movs r3, #3 800a610: e37c b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a612: 4b37 ldr r3, [pc, #220] @ (800a6f0 ) 800a614: 681b ldr r3, [r3, #0] 800a616: f003 0304 and.w r3, r3, #4 800a61a: 2b00 cmp r3, #0 800a61c: d0f0 beq.n 800a600 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a61e: f7fb f8f7 bl 8005810 800a622: 4603 mov r3, r0 800a624: f241 0203 movw r2, #4099 @ 0x1003 800a628: 4293 cmp r3, r2 800a62a: d817 bhi.n 800a65c 800a62c: 687b ldr r3, [r7, #4] 800a62e: 691b ldr r3, [r3, #16] 800a630: 2b40 cmp r3, #64 @ 0x40 800a632: d108 bne.n 800a646 800a634: 4b2e ldr r3, [pc, #184] @ (800a6f0 ) 800a636: 685b ldr r3, [r3, #4] 800a638: f423 337c bic.w r3, r3, #258048 @ 0x3f000 800a63c: 4a2c ldr r2, [pc, #176] @ (800a6f0 ) 800a63e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800a642: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a644: e07a b.n 800a73c __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a646: 4b2a ldr r3, [pc, #168] @ (800a6f0 ) 800a648: 685b ldr r3, [r3, #4] 800a64a: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800a64e: 687b ldr r3, [r7, #4] 800a650: 691b ldr r3, [r3, #16] 800a652: 031b lsls r3, r3, #12 800a654: 4926 ldr r1, [pc, #152] @ (800a6f0 ) 800a656: 4313 orrs r3, r2 800a658: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a65a: e06f b.n 800a73c __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a65c: 4b24 ldr r3, [pc, #144] @ (800a6f0 ) 800a65e: 685b ldr r3, [r3, #4] 800a660: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 800a664: 687b ldr r3, [r7, #4] 800a666: 691b ldr r3, [r3, #16] 800a668: 061b lsls r3, r3, #24 800a66a: 4921 ldr r1, [pc, #132] @ (800a6f0 ) 800a66c: 4313 orrs r3, r2 800a66e: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a670: e064 b.n 800a73c } else { /* Check the HSI State */ if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF) 800a672: 687b ldr r3, [r7, #4] 800a674: 68db ldr r3, [r3, #12] 800a676: 2b00 cmp r3, #0 800a678: d047 beq.n 800a70a { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 800a67a: 4b1d ldr r3, [pc, #116] @ (800a6f0 ) 800a67c: 681b ldr r3, [r3, #0] 800a67e: f023 0219 bic.w r2, r3, #25 800a682: 687b ldr r3, [r7, #4] 800a684: 68db ldr r3, [r3, #12] 800a686: 491a ldr r1, [pc, #104] @ (800a6f0 ) 800a688: 4313 orrs r3, r2 800a68a: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a68c: f7fb f890 bl 80057b0 800a690: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a692: e008 b.n 800a6a6 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a694: f7fb f88c bl 80057b0 800a698: 4602 mov r2, r0 800a69a: 6a7b ldr r3, [r7, #36] @ 0x24 800a69c: 1ad3 subs r3, r2, r3 800a69e: 2b02 cmp r3, #2 800a6a0: d901 bls.n 800a6a6 { return HAL_TIMEOUT; 800a6a2: 2303 movs r3, #3 800a6a4: e332 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a6a6: 4b12 ldr r3, [pc, #72] @ (800a6f0 ) 800a6a8: 681b ldr r3, [r3, #0] 800a6aa: f003 0304 and.w r3, r3, #4 800a6ae: 2b00 cmp r3, #0 800a6b0: d0f0 beq.n 800a694 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a6b2: f7fb f8ad bl 8005810 800a6b6: 4603 mov r3, r0 800a6b8: f241 0203 movw r2, #4099 @ 0x1003 800a6bc: 4293 cmp r3, r2 800a6be: d819 bhi.n 800a6f4 800a6c0: 687b ldr r3, [r7, #4] 800a6c2: 691b ldr r3, [r3, #16] 800a6c4: 2b40 cmp r3, #64 @ 0x40 800a6c6: d108 bne.n 800a6da 800a6c8: 4b09 ldr r3, [pc, #36] @ (800a6f0 ) 800a6ca: 685b ldr r3, [r3, #4] 800a6cc: f423 337c bic.w r3, r3, #258048 @ 0x3f000 800a6d0: 4a07 ldr r2, [pc, #28] @ (800a6f0 ) 800a6d2: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800a6d6: 6053 str r3, [r2, #4] 800a6d8: e030 b.n 800a73c 800a6da: 4b05 ldr r3, [pc, #20] @ (800a6f0 ) 800a6dc: 685b ldr r3, [r3, #4] 800a6de: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800a6e2: 687b ldr r3, [r7, #4] 800a6e4: 691b ldr r3, [r3, #16] 800a6e6: 031b lsls r3, r3, #12 800a6e8: 4901 ldr r1, [pc, #4] @ (800a6f0 ) 800a6ea: 4313 orrs r3, r2 800a6ec: 604b str r3, [r1, #4] 800a6ee: e025 b.n 800a73c 800a6f0: 58024400 .word 0x58024400 800a6f4: 4b9a ldr r3, [pc, #616] @ (800a960 ) 800a6f6: 685b ldr r3, [r3, #4] 800a6f8: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 800a6fc: 687b ldr r3, [r7, #4] 800a6fe: 691b ldr r3, [r3, #16] 800a700: 061b lsls r3, r3, #24 800a702: 4997 ldr r1, [pc, #604] @ (800a960 ) 800a704: 4313 orrs r3, r2 800a706: 604b str r3, [r1, #4] 800a708: e018 b.n 800a73c } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 800a70a: 4b95 ldr r3, [pc, #596] @ (800a960 ) 800a70c: 681b ldr r3, [r3, #0] 800a70e: 4a94 ldr r2, [pc, #592] @ (800a960 ) 800a710: f023 0301 bic.w r3, r3, #1 800a714: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a716: f7fb f84b bl 80057b0 800a71a: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 800a71c: e008 b.n 800a730 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a71e: f7fb f847 bl 80057b0 800a722: 4602 mov r2, r0 800a724: 6a7b ldr r3, [r7, #36] @ 0x24 800a726: 1ad3 subs r3, r2, r3 800a728: 2b02 cmp r3, #2 800a72a: d901 bls.n 800a730 { return HAL_TIMEOUT; 800a72c: 2303 movs r3, #3 800a72e: e2ed b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 800a730: 4b8b ldr r3, [pc, #556] @ (800a960 ) 800a732: 681b ldr r3, [r3, #0] 800a734: f003 0304 and.w r3, r3, #4 800a738: 2b00 cmp r3, #0 800a73a: d1f0 bne.n 800a71e } } } } /*----------------------------- CSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) 800a73c: 687b ldr r3, [r7, #4] 800a73e: 681b ldr r3, [r3, #0] 800a740: f003 0310 and.w r3, r3, #16 800a744: 2b00 cmp r3, #0 800a746: f000 80a9 beq.w 800a89c /* Check the parameters */ assert_param(IS_RCC_CSI(RCC_OscInitStruct->CSIState)); assert_param(IS_RCC_CSICALIBRATION_VALUE(RCC_OscInitStruct->CSICalibrationValue)); /* When the CSI is used as system clock it will not disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 800a74a: 4b85 ldr r3, [pc, #532] @ (800a960 ) 800a74c: 691b ldr r3, [r3, #16] 800a74e: f003 0338 and.w r3, r3, #56 @ 0x38 800a752: 61bb str r3, [r7, #24] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a754: 4b82 ldr r3, [pc, #520] @ (800a960 ) 800a756: 6a9b ldr r3, [r3, #40] @ 0x28 800a758: 617b str r3, [r7, #20] if ((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI))) 800a75a: 69bb ldr r3, [r7, #24] 800a75c: 2b08 cmp r3, #8 800a75e: d007 beq.n 800a770 800a760: 69bb ldr r3, [r7, #24] 800a762: 2b18 cmp r3, #24 800a764: d13a bne.n 800a7dc 800a766: 697b ldr r3, [r7, #20] 800a768: f003 0303 and.w r3, r3, #3 800a76c: 2b01 cmp r3, #1 800a76e: d135 bne.n 800a7dc { /* When CSI is used as system clock it will not disabled */ if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a770: 4b7b ldr r3, [pc, #492] @ (800a960 ) 800a772: 681b ldr r3, [r3, #0] 800a774: f403 7380 and.w r3, r3, #256 @ 0x100 800a778: 2b00 cmp r3, #0 800a77a: d005 beq.n 800a788 800a77c: 687b ldr r3, [r7, #4] 800a77e: 69db ldr r3, [r3, #28] 800a780: 2b80 cmp r3, #128 @ 0x80 800a782: d001 beq.n 800a788 { return HAL_ERROR; 800a784: 2301 movs r3, #1 800a786: e2c1 b.n 800ad0c } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a788: f7fb f842 bl 8005810 800a78c: 4603 mov r3, r0 800a78e: f241 0203 movw r2, #4099 @ 0x1003 800a792: 4293 cmp r3, r2 800a794: d817 bhi.n 800a7c6 800a796: 687b ldr r3, [r7, #4] 800a798: 6a1b ldr r3, [r3, #32] 800a79a: 2b20 cmp r3, #32 800a79c: d108 bne.n 800a7b0 800a79e: 4b70 ldr r3, [pc, #448] @ (800a960 ) 800a7a0: 685b ldr r3, [r3, #4] 800a7a2: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800a7a6: 4a6e ldr r2, [pc, #440] @ (800a960 ) 800a7a8: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 800a7ac: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a7ae: e075 b.n 800a89c __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a7b0: 4b6b ldr r3, [pc, #428] @ (800a960 ) 800a7b2: 685b ldr r3, [r3, #4] 800a7b4: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 800a7b8: 687b ldr r3, [r7, #4] 800a7ba: 6a1b ldr r3, [r3, #32] 800a7bc: 069b lsls r3, r3, #26 800a7be: 4968 ldr r1, [pc, #416] @ (800a960 ) 800a7c0: 4313 orrs r3, r2 800a7c2: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a7c4: e06a b.n 800a89c __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a7c6: 4b66 ldr r3, [pc, #408] @ (800a960 ) 800a7c8: 68db ldr r3, [r3, #12] 800a7ca: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 800a7ce: 687b ldr r3, [r7, #4] 800a7d0: 6a1b ldr r3, [r3, #32] 800a7d2: 061b lsls r3, r3, #24 800a7d4: 4962 ldr r1, [pc, #392] @ (800a960 ) 800a7d6: 4313 orrs r3, r2 800a7d8: 60cb str r3, [r1, #12] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a7da: e05f b.n 800a89c } } else { /* Check the CSI State */ if ((RCC_OscInitStruct->CSIState) != RCC_CSI_OFF) 800a7dc: 687b ldr r3, [r7, #4] 800a7de: 69db ldr r3, [r3, #28] 800a7e0: 2b00 cmp r3, #0 800a7e2: d042 beq.n 800a86a { /* Enable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_ENABLE(); 800a7e4: 4b5e ldr r3, [pc, #376] @ (800a960 ) 800a7e6: 681b ldr r3, [r3, #0] 800a7e8: 4a5d ldr r2, [pc, #372] @ (800a960 ) 800a7ea: f043 0380 orr.w r3, r3, #128 @ 0x80 800a7ee: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a7f0: f7fa ffde bl 80057b0 800a7f4: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800a7f6: e008 b.n 800a80a { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 800a7f8: f7fa ffda bl 80057b0 800a7fc: 4602 mov r2, r0 800a7fe: 6a7b ldr r3, [r7, #36] @ 0x24 800a800: 1ad3 subs r3, r2, r3 800a802: 2b02 cmp r3, #2 800a804: d901 bls.n 800a80a { return HAL_TIMEOUT; 800a806: 2303 movs r3, #3 800a808: e280 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800a80a: 4b55 ldr r3, [pc, #340] @ (800a960 ) 800a80c: 681b ldr r3, [r3, #0] 800a80e: f403 7380 and.w r3, r3, #256 @ 0x100 800a812: 2b00 cmp r3, #0 800a814: d0f0 beq.n 800a7f8 } } /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a816: f7fa fffb bl 8005810 800a81a: 4603 mov r3, r0 800a81c: f241 0203 movw r2, #4099 @ 0x1003 800a820: 4293 cmp r3, r2 800a822: d817 bhi.n 800a854 800a824: 687b ldr r3, [r7, #4] 800a826: 6a1b ldr r3, [r3, #32] 800a828: 2b20 cmp r3, #32 800a82a: d108 bne.n 800a83e 800a82c: 4b4c ldr r3, [pc, #304] @ (800a960 ) 800a82e: 685b ldr r3, [r3, #4] 800a830: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800a834: 4a4a ldr r2, [pc, #296] @ (800a960 ) 800a836: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 800a83a: 6053 str r3, [r2, #4] 800a83c: e02e b.n 800a89c 800a83e: 4b48 ldr r3, [pc, #288] @ (800a960 ) 800a840: 685b ldr r3, [r3, #4] 800a842: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 800a846: 687b ldr r3, [r7, #4] 800a848: 6a1b ldr r3, [r3, #32] 800a84a: 069b lsls r3, r3, #26 800a84c: 4944 ldr r1, [pc, #272] @ (800a960 ) 800a84e: 4313 orrs r3, r2 800a850: 604b str r3, [r1, #4] 800a852: e023 b.n 800a89c 800a854: 4b42 ldr r3, [pc, #264] @ (800a960 ) 800a856: 68db ldr r3, [r3, #12] 800a858: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 800a85c: 687b ldr r3, [r7, #4] 800a85e: 6a1b ldr r3, [r3, #32] 800a860: 061b lsls r3, r3, #24 800a862: 493f ldr r1, [pc, #252] @ (800a960 ) 800a864: 4313 orrs r3, r2 800a866: 60cb str r3, [r1, #12] 800a868: e018 b.n 800a89c } else { /* Disable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_DISABLE(); 800a86a: 4b3d ldr r3, [pc, #244] @ (800a960 ) 800a86c: 681b ldr r3, [r3, #0] 800a86e: 4a3c ldr r2, [pc, #240] @ (800a960 ) 800a870: f023 0380 bic.w r3, r3, #128 @ 0x80 800a874: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a876: f7fa ff9b bl 80057b0 800a87a: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 800a87c: e008 b.n 800a890 { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 800a87e: f7fa ff97 bl 80057b0 800a882: 4602 mov r2, r0 800a884: 6a7b ldr r3, [r7, #36] @ 0x24 800a886: 1ad3 subs r3, r2, r3 800a888: 2b02 cmp r3, #2 800a88a: d901 bls.n 800a890 { return HAL_TIMEOUT; 800a88c: 2303 movs r3, #3 800a88e: e23d b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 800a890: 4b33 ldr r3, [pc, #204] @ (800a960 ) 800a892: 681b ldr r3, [r3, #0] 800a894: f403 7380 and.w r3, r3, #256 @ 0x100 800a898: 2b00 cmp r3, #0 800a89a: d1f0 bne.n 800a87e } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 800a89c: 687b ldr r3, [r7, #4] 800a89e: 681b ldr r3, [r3, #0] 800a8a0: f003 0308 and.w r3, r3, #8 800a8a4: 2b00 cmp r3, #0 800a8a6: d036 beq.n 800a916 { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF) 800a8a8: 687b ldr r3, [r7, #4] 800a8aa: 695b ldr r3, [r3, #20] 800a8ac: 2b00 cmp r3, #0 800a8ae: d019 beq.n 800a8e4 { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 800a8b0: 4b2b ldr r3, [pc, #172] @ (800a960 ) 800a8b2: 6f5b ldr r3, [r3, #116] @ 0x74 800a8b4: 4a2a ldr r2, [pc, #168] @ (800a960 ) 800a8b6: f043 0301 orr.w r3, r3, #1 800a8ba: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a8bc: f7fa ff78 bl 80057b0 800a8c0: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 800a8c2: e008 b.n 800a8d6 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 800a8c4: f7fa ff74 bl 80057b0 800a8c8: 4602 mov r2, r0 800a8ca: 6a7b ldr r3, [r7, #36] @ 0x24 800a8cc: 1ad3 subs r3, r2, r3 800a8ce: 2b02 cmp r3, #2 800a8d0: d901 bls.n 800a8d6 { return HAL_TIMEOUT; 800a8d2: 2303 movs r3, #3 800a8d4: e21a b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 800a8d6: 4b22 ldr r3, [pc, #136] @ (800a960 ) 800a8d8: 6f5b ldr r3, [r3, #116] @ 0x74 800a8da: f003 0302 and.w r3, r3, #2 800a8de: 2b00 cmp r3, #0 800a8e0: d0f0 beq.n 800a8c4 800a8e2: e018 b.n 800a916 } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 800a8e4: 4b1e ldr r3, [pc, #120] @ (800a960 ) 800a8e6: 6f5b ldr r3, [r3, #116] @ 0x74 800a8e8: 4a1d ldr r2, [pc, #116] @ (800a960 ) 800a8ea: f023 0301 bic.w r3, r3, #1 800a8ee: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a8f0: f7fa ff5e bl 80057b0 800a8f4: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 800a8f6: e008 b.n 800a90a { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 800a8f8: f7fa ff5a bl 80057b0 800a8fc: 4602 mov r2, r0 800a8fe: 6a7b ldr r3, [r7, #36] @ 0x24 800a900: 1ad3 subs r3, r2, r3 800a902: 2b02 cmp r3, #2 800a904: d901 bls.n 800a90a { return HAL_TIMEOUT; 800a906: 2303 movs r3, #3 800a908: e200 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 800a90a: 4b15 ldr r3, [pc, #84] @ (800a960 ) 800a90c: 6f5b ldr r3, [r3, #116] @ 0x74 800a90e: f003 0302 and.w r3, r3, #2 800a912: 2b00 cmp r3, #0 800a914: d1f0 bne.n 800a8f8 } } } /*------------------------------ HSI48 Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 800a916: 687b ldr r3, [r7, #4] 800a918: 681b ldr r3, [r3, #0] 800a91a: f003 0320 and.w r3, r3, #32 800a91e: 2b00 cmp r3, #0 800a920: d039 beq.n 800a996 { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* Check the HSI48 State */ if ((RCC_OscInitStruct->HSI48State) != RCC_HSI48_OFF) 800a922: 687b ldr r3, [r7, #4] 800a924: 699b ldr r3, [r3, #24] 800a926: 2b00 cmp r3, #0 800a928: d01c beq.n 800a964 { /* Enable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 800a92a: 4b0d ldr r3, [pc, #52] @ (800a960 ) 800a92c: 681b ldr r3, [r3, #0] 800a92e: 4a0c ldr r2, [pc, #48] @ (800a960 ) 800a930: f443 5380 orr.w r3, r3, #4096 @ 0x1000 800a934: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 800a936: f7fa ff3b bl 80057b0 800a93a: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800a93c: e008 b.n 800a950 { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 800a93e: f7fa ff37 bl 80057b0 800a942: 4602 mov r2, r0 800a944: 6a7b ldr r3, [r7, #36] @ 0x24 800a946: 1ad3 subs r3, r2, r3 800a948: 2b02 cmp r3, #2 800a94a: d901 bls.n 800a950 { return HAL_TIMEOUT; 800a94c: 2303 movs r3, #3 800a94e: e1dd b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800a950: 4b03 ldr r3, [pc, #12] @ (800a960 ) 800a952: 681b ldr r3, [r3, #0] 800a954: f403 5300 and.w r3, r3, #8192 @ 0x2000 800a958: 2b00 cmp r3, #0 800a95a: d0f0 beq.n 800a93e 800a95c: e01b b.n 800a996 800a95e: bf00 nop 800a960: 58024400 .word 0x58024400 } } else { /* Disable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 800a964: 4b9b ldr r3, [pc, #620] @ (800abd4 ) 800a966: 681b ldr r3, [r3, #0] 800a968: 4a9a ldr r2, [pc, #616] @ (800abd4 ) 800a96a: f423 5380 bic.w r3, r3, #4096 @ 0x1000 800a96e: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 800a970: f7fa ff1e bl 80057b0 800a974: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800a976: e008 b.n 800a98a { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 800a978: f7fa ff1a bl 80057b0 800a97c: 4602 mov r2, r0 800a97e: 6a7b ldr r3, [r7, #36] @ 0x24 800a980: 1ad3 subs r3, r2, r3 800a982: 2b02 cmp r3, #2 800a984: d901 bls.n 800a98a { return HAL_TIMEOUT; 800a986: 2303 movs r3, #3 800a988: e1c0 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800a98a: 4b92 ldr r3, [pc, #584] @ (800abd4 ) 800a98c: 681b ldr r3, [r3, #0] 800a98e: f403 5300 and.w r3, r3, #8192 @ 0x2000 800a992: 2b00 cmp r3, #0 800a994: d1f0 bne.n 800a978 } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 800a996: 687b ldr r3, [r7, #4] 800a998: 681b ldr r3, [r3, #0] 800a99a: f003 0304 and.w r3, r3, #4 800a99e: 2b00 cmp r3, #0 800a9a0: f000 8081 beq.w 800aaa6 { /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); /* Enable write access to Backup domain */ PWR->CR1 |= PWR_CR1_DBP; 800a9a4: 4b8c ldr r3, [pc, #560] @ (800abd8 ) 800a9a6: 681b ldr r3, [r3, #0] 800a9a8: 4a8b ldr r2, [pc, #556] @ (800abd8 ) 800a9aa: f443 7380 orr.w r3, r3, #256 @ 0x100 800a9ae: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800a9b0: f7fa fefe bl 80057b0 800a9b4: 6278 str r0, [r7, #36] @ 0x24 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800a9b6: e008 b.n 800a9ca { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800a9b8: f7fa fefa bl 80057b0 800a9bc: 4602 mov r2, r0 800a9be: 6a7b ldr r3, [r7, #36] @ 0x24 800a9c0: 1ad3 subs r3, r2, r3 800a9c2: 2b64 cmp r3, #100 @ 0x64 800a9c4: d901 bls.n 800a9ca { return HAL_TIMEOUT; 800a9c6: 2303 movs r3, #3 800a9c8: e1a0 b.n 800ad0c while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800a9ca: 4b83 ldr r3, [pc, #524] @ (800abd8 ) 800a9cc: 681b ldr r3, [r3, #0] 800a9ce: f403 7380 and.w r3, r3, #256 @ 0x100 800a9d2: 2b00 cmp r3, #0 800a9d4: d0f0 beq.n 800a9b8 } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 800a9d6: 687b ldr r3, [r7, #4] 800a9d8: 689b ldr r3, [r3, #8] 800a9da: 2b01 cmp r3, #1 800a9dc: d106 bne.n 800a9ec 800a9de: 4b7d ldr r3, [pc, #500] @ (800abd4 ) 800a9e0: 6f1b ldr r3, [r3, #112] @ 0x70 800a9e2: 4a7c ldr r2, [pc, #496] @ (800abd4 ) 800a9e4: f043 0301 orr.w r3, r3, #1 800a9e8: 6713 str r3, [r2, #112] @ 0x70 800a9ea: e02d b.n 800aa48 800a9ec: 687b ldr r3, [r7, #4] 800a9ee: 689b ldr r3, [r3, #8] 800a9f0: 2b00 cmp r3, #0 800a9f2: d10c bne.n 800aa0e 800a9f4: 4b77 ldr r3, [pc, #476] @ (800abd4 ) 800a9f6: 6f1b ldr r3, [r3, #112] @ 0x70 800a9f8: 4a76 ldr r2, [pc, #472] @ (800abd4 ) 800a9fa: f023 0301 bic.w r3, r3, #1 800a9fe: 6713 str r3, [r2, #112] @ 0x70 800aa00: 4b74 ldr r3, [pc, #464] @ (800abd4 ) 800aa02: 6f1b ldr r3, [r3, #112] @ 0x70 800aa04: 4a73 ldr r2, [pc, #460] @ (800abd4 ) 800aa06: f023 0304 bic.w r3, r3, #4 800aa0a: 6713 str r3, [r2, #112] @ 0x70 800aa0c: e01c b.n 800aa48 800aa0e: 687b ldr r3, [r7, #4] 800aa10: 689b ldr r3, [r3, #8] 800aa12: 2b05 cmp r3, #5 800aa14: d10c bne.n 800aa30 800aa16: 4b6f ldr r3, [pc, #444] @ (800abd4 ) 800aa18: 6f1b ldr r3, [r3, #112] @ 0x70 800aa1a: 4a6e ldr r2, [pc, #440] @ (800abd4 ) 800aa1c: f043 0304 orr.w r3, r3, #4 800aa20: 6713 str r3, [r2, #112] @ 0x70 800aa22: 4b6c ldr r3, [pc, #432] @ (800abd4 ) 800aa24: 6f1b ldr r3, [r3, #112] @ 0x70 800aa26: 4a6b ldr r2, [pc, #428] @ (800abd4 ) 800aa28: f043 0301 orr.w r3, r3, #1 800aa2c: 6713 str r3, [r2, #112] @ 0x70 800aa2e: e00b b.n 800aa48 800aa30: 4b68 ldr r3, [pc, #416] @ (800abd4 ) 800aa32: 6f1b ldr r3, [r3, #112] @ 0x70 800aa34: 4a67 ldr r2, [pc, #412] @ (800abd4 ) 800aa36: f023 0301 bic.w r3, r3, #1 800aa3a: 6713 str r3, [r2, #112] @ 0x70 800aa3c: 4b65 ldr r3, [pc, #404] @ (800abd4 ) 800aa3e: 6f1b ldr r3, [r3, #112] @ 0x70 800aa40: 4a64 ldr r2, [pc, #400] @ (800abd4 ) 800aa42: f023 0304 bic.w r3, r3, #4 800aa46: 6713 str r3, [r2, #112] @ 0x70 /* Check the LSE State */ if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) 800aa48: 687b ldr r3, [r7, #4] 800aa4a: 689b ldr r3, [r3, #8] 800aa4c: 2b00 cmp r3, #0 800aa4e: d015 beq.n 800aa7c { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aa50: f7fa feae bl 80057b0 800aa54: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800aa56: e00a b.n 800aa6e { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800aa58: f7fa feaa bl 80057b0 800aa5c: 4602 mov r2, r0 800aa5e: 6a7b ldr r3, [r7, #36] @ 0x24 800aa60: 1ad3 subs r3, r2, r3 800aa62: f241 3288 movw r2, #5000 @ 0x1388 800aa66: 4293 cmp r3, r2 800aa68: d901 bls.n 800aa6e { return HAL_TIMEOUT; 800aa6a: 2303 movs r3, #3 800aa6c: e14e b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800aa6e: 4b59 ldr r3, [pc, #356] @ (800abd4 ) 800aa70: 6f1b ldr r3, [r3, #112] @ 0x70 800aa72: f003 0302 and.w r3, r3, #2 800aa76: 2b00 cmp r3, #0 800aa78: d0ee beq.n 800aa58 800aa7a: e014 b.n 800aaa6 } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aa7c: f7fa fe98 bl 80057b0 800aa80: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800aa82: e00a b.n 800aa9a { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800aa84: f7fa fe94 bl 80057b0 800aa88: 4602 mov r2, r0 800aa8a: 6a7b ldr r3, [r7, #36] @ 0x24 800aa8c: 1ad3 subs r3, r2, r3 800aa8e: f241 3288 movw r2, #5000 @ 0x1388 800aa92: 4293 cmp r3, r2 800aa94: d901 bls.n 800aa9a { return HAL_TIMEOUT; 800aa96: 2303 movs r3, #3 800aa98: e138 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800aa9a: 4b4e ldr r3, [pc, #312] @ (800abd4 ) 800aa9c: 6f1b ldr r3, [r3, #112] @ 0x70 800aa9e: f003 0302 and.w r3, r3, #2 800aaa2: 2b00 cmp r3, #0 800aaa4: d1ee bne.n 800aa84 } } /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 800aaa6: 687b ldr r3, [r7, #4] 800aaa8: 6a5b ldr r3, [r3, #36] @ 0x24 800aaaa: 2b00 cmp r3, #0 800aaac: f000 812d beq.w 800ad0a { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1) 800aab0: 4b48 ldr r3, [pc, #288] @ (800abd4 ) 800aab2: 691b ldr r3, [r3, #16] 800aab4: f003 0338 and.w r3, r3, #56 @ 0x38 800aab8: 2b18 cmp r3, #24 800aaba: f000 80bd beq.w 800ac38 { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 800aabe: 687b ldr r3, [r7, #4] 800aac0: 6a5b ldr r3, [r3, #36] @ 0x24 800aac2: 2b02 cmp r3, #2 800aac4: f040 809e bne.w 800ac04 assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR)); assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800aac8: 4b42 ldr r3, [pc, #264] @ (800abd4 ) 800aaca: 681b ldr r3, [r3, #0] 800aacc: 4a41 ldr r2, [pc, #260] @ (800abd4 ) 800aace: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800aad2: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aad4: f7fa fe6c bl 80057b0 800aad8: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800aada: e008 b.n 800aaee { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800aadc: f7fa fe68 bl 80057b0 800aae0: 4602 mov r2, r0 800aae2: 6a7b ldr r3, [r7, #36] @ 0x24 800aae4: 1ad3 subs r3, r2, r3 800aae6: 2b02 cmp r3, #2 800aae8: d901 bls.n 800aaee { return HAL_TIMEOUT; 800aaea: 2303 movs r3, #3 800aaec: e10e b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800aaee: 4b39 ldr r3, [pc, #228] @ (800abd4 ) 800aaf0: 681b ldr r3, [r3, #0] 800aaf2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800aaf6: 2b00 cmp r3, #0 800aaf8: d1f0 bne.n 800aadc } } /* Configure the main PLL clock source, multiplication and division factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 800aafa: 4b36 ldr r3, [pc, #216] @ (800abd4 ) 800aafc: 6a9a ldr r2, [r3, #40] @ 0x28 800aafe: 4b37 ldr r3, [pc, #220] @ (800abdc ) 800ab00: 4013 ands r3, r2 800ab02: 687a ldr r2, [r7, #4] 800ab04: 6a91 ldr r1, [r2, #40] @ 0x28 800ab06: 687a ldr r2, [r7, #4] 800ab08: 6ad2 ldr r2, [r2, #44] @ 0x2c 800ab0a: 0112 lsls r2, r2, #4 800ab0c: 430a orrs r2, r1 800ab0e: 4931 ldr r1, [pc, #196] @ (800abd4 ) 800ab10: 4313 orrs r3, r2 800ab12: 628b str r3, [r1, #40] @ 0x28 800ab14: 687b ldr r3, [r7, #4] 800ab16: 6b1b ldr r3, [r3, #48] @ 0x30 800ab18: 3b01 subs r3, #1 800ab1a: f3c3 0208 ubfx r2, r3, #0, #9 800ab1e: 687b ldr r3, [r7, #4] 800ab20: 6b5b ldr r3, [r3, #52] @ 0x34 800ab22: 3b01 subs r3, #1 800ab24: 025b lsls r3, r3, #9 800ab26: b29b uxth r3, r3 800ab28: 431a orrs r2, r3 800ab2a: 687b ldr r3, [r7, #4] 800ab2c: 6b9b ldr r3, [r3, #56] @ 0x38 800ab2e: 3b01 subs r3, #1 800ab30: 041b lsls r3, r3, #16 800ab32: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800ab36: 431a orrs r2, r3 800ab38: 687b ldr r3, [r7, #4] 800ab3a: 6bdb ldr r3, [r3, #60] @ 0x3c 800ab3c: 3b01 subs r3, #1 800ab3e: 061b lsls r3, r3, #24 800ab40: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800ab44: 4923 ldr r1, [pc, #140] @ (800abd4 ) 800ab46: 4313 orrs r3, r2 800ab48: 630b str r3, [r1, #48] @ 0x30 RCC_OscInitStruct->PLL.PLLP, RCC_OscInitStruct->PLL.PLLQ, RCC_OscInitStruct->PLL.PLLR); /* Disable PLLFRACN . */ __HAL_RCC_PLLFRACN_DISABLE(); 800ab4a: 4b22 ldr r3, [pc, #136] @ (800abd4 ) 800ab4c: 6adb ldr r3, [r3, #44] @ 0x2c 800ab4e: 4a21 ldr r2, [pc, #132] @ (800abd4 ) 800ab50: f023 0301 bic.w r3, r3, #1 800ab54: 62d3 str r3, [r2, #44] @ 0x2c /* Configure PLL PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800ab56: 4b1f ldr r3, [pc, #124] @ (800abd4 ) 800ab58: 6b5a ldr r2, [r3, #52] @ 0x34 800ab5a: 4b21 ldr r3, [pc, #132] @ (800abe0 ) 800ab5c: 4013 ands r3, r2 800ab5e: 687a ldr r2, [r7, #4] 800ab60: 6c92 ldr r2, [r2, #72] @ 0x48 800ab62: 00d2 lsls r2, r2, #3 800ab64: 491b ldr r1, [pc, #108] @ (800abd4 ) 800ab66: 4313 orrs r3, r2 800ab68: 634b str r3, [r1, #52] @ 0x34 /* Select PLL1 input reference frequency range: VCI */ __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ; 800ab6a: 4b1a ldr r3, [pc, #104] @ (800abd4 ) 800ab6c: 6adb ldr r3, [r3, #44] @ 0x2c 800ab6e: f023 020c bic.w r2, r3, #12 800ab72: 687b ldr r3, [r7, #4] 800ab74: 6c1b ldr r3, [r3, #64] @ 0x40 800ab76: 4917 ldr r1, [pc, #92] @ (800abd4 ) 800ab78: 4313 orrs r3, r2 800ab7a: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL1 output frequency range : VCO */ __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ; 800ab7c: 4b15 ldr r3, [pc, #84] @ (800abd4 ) 800ab7e: 6adb ldr r3, [r3, #44] @ 0x2c 800ab80: f023 0202 bic.w r2, r3, #2 800ab84: 687b ldr r3, [r7, #4] 800ab86: 6c5b ldr r3, [r3, #68] @ 0x44 800ab88: 4912 ldr r1, [pc, #72] @ (800abd4 ) 800ab8a: 4313 orrs r3, r2 800ab8c: 62cb str r3, [r1, #44] @ 0x2c /* Enable PLL System Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP); 800ab8e: 4b11 ldr r3, [pc, #68] @ (800abd4 ) 800ab90: 6adb ldr r3, [r3, #44] @ 0x2c 800ab92: 4a10 ldr r2, [pc, #64] @ (800abd4 ) 800ab94: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800ab98: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1Q Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800ab9a: 4b0e ldr r3, [pc, #56] @ (800abd4 ) 800ab9c: 6adb ldr r3, [r3, #44] @ 0x2c 800ab9e: 4a0d ldr r2, [pc, #52] @ (800abd4 ) 800aba0: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800aba4: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1R Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR); 800aba6: 4b0b ldr r3, [pc, #44] @ (800abd4 ) 800aba8: 6adb ldr r3, [r3, #44] @ 0x2c 800abaa: 4a0a ldr r2, [pc, #40] @ (800abd4 ) 800abac: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800abb0: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1FRACN . */ __HAL_RCC_PLLFRACN_ENABLE(); 800abb2: 4b08 ldr r3, [pc, #32] @ (800abd4 ) 800abb4: 6adb ldr r3, [r3, #44] @ 0x2c 800abb6: 4a07 ldr r2, [pc, #28] @ (800abd4 ) 800abb8: f043 0301 orr.w r3, r3, #1 800abbc: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 800abbe: 4b05 ldr r3, [pc, #20] @ (800abd4 ) 800abc0: 681b ldr r3, [r3, #0] 800abc2: 4a04 ldr r2, [pc, #16] @ (800abd4 ) 800abc4: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800abc8: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800abca: f7fa fdf1 bl 80057b0 800abce: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800abd0: e011 b.n 800abf6 800abd2: bf00 nop 800abd4: 58024400 .word 0x58024400 800abd8: 58024800 .word 0x58024800 800abdc: fffffc0c .word 0xfffffc0c 800abe0: ffff0007 .word 0xffff0007 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800abe4: f7fa fde4 bl 80057b0 800abe8: 4602 mov r2, r0 800abea: 6a7b ldr r3, [r7, #36] @ 0x24 800abec: 1ad3 subs r3, r2, r3 800abee: 2b02 cmp r3, #2 800abf0: d901 bls.n 800abf6 { return HAL_TIMEOUT; 800abf2: 2303 movs r3, #3 800abf4: e08a b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800abf6: 4b47 ldr r3, [pc, #284] @ (800ad14 ) 800abf8: 681b ldr r3, [r3, #0] 800abfa: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800abfe: 2b00 cmp r3, #0 800ac00: d0f0 beq.n 800abe4 800ac02: e082 b.n 800ad0a } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800ac04: 4b43 ldr r3, [pc, #268] @ (800ad14 ) 800ac06: 681b ldr r3, [r3, #0] 800ac08: 4a42 ldr r2, [pc, #264] @ (800ad14 ) 800ac0a: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800ac0e: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ac10: f7fa fdce bl 80057b0 800ac14: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ac16: e008 b.n 800ac2a { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800ac18: f7fa fdca bl 80057b0 800ac1c: 4602 mov r2, r0 800ac1e: 6a7b ldr r3, [r7, #36] @ 0x24 800ac20: 1ad3 subs r3, r2, r3 800ac22: 2b02 cmp r3, #2 800ac24: d901 bls.n 800ac2a { return HAL_TIMEOUT; 800ac26: 2303 movs r3, #3 800ac28: e070 b.n 800ad0c while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ac2a: 4b3a ldr r3, [pc, #232] @ (800ad14 ) 800ac2c: 681b ldr r3, [r3, #0] 800ac2e: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800ac32: 2b00 cmp r3, #0 800ac34: d1f0 bne.n 800ac18 800ac36: e068 b.n 800ad0a } } else { /* Do not return HAL_ERROR if request repeats the current configuration */ temp1_pllckcfg = RCC->PLLCKSELR; 800ac38: 4b36 ldr r3, [pc, #216] @ (800ad14 ) 800ac3a: 6a9b ldr r3, [r3, #40] @ 0x28 800ac3c: 613b str r3, [r7, #16] temp2_pllckcfg = RCC->PLL1DIVR; 800ac3e: 4b35 ldr r3, [pc, #212] @ (800ad14 ) 800ac40: 6b1b ldr r3, [r3, #48] @ 0x30 800ac42: 60fb str r3, [r7, #12] if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800ac44: 687b ldr r3, [r7, #4] 800ac46: 6a5b ldr r3, [r3, #36] @ 0x24 800ac48: 2b01 cmp r3, #1 800ac4a: d031 beq.n 800acb0 (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800ac4c: 693b ldr r3, [r7, #16] 800ac4e: f003 0203 and.w r2, r3, #3 800ac52: 687b ldr r3, [r7, #4] 800ac54: 6a9b ldr r3, [r3, #40] @ 0x28 if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800ac56: 429a cmp r2, r3 800ac58: d12a bne.n 800acb0 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800ac5a: 693b ldr r3, [r7, #16] 800ac5c: 091b lsrs r3, r3, #4 800ac5e: f003 023f and.w r2, r3, #63 @ 0x3f 800ac62: 687b ldr r3, [r7, #4] 800ac64: 6adb ldr r3, [r3, #44] @ 0x2c (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800ac66: 429a cmp r2, r3 800ac68: d122 bne.n 800acb0 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800ac6a: 68fb ldr r3, [r7, #12] 800ac6c: f3c3 0208 ubfx r2, r3, #0, #9 800ac70: 687b ldr r3, [r7, #4] 800ac72: 6b1b ldr r3, [r3, #48] @ 0x30 800ac74: 3b01 subs r3, #1 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800ac76: 429a cmp r2, r3 800ac78: d11a bne.n 800acb0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800ac7a: 68fb ldr r3, [r7, #12] 800ac7c: 0a5b lsrs r3, r3, #9 800ac7e: f003 027f and.w r2, r3, #127 @ 0x7f 800ac82: 687b ldr r3, [r7, #4] 800ac84: 6b5b ldr r3, [r3, #52] @ 0x34 800ac86: 3b01 subs r3, #1 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800ac88: 429a cmp r2, r3 800ac8a: d111 bne.n 800acb0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800ac8c: 68fb ldr r3, [r7, #12] 800ac8e: 0c1b lsrs r3, r3, #16 800ac90: f003 027f and.w r2, r3, #127 @ 0x7f 800ac94: 687b ldr r3, [r7, #4] 800ac96: 6b9b ldr r3, [r3, #56] @ 0x38 800ac98: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800ac9a: 429a cmp r2, r3 800ac9c: d108 bne.n 800acb0 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U))) 800ac9e: 68fb ldr r3, [r7, #12] 800aca0: 0e1b lsrs r3, r3, #24 800aca2: f003 027f and.w r2, r3, #127 @ 0x7f 800aca6: 687b ldr r3, [r7, #4] 800aca8: 6bdb ldr r3, [r3, #60] @ 0x3c 800acaa: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800acac: 429a cmp r2, r3 800acae: d001 beq.n 800acb4 { return HAL_ERROR; 800acb0: 2301 movs r3, #1 800acb2: e02b b.n 800ad0c } else { /* Check if only fractional part needs to be updated */ temp1_pllckcfg = ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> RCC_PLL1FRACR_FRACN1_Pos); 800acb4: 4b17 ldr r3, [pc, #92] @ (800ad14 ) 800acb6: 6b5b ldr r3, [r3, #52] @ 0x34 800acb8: 08db lsrs r3, r3, #3 800acba: f3c3 030c ubfx r3, r3, #0, #13 800acbe: 613b str r3, [r7, #16] if (RCC_OscInitStruct->PLL.PLLFRACN != temp1_pllckcfg) 800acc0: 687b ldr r3, [r7, #4] 800acc2: 6c9b ldr r3, [r3, #72] @ 0x48 800acc4: 693a ldr r2, [r7, #16] 800acc6: 429a cmp r2, r3 800acc8: d01f beq.n 800ad0a { assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable PLL1FRACEN */ __HAL_RCC_PLLFRACN_DISABLE(); 800acca: 4b12 ldr r3, [pc, #72] @ (800ad14 ) 800accc: 6adb ldr r3, [r3, #44] @ 0x2c 800acce: 4a11 ldr r2, [pc, #68] @ (800ad14 ) 800acd0: f023 0301 bic.w r3, r3, #1 800acd4: 62d3 str r3, [r2, #44] @ 0x2c /* Get Start Tick*/ tickstart = HAL_GetTick(); 800acd6: f7fa fd6b bl 80057b0 800acda: 6278 str r0, [r7, #36] @ 0x24 /* Wait at least 2 CK_REF (PLL input source divided by M) period to make sure next latched value will be taken into account. */ while ((HAL_GetTick() - tickstart) < PLL_FRAC_TIMEOUT_VALUE) 800acdc: bf00 nop 800acde: f7fa fd67 bl 80057b0 800ace2: 4602 mov r2, r0 800ace4: 6a7b ldr r3, [r7, #36] @ 0x24 800ace6: 4293 cmp r3, r2 800ace8: d0f9 beq.n 800acde { } /* Configure PLL1 PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800acea: 4b0a ldr r3, [pc, #40] @ (800ad14 ) 800acec: 6b5a ldr r2, [r3, #52] @ 0x34 800acee: 4b0a ldr r3, [pc, #40] @ (800ad18 ) 800acf0: 4013 ands r3, r2 800acf2: 687a ldr r2, [r7, #4] 800acf4: 6c92 ldr r2, [r2, #72] @ 0x48 800acf6: 00d2 lsls r2, r2, #3 800acf8: 4906 ldr r1, [pc, #24] @ (800ad14 ) 800acfa: 4313 orrs r3, r2 800acfc: 634b str r3, [r1, #52] @ 0x34 /* Enable PLL1FRACEN to latch new value. */ __HAL_RCC_PLLFRACN_ENABLE(); 800acfe: 4b05 ldr r3, [pc, #20] @ (800ad14 ) 800ad00: 6adb ldr r3, [r3, #44] @ 0x2c 800ad02: 4a04 ldr r2, [pc, #16] @ (800ad14 ) 800ad04: f043 0301 orr.w r3, r3, #1 800ad08: 62d3 str r3, [r2, #44] @ 0x2c } } } } return HAL_OK; 800ad0a: 2300 movs r3, #0 } 800ad0c: 4618 mov r0, r3 800ad0e: 3730 adds r7, #48 @ 0x30 800ad10: 46bd mov sp, r7 800ad12: bd80 pop {r7, pc} 800ad14: 58024400 .word 0x58024400 800ad18: ffff0007 .word 0xffff0007 0800ad1c : * D1CPRE[3:0] bits to ensure that Domain1 core clock 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) { 800ad1c: b580 push {r7, lr} 800ad1e: b086 sub sp, #24 800ad20: af00 add r7, sp, #0 800ad22: 6078 str r0, [r7, #4] 800ad24: 6039 str r1, [r7, #0] HAL_StatusTypeDef halstatus; uint32_t tickstart; uint32_t common_system_clock; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 800ad26: 687b ldr r3, [r7, #4] 800ad28: 2b00 cmp r3, #0 800ad2a: d101 bne.n 800ad30 { return HAL_ERROR; 800ad2c: 2301 movs r3, #1 800ad2e: e19c b.n 800b06a /* 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()) 800ad30: 4b8a ldr r3, [pc, #552] @ (800af5c ) 800ad32: 681b ldr r3, [r3, #0] 800ad34: f003 030f and.w r3, r3, #15 800ad38: 683a ldr r2, [r7, #0] 800ad3a: 429a cmp r2, r3 800ad3c: d910 bls.n 800ad60 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800ad3e: 4b87 ldr r3, [pc, #540] @ (800af5c ) 800ad40: 681b ldr r3, [r3, #0] 800ad42: f023 020f bic.w r2, r3, #15 800ad46: 4985 ldr r1, [pc, #532] @ (800af5c ) 800ad48: 683b ldr r3, [r7, #0] 800ad4a: 4313 orrs r3, r2 800ad4c: 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) 800ad4e: 4b83 ldr r3, [pc, #524] @ (800af5c ) 800ad50: 681b ldr r3, [r3, #0] 800ad52: f003 030f and.w r3, r3, #15 800ad56: 683a ldr r2, [r7, #0] 800ad58: 429a cmp r2, r3 800ad5a: d001 beq.n 800ad60 { return HAL_ERROR; 800ad5c: 2301 movs r3, #1 800ad5e: e184 b.n 800b06a } /* Increasing the BUS frequency divider */ /*-------------------------- D1PCLK1/CDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800ad60: 687b ldr r3, [r7, #4] 800ad62: 681b ldr r3, [r3, #0] 800ad64: f003 0304 and.w r3, r3, #4 800ad68: 2b00 cmp r3, #0 800ad6a: d010 beq.n 800ad8e { #if defined (RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800ad6c: 687b ldr r3, [r7, #4] 800ad6e: 691a ldr r2, [r3, #16] 800ad70: 4b7b ldr r3, [pc, #492] @ (800af60 ) 800ad72: 699b ldr r3, [r3, #24] 800ad74: f003 0370 and.w r3, r3, #112 @ 0x70 800ad78: 429a cmp r2, r3 800ad7a: d908 bls.n 800ad8e { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800ad7c: 4b78 ldr r3, [pc, #480] @ (800af60 ) 800ad7e: 699b ldr r3, [r3, #24] 800ad80: f023 0270 bic.w r2, r3, #112 @ 0x70 800ad84: 687b ldr r3, [r7, #4] 800ad86: 691b ldr r3, [r3, #16] 800ad88: 4975 ldr r1, [pc, #468] @ (800af60 ) 800ad8a: 4313 orrs r3, r2 800ad8c: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800ad8e: 687b ldr r3, [r7, #4] 800ad90: 681b ldr r3, [r3, #0] 800ad92: f003 0308 and.w r3, r3, #8 800ad96: 2b00 cmp r3, #0 800ad98: d010 beq.n 800adbc { #if defined (RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800ad9a: 687b ldr r3, [r7, #4] 800ad9c: 695a ldr r2, [r3, #20] 800ad9e: 4b70 ldr r3, [pc, #448] @ (800af60 ) 800ada0: 69db ldr r3, [r3, #28] 800ada2: f003 0370 and.w r3, r3, #112 @ 0x70 800ada6: 429a cmp r2, r3 800ada8: d908 bls.n 800adbc { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800adaa: 4b6d ldr r3, [pc, #436] @ (800af60 ) 800adac: 69db ldr r3, [r3, #28] 800adae: f023 0270 bic.w r2, r3, #112 @ 0x70 800adb2: 687b ldr r3, [r7, #4] 800adb4: 695b ldr r3, [r3, #20] 800adb6: 496a ldr r1, [pc, #424] @ (800af60 ) 800adb8: 4313 orrs r3, r2 800adba: 61cb str r3, [r1, #28] MODIFY_REG(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 800adbc: 687b ldr r3, [r7, #4] 800adbe: 681b ldr r3, [r3, #0] 800adc0: f003 0310 and.w r3, r3, #16 800adc4: 2b00 cmp r3, #0 800adc6: d010 beq.n 800adea { #if defined(RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800adc8: 687b ldr r3, [r7, #4] 800adca: 699a ldr r2, [r3, #24] 800adcc: 4b64 ldr r3, [pc, #400] @ (800af60 ) 800adce: 69db ldr r3, [r3, #28] 800add0: f403 63e0 and.w r3, r3, #1792 @ 0x700 800add4: 429a cmp r2, r3 800add6: d908 bls.n 800adea { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800add8: 4b61 ldr r3, [pc, #388] @ (800af60 ) 800adda: 69db ldr r3, [r3, #28] 800addc: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800ade0: 687b ldr r3, [r7, #4] 800ade2: 699b ldr r3, [r3, #24] 800ade4: 495e ldr r1, [pc, #376] @ (800af60 ) 800ade6: 4313 orrs r3, r2 800ade8: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800adea: 687b ldr r3, [r7, #4] 800adec: 681b ldr r3, [r3, #0] 800adee: f003 0320 and.w r3, r3, #32 800adf2: 2b00 cmp r3, #0 800adf4: d010 beq.n 800ae18 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800adf6: 687b ldr r3, [r7, #4] 800adf8: 69da ldr r2, [r3, #28] 800adfa: 4b59 ldr r3, [pc, #356] @ (800af60 ) 800adfc: 6a1b ldr r3, [r3, #32] 800adfe: f003 0370 and.w r3, r3, #112 @ 0x70 800ae02: 429a cmp r2, r3 800ae04: d908 bls.n 800ae18 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800ae06: 4b56 ldr r3, [pc, #344] @ (800af60 ) 800ae08: 6a1b ldr r3, [r3, #32] 800ae0a: f023 0270 bic.w r2, r3, #112 @ 0x70 800ae0e: 687b ldr r3, [r7, #4] 800ae10: 69db ldr r3, [r3, #28] 800ae12: 4953 ldr r1, [pc, #332] @ (800af60 ) 800ae14: 4313 orrs r3, r2 800ae16: 620b str r3, [r1, #32] } #endif } /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800ae18: 687b ldr r3, [r7, #4] 800ae1a: 681b ldr r3, [r3, #0] 800ae1c: f003 0302 and.w r3, r3, #2 800ae20: 2b00 cmp r3, #0 800ae22: d010 beq.n 800ae46 { #if defined (RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800ae24: 687b ldr r3, [r7, #4] 800ae26: 68da ldr r2, [r3, #12] 800ae28: 4b4d ldr r3, [pc, #308] @ (800af60 ) 800ae2a: 699b ldr r3, [r3, #24] 800ae2c: f003 030f and.w r3, r3, #15 800ae30: 429a cmp r2, r3 800ae32: d908 bls.n 800ae46 { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800ae34: 4b4a ldr r3, [pc, #296] @ (800af60 ) 800ae36: 699b ldr r3, [r3, #24] 800ae38: f023 020f bic.w r2, r3, #15 800ae3c: 687b ldr r3, [r7, #4] 800ae3e: 68db ldr r3, [r3, #12] 800ae40: 4947 ldr r1, [pc, #284] @ (800af60 ) 800ae42: 4313 orrs r3, r2 800ae44: 618b str r3, [r1, #24] } #endif } /*------------------------- SYSCLK Configuration -------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 800ae46: 687b ldr r3, [r7, #4] 800ae48: 681b ldr r3, [r3, #0] 800ae4a: f003 0301 and.w r3, r3, #1 800ae4e: 2b00 cmp r3, #0 800ae50: d055 beq.n 800aefe { assert_param(IS_RCC_SYSCLK(RCC_ClkInitStruct->SYSCLKDivider)); assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); #if defined(RCC_D1CFGR_D1CPRE) MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, RCC_ClkInitStruct->SYSCLKDivider); 800ae52: 4b43 ldr r3, [pc, #268] @ (800af60 ) 800ae54: 699b ldr r3, [r3, #24] 800ae56: f423 6270 bic.w r2, r3, #3840 @ 0xf00 800ae5a: 687b ldr r3, [r7, #4] 800ae5c: 689b ldr r3, [r3, #8] 800ae5e: 4940 ldr r1, [pc, #256] @ (800af60 ) 800ae60: 4313 orrs r3, r2 800ae62: 618b str r3, [r1, #24] #else MODIFY_REG(RCC->CDCFGR1, RCC_CDCFGR1_CDCPRE, RCC_ClkInitStruct->SYSCLKDivider); #endif /* HSE is selected as System Clock Source */ if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 800ae64: 687b ldr r3, [r7, #4] 800ae66: 685b ldr r3, [r3, #4] 800ae68: 2b02 cmp r3, #2 800ae6a: d107 bne.n 800ae7c { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800ae6c: 4b3c ldr r3, [pc, #240] @ (800af60 ) 800ae6e: 681b ldr r3, [r3, #0] 800ae70: f403 3300 and.w r3, r3, #131072 @ 0x20000 800ae74: 2b00 cmp r3, #0 800ae76: d121 bne.n 800aebc { return HAL_ERROR; 800ae78: 2301 movs r3, #1 800ae7a: e0f6 b.n 800b06a } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 800ae7c: 687b ldr r3, [r7, #4] 800ae7e: 685b ldr r3, [r3, #4] 800ae80: 2b03 cmp r3, #3 800ae82: d107 bne.n 800ae94 { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800ae84: 4b36 ldr r3, [pc, #216] @ (800af60 ) 800ae86: 681b ldr r3, [r3, #0] 800ae88: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800ae8c: 2b00 cmp r3, #0 800ae8e: d115 bne.n 800aebc { return HAL_ERROR; 800ae90: 2301 movs r3, #1 800ae92: e0ea b.n 800b06a } } /* CSI is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI) 800ae94: 687b ldr r3, [r7, #4] 800ae96: 685b ldr r3, [r3, #4] 800ae98: 2b01 cmp r3, #1 800ae9a: d107 bne.n 800aeac { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800ae9c: 4b30 ldr r3, [pc, #192] @ (800af60 ) 800ae9e: 681b ldr r3, [r3, #0] 800aea0: f403 7380 and.w r3, r3, #256 @ 0x100 800aea4: 2b00 cmp r3, #0 800aea6: d109 bne.n 800aebc { return HAL_ERROR; 800aea8: 2301 movs r3, #1 800aeaa: e0de b.n 800b06a } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800aeac: 4b2c ldr r3, [pc, #176] @ (800af60 ) 800aeae: 681b ldr r3, [r3, #0] 800aeb0: f003 0304 and.w r3, r3, #4 800aeb4: 2b00 cmp r3, #0 800aeb6: d101 bne.n 800aebc { return HAL_ERROR; 800aeb8: 2301 movs r3, #1 800aeba: e0d6 b.n 800b06a } } MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); 800aebc: 4b28 ldr r3, [pc, #160] @ (800af60 ) 800aebe: 691b ldr r3, [r3, #16] 800aec0: f023 0207 bic.w r2, r3, #7 800aec4: 687b ldr r3, [r7, #4] 800aec6: 685b ldr r3, [r3, #4] 800aec8: 4925 ldr r1, [pc, #148] @ (800af60 ) 800aeca: 4313 orrs r3, r2 800aecc: 610b str r3, [r1, #16] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aece: f7fa fc6f bl 80057b0 800aed2: 6178 str r0, [r7, #20] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800aed4: e00a b.n 800aeec { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 800aed6: f7fa fc6b bl 80057b0 800aeda: 4602 mov r2, r0 800aedc: 697b ldr r3, [r7, #20] 800aede: 1ad3 subs r3, r2, r3 800aee0: f241 3288 movw r2, #5000 @ 0x1388 800aee4: 4293 cmp r3, r2 800aee6: d901 bls.n 800aeec { return HAL_TIMEOUT; 800aee8: 2303 movs r3, #3 800aeea: e0be b.n 800b06a while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800aeec: 4b1c ldr r3, [pc, #112] @ (800af60 ) 800aeee: 691b ldr r3, [r3, #16] 800aef0: f003 0238 and.w r2, r3, #56 @ 0x38 800aef4: 687b ldr r3, [r7, #4] 800aef6: 685b ldr r3, [r3, #4] 800aef8: 00db lsls r3, r3, #3 800aefa: 429a cmp r2, r3 800aefc: d1eb bne.n 800aed6 } /* Decreasing the BUS frequency divider */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800aefe: 687b ldr r3, [r7, #4] 800af00: 681b ldr r3, [r3, #0] 800af02: f003 0302 and.w r3, r3, #2 800af06: 2b00 cmp r3, #0 800af08: d010 beq.n 800af2c { #if defined(RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800af0a: 687b ldr r3, [r7, #4] 800af0c: 68da ldr r2, [r3, #12] 800af0e: 4b14 ldr r3, [pc, #80] @ (800af60 ) 800af10: 699b ldr r3, [r3, #24] 800af12: f003 030f and.w r3, r3, #15 800af16: 429a cmp r2, r3 800af18: d208 bcs.n 800af2c { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800af1a: 4b11 ldr r3, [pc, #68] @ (800af60 ) 800af1c: 699b ldr r3, [r3, #24] 800af1e: f023 020f bic.w r2, r3, #15 800af22: 687b ldr r3, [r7, #4] 800af24: 68db ldr r3, [r3, #12] 800af26: 490e ldr r1, [pc, #56] @ (800af60 ) 800af28: 4313 orrs r3, r2 800af2a: 618b str r3, [r1, #24] } #endif } /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 800af2c: 4b0b ldr r3, [pc, #44] @ (800af5c ) 800af2e: 681b ldr r3, [r3, #0] 800af30: f003 030f and.w r3, r3, #15 800af34: 683a ldr r2, [r7, #0] 800af36: 429a cmp r2, r3 800af38: d214 bcs.n 800af64 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800af3a: 4b08 ldr r3, [pc, #32] @ (800af5c ) 800af3c: 681b ldr r3, [r3, #0] 800af3e: f023 020f bic.w r2, r3, #15 800af42: 4906 ldr r1, [pc, #24] @ (800af5c ) 800af44: 683b ldr r3, [r7, #0] 800af46: 4313 orrs r3, r2 800af48: 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) 800af4a: 4b04 ldr r3, [pc, #16] @ (800af5c ) 800af4c: 681b ldr r3, [r3, #0] 800af4e: f003 030f and.w r3, r3, #15 800af52: 683a ldr r2, [r7, #0] 800af54: 429a cmp r2, r3 800af56: d005 beq.n 800af64 { return HAL_ERROR; 800af58: 2301 movs r3, #1 800af5a: e086 b.n 800b06a 800af5c: 52002000 .word 0x52002000 800af60: 58024400 .word 0x58024400 } } /*-------------------------- D1PCLK1/CDPCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800af64: 687b ldr r3, [r7, #4] 800af66: 681b ldr r3, [r3, #0] 800af68: f003 0304 and.w r3, r3, #4 800af6c: 2b00 cmp r3, #0 800af6e: d010 beq.n 800af92 { #if defined(RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800af70: 687b ldr r3, [r7, #4] 800af72: 691a ldr r2, [r3, #16] 800af74: 4b3f ldr r3, [pc, #252] @ (800b074 ) 800af76: 699b ldr r3, [r3, #24] 800af78: f003 0370 and.w r3, r3, #112 @ 0x70 800af7c: 429a cmp r2, r3 800af7e: d208 bcs.n 800af92 { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800af80: 4b3c ldr r3, [pc, #240] @ (800b074 ) 800af82: 699b ldr r3, [r3, #24] 800af84: f023 0270 bic.w r2, r3, #112 @ 0x70 800af88: 687b ldr r3, [r7, #4] 800af8a: 691b ldr r3, [r3, #16] 800af8c: 4939 ldr r1, [pc, #228] @ (800b074 ) 800af8e: 4313 orrs r3, r2 800af90: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800af92: 687b ldr r3, [r7, #4] 800af94: 681b ldr r3, [r3, #0] 800af96: f003 0308 and.w r3, r3, #8 800af9a: 2b00 cmp r3, #0 800af9c: d010 beq.n 800afc0 { #if defined(RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800af9e: 687b ldr r3, [r7, #4] 800afa0: 695a ldr r2, [r3, #20] 800afa2: 4b34 ldr r3, [pc, #208] @ (800b074 ) 800afa4: 69db ldr r3, [r3, #28] 800afa6: f003 0370 and.w r3, r3, #112 @ 0x70 800afaa: 429a cmp r2, r3 800afac: d208 bcs.n 800afc0 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800afae: 4b31 ldr r3, [pc, #196] @ (800b074 ) 800afb0: 69db ldr r3, [r3, #28] 800afb2: f023 0270 bic.w r2, r3, #112 @ 0x70 800afb6: 687b ldr r3, [r7, #4] 800afb8: 695b ldr r3, [r3, #20] 800afba: 492e ldr r1, [pc, #184] @ (800b074 ) 800afbc: 4313 orrs r3, r2 800afbe: 61cb str r3, [r1, #28] } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 800afc0: 687b ldr r3, [r7, #4] 800afc2: 681b ldr r3, [r3, #0] 800afc4: f003 0310 and.w r3, r3, #16 800afc8: 2b00 cmp r3, #0 800afca: d010 beq.n 800afee { #if defined (RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800afcc: 687b ldr r3, [r7, #4] 800afce: 699a ldr r2, [r3, #24] 800afd0: 4b28 ldr r3, [pc, #160] @ (800b074 ) 800afd2: 69db ldr r3, [r3, #28] 800afd4: f403 63e0 and.w r3, r3, #1792 @ 0x700 800afd8: 429a cmp r2, r3 800afda: d208 bcs.n 800afee { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800afdc: 4b25 ldr r3, [pc, #148] @ (800b074 ) 800afde: 69db ldr r3, [r3, #28] 800afe0: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800afe4: 687b ldr r3, [r7, #4] 800afe6: 699b ldr r3, [r3, #24] 800afe8: 4922 ldr r1, [pc, #136] @ (800b074 ) 800afea: 4313 orrs r3, r2 800afec: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1/SRDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800afee: 687b ldr r3, [r7, #4] 800aff0: 681b ldr r3, [r3, #0] 800aff2: f003 0320 and.w r3, r3, #32 800aff6: 2b00 cmp r3, #0 800aff8: d010 beq.n 800b01c { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800affa: 687b ldr r3, [r7, #4] 800affc: 69da ldr r2, [r3, #28] 800affe: 4b1d ldr r3, [pc, #116] @ (800b074 ) 800b000: 6a1b ldr r3, [r3, #32] 800b002: f003 0370 and.w r3, r3, #112 @ 0x70 800b006: 429a cmp r2, r3 800b008: d208 bcs.n 800b01c { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800b00a: 4b1a ldr r3, [pc, #104] @ (800b074 ) 800b00c: 6a1b ldr r3, [r3, #32] 800b00e: f023 0270 bic.w r2, r3, #112 @ 0x70 800b012: 687b ldr r3, [r7, #4] 800b014: 69db ldr r3, [r3, #28] 800b016: 4917 ldr r1, [pc, #92] @ (800b074 ) 800b018: 4313 orrs r3, r2 800b01a: 620b str r3, [r1, #32] #endif } /* Update the SystemCoreClock global variable */ #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE) >> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 800b01c: f000 f834 bl 800b088 800b020: 4602 mov r2, r0 800b022: 4b14 ldr r3, [pc, #80] @ (800b074 ) 800b024: 699b ldr r3, [r3, #24] 800b026: 0a1b lsrs r3, r3, #8 800b028: f003 030f and.w r3, r3, #15 800b02c: 4912 ldr r1, [pc, #72] @ (800b078 ) 800b02e: 5ccb ldrb r3, [r1, r3] 800b030: f003 031f and.w r3, r3, #31 800b034: fa22 f303 lsr.w r3, r2, r3 800b038: 613b str r3, [r7, #16] #else common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE) >> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU); #endif #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE) >> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 800b03a: 4b0e ldr r3, [pc, #56] @ (800b074 ) 800b03c: 699b ldr r3, [r3, #24] 800b03e: f003 030f and.w r3, r3, #15 800b042: 4a0d ldr r2, [pc, #52] @ (800b078 ) 800b044: 5cd3 ldrb r3, [r2, r3] 800b046: f003 031f and.w r3, r3, #31 800b04a: 693a ldr r2, [r7, #16] 800b04c: fa22 f303 lsr.w r3, r2, r3 800b050: 4a0a ldr r2, [pc, #40] @ (800b07c ) 800b052: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800b054: 4a0a ldr r2, [pc, #40] @ (800b080 ) 800b056: 693b ldr r3, [r7, #16] 800b058: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ /* Configure the source of time base considering new system clocks settings*/ halstatus = HAL_InitTick(uwTickPrio); 800b05a: 4b0a ldr r3, [pc, #40] @ (800b084 ) 800b05c: 681b ldr r3, [r3, #0] 800b05e: 4618 mov r0, r3 800b060: f7f8 ffac bl 8003fbc 800b064: 4603 mov r3, r0 800b066: 73fb strb r3, [r7, #15] return halstatus; 800b068: 7bfb ldrb r3, [r7, #15] } 800b06a: 4618 mov r0, r3 800b06c: 3718 adds r7, #24 800b06e: 46bd mov sp, r7 800b070: bd80 pop {r7, pc} 800b072: bf00 nop 800b074: 58024400 .word 0x58024400 800b078: 08031a8c .word 0x08031a8c 800b07c: 24000010 .word 0x24000010 800b080: 2400000c .word 0x2400000c 800b084: 2400002c .word 0x2400002c 0800b088 : * * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 800b088: b480 push {r7} 800b08a: b089 sub sp, #36 @ 0x24 800b08c: af00 add r7, sp, #0 float_t fracn1, pllvco; uint32_t sysclockfreq; /* Get SYSCLK source -------------------------------------------------------*/ switch (RCC->CFGR & RCC_CFGR_SWS) 800b08e: 4bb3 ldr r3, [pc, #716] @ (800b35c ) 800b090: 691b ldr r3, [r3, #16] 800b092: f003 0338 and.w r3, r3, #56 @ 0x38 800b096: 2b18 cmp r3, #24 800b098: f200 8155 bhi.w 800b346 800b09c: a201 add r2, pc, #4 @ (adr r2, 800b0a4 ) 800b09e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b0a2: bf00 nop 800b0a4: 0800b109 .word 0x0800b109 800b0a8: 0800b347 .word 0x0800b347 800b0ac: 0800b347 .word 0x0800b347 800b0b0: 0800b347 .word 0x0800b347 800b0b4: 0800b347 .word 0x0800b347 800b0b8: 0800b347 .word 0x0800b347 800b0bc: 0800b347 .word 0x0800b347 800b0c0: 0800b347 .word 0x0800b347 800b0c4: 0800b12f .word 0x0800b12f 800b0c8: 0800b347 .word 0x0800b347 800b0cc: 0800b347 .word 0x0800b347 800b0d0: 0800b347 .word 0x0800b347 800b0d4: 0800b347 .word 0x0800b347 800b0d8: 0800b347 .word 0x0800b347 800b0dc: 0800b347 .word 0x0800b347 800b0e0: 0800b347 .word 0x0800b347 800b0e4: 0800b135 .word 0x0800b135 800b0e8: 0800b347 .word 0x0800b347 800b0ec: 0800b347 .word 0x0800b347 800b0f0: 0800b347 .word 0x0800b347 800b0f4: 0800b347 .word 0x0800b347 800b0f8: 0800b347 .word 0x0800b347 800b0fc: 0800b347 .word 0x0800b347 800b100: 0800b347 .word 0x0800b347 800b104: 0800b13b .word 0x0800b13b { case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800b108: 4b94 ldr r3, [pc, #592] @ (800b35c ) 800b10a: 681b ldr r3, [r3, #0] 800b10c: f003 0320 and.w r3, r3, #32 800b110: 2b00 cmp r3, #0 800b112: d009 beq.n 800b128 { sysclockfreq = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800b114: 4b91 ldr r3, [pc, #580] @ (800b35c ) 800b116: 681b ldr r3, [r3, #0] 800b118: 08db lsrs r3, r3, #3 800b11a: f003 0303 and.w r3, r3, #3 800b11e: 4a90 ldr r2, [pc, #576] @ (800b360 ) 800b120: fa22 f303 lsr.w r3, r2, r3 800b124: 61bb str r3, [r7, #24] else { sysclockfreq = (uint32_t) HSI_VALUE; } break; 800b126: e111 b.n 800b34c sysclockfreq = (uint32_t) HSI_VALUE; 800b128: 4b8d ldr r3, [pc, #564] @ (800b360 ) 800b12a: 61bb str r3, [r7, #24] break; 800b12c: e10e b.n 800b34c case RCC_CFGR_SWS_CSI: /* CSI used as system clock source */ sysclockfreq = CSI_VALUE; 800b12e: 4b8d ldr r3, [pc, #564] @ (800b364 ) 800b130: 61bb str r3, [r7, #24] break; 800b132: e10b b.n 800b34c case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ sysclockfreq = HSE_VALUE; 800b134: 4b8c ldr r3, [pc, #560] @ (800b368 ) 800b136: 61bb str r3, [r7, #24] break; 800b138: e108 b.n 800b34c case RCC_CFGR_SWS_PLL1: /* PLL1 used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN SYSCLK = PLL_VCO / PLLR */ pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC); 800b13a: 4b88 ldr r3, [pc, #544] @ (800b35c ) 800b13c: 6a9b ldr r3, [r3, #40] @ 0x28 800b13e: f003 0303 and.w r3, r3, #3 800b142: 617b str r3, [r7, #20] pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1) >> 4) ; 800b144: 4b85 ldr r3, [pc, #532] @ (800b35c ) 800b146: 6a9b ldr r3, [r3, #40] @ 0x28 800b148: 091b lsrs r3, r3, #4 800b14a: f003 033f and.w r3, r3, #63 @ 0x3f 800b14e: 613b str r3, [r7, #16] pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN) >> RCC_PLLCFGR_PLL1FRACEN_Pos); 800b150: 4b82 ldr r3, [pc, #520] @ (800b35c ) 800b152: 6adb ldr r3, [r3, #44] @ 0x2c 800b154: f003 0301 and.w r3, r3, #1 800b158: 60fb str r3, [r7, #12] fracn1 = (float_t)(uint32_t)(pllfracen * ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> 3)); 800b15a: 4b80 ldr r3, [pc, #512] @ (800b35c ) 800b15c: 6b5b ldr r3, [r3, #52] @ 0x34 800b15e: 08db lsrs r3, r3, #3 800b160: f3c3 030c ubfx r3, r3, #0, #13 800b164: 68fa ldr r2, [r7, #12] 800b166: fb02 f303 mul.w r3, r2, r3 800b16a: ee07 3a90 vmov s15, r3 800b16e: eef8 7a67 vcvt.f32.u32 s15, s15 800b172: edc7 7a02 vstr s15, [r7, #8] if (pllm != 0U) 800b176: 693b ldr r3, [r7, #16] 800b178: 2b00 cmp r3, #0 800b17a: f000 80e1 beq.w 800b340 800b17e: 697b ldr r3, [r7, #20] 800b180: 2b02 cmp r3, #2 800b182: f000 8083 beq.w 800b28c 800b186: 697b ldr r3, [r7, #20] 800b188: 2b02 cmp r3, #2 800b18a: f200 80a1 bhi.w 800b2d0 800b18e: 697b ldr r3, [r7, #20] 800b190: 2b00 cmp r3, #0 800b192: d003 beq.n 800b19c 800b194: 697b ldr r3, [r7, #20] 800b196: 2b01 cmp r3, #1 800b198: d056 beq.n 800b248 800b19a: e099 b.n 800b2d0 { switch (pllsource) { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800b19c: 4b6f ldr r3, [pc, #444] @ (800b35c ) 800b19e: 681b ldr r3, [r3, #0] 800b1a0: f003 0320 and.w r3, r3, #32 800b1a4: 2b00 cmp r3, #0 800b1a6: d02d beq.n 800b204 { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800b1a8: 4b6c ldr r3, [pc, #432] @ (800b35c ) 800b1aa: 681b ldr r3, [r3, #0] 800b1ac: 08db lsrs r3, r3, #3 800b1ae: f003 0303 and.w r3, r3, #3 800b1b2: 4a6b ldr r2, [pc, #428] @ (800b360 ) 800b1b4: fa22 f303 lsr.w r3, r2, r3 800b1b8: 607b str r3, [r7, #4] pllvco = ((float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b1ba: 687b ldr r3, [r7, #4] 800b1bc: ee07 3a90 vmov s15, r3 800b1c0: eef8 6a67 vcvt.f32.u32 s13, s15 800b1c4: 693b ldr r3, [r7, #16] 800b1c6: ee07 3a90 vmov s15, r3 800b1ca: eef8 7a67 vcvt.f32.u32 s15, s15 800b1ce: ee86 7aa7 vdiv.f32 s14, s13, s15 800b1d2: 4b62 ldr r3, [pc, #392] @ (800b35c ) 800b1d4: 6b1b ldr r3, [r3, #48] @ 0x30 800b1d6: f3c3 0308 ubfx r3, r3, #0, #9 800b1da: ee07 3a90 vmov s15, r3 800b1de: eef8 6a67 vcvt.f32.u32 s13, s15 800b1e2: ed97 6a02 vldr s12, [r7, #8] 800b1e6: eddf 5a61 vldr s11, [pc, #388] @ 800b36c 800b1ea: eec6 7a25 vdiv.f32 s15, s12, s11 800b1ee: ee76 7aa7 vadd.f32 s15, s13, s15 800b1f2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b1f6: ee77 7aa6 vadd.f32 s15, s15, s13 800b1fa: ee67 7a27 vmul.f32 s15, s14, s15 800b1fe: edc7 7a07 vstr s15, [r7, #28] } else { pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); } break; 800b202: e087 b.n 800b314 pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b204: 693b ldr r3, [r7, #16] 800b206: ee07 3a90 vmov s15, r3 800b20a: eef8 7a67 vcvt.f32.u32 s15, s15 800b20e: eddf 6a58 vldr s13, [pc, #352] @ 800b370 800b212: ee86 7aa7 vdiv.f32 s14, s13, s15 800b216: 4b51 ldr r3, [pc, #324] @ (800b35c ) 800b218: 6b1b ldr r3, [r3, #48] @ 0x30 800b21a: f3c3 0308 ubfx r3, r3, #0, #9 800b21e: ee07 3a90 vmov s15, r3 800b222: eef8 6a67 vcvt.f32.u32 s13, s15 800b226: ed97 6a02 vldr s12, [r7, #8] 800b22a: eddf 5a50 vldr s11, [pc, #320] @ 800b36c 800b22e: eec6 7a25 vdiv.f32 s15, s12, s11 800b232: ee76 7aa7 vadd.f32 s15, s13, s15 800b236: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b23a: ee77 7aa6 vadd.f32 s15, s15, s13 800b23e: ee67 7a27 vmul.f32 s15, s14, s15 800b242: edc7 7a07 vstr s15, [r7, #28] break; 800b246: e065 b.n 800b314 case RCC_PLLSOURCE_CSI: /* CSI used as PLL clock source */ pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b248: 693b ldr r3, [r7, #16] 800b24a: ee07 3a90 vmov s15, r3 800b24e: eef8 7a67 vcvt.f32.u32 s15, s15 800b252: eddf 6a48 vldr s13, [pc, #288] @ 800b374 800b256: ee86 7aa7 vdiv.f32 s14, s13, s15 800b25a: 4b40 ldr r3, [pc, #256] @ (800b35c ) 800b25c: 6b1b ldr r3, [r3, #48] @ 0x30 800b25e: f3c3 0308 ubfx r3, r3, #0, #9 800b262: ee07 3a90 vmov s15, r3 800b266: eef8 6a67 vcvt.f32.u32 s13, s15 800b26a: ed97 6a02 vldr s12, [r7, #8] 800b26e: eddf 5a3f vldr s11, [pc, #252] @ 800b36c 800b272: eec6 7a25 vdiv.f32 s15, s12, s11 800b276: ee76 7aa7 vadd.f32 s15, s13, s15 800b27a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b27e: ee77 7aa6 vadd.f32 s15, s15, s13 800b282: ee67 7a27 vmul.f32 s15, s14, s15 800b286: edc7 7a07 vstr s15, [r7, #28] break; 800b28a: e043 b.n 800b314 case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b28c: 693b ldr r3, [r7, #16] 800b28e: ee07 3a90 vmov s15, r3 800b292: eef8 7a67 vcvt.f32.u32 s15, s15 800b296: eddf 6a38 vldr s13, [pc, #224] @ 800b378 800b29a: ee86 7aa7 vdiv.f32 s14, s13, s15 800b29e: 4b2f ldr r3, [pc, #188] @ (800b35c ) 800b2a0: 6b1b ldr r3, [r3, #48] @ 0x30 800b2a2: f3c3 0308 ubfx r3, r3, #0, #9 800b2a6: ee07 3a90 vmov s15, r3 800b2aa: eef8 6a67 vcvt.f32.u32 s13, s15 800b2ae: ed97 6a02 vldr s12, [r7, #8] 800b2b2: eddf 5a2e vldr s11, [pc, #184] @ 800b36c 800b2b6: eec6 7a25 vdiv.f32 s15, s12, s11 800b2ba: ee76 7aa7 vadd.f32 s15, s13, s15 800b2be: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b2c2: ee77 7aa6 vadd.f32 s15, s15, s13 800b2c6: ee67 7a27 vmul.f32 s15, s14, s15 800b2ca: edc7 7a07 vstr s15, [r7, #28] break; 800b2ce: e021 b.n 800b314 default: pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b2d0: 693b ldr r3, [r7, #16] 800b2d2: ee07 3a90 vmov s15, r3 800b2d6: eef8 7a67 vcvt.f32.u32 s15, s15 800b2da: eddf 6a26 vldr s13, [pc, #152] @ 800b374 800b2de: ee86 7aa7 vdiv.f32 s14, s13, s15 800b2e2: 4b1e ldr r3, [pc, #120] @ (800b35c ) 800b2e4: 6b1b ldr r3, [r3, #48] @ 0x30 800b2e6: f3c3 0308 ubfx r3, r3, #0, #9 800b2ea: ee07 3a90 vmov s15, r3 800b2ee: eef8 6a67 vcvt.f32.u32 s13, s15 800b2f2: ed97 6a02 vldr s12, [r7, #8] 800b2f6: eddf 5a1d vldr s11, [pc, #116] @ 800b36c 800b2fa: eec6 7a25 vdiv.f32 s15, s12, s11 800b2fe: ee76 7aa7 vadd.f32 s15, s13, s15 800b302: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b306: ee77 7aa6 vadd.f32 s15, s15, s13 800b30a: ee67 7a27 vmul.f32 s15, s14, s15 800b30e: edc7 7a07 vstr s15, [r7, #28] break; 800b312: bf00 nop } pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >> 9) + 1U) ; 800b314: 4b11 ldr r3, [pc, #68] @ (800b35c ) 800b316: 6b1b ldr r3, [r3, #48] @ 0x30 800b318: 0a5b lsrs r3, r3, #9 800b31a: f003 037f and.w r3, r3, #127 @ 0x7f 800b31e: 3301 adds r3, #1 800b320: 603b str r3, [r7, #0] sysclockfreq = (uint32_t)(float_t)(pllvco / (float_t)pllp); 800b322: 683b ldr r3, [r7, #0] 800b324: ee07 3a90 vmov s15, r3 800b328: eeb8 7a67 vcvt.f32.u32 s14, s15 800b32c: edd7 6a07 vldr s13, [r7, #28] 800b330: eec6 7a87 vdiv.f32 s15, s13, s14 800b334: eefc 7ae7 vcvt.u32.f32 s15, s15 800b338: ee17 3a90 vmov r3, s15 800b33c: 61bb str r3, [r7, #24] } else { sysclockfreq = 0U; } break; 800b33e: e005 b.n 800b34c sysclockfreq = 0U; 800b340: 2300 movs r3, #0 800b342: 61bb str r3, [r7, #24] break; 800b344: e002 b.n 800b34c default: sysclockfreq = CSI_VALUE; 800b346: 4b07 ldr r3, [pc, #28] @ (800b364 ) 800b348: 61bb str r3, [r7, #24] break; 800b34a: bf00 nop } return sysclockfreq; 800b34c: 69bb ldr r3, [r7, #24] } 800b34e: 4618 mov r0, r3 800b350: 3724 adds r7, #36 @ 0x24 800b352: 46bd mov sp, r7 800b354: f85d 7b04 ldr.w r7, [sp], #4 800b358: 4770 bx lr 800b35a: bf00 nop 800b35c: 58024400 .word 0x58024400 800b360: 03d09000 .word 0x03d09000 800b364: 003d0900 .word 0x003d0900 800b368: 017d7840 .word 0x017d7840 800b36c: 46000000 .word 0x46000000 800b370: 4c742400 .word 0x4c742400 800b374: 4a742400 .word 0x4a742400 800b378: 4bbebc20 .word 0x4bbebc20 0800b37c : * @note The SystemD2Clock CMSIS variable is used to store System domain2 Clock Frequency * and updated within this function * @retval HCLK frequency */ uint32_t HAL_RCC_GetHCLKFreq(void) { 800b37c: b580 push {r7, lr} 800b37e: b082 sub sp, #8 800b380: af00 add r7, sp, #0 uint32_t common_system_clock; #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE) >> RCC_D1CFGR_D1CPRE_Pos] & 0x1FU); 800b382: f7ff fe81 bl 800b088 800b386: 4602 mov r2, r0 800b388: 4b10 ldr r3, [pc, #64] @ (800b3cc ) 800b38a: 699b ldr r3, [r3, #24] 800b38c: 0a1b lsrs r3, r3, #8 800b38e: f003 030f and.w r3, r3, #15 800b392: 490f ldr r1, [pc, #60] @ (800b3d0 ) 800b394: 5ccb ldrb r3, [r1, r3] 800b396: f003 031f and.w r3, r3, #31 800b39a: fa22 f303 lsr.w r3, r2, r3 800b39e: 607b str r3, [r7, #4] #else common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE) >> RCC_CDCFGR1_CDCPRE_Pos] & 0x1FU); #endif #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE) >> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 800b3a0: 4b0a ldr r3, [pc, #40] @ (800b3cc ) 800b3a2: 699b ldr r3, [r3, #24] 800b3a4: f003 030f and.w r3, r3, #15 800b3a8: 4a09 ldr r2, [pc, #36] @ (800b3d0 ) 800b3aa: 5cd3 ldrb r3, [r2, r3] 800b3ac: f003 031f and.w r3, r3, #31 800b3b0: 687a ldr r2, [r7, #4] 800b3b2: fa22 f303 lsr.w r3, r2, r3 800b3b6: 4a07 ldr r2, [pc, #28] @ (800b3d4 ) 800b3b8: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800b3ba: 4a07 ldr r2, [pc, #28] @ (800b3d8 ) 800b3bc: 687b ldr r3, [r7, #4] 800b3be: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ return SystemD2Clock; 800b3c0: 4b04 ldr r3, [pc, #16] @ (800b3d4 ) 800b3c2: 681b ldr r3, [r3, #0] } 800b3c4: 4618 mov r0, r3 800b3c6: 3708 adds r7, #8 800b3c8: 46bd mov sp, r7 800b3ca: bd80 pop {r7, pc} 800b3cc: 58024400 .word 0x58024400 800b3d0: 08031a8c .word 0x08031a8c 800b3d4: 24000010 .word 0x24000010 800b3d8: 2400000c .word 0x2400000c 0800b3dc : * @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) { 800b3dc: b580 push {r7, lr} 800b3de: af00 add r7, sp, #0 #if defined (RCC_D2CFGR_D2PPRE1) /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1) >> RCC_D2CFGR_D2PPRE1_Pos]) & 0x1FU)); 800b3e0: f7ff ffcc bl 800b37c 800b3e4: 4602 mov r2, r0 800b3e6: 4b06 ldr r3, [pc, #24] @ (800b400 ) 800b3e8: 69db ldr r3, [r3, #28] 800b3ea: 091b lsrs r3, r3, #4 800b3ec: f003 0307 and.w r3, r3, #7 800b3f0: 4904 ldr r1, [pc, #16] @ (800b404 ) 800b3f2: 5ccb ldrb r3, [r1, r3] 800b3f4: f003 031f and.w r3, r3, #31 800b3f8: fa22 f303 lsr.w r3, r2, r3 #else /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE1) >> RCC_CDCFGR2_CDPPRE1_Pos]) & 0x1FU)); #endif } 800b3fc: 4618 mov r0, r3 800b3fe: bd80 pop {r7, pc} 800b400: 58024400 .word 0x58024400 800b404: 08031a8c .word 0x08031a8c 0800b408 : * @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 PCLK1 frequency */ uint32_t HAL_RCC_GetPCLK2Freq(void) { 800b408: b580 push {r7, lr} 800b40a: af00 add r7, sp, #0 /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ #if defined(RCC_D2CFGR_D2PPRE2) return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2) >> RCC_D2CFGR_D2PPRE2_Pos]) & 0x1FU)); 800b40c: f7ff ffb6 bl 800b37c 800b410: 4602 mov r2, r0 800b412: 4b06 ldr r3, [pc, #24] @ (800b42c ) 800b414: 69db ldr r3, [r3, #28] 800b416: 0a1b lsrs r3, r3, #8 800b418: f003 0307 and.w r3, r3, #7 800b41c: 4904 ldr r1, [pc, #16] @ (800b430 ) 800b41e: 5ccb ldrb r3, [r1, r3] 800b420: f003 031f and.w r3, r3, #31 800b424: fa22 f303 lsr.w r3, r2, r3 #else return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE2) >> RCC_CDCFGR2_CDPPRE2_Pos]) & 0x1FU)); #endif } 800b428: 4618 mov r0, r3 800b42a: bd80 pop {r7, pc} 800b42c: 58024400 .word 0x58024400 800b430: 08031a8c .word 0x08031a8c 0800b434 : * will be configured. * @param pFLatency: Pointer on the Flash Latency. * @retval None */ void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) { 800b434: b480 push {r7} 800b436: b083 sub sp, #12 800b438: af00 add r7, sp, #0 800b43a: 6078 str r0, [r7, #4] 800b43c: 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_D1PCLK1 | RCC_CLOCKTYPE_PCLK1 | 800b43e: 687b ldr r3, [r7, #4] 800b440: 223f movs r2, #63 @ 0x3f 800b442: 601a str r2, [r3, #0] RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_D3PCLK1 ; /* Get the SYSCLK configuration --------------------------------------------*/ RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW); 800b444: 4b1a ldr r3, [pc, #104] @ (800b4b0 ) 800b446: 691b ldr r3, [r3, #16] 800b448: f003 0207 and.w r2, r3, #7 800b44c: 687b ldr r3, [r7, #4] 800b44e: 605a str r2, [r3, #4] #if defined(RCC_D1CFGR_D1CPRE) /* Get the SYSCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE); 800b450: 4b17 ldr r3, [pc, #92] @ (800b4b0 ) 800b452: 699b ldr r3, [r3, #24] 800b454: f403 6270 and.w r2, r3, #3840 @ 0xf00 800b458: 687b ldr r3, [r7, #4] 800b45a: 609a str r2, [r3, #8] /* Get the D1HCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE); 800b45c: 4b14 ldr r3, [pc, #80] @ (800b4b0 ) 800b45e: 699b ldr r3, [r3, #24] 800b460: f003 020f and.w r2, r3, #15 800b464: 687b ldr r3, [r7, #4] 800b466: 60da str r2, [r3, #12] /* Get the APB3 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE); 800b468: 4b11 ldr r3, [pc, #68] @ (800b4b0 ) 800b46a: 699b ldr r3, [r3, #24] 800b46c: f003 0270 and.w r2, r3, #112 @ 0x70 800b470: 687b ldr r3, [r7, #4] 800b472: 611a str r2, [r3, #16] /* Get the APB1 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1); 800b474: 4b0e ldr r3, [pc, #56] @ (800b4b0 ) 800b476: 69db ldr r3, [r3, #28] 800b478: f003 0270 and.w r2, r3, #112 @ 0x70 800b47c: 687b ldr r3, [r7, #4] 800b47e: 615a str r2, [r3, #20] /* Get the APB2 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2); 800b480: 4b0b ldr r3, [pc, #44] @ (800b4b0 ) 800b482: 69db ldr r3, [r3, #28] 800b484: f403 62e0 and.w r2, r3, #1792 @ 0x700 800b488: 687b ldr r3, [r7, #4] 800b48a: 619a str r2, [r3, #24] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE); 800b48c: 4b08 ldr r3, [pc, #32] @ (800b4b0 ) 800b48e: 6a1b ldr r3, [r3, #32] 800b490: f003 0270 and.w r2, r3, #112 @ 0x70 800b494: 687b ldr r3, [r7, #4] 800b496: 61da str r2, [r3, #28] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->SRDCFGR & RCC_SRDCFGR_SRDPPRE); #endif /* Get the Flash Wait State (Latency) configuration ------------------------*/ *pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY); 800b498: 4b06 ldr r3, [pc, #24] @ (800b4b4 ) 800b49a: 681b ldr r3, [r3, #0] 800b49c: f003 020f and.w r2, r3, #15 800b4a0: 683b ldr r3, [r7, #0] 800b4a2: 601a str r2, [r3, #0] } 800b4a4: bf00 nop 800b4a6: 370c adds r7, #12 800b4a8: 46bd mov sp, r7 800b4aa: f85d 7b04 ldr.w r7, [sp], #4 800b4ae: 4770 bx lr 800b4b0: 58024400 .word 0x58024400 800b4b4: 52002000 .word 0x52002000 0800b4b8 : * (*) : Available on some STM32H7 lines only. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 800b4b8: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800b4bc: b0c8 sub sp, #288 @ 0x120 800b4be: af00 add r7, sp, #0 800b4c0: f8c7 010c str.w r0, [r7, #268] @ 0x10c uint32_t tmpreg; uint32_t tickstart; HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */ 800b4c4: 2300 movs r3, #0 800b4c6: f887 311f strb.w r3, [r7, #287] @ 0x11f HAL_StatusTypeDef status = HAL_OK; /* Final status */ 800b4ca: 2300 movs r3, #0 800b4cc: f887 311e strb.w r3, [r7, #286] @ 0x11e /*---------------------------- SPDIFRX configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) 800b4d0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b4d4: e9d3 2300 ldrd r2, r3, [r3] 800b4d8: f002 6400 and.w r4, r2, #134217728 @ 0x8000000 800b4dc: 2500 movs r5, #0 800b4de: ea54 0305 orrs.w r3, r4, r5 800b4e2: d049 beq.n 800b578 { switch (PeriphClkInit->SpdifrxClockSelection) 800b4e4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b4e8: 6e9b ldr r3, [r3, #104] @ 0x68 800b4ea: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800b4ee: d02f beq.n 800b550 800b4f0: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800b4f4: d828 bhi.n 800b548 800b4f6: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b4fa: d01a beq.n 800b532 800b4fc: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b500: d822 bhi.n 800b548 800b502: 2b00 cmp r3, #0 800b504: d003 beq.n 800b50e 800b506: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800b50a: d007 beq.n 800b51c 800b50c: e01c b.n 800b548 { case RCC_SPDIFRXCLKSOURCE_PLL: /* PLL is used as clock source for SPDIFRX*/ /* Enable PLL1Q Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b50e: 4bb8 ldr r3, [pc, #736] @ (800b7f0 ) 800b510: 6adb ldr r3, [r3, #44] @ 0x2c 800b512: 4ab7 ldr r2, [pc, #732] @ (800b7f0 ) 800b514: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b518: 62d3 str r3, [r2, #44] @ 0x2c /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b51a: e01a b.n 800b552 case RCC_SPDIFRXCLKSOURCE_PLL2: /* PLL2 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800b51c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b520: 3308 adds r3, #8 800b522: 2102 movs r1, #2 800b524: 4618 mov r0, r3 800b526: f001 fc73 bl 800ce10 800b52a: 4603 mov r3, r0 800b52c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b530: e00f b.n 800b552 case RCC_SPDIFRXCLKSOURCE_PLL3: /* PLL3 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800b532: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b536: 3328 adds r3, #40 @ 0x28 800b538: 2102 movs r1, #2 800b53a: 4618 mov r0, r3 800b53c: f001 fd1a bl 800cf74 800b540: 4603 mov r3, r0 800b542: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b546: e004 b.n 800b552 /* Internal OSC clock is used as source of SPDIFRX clock*/ /* SPDIFRX clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b548: 2301 movs r3, #1 800b54a: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b54e: e000 b.n 800b552 break; 800b550: bf00 nop } if (ret == HAL_OK) 800b552: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b556: 2b00 cmp r3, #0 800b558: d10a bne.n 800b570 { /* Set the source of SPDIFRX clock*/ __HAL_RCC_SPDIFRX_CONFIG(PeriphClkInit->SpdifrxClockSelection); 800b55a: 4ba5 ldr r3, [pc, #660] @ (800b7f0 ) 800b55c: 6d1b ldr r3, [r3, #80] @ 0x50 800b55e: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800b562: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b566: 6e9b ldr r3, [r3, #104] @ 0x68 800b568: 4aa1 ldr r2, [pc, #644] @ (800b7f0 ) 800b56a: 430b orrs r3, r1 800b56c: 6513 str r3, [r2, #80] @ 0x50 800b56e: e003 b.n 800b578 } else { /* set overall return value */ status = ret; 800b570: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b574: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) 800b578: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b57c: e9d3 2300 ldrd r2, r3, [r3] 800b580: f402 7880 and.w r8, r2, #256 @ 0x100 800b584: f04f 0900 mov.w r9, #0 800b588: ea58 0309 orrs.w r3, r8, r9 800b58c: d047 beq.n 800b61e { switch (PeriphClkInit->Sai1ClockSelection) 800b58e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b592: 6d9b ldr r3, [r3, #88] @ 0x58 800b594: 2b04 cmp r3, #4 800b596: d82a bhi.n 800b5ee 800b598: a201 add r2, pc, #4 @ (adr r2, 800b5a0 ) 800b59a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b59e: bf00 nop 800b5a0: 0800b5b5 .word 0x0800b5b5 800b5a4: 0800b5c3 .word 0x0800b5c3 800b5a8: 0800b5d9 .word 0x0800b5d9 800b5ac: 0800b5f7 .word 0x0800b5f7 800b5b0: 0800b5f7 .word 0x0800b5f7 { case RCC_SAI1CLKSOURCE_PLL: /* PLL is used as clock source for SAI1*/ /* Enable SAI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b5b4: 4b8e ldr r3, [pc, #568] @ (800b7f0 ) 800b5b6: 6adb ldr r3, [r3, #44] @ 0x2c 800b5b8: 4a8d ldr r2, [pc, #564] @ (800b7f0 ) 800b5ba: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b5be: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b5c0: e01a b.n 800b5f8 case RCC_SAI1CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI1*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b5c2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b5c6: 3308 adds r3, #8 800b5c8: 2100 movs r1, #0 800b5ca: 4618 mov r0, r3 800b5cc: f001 fc20 bl 800ce10 800b5d0: 4603 mov r3, r0 800b5d2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b5d6: e00f b.n 800b5f8 case RCC_SAI1CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b5d8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b5dc: 3328 adds r3, #40 @ 0x28 800b5de: 2100 movs r1, #0 800b5e0: 4618 mov r0, r3 800b5e2: f001 fcc7 bl 800cf74 800b5e6: 4603 mov r3, r0 800b5e8: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b5ec: e004 b.n 800b5f8 /* HSI, HSE, or CSI oscillator is used as source of SAI1 clock */ /* SAI1 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b5ee: 2301 movs r3, #1 800b5f0: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b5f4: e000 b.n 800b5f8 break; 800b5f6: bf00 nop } if (ret == HAL_OK) 800b5f8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b5fc: 2b00 cmp r3, #0 800b5fe: d10a bne.n 800b616 { /* Set the source of SAI1 clock*/ __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection); 800b600: 4b7b ldr r3, [pc, #492] @ (800b7f0 ) 800b602: 6d1b ldr r3, [r3, #80] @ 0x50 800b604: f023 0107 bic.w r1, r3, #7 800b608: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b60c: 6d9b ldr r3, [r3, #88] @ 0x58 800b60e: 4a78 ldr r2, [pc, #480] @ (800b7f0 ) 800b610: 430b orrs r3, r1 800b612: 6513 str r3, [r2, #80] @ 0x50 800b614: e003 b.n 800b61e } else { /* set overall return value */ status = ret; 800b616: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b61a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #if defined(SAI3) /*---------------------------- SAI2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI23) == RCC_PERIPHCLK_SAI23) 800b61e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b622: e9d3 2300 ldrd r2, r3, [r3] 800b626: f402 7a00 and.w sl, r2, #512 @ 0x200 800b62a: f04f 0b00 mov.w fp, #0 800b62e: ea5a 030b orrs.w r3, sl, fp 800b632: d04c beq.n 800b6ce { switch (PeriphClkInit->Sai23ClockSelection) 800b634: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b638: 6ddb ldr r3, [r3, #92] @ 0x5c 800b63a: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b63e: d030 beq.n 800b6a2 800b640: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b644: d829 bhi.n 800b69a 800b646: 2bc0 cmp r3, #192 @ 0xc0 800b648: d02d beq.n 800b6a6 800b64a: 2bc0 cmp r3, #192 @ 0xc0 800b64c: d825 bhi.n 800b69a 800b64e: 2b80 cmp r3, #128 @ 0x80 800b650: d018 beq.n 800b684 800b652: 2b80 cmp r3, #128 @ 0x80 800b654: d821 bhi.n 800b69a 800b656: 2b00 cmp r3, #0 800b658: d002 beq.n 800b660 800b65a: 2b40 cmp r3, #64 @ 0x40 800b65c: d007 beq.n 800b66e 800b65e: e01c b.n 800b69a { case RCC_SAI23CLKSOURCE_PLL: /* PLL is used as clock source for SAI2/3 */ /* Enable SAI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b660: 4b63 ldr r3, [pc, #396] @ (800b7f0 ) 800b662: 6adb ldr r3, [r3, #44] @ 0x2c 800b664: 4a62 ldr r2, [pc, #392] @ (800b7f0 ) 800b666: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b66a: 62d3 str r3, [r2, #44] @ 0x2c /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b66c: e01c b.n 800b6a8 case RCC_SAI23CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b66e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b672: 3308 adds r3, #8 800b674: 2100 movs r1, #0 800b676: 4618 mov r0, r3 800b678: f001 fbca bl 800ce10 800b67c: 4603 mov r3, r0 800b67e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b682: e011 b.n 800b6a8 case RCC_SAI23CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b684: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b688: 3328 adds r3, #40 @ 0x28 800b68a: 2100 movs r1, #0 800b68c: 4618 mov r0, r3 800b68e: f001 fc71 bl 800cf74 800b692: 4603 mov r3, r0 800b694: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b698: e006 b.n 800b6a8 /* HSI, HSE, or CSI oscillator is used as source of SAI2/3 clock */ /* SAI2/3 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b69a: 2301 movs r3, #1 800b69c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b6a0: e002 b.n 800b6a8 break; 800b6a2: bf00 nop 800b6a4: e000 b.n 800b6a8 break; 800b6a6: bf00 nop } if (ret == HAL_OK) 800b6a8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b6ac: 2b00 cmp r3, #0 800b6ae: d10a bne.n 800b6c6 { /* Set the source of SAI2/3 clock*/ __HAL_RCC_SAI23_CONFIG(PeriphClkInit->Sai23ClockSelection); 800b6b0: 4b4f ldr r3, [pc, #316] @ (800b7f0 ) 800b6b2: 6d1b ldr r3, [r3, #80] @ 0x50 800b6b4: f423 71e0 bic.w r1, r3, #448 @ 0x1c0 800b6b8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6bc: 6ddb ldr r3, [r3, #92] @ 0x5c 800b6be: 4a4c ldr r2, [pc, #304] @ (800b7f0 ) 800b6c0: 430b orrs r3, r1 800b6c2: 6513 str r3, [r2, #80] @ 0x50 800b6c4: e003 b.n 800b6ce } else { /* set overall return value */ status = ret; 800b6c6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b6ca: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI2B*/ #if defined(SAI4) /*---------------------------- SAI4A configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4A) == RCC_PERIPHCLK_SAI4A) 800b6ce: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6d2: e9d3 2300 ldrd r2, r3, [r3] 800b6d6: f402 6380 and.w r3, r2, #1024 @ 0x400 800b6da: f8c7 3100 str.w r3, [r7, #256] @ 0x100 800b6de: 2300 movs r3, #0 800b6e0: f8c7 3104 str.w r3, [r7, #260] @ 0x104 800b6e4: e9d7 1240 ldrd r1, r2, [r7, #256] @ 0x100 800b6e8: 460b mov r3, r1 800b6ea: 4313 orrs r3, r2 800b6ec: d053 beq.n 800b796 { switch (PeriphClkInit->Sai4AClockSelection) 800b6ee: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6f2: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800b6f6: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800b6fa: d035 beq.n 800b768 800b6fc: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800b700: d82e bhi.n 800b760 800b702: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800b706: d031 beq.n 800b76c 800b708: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800b70c: d828 bhi.n 800b760 800b70e: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800b712: d01a beq.n 800b74a 800b714: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800b718: d822 bhi.n 800b760 800b71a: 2b00 cmp r3, #0 800b71c: d003 beq.n 800b726 800b71e: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b722: d007 beq.n 800b734 800b724: e01c b.n 800b760 { case RCC_SAI4ACLKSOURCE_PLL: /* PLL is used as clock source for SAI2*/ /* Enable SAI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b726: 4b32 ldr r3, [pc, #200] @ (800b7f0 ) 800b728: 6adb ldr r3, [r3, #44] @ 0x2c 800b72a: 4a31 ldr r2, [pc, #196] @ (800b7f0 ) 800b72c: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b730: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b732: e01c b.n 800b76e case RCC_SAI4ACLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b734: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b738: 3308 adds r3, #8 800b73a: 2100 movs r1, #0 800b73c: 4618 mov r0, r3 800b73e: f001 fb67 bl 800ce10 800b742: 4603 mov r3, r0 800b744: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800b748: e011 b.n 800b76e case RCC_SAI4ACLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b74a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b74e: 3328 adds r3, #40 @ 0x28 800b750: 2100 movs r1, #0 800b752: 4618 mov r0, r3 800b754: f001 fc0e bl 800cf74 800b758: 4603 mov r3, r0 800b75a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b75e: e006 b.n 800b76e /* SAI4A clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800b760: 2301 movs r3, #1 800b762: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b766: e002 b.n 800b76e break; 800b768: bf00 nop 800b76a: e000 b.n 800b76e break; 800b76c: bf00 nop } if (ret == HAL_OK) 800b76e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b772: 2b00 cmp r3, #0 800b774: d10b bne.n 800b78e { /* Set the source of SAI4A clock*/ __HAL_RCC_SAI4A_CONFIG(PeriphClkInit->Sai4AClockSelection); 800b776: 4b1e ldr r3, [pc, #120] @ (800b7f0 ) 800b778: 6d9b ldr r3, [r3, #88] @ 0x58 800b77a: f423 0160 bic.w r1, r3, #14680064 @ 0xe00000 800b77e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b782: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800b786: 4a1a ldr r2, [pc, #104] @ (800b7f0 ) 800b788: 430b orrs r3, r1 800b78a: 6593 str r3, [r2, #88] @ 0x58 800b78c: e003 b.n 800b796 } else { /* set overall return value */ status = ret; 800b78e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b792: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI4B configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4B) == RCC_PERIPHCLK_SAI4B) 800b796: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b79a: e9d3 2300 ldrd r2, r3, [r3] 800b79e: f402 6300 and.w r3, r2, #2048 @ 0x800 800b7a2: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 800b7a6: 2300 movs r3, #0 800b7a8: f8c7 30fc str.w r3, [r7, #252] @ 0xfc 800b7ac: e9d7 123e ldrd r1, r2, [r7, #248] @ 0xf8 800b7b0: 460b mov r3, r1 800b7b2: 4313 orrs r3, r2 800b7b4: d056 beq.n 800b864 { switch (PeriphClkInit->Sai4BClockSelection) 800b7b6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b7ba: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800b7be: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800b7c2: d038 beq.n 800b836 800b7c4: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800b7c8: d831 bhi.n 800b82e 800b7ca: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800b7ce: d034 beq.n 800b83a 800b7d0: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800b7d4: d82b bhi.n 800b82e 800b7d6: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800b7da: d01d beq.n 800b818 800b7dc: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800b7e0: d825 bhi.n 800b82e 800b7e2: 2b00 cmp r3, #0 800b7e4: d006 beq.n 800b7f4 800b7e6: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 800b7ea: d00a beq.n 800b802 800b7ec: e01f b.n 800b82e 800b7ee: bf00 nop 800b7f0: 58024400 .word 0x58024400 { case RCC_SAI4BCLKSOURCE_PLL: /* PLL is used as clock source for SAI2*/ /* Enable SAI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b7f4: 4ba2 ldr r3, [pc, #648] @ (800ba80 ) 800b7f6: 6adb ldr r3, [r3, #44] @ 0x2c 800b7f8: 4aa1 ldr r2, [pc, #644] @ (800ba80 ) 800b7fa: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b7fe: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b800: e01c b.n 800b83c case RCC_SAI4BCLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b802: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b806: 3308 adds r3, #8 800b808: 2100 movs r1, #0 800b80a: 4618 mov r0, r3 800b80c: f001 fb00 bl 800ce10 800b810: 4603 mov r3, r0 800b812: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800b816: e011 b.n 800b83c case RCC_SAI4BCLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b818: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b81c: 3328 adds r3, #40 @ 0x28 800b81e: 2100 movs r1, #0 800b820: 4618 mov r0, r3 800b822: f001 fba7 bl 800cf74 800b826: 4603 mov r3, r0 800b828: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b82c: e006 b.n 800b83c /* SAI4B clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800b82e: 2301 movs r3, #1 800b830: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b834: e002 b.n 800b83c break; 800b836: bf00 nop 800b838: e000 b.n 800b83c break; 800b83a: bf00 nop } if (ret == HAL_OK) 800b83c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b840: 2b00 cmp r3, #0 800b842: d10b bne.n 800b85c { /* Set the source of SAI4B clock*/ __HAL_RCC_SAI4B_CONFIG(PeriphClkInit->Sai4BClockSelection); 800b844: 4b8e ldr r3, [pc, #568] @ (800ba80 ) 800b846: 6d9b ldr r3, [r3, #88] @ 0x58 800b848: f023 61e0 bic.w r1, r3, #117440512 @ 0x7000000 800b84c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b850: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800b854: 4a8a ldr r2, [pc, #552] @ (800ba80 ) 800b856: 430b orrs r3, r1 800b858: 6593 str r3, [r2, #88] @ 0x58 800b85a: e003 b.n 800b864 } else { /* set overall return value */ status = ret; 800b85c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b860: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI4*/ #if defined(QUADSPI) /*---------------------------- QSPI configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_QSPI) == RCC_PERIPHCLK_QSPI) 800b864: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b868: e9d3 2300 ldrd r2, r3, [r3] 800b86c: f002 7300 and.w r3, r2, #33554432 @ 0x2000000 800b870: f8c7 30f0 str.w r3, [r7, #240] @ 0xf0 800b874: 2300 movs r3, #0 800b876: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 800b87a: e9d7 123c ldrd r1, r2, [r7, #240] @ 0xf0 800b87e: 460b mov r3, r1 800b880: 4313 orrs r3, r2 800b882: d03a beq.n 800b8fa { switch (PeriphClkInit->QspiClockSelection) 800b884: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b888: 6cdb ldr r3, [r3, #76] @ 0x4c 800b88a: 2b30 cmp r3, #48 @ 0x30 800b88c: d01f beq.n 800b8ce 800b88e: 2b30 cmp r3, #48 @ 0x30 800b890: d819 bhi.n 800b8c6 800b892: 2b20 cmp r3, #32 800b894: d00c beq.n 800b8b0 800b896: 2b20 cmp r3, #32 800b898: d815 bhi.n 800b8c6 800b89a: 2b00 cmp r3, #0 800b89c: d019 beq.n 800b8d2 800b89e: 2b10 cmp r3, #16 800b8a0: d111 bne.n 800b8c6 { case RCC_QSPICLKSOURCE_PLL: /* PLL is used as clock source for QSPI*/ /* Enable QSPI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b8a2: 4b77 ldr r3, [pc, #476] @ (800ba80 ) 800b8a4: 6adb ldr r3, [r3, #44] @ 0x2c 800b8a6: 4a76 ldr r2, [pc, #472] @ (800ba80 ) 800b8a8: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b8ac: 62d3 str r3, [r2, #44] @ 0x2c /* QSPI clock source configuration done later after clock selection check */ break; 800b8ae: e011 b.n 800b8d4 case RCC_QSPICLKSOURCE_PLL2: /* PLL2 is used as clock source for QSPI*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800b8b0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8b4: 3308 adds r3, #8 800b8b6: 2102 movs r1, #2 800b8b8: 4618 mov r0, r3 800b8ba: f001 faa9 bl 800ce10 800b8be: 4603 mov r3, r0 800b8c0: f887 311f strb.w r3, [r7, #287] @ 0x11f /* QSPI clock source configuration done later after clock selection check */ break; 800b8c4: e006 b.n 800b8d4 case RCC_QSPICLKSOURCE_D1HCLK: /* Domain1 HCLK clock selected as QSPI kernel peripheral clock */ break; default: ret = HAL_ERROR; 800b8c6: 2301 movs r3, #1 800b8c8: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b8cc: e002 b.n 800b8d4 break; 800b8ce: bf00 nop 800b8d0: e000 b.n 800b8d4 break; 800b8d2: bf00 nop } if (ret == HAL_OK) 800b8d4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8d8: 2b00 cmp r3, #0 800b8da: d10a bne.n 800b8f2 { /* Set the source of QSPI clock*/ __HAL_RCC_QSPI_CONFIG(PeriphClkInit->QspiClockSelection); 800b8dc: 4b68 ldr r3, [pc, #416] @ (800ba80 ) 800b8de: 6cdb ldr r3, [r3, #76] @ 0x4c 800b8e0: f023 0130 bic.w r1, r3, #48 @ 0x30 800b8e4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8e8: 6cdb ldr r3, [r3, #76] @ 0x4c 800b8ea: 4a65 ldr r2, [pc, #404] @ (800ba80 ) 800b8ec: 430b orrs r3, r1 800b8ee: 64d3 str r3, [r2, #76] @ 0x4c 800b8f0: e003 b.n 800b8fa } else { /* set overall return value */ status = ret; 800b8f2: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8f6: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*OCTOSPI*/ /*---------------------------- SPI1/2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI123) == RCC_PERIPHCLK_SPI123) 800b8fa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8fe: e9d3 2300 ldrd r2, r3, [r3] 800b902: f402 5380 and.w r3, r2, #4096 @ 0x1000 800b906: f8c7 30e8 str.w r3, [r7, #232] @ 0xe8 800b90a: 2300 movs r3, #0 800b90c: f8c7 30ec str.w r3, [r7, #236] @ 0xec 800b910: e9d7 123a ldrd r1, r2, [r7, #232] @ 0xe8 800b914: 460b mov r3, r1 800b916: 4313 orrs r3, r2 800b918: d051 beq.n 800b9be { switch (PeriphClkInit->Spi123ClockSelection) 800b91a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b91e: 6e1b ldr r3, [r3, #96] @ 0x60 800b920: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800b924: d035 beq.n 800b992 800b926: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800b92a: d82e bhi.n 800b98a 800b92c: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800b930: d031 beq.n 800b996 800b932: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800b936: d828 bhi.n 800b98a 800b938: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800b93c: d01a beq.n 800b974 800b93e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800b942: d822 bhi.n 800b98a 800b944: 2b00 cmp r3, #0 800b946: d003 beq.n 800b950 800b948: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800b94c: d007 beq.n 800b95e 800b94e: e01c b.n 800b98a { case RCC_SPI123CLKSOURCE_PLL: /* PLL is used as clock source for SPI1/2/3 */ /* Enable SPI Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800b950: 4b4b ldr r3, [pc, #300] @ (800ba80 ) 800b952: 6adb ldr r3, [r3, #44] @ 0x2c 800b954: 4a4a ldr r2, [pc, #296] @ (800ba80 ) 800b956: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b95a: 62d3 str r3, [r2, #44] @ 0x2c /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800b95c: e01c b.n 800b998 case RCC_SPI123CLKSOURCE_PLL2: /* PLL2 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b95e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b962: 3308 adds r3, #8 800b964: 2100 movs r1, #0 800b966: 4618 mov r0, r3 800b968: f001 fa52 bl 800ce10 800b96c: 4603 mov r3, r0 800b96e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800b972: e011 b.n 800b998 case RCC_SPI123CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b974: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b978: 3328 adds r3, #40 @ 0x28 800b97a: 2100 movs r1, #0 800b97c: 4618 mov r0, r3 800b97e: f001 faf9 bl 800cf74 800b982: 4603 mov r3, r0 800b984: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800b988: e006 b.n 800b998 /* HSI, HSE, or CSI oscillator is used as source of SPI1/2/3 clock */ /* SPI1/2/3 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800b98a: 2301 movs r3, #1 800b98c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b990: e002 b.n 800b998 break; 800b992: bf00 nop 800b994: e000 b.n 800b998 break; 800b996: bf00 nop } if (ret == HAL_OK) 800b998: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b99c: 2b00 cmp r3, #0 800b99e: d10a bne.n 800b9b6 { /* Set the source of SPI1/2/3 clock*/ __HAL_RCC_SPI123_CONFIG(PeriphClkInit->Spi123ClockSelection); 800b9a0: 4b37 ldr r3, [pc, #220] @ (800ba80 ) 800b9a2: 6d1b ldr r3, [r3, #80] @ 0x50 800b9a4: f423 41e0 bic.w r1, r3, #28672 @ 0x7000 800b9a8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9ac: 6e1b ldr r3, [r3, #96] @ 0x60 800b9ae: 4a34 ldr r2, [pc, #208] @ (800ba80 ) 800b9b0: 430b orrs r3, r1 800b9b2: 6513 str r3, [r2, #80] @ 0x50 800b9b4: e003 b.n 800b9be } else { /* set overall return value */ status = ret; 800b9b6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b9ba: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI4/5 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI45) == RCC_PERIPHCLK_SPI45) 800b9be: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9c2: e9d3 2300 ldrd r2, r3, [r3] 800b9c6: f402 5300 and.w r3, r2, #8192 @ 0x2000 800b9ca: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 800b9ce: 2300 movs r3, #0 800b9d0: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 800b9d4: e9d7 1238 ldrd r1, r2, [r7, #224] @ 0xe0 800b9d8: 460b mov r3, r1 800b9da: 4313 orrs r3, r2 800b9dc: d056 beq.n 800ba8c { switch (PeriphClkInit->Spi45ClockSelection) 800b9de: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9e2: 6e5b ldr r3, [r3, #100] @ 0x64 800b9e4: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800b9e8: d033 beq.n 800ba52 800b9ea: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800b9ee: d82c bhi.n 800ba4a 800b9f0: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800b9f4: d02f beq.n 800ba56 800b9f6: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800b9fa: d826 bhi.n 800ba4a 800b9fc: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800ba00: d02b beq.n 800ba5a 800ba02: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800ba06: d820 bhi.n 800ba4a 800ba08: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800ba0c: d012 beq.n 800ba34 800ba0e: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800ba12: d81a bhi.n 800ba4a 800ba14: 2b00 cmp r3, #0 800ba16: d022 beq.n 800ba5e 800ba18: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800ba1c: d115 bne.n 800ba4a /* SPI4/5 clock source configuration done later after clock selection check */ break; case RCC_SPI45CLKSOURCE_PLL2: /* PLL2 is used as clock source for SPI4/5 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800ba1e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba22: 3308 adds r3, #8 800ba24: 2101 movs r1, #1 800ba26: 4618 mov r0, r3 800ba28: f001 f9f2 bl 800ce10 800ba2c: 4603 mov r3, r0 800ba2e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800ba32: e015 b.n 800ba60 case RCC_SPI45CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800ba34: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba38: 3328 adds r3, #40 @ 0x28 800ba3a: 2101 movs r1, #1 800ba3c: 4618 mov r0, r3 800ba3e: f001 fa99 bl 800cf74 800ba42: 4603 mov r3, r0 800ba44: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800ba48: e00a b.n 800ba60 /* HSE, oscillator is used as source of SPI4/5 clock */ /* SPI4/5 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800ba4a: 2301 movs r3, #1 800ba4c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ba50: e006 b.n 800ba60 break; 800ba52: bf00 nop 800ba54: e004 b.n 800ba60 break; 800ba56: bf00 nop 800ba58: e002 b.n 800ba60 break; 800ba5a: bf00 nop 800ba5c: e000 b.n 800ba60 break; 800ba5e: bf00 nop } if (ret == HAL_OK) 800ba60: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba64: 2b00 cmp r3, #0 800ba66: d10d bne.n 800ba84 { /* Set the source of SPI4/5 clock*/ __HAL_RCC_SPI45_CONFIG(PeriphClkInit->Spi45ClockSelection); 800ba68: 4b05 ldr r3, [pc, #20] @ (800ba80 ) 800ba6a: 6d1b ldr r3, [r3, #80] @ 0x50 800ba6c: f423 21e0 bic.w r1, r3, #458752 @ 0x70000 800ba70: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba74: 6e5b ldr r3, [r3, #100] @ 0x64 800ba76: 4a02 ldr r2, [pc, #8] @ (800ba80 ) 800ba78: 430b orrs r3, r1 800ba7a: 6513 str r3, [r2, #80] @ 0x50 800ba7c: e006 b.n 800ba8c 800ba7e: bf00 nop 800ba80: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800ba84: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba88: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI6 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI6) == RCC_PERIPHCLK_SPI6) 800ba8c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba90: e9d3 2300 ldrd r2, r3, [r3] 800ba94: f402 4380 and.w r3, r2, #16384 @ 0x4000 800ba98: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 800ba9c: 2300 movs r3, #0 800ba9e: f8c7 30dc str.w r3, [r7, #220] @ 0xdc 800baa2: e9d7 1236 ldrd r1, r2, [r7, #216] @ 0xd8 800baa6: 460b mov r3, r1 800baa8: 4313 orrs r3, r2 800baaa: d055 beq.n 800bb58 { switch (PeriphClkInit->Spi6ClockSelection) 800baac: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bab0: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800bab4: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800bab8: d033 beq.n 800bb22 800baba: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800babe: d82c bhi.n 800bb1a 800bac0: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800bac4: d02f beq.n 800bb26 800bac6: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800baca: d826 bhi.n 800bb1a 800bacc: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800bad0: d02b beq.n 800bb2a 800bad2: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800bad6: d820 bhi.n 800bb1a 800bad8: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800badc: d012 beq.n 800bb04 800bade: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bae2: d81a bhi.n 800bb1a 800bae4: 2b00 cmp r3, #0 800bae6: d022 beq.n 800bb2e 800bae8: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800baec: d115 bne.n 800bb1a /* SPI6 clock source configuration done later after clock selection check */ break; case RCC_SPI6CLKSOURCE_PLL2: /* PLL2 is used as clock source for SPI6*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800baee: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800baf2: 3308 adds r3, #8 800baf4: 2101 movs r1, #1 800baf6: 4618 mov r0, r3 800baf8: f001 f98a bl 800ce10 800bafc: 4603 mov r3, r0 800bafe: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800bb02: e015 b.n 800bb30 case RCC_SPI6CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI6*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800bb04: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb08: 3328 adds r3, #40 @ 0x28 800bb0a: 2101 movs r1, #1 800bb0c: 4618 mov r0, r3 800bb0e: f001 fa31 bl 800cf74 800bb12: 4603 mov r3, r0 800bb14: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800bb18: e00a b.n 800bb30 /* SPI6 clock source configuration done later after clock selection check */ break; #endif default: ret = HAL_ERROR; 800bb1a: 2301 movs r3, #1 800bb1c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bb20: e006 b.n 800bb30 break; 800bb22: bf00 nop 800bb24: e004 b.n 800bb30 break; 800bb26: bf00 nop 800bb28: e002 b.n 800bb30 break; 800bb2a: bf00 nop 800bb2c: e000 b.n 800bb30 break; 800bb2e: bf00 nop } if (ret == HAL_OK) 800bb30: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bb34: 2b00 cmp r3, #0 800bb36: d10b bne.n 800bb50 { /* Set the source of SPI6 clock*/ __HAL_RCC_SPI6_CONFIG(PeriphClkInit->Spi6ClockSelection); 800bb38: 4ba3 ldr r3, [pc, #652] @ (800bdc8 ) 800bb3a: 6d9b ldr r3, [r3, #88] @ 0x58 800bb3c: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800bb40: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb44: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800bb48: 4a9f ldr r2, [pc, #636] @ (800bdc8 ) 800bb4a: 430b orrs r3, r1 800bb4c: 6593 str r3, [r2, #88] @ 0x58 800bb4e: e003 b.n 800bb58 } else { /* set overall return value */ status = ret; 800bb50: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bb54: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*DSI*/ #if defined(FDCAN1) || defined(FDCAN2) /*---------------------------- FDCAN configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_FDCAN) == RCC_PERIPHCLK_FDCAN) 800bb58: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb5c: e9d3 2300 ldrd r2, r3, [r3] 800bb60: f402 4300 and.w r3, r2, #32768 @ 0x8000 800bb64: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800bb68: 2300 movs r3, #0 800bb6a: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 800bb6e: e9d7 1234 ldrd r1, r2, [r7, #208] @ 0xd0 800bb72: 460b mov r3, r1 800bb74: 4313 orrs r3, r2 800bb76: d037 beq.n 800bbe8 { switch (PeriphClkInit->FdcanClockSelection) 800bb78: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb7c: 6f1b ldr r3, [r3, #112] @ 0x70 800bb7e: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bb82: d00e beq.n 800bba2 800bb84: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bb88: d816 bhi.n 800bbb8 800bb8a: 2b00 cmp r3, #0 800bb8c: d018 beq.n 800bbc0 800bb8e: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800bb92: d111 bne.n 800bbb8 { case RCC_FDCANCLKSOURCE_PLL: /* PLL is used as clock source for FDCAN*/ /* Enable FDCAN Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800bb94: 4b8c ldr r3, [pc, #560] @ (800bdc8 ) 800bb96: 6adb ldr r3, [r3, #44] @ 0x2c 800bb98: 4a8b ldr r2, [pc, #556] @ (800bdc8 ) 800bb9a: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bb9e: 62d3 str r3, [r2, #44] @ 0x2c /* FDCAN clock source configuration done later after clock selection check */ break; 800bba0: e00f b.n 800bbc2 case RCC_FDCANCLKSOURCE_PLL2: /* PLL2 is used as clock source for FDCAN*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800bba2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bba6: 3308 adds r3, #8 800bba8: 2101 movs r1, #1 800bbaa: 4618 mov r0, r3 800bbac: f001 f930 bl 800ce10 800bbb0: 4603 mov r3, r0 800bbb2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FDCAN clock source configuration done later after clock selection check */ break; 800bbb6: e004 b.n 800bbc2 /* HSE is used as clock source for FDCAN*/ /* FDCAN clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bbb8: 2301 movs r3, #1 800bbba: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bbbe: e000 b.n 800bbc2 break; 800bbc0: bf00 nop } if (ret == HAL_OK) 800bbc2: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbc6: 2b00 cmp r3, #0 800bbc8: d10a bne.n 800bbe0 { /* Set the source of FDCAN clock*/ __HAL_RCC_FDCAN_CONFIG(PeriphClkInit->FdcanClockSelection); 800bbca: 4b7f ldr r3, [pc, #508] @ (800bdc8 ) 800bbcc: 6d1b ldr r3, [r3, #80] @ 0x50 800bbce: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800bbd2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbd6: 6f1b ldr r3, [r3, #112] @ 0x70 800bbd8: 4a7b ldr r2, [pc, #492] @ (800bdc8 ) 800bbda: 430b orrs r3, r1 800bbdc: 6513 str r3, [r2, #80] @ 0x50 800bbde: e003 b.n 800bbe8 } else { /* set overall return value */ status = ret; 800bbe0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbe4: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*FDCAN1 || FDCAN2*/ /*---------------------------- FMC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_FMC) == RCC_PERIPHCLK_FMC) 800bbe8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbec: e9d3 2300 ldrd r2, r3, [r3] 800bbf0: f002 7380 and.w r3, r2, #16777216 @ 0x1000000 800bbf4: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800bbf8: 2300 movs r3, #0 800bbfa: f8c7 30cc str.w r3, [r7, #204] @ 0xcc 800bbfe: e9d7 1232 ldrd r1, r2, [r7, #200] @ 0xc8 800bc02: 460b mov r3, r1 800bc04: 4313 orrs r3, r2 800bc06: d039 beq.n 800bc7c { switch (PeriphClkInit->FmcClockSelection) 800bc08: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc0c: 6c9b ldr r3, [r3, #72] @ 0x48 800bc0e: 2b03 cmp r3, #3 800bc10: d81c bhi.n 800bc4c 800bc12: a201 add r2, pc, #4 @ (adr r2, 800bc18 ) 800bc14: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800bc18: 0800bc55 .word 0x0800bc55 800bc1c: 0800bc29 .word 0x0800bc29 800bc20: 0800bc37 .word 0x0800bc37 800bc24: 0800bc55 .word 0x0800bc55 { case RCC_FMCCLKSOURCE_PLL: /* PLL is used as clock source for FMC*/ /* Enable FMC Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800bc28: 4b67 ldr r3, [pc, #412] @ (800bdc8 ) 800bc2a: 6adb ldr r3, [r3, #44] @ 0x2c 800bc2c: 4a66 ldr r2, [pc, #408] @ (800bdc8 ) 800bc2e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bc32: 62d3 str r3, [r2, #44] @ 0x2c /* FMC clock source configuration done later after clock selection check */ break; 800bc34: e00f b.n 800bc56 case RCC_FMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for FMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800bc36: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc3a: 3308 adds r3, #8 800bc3c: 2102 movs r1, #2 800bc3e: 4618 mov r0, r3 800bc40: f001 f8e6 bl 800ce10 800bc44: 4603 mov r3, r0 800bc46: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FMC clock source configuration done later after clock selection check */ break; 800bc4a: e004 b.n 800bc56 case RCC_FMCCLKSOURCE_HCLK: /* D1/CD HCLK clock selected as FMC kernel peripheral clock */ break; default: ret = HAL_ERROR; 800bc4c: 2301 movs r3, #1 800bc4e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bc52: e000 b.n 800bc56 break; 800bc54: bf00 nop } if (ret == HAL_OK) 800bc56: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bc5a: 2b00 cmp r3, #0 800bc5c: d10a bne.n 800bc74 { /* Set the source of FMC clock*/ __HAL_RCC_FMC_CONFIG(PeriphClkInit->FmcClockSelection); 800bc5e: 4b5a ldr r3, [pc, #360] @ (800bdc8 ) 800bc60: 6cdb ldr r3, [r3, #76] @ 0x4c 800bc62: f023 0103 bic.w r1, r3, #3 800bc66: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc6a: 6c9b ldr r3, [r3, #72] @ 0x48 800bc6c: 4a56 ldr r2, [pc, #344] @ (800bdc8 ) 800bc6e: 430b orrs r3, r1 800bc70: 64d3 str r3, [r2, #76] @ 0x4c 800bc72: e003 b.n 800bc7c } else { /* set overall return value */ status = ret; 800bc74: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bc78: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- RTC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC) 800bc7c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc80: e9d3 2300 ldrd r2, r3, [r3] 800bc84: f402 0380 and.w r3, r2, #4194304 @ 0x400000 800bc88: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800bc8c: 2300 movs r3, #0 800bc8e: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800bc92: e9d7 1230 ldrd r1, r2, [r7, #192] @ 0xc0 800bc96: 460b mov r3, r1 800bc98: 4313 orrs r3, r2 800bc9a: f000 809f beq.w 800bddc { /* check for RTC Parameters used to output RTCCLK */ assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); /* Enable write access to Backup domain */ SET_BIT(PWR->CR1, PWR_CR1_DBP); 800bc9e: 4b4b ldr r3, [pc, #300] @ (800bdcc ) 800bca0: 681b ldr r3, [r3, #0] 800bca2: 4a4a ldr r2, [pc, #296] @ (800bdcc ) 800bca4: f443 7380 orr.w r3, r3, #256 @ 0x100 800bca8: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800bcaa: f7f9 fd81 bl 80057b0 800bcae: f8c7 0118 str.w r0, [r7, #280] @ 0x118 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800bcb2: e00b b.n 800bccc { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800bcb4: f7f9 fd7c bl 80057b0 800bcb8: 4602 mov r2, r0 800bcba: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800bcbe: 1ad3 subs r3, r2, r3 800bcc0: 2b64 cmp r3, #100 @ 0x64 800bcc2: d903 bls.n 800bccc { ret = HAL_TIMEOUT; 800bcc4: 2303 movs r3, #3 800bcc6: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bcca: e005 b.n 800bcd8 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800bccc: 4b3f ldr r3, [pc, #252] @ (800bdcc ) 800bcce: 681b ldr r3, [r3, #0] 800bcd0: f403 7380 and.w r3, r3, #256 @ 0x100 800bcd4: 2b00 cmp r3, #0 800bcd6: d0ed beq.n 800bcb4 } } if (ret == HAL_OK) 800bcd8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bcdc: 2b00 cmp r3, #0 800bcde: d179 bne.n 800bdd4 { /* Reset the Backup domain only if the RTC Clock source selection is modified */ if ((RCC->BDCR & RCC_BDCR_RTCSEL) != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)) 800bce0: 4b39 ldr r3, [pc, #228] @ (800bdc8 ) 800bce2: 6f1a ldr r2, [r3, #112] @ 0x70 800bce4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bce8: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bcec: 4053 eors r3, r2 800bcee: f403 7340 and.w r3, r3, #768 @ 0x300 800bcf2: 2b00 cmp r3, #0 800bcf4: d015 beq.n 800bd22 { /* Store the content of BDCR register before the reset of Backup Domain */ tmpreg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 800bcf6: 4b34 ldr r3, [pc, #208] @ (800bdc8 ) 800bcf8: 6f1b ldr r3, [r3, #112] @ 0x70 800bcfa: f423 7340 bic.w r3, r3, #768 @ 0x300 800bcfe: f8c7 3114 str.w r3, [r7, #276] @ 0x114 /* RTC Clock selection can be changed only if the Backup Domain is reset */ __HAL_RCC_BACKUPRESET_FORCE(); 800bd02: 4b31 ldr r3, [pc, #196] @ (800bdc8 ) 800bd04: 6f1b ldr r3, [r3, #112] @ 0x70 800bd06: 4a30 ldr r2, [pc, #192] @ (800bdc8 ) 800bd08: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800bd0c: 6713 str r3, [r2, #112] @ 0x70 __HAL_RCC_BACKUPRESET_RELEASE(); 800bd0e: 4b2e ldr r3, [pc, #184] @ (800bdc8 ) 800bd10: 6f1b ldr r3, [r3, #112] @ 0x70 800bd12: 4a2d ldr r2, [pc, #180] @ (800bdc8 ) 800bd14: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800bd18: 6713 str r3, [r2, #112] @ 0x70 /* Restore the Content of BDCR register */ RCC->BDCR = tmpreg; 800bd1a: 4a2b ldr r2, [pc, #172] @ (800bdc8 ) 800bd1c: f8d7 3114 ldr.w r3, [r7, #276] @ 0x114 800bd20: 6713 str r3, [r2, #112] @ 0x70 } /* If LSE is selected as RTC clock source (and enabled prior to Backup Domain reset), wait for LSE reactivation */ if (PeriphClkInit->RTCClockSelection == RCC_RTCCLKSOURCE_LSE) 800bd22: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd26: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bd2a: f5b3 7f80 cmp.w r3, #256 @ 0x100 800bd2e: d118 bne.n 800bd62 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800bd30: f7f9 fd3e bl 80057b0 800bd34: f8c7 0118 str.w r0, [r7, #280] @ 0x118 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800bd38: e00d b.n 800bd56 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800bd3a: f7f9 fd39 bl 80057b0 800bd3e: 4602 mov r2, r0 800bd40: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800bd44: 1ad2 subs r2, r2, r3 800bd46: f241 3388 movw r3, #5000 @ 0x1388 800bd4a: 429a cmp r2, r3 800bd4c: d903 bls.n 800bd56 { ret = HAL_TIMEOUT; 800bd4e: 2303 movs r3, #3 800bd50: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bd54: e005 b.n 800bd62 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800bd56: 4b1c ldr r3, [pc, #112] @ (800bdc8 ) 800bd58: 6f1b ldr r3, [r3, #112] @ 0x70 800bd5a: f003 0302 and.w r3, r3, #2 800bd5e: 2b00 cmp r3, #0 800bd60: d0eb beq.n 800bd3a } } } if (ret == HAL_OK) 800bd62: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd66: 2b00 cmp r3, #0 800bd68: d129 bne.n 800bdbe { __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 800bd6a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd6e: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bd72: f403 7340 and.w r3, r3, #768 @ 0x300 800bd76: f5b3 7f40 cmp.w r3, #768 @ 0x300 800bd7a: d10e bne.n 800bd9a 800bd7c: 4b12 ldr r3, [pc, #72] @ (800bdc8 ) 800bd7e: 691b ldr r3, [r3, #16] 800bd80: f423 517c bic.w r1, r3, #16128 @ 0x3f00 800bd84: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd88: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bd8c: 091a lsrs r2, r3, #4 800bd8e: 4b10 ldr r3, [pc, #64] @ (800bdd0 ) 800bd90: 4013 ands r3, r2 800bd92: 4a0d ldr r2, [pc, #52] @ (800bdc8 ) 800bd94: 430b orrs r3, r1 800bd96: 6113 str r3, [r2, #16] 800bd98: e005 b.n 800bda6 800bd9a: 4b0b ldr r3, [pc, #44] @ (800bdc8 ) 800bd9c: 691b ldr r3, [r3, #16] 800bd9e: 4a0a ldr r2, [pc, #40] @ (800bdc8 ) 800bda0: f423 537c bic.w r3, r3, #16128 @ 0x3f00 800bda4: 6113 str r3, [r2, #16] 800bda6: 4b08 ldr r3, [pc, #32] @ (800bdc8 ) 800bda8: 6f19 ldr r1, [r3, #112] @ 0x70 800bdaa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bdae: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bdb2: f3c3 030b ubfx r3, r3, #0, #12 800bdb6: 4a04 ldr r2, [pc, #16] @ (800bdc8 ) 800bdb8: 430b orrs r3, r1 800bdba: 6713 str r3, [r2, #112] @ 0x70 800bdbc: e00e b.n 800bddc } else { /* set overall return value */ status = ret; 800bdbe: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bdc2: f887 311e strb.w r3, [r7, #286] @ 0x11e 800bdc6: e009 b.n 800bddc 800bdc8: 58024400 .word 0x58024400 800bdcc: 58024800 .word 0x58024800 800bdd0: 00ffffcf .word 0x00ffffcf } } else { /* set overall return value */ status = ret; 800bdd4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bdd8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART1/6 configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART16) == RCC_PERIPHCLK_USART16) 800bddc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bde0: e9d3 2300 ldrd r2, r3, [r3] 800bde4: f002 0301 and.w r3, r2, #1 800bde8: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800bdec: 2300 movs r3, #0 800bdee: f8c7 30bc str.w r3, [r7, #188] @ 0xbc 800bdf2: e9d7 122e ldrd r1, r2, [r7, #184] @ 0xb8 800bdf6: 460b mov r3, r1 800bdf8: 4313 orrs r3, r2 800bdfa: f000 8089 beq.w 800bf10 { switch (PeriphClkInit->Usart16ClockSelection) 800bdfe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be02: 6fdb ldr r3, [r3, #124] @ 0x7c 800be04: 2b28 cmp r3, #40 @ 0x28 800be06: d86b bhi.n 800bee0 800be08: a201 add r2, pc, #4 @ (adr r2, 800be10 ) 800be0a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800be0e: bf00 nop 800be10: 0800bee9 .word 0x0800bee9 800be14: 0800bee1 .word 0x0800bee1 800be18: 0800bee1 .word 0x0800bee1 800be1c: 0800bee1 .word 0x0800bee1 800be20: 0800bee1 .word 0x0800bee1 800be24: 0800bee1 .word 0x0800bee1 800be28: 0800bee1 .word 0x0800bee1 800be2c: 0800bee1 .word 0x0800bee1 800be30: 0800beb5 .word 0x0800beb5 800be34: 0800bee1 .word 0x0800bee1 800be38: 0800bee1 .word 0x0800bee1 800be3c: 0800bee1 .word 0x0800bee1 800be40: 0800bee1 .word 0x0800bee1 800be44: 0800bee1 .word 0x0800bee1 800be48: 0800bee1 .word 0x0800bee1 800be4c: 0800bee1 .word 0x0800bee1 800be50: 0800becb .word 0x0800becb 800be54: 0800bee1 .word 0x0800bee1 800be58: 0800bee1 .word 0x0800bee1 800be5c: 0800bee1 .word 0x0800bee1 800be60: 0800bee1 .word 0x0800bee1 800be64: 0800bee1 .word 0x0800bee1 800be68: 0800bee1 .word 0x0800bee1 800be6c: 0800bee1 .word 0x0800bee1 800be70: 0800bee9 .word 0x0800bee9 800be74: 0800bee1 .word 0x0800bee1 800be78: 0800bee1 .word 0x0800bee1 800be7c: 0800bee1 .word 0x0800bee1 800be80: 0800bee1 .word 0x0800bee1 800be84: 0800bee1 .word 0x0800bee1 800be88: 0800bee1 .word 0x0800bee1 800be8c: 0800bee1 .word 0x0800bee1 800be90: 0800bee9 .word 0x0800bee9 800be94: 0800bee1 .word 0x0800bee1 800be98: 0800bee1 .word 0x0800bee1 800be9c: 0800bee1 .word 0x0800bee1 800bea0: 0800bee1 .word 0x0800bee1 800bea4: 0800bee1 .word 0x0800bee1 800bea8: 0800bee1 .word 0x0800bee1 800beac: 0800bee1 .word 0x0800bee1 800beb0: 0800bee9 .word 0x0800bee9 case RCC_USART16CLKSOURCE_PCLK2: /* CD/D2 PCLK2 as clock source for USART1/6 */ /* USART1/6 clock source configuration done later after clock selection check */ break; case RCC_USART16CLKSOURCE_PLL2: /* PLL2 is used as clock source for USART1/6 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800beb4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800beb8: 3308 adds r3, #8 800beba: 2101 movs r1, #1 800bebc: 4618 mov r0, r3 800bebe: f000 ffa7 bl 800ce10 800bec2: 4603 mov r3, r0 800bec4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800bec8: e00f b.n 800beea case RCC_USART16CLKSOURCE_PLL3: /* PLL3 is used as clock source for USART1/6 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800beca: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bece: 3328 adds r3, #40 @ 0x28 800bed0: 2101 movs r1, #1 800bed2: 4618 mov r0, r3 800bed4: f001 f84e bl 800cf74 800bed8: 4603 mov r3, r0 800beda: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800bede: e004 b.n 800beea /* LSE, oscillator is used as source of USART1/6 clock */ /* USART1/6 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bee0: 2301 movs r3, #1 800bee2: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bee6: e000 b.n 800beea break; 800bee8: bf00 nop } if (ret == HAL_OK) 800beea: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800beee: 2b00 cmp r3, #0 800bef0: d10a bne.n 800bf08 { /* Set the source of USART1/6 clock */ __HAL_RCC_USART16_CONFIG(PeriphClkInit->Usart16ClockSelection); 800bef2: 4bbf ldr r3, [pc, #764] @ (800c1f0 ) 800bef4: 6d5b ldr r3, [r3, #84] @ 0x54 800bef6: f023 0138 bic.w r1, r3, #56 @ 0x38 800befa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800befe: 6fdb ldr r3, [r3, #124] @ 0x7c 800bf00: 4abb ldr r2, [pc, #748] @ (800c1f0 ) 800bf02: 430b orrs r3, r1 800bf04: 6553 str r3, [r2, #84] @ 0x54 800bf06: e003 b.n 800bf10 } else { /* set overall return value */ status = ret; 800bf08: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bf0c: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART2/3/4/5/7/8 Configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART234578) == RCC_PERIPHCLK_USART234578) 800bf10: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf14: e9d3 2300 ldrd r2, r3, [r3] 800bf18: f002 0302 and.w r3, r2, #2 800bf1c: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800bf20: 2300 movs r3, #0 800bf22: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800bf26: e9d7 122c ldrd r1, r2, [r7, #176] @ 0xb0 800bf2a: 460b mov r3, r1 800bf2c: 4313 orrs r3, r2 800bf2e: d041 beq.n 800bfb4 { switch (PeriphClkInit->Usart234578ClockSelection) 800bf30: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf34: 6f9b ldr r3, [r3, #120] @ 0x78 800bf36: 2b05 cmp r3, #5 800bf38: d824 bhi.n 800bf84 800bf3a: a201 add r2, pc, #4 @ (adr r2, 800bf40 ) 800bf3c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800bf40: 0800bf8d .word 0x0800bf8d 800bf44: 0800bf59 .word 0x0800bf59 800bf48: 0800bf6f .word 0x0800bf6f 800bf4c: 0800bf8d .word 0x0800bf8d 800bf50: 0800bf8d .word 0x0800bf8d 800bf54: 0800bf8d .word 0x0800bf8d case RCC_USART234578CLKSOURCE_PCLK1: /* CD/D2 PCLK1 as clock source for USART2/3/4/5/7/8 */ /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; case RCC_USART234578CLKSOURCE_PLL2: /* PLL2 is used as clock source for USART2/3/4/5/7/8 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800bf58: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf5c: 3308 adds r3, #8 800bf5e: 2101 movs r1, #1 800bf60: 4618 mov r0, r3 800bf62: f000 ff55 bl 800ce10 800bf66: 4603 mov r3, r0 800bf68: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800bf6c: e00f b.n 800bf8e case RCC_USART234578CLKSOURCE_PLL3: /* PLL3 is used as clock source for USART2/3/4/5/7/8 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800bf6e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf72: 3328 adds r3, #40 @ 0x28 800bf74: 2101 movs r1, #1 800bf76: 4618 mov r0, r3 800bf78: f000 fffc bl 800cf74 800bf7c: 4603 mov r3, r0 800bf7e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800bf82: e004 b.n 800bf8e /* LSE, oscillator is used as source of USART2/3/4/5/7/8 clock */ /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bf84: 2301 movs r3, #1 800bf86: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bf8a: e000 b.n 800bf8e break; 800bf8c: bf00 nop } if (ret == HAL_OK) 800bf8e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bf92: 2b00 cmp r3, #0 800bf94: d10a bne.n 800bfac { /* Set the source of USART2/3/4/5/7/8 clock */ __HAL_RCC_USART234578_CONFIG(PeriphClkInit->Usart234578ClockSelection); 800bf96: 4b96 ldr r3, [pc, #600] @ (800c1f0 ) 800bf98: 6d5b ldr r3, [r3, #84] @ 0x54 800bf9a: f023 0107 bic.w r1, r3, #7 800bf9e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bfa2: 6f9b ldr r3, [r3, #120] @ 0x78 800bfa4: 4a92 ldr r2, [pc, #584] @ (800c1f0 ) 800bfa6: 430b orrs r3, r1 800bfa8: 6553 str r3, [r2, #84] @ 0x54 800bfaa: e003 b.n 800bfb4 } else { /* set overall return value */ status = ret; 800bfac: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bfb0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- LPUART1 Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1) 800bfb4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bfb8: e9d3 2300 ldrd r2, r3, [r3] 800bfbc: f002 0304 and.w r3, r2, #4 800bfc0: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 800bfc4: 2300 movs r3, #0 800bfc6: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800bfca: e9d7 122a ldrd r1, r2, [r7, #168] @ 0xa8 800bfce: 460b mov r3, r1 800bfd0: 4313 orrs r3, r2 800bfd2: d044 beq.n 800c05e { switch (PeriphClkInit->Lpuart1ClockSelection) 800bfd4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bfd8: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800bfdc: 2b05 cmp r3, #5 800bfde: d825 bhi.n 800c02c 800bfe0: a201 add r2, pc, #4 @ (adr r2, 800bfe8 ) 800bfe2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800bfe6: bf00 nop 800bfe8: 0800c035 .word 0x0800c035 800bfec: 0800c001 .word 0x0800c001 800bff0: 0800c017 .word 0x0800c017 800bff4: 0800c035 .word 0x0800c035 800bff8: 0800c035 .word 0x0800c035 800bffc: 0800c035 .word 0x0800c035 case RCC_LPUART1CLKSOURCE_PCLK4: /* SRD/D3 PCLK1 (PCLK4) as clock source for LPUART1 */ /* LPUART1 clock source configuration done later after clock selection check */ break; case RCC_LPUART1CLKSOURCE_PLL2: /* PLL2 is used as clock source for LPUART1 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800c000: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c004: 3308 adds r3, #8 800c006: 2101 movs r1, #1 800c008: 4618 mov r0, r3 800c00a: f000 ff01 bl 800ce10 800c00e: 4603 mov r3, r0 800c010: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800c014: e00f b.n 800c036 case RCC_LPUART1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPUART1 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c016: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c01a: 3328 adds r3, #40 @ 0x28 800c01c: 2101 movs r1, #1 800c01e: 4618 mov r0, r3 800c020: f000 ffa8 bl 800cf74 800c024: 4603 mov r3, r0 800c026: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800c02a: e004 b.n 800c036 /* LSE, oscillator is used as source of LPUART1 clock */ /* LPUART1 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c02c: 2301 movs r3, #1 800c02e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c032: e000 b.n 800c036 break; 800c034: bf00 nop } if (ret == HAL_OK) 800c036: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c03a: 2b00 cmp r3, #0 800c03c: d10b bne.n 800c056 { /* Set the source of LPUART1 clock */ __HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection); 800c03e: 4b6c ldr r3, [pc, #432] @ (800c1f0 ) 800c040: 6d9b ldr r3, [r3, #88] @ 0x58 800c042: f023 0107 bic.w r1, r3, #7 800c046: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c04a: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800c04e: 4a68 ldr r2, [pc, #416] @ (800c1f0 ) 800c050: 430b orrs r3, r1 800c052: 6593 str r3, [r2, #88] @ 0x58 800c054: e003 b.n 800c05e } else { /* set overall return value */ status = ret; 800c056: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c05a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1) 800c05e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c062: e9d3 2300 ldrd r2, r3, [r3] 800c066: f002 0320 and.w r3, r2, #32 800c06a: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 800c06e: 2300 movs r3, #0 800c070: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 800c074: e9d7 1228 ldrd r1, r2, [r7, #160] @ 0xa0 800c078: 460b mov r3, r1 800c07a: 4313 orrs r3, r2 800c07c: d055 beq.n 800c12a { switch (PeriphClkInit->Lptim1ClockSelection) 800c07e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c082: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800c086: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800c08a: d033 beq.n 800c0f4 800c08c: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800c090: d82c bhi.n 800c0ec 800c092: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800c096: d02f beq.n 800c0f8 800c098: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800c09c: d826 bhi.n 800c0ec 800c09e: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800c0a2: d02b beq.n 800c0fc 800c0a4: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800c0a8: d820 bhi.n 800c0ec 800c0aa: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800c0ae: d012 beq.n 800c0d6 800c0b0: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800c0b4: d81a bhi.n 800c0ec 800c0b6: 2b00 cmp r3, #0 800c0b8: d022 beq.n 800c100 800c0ba: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800c0be: d115 bne.n 800c0ec /* LPTIM1 clock source configuration done later after clock selection check */ break; case RCC_LPTIM1CLKSOURCE_PLL2: /* PLL2 is used as clock source for LPTIM1*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c0c0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c0c4: 3308 adds r3, #8 800c0c6: 2100 movs r1, #0 800c0c8: 4618 mov r0, r3 800c0ca: f000 fea1 bl 800ce10 800c0ce: 4603 mov r3, r0 800c0d0: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800c0d4: e015 b.n 800c102 case RCC_LPTIM1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c0d6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c0da: 3328 adds r3, #40 @ 0x28 800c0dc: 2102 movs r1, #2 800c0de: 4618 mov r0, r3 800c0e0: f000 ff48 bl 800cf74 800c0e4: 4603 mov r3, r0 800c0e6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800c0ea: e00a b.n 800c102 /* HSI, HSE, or CSI oscillator is used as source of LPTIM1 clock */ /* LPTIM1 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c0ec: 2301 movs r3, #1 800c0ee: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c0f2: e006 b.n 800c102 break; 800c0f4: bf00 nop 800c0f6: e004 b.n 800c102 break; 800c0f8: bf00 nop 800c0fa: e002 b.n 800c102 break; 800c0fc: bf00 nop 800c0fe: e000 b.n 800c102 break; 800c100: bf00 nop } if (ret == HAL_OK) 800c102: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c106: 2b00 cmp r3, #0 800c108: d10b bne.n 800c122 { /* Set the source of LPTIM1 clock*/ __HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection); 800c10a: 4b39 ldr r3, [pc, #228] @ (800c1f0 ) 800c10c: 6d5b ldr r3, [r3, #84] @ 0x54 800c10e: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800c112: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c116: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800c11a: 4a35 ldr r2, [pc, #212] @ (800c1f0 ) 800c11c: 430b orrs r3, r1 800c11e: 6553 str r3, [r2, #84] @ 0x54 800c120: e003 b.n 800c12a } else { /* set overall return value */ status = ret; 800c122: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c126: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == RCC_PERIPHCLK_LPTIM2) 800c12a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c12e: e9d3 2300 ldrd r2, r3, [r3] 800c132: f002 0340 and.w r3, r2, #64 @ 0x40 800c136: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800c13a: 2300 movs r3, #0 800c13c: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800c140: e9d7 1226 ldrd r1, r2, [r7, #152] @ 0x98 800c144: 460b mov r3, r1 800c146: 4313 orrs r3, r2 800c148: d058 beq.n 800c1fc { switch (PeriphClkInit->Lptim2ClockSelection) 800c14a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c14e: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800c152: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800c156: d033 beq.n 800c1c0 800c158: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800c15c: d82c bhi.n 800c1b8 800c15e: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c162: d02f beq.n 800c1c4 800c164: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c168: d826 bhi.n 800c1b8 800c16a: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800c16e: d02b beq.n 800c1c8 800c170: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800c174: d820 bhi.n 800c1b8 800c176: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800c17a: d012 beq.n 800c1a2 800c17c: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800c180: d81a bhi.n 800c1b8 800c182: 2b00 cmp r3, #0 800c184: d022 beq.n 800c1cc 800c186: f5b3 6f80 cmp.w r3, #1024 @ 0x400 800c18a: d115 bne.n 800c1b8 /* LPTIM2 clock source configuration done later after clock selection check */ break; case RCC_LPTIM2CLKSOURCE_PLL2: /* PLL2 is used as clock source for LPTIM2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c18c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c190: 3308 adds r3, #8 800c192: 2100 movs r1, #0 800c194: 4618 mov r0, r3 800c196: f000 fe3b bl 800ce10 800c19a: 4603 mov r3, r0 800c19c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800c1a0: e015 b.n 800c1ce case RCC_LPTIM2CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c1a2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c1a6: 3328 adds r3, #40 @ 0x28 800c1a8: 2102 movs r1, #2 800c1aa: 4618 mov r0, r3 800c1ac: f000 fee2 bl 800cf74 800c1b0: 4603 mov r3, r0 800c1b2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800c1b6: e00a b.n 800c1ce /* HSI, HSE, or CSI oscillator is used as source of LPTIM2 clock */ /* LPTIM2 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c1b8: 2301 movs r3, #1 800c1ba: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c1be: e006 b.n 800c1ce break; 800c1c0: bf00 nop 800c1c2: e004 b.n 800c1ce break; 800c1c4: bf00 nop 800c1c6: e002 b.n 800c1ce break; 800c1c8: bf00 nop 800c1ca: e000 b.n 800c1ce break; 800c1cc: bf00 nop } if (ret == HAL_OK) 800c1ce: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c1d2: 2b00 cmp r3, #0 800c1d4: d10e bne.n 800c1f4 { /* Set the source of LPTIM2 clock*/ __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection); 800c1d6: 4b06 ldr r3, [pc, #24] @ (800c1f0 ) 800c1d8: 6d9b ldr r3, [r3, #88] @ 0x58 800c1da: f423 51e0 bic.w r1, r3, #7168 @ 0x1c00 800c1de: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c1e2: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800c1e6: 4a02 ldr r2, [pc, #8] @ (800c1f0 ) 800c1e8: 430b orrs r3, r1 800c1ea: 6593 str r3, [r2, #88] @ 0x58 800c1ec: e006 b.n 800c1fc 800c1ee: bf00 nop 800c1f0: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800c1f4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c1f8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM345 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM345) == RCC_PERIPHCLK_LPTIM345) 800c1fc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c200: e9d3 2300 ldrd r2, r3, [r3] 800c204: f002 0380 and.w r3, r2, #128 @ 0x80 800c208: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800c20c: 2300 movs r3, #0 800c20e: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800c212: e9d7 1224 ldrd r1, r2, [r7, #144] @ 0x90 800c216: 460b mov r3, r1 800c218: 4313 orrs r3, r2 800c21a: d055 beq.n 800c2c8 { switch (PeriphClkInit->Lptim345ClockSelection) 800c21c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c220: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800c224: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800c228: d033 beq.n 800c292 800c22a: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800c22e: d82c bhi.n 800c28a 800c230: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800c234: d02f beq.n 800c296 800c236: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800c23a: d826 bhi.n 800c28a 800c23c: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800c240: d02b beq.n 800c29a 800c242: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800c246: d820 bhi.n 800c28a 800c248: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800c24c: d012 beq.n 800c274 800c24e: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800c252: d81a bhi.n 800c28a 800c254: 2b00 cmp r3, #0 800c256: d022 beq.n 800c29e 800c258: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800c25c: d115 bne.n 800c28a case RCC_LPTIM345CLKSOURCE_PCLK4: /* SRD/D3 PCLK1 (PCLK4) as clock source for LPTIM3/4/5 */ /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; case RCC_LPTIM345CLKSOURCE_PLL2: /* PLL2 is used as clock source for LPTIM3/4/5 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c25e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c262: 3308 adds r3, #8 800c264: 2100 movs r1, #0 800c266: 4618 mov r0, r3 800c268: f000 fdd2 bl 800ce10 800c26c: 4603 mov r3, r0 800c26e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800c272: e015 b.n 800c2a0 case RCC_LPTIM345CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM3/4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c274: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c278: 3328 adds r3, #40 @ 0x28 800c27a: 2102 movs r1, #2 800c27c: 4618 mov r0, r3 800c27e: f000 fe79 bl 800cf74 800c282: 4603 mov r3, r0 800c284: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800c288: e00a b.n 800c2a0 /* HSI, HSE, or CSI oscillator is used as source of LPTIM3/4/5 clock */ /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c28a: 2301 movs r3, #1 800c28c: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c290: e006 b.n 800c2a0 break; 800c292: bf00 nop 800c294: e004 b.n 800c2a0 break; 800c296: bf00 nop 800c298: e002 b.n 800c2a0 break; 800c29a: bf00 nop 800c29c: e000 b.n 800c2a0 break; 800c29e: bf00 nop } if (ret == HAL_OK) 800c2a0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c2a4: 2b00 cmp r3, #0 800c2a6: d10b bne.n 800c2c0 { /* Set the source of LPTIM3/4/5 clock */ __HAL_RCC_LPTIM345_CONFIG(PeriphClkInit->Lptim345ClockSelection); 800c2a8: 4bbb ldr r3, [pc, #748] @ (800c598 ) 800c2aa: 6d9b ldr r3, [r3, #88] @ 0x58 800c2ac: f423 4160 bic.w r1, r3, #57344 @ 0xe000 800c2b0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2b4: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800c2b8: 4ab7 ldr r2, [pc, #732] @ (800c598 ) 800c2ba: 430b orrs r3, r1 800c2bc: 6593 str r3, [r2, #88] @ 0x58 800c2be: e003 b.n 800c2c8 } else { /* set overall return value */ status = ret; 800c2c0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c2c4: f887 311e strb.w r3, [r7, #286] @ 0x11e __HAL_RCC_I2C1235_CONFIG(PeriphClkInit->I2c1235ClockSelection); } #else if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C123) == RCC_PERIPHCLK_I2C123) 800c2c8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2cc: e9d3 2300 ldrd r2, r3, [r3] 800c2d0: f002 0308 and.w r3, r2, #8 800c2d4: f8c7 3088 str.w r3, [r7, #136] @ 0x88 800c2d8: 2300 movs r3, #0 800c2da: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800c2de: e9d7 1222 ldrd r1, r2, [r7, #136] @ 0x88 800c2e2: 460b mov r3, r1 800c2e4: 4313 orrs r3, r2 800c2e6: d01e beq.n 800c326 { /* Check the parameters */ assert_param(IS_RCC_I2C123CLKSOURCE(PeriphClkInit->I2c123ClockSelection)); if ((PeriphClkInit->I2c123ClockSelection) == RCC_I2C123CLKSOURCE_PLL3) 800c2e8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2ec: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800c2f0: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c2f4: d10c bne.n 800c310 { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800c2f6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2fa: 3328 adds r3, #40 @ 0x28 800c2fc: 2102 movs r1, #2 800c2fe: 4618 mov r0, r3 800c300: f000 fe38 bl 800cf74 800c304: 4603 mov r3, r0 800c306: 2b00 cmp r3, #0 800c308: d002 beq.n 800c310 { status = HAL_ERROR; 800c30a: 2301 movs r3, #1 800c30c: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C123_CONFIG(PeriphClkInit->I2c123ClockSelection); 800c310: 4ba1 ldr r3, [pc, #644] @ (800c598 ) 800c312: 6d5b ldr r3, [r3, #84] @ 0x54 800c314: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800c318: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c31c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800c320: 4a9d ldr r2, [pc, #628] @ (800c598 ) 800c322: 430b orrs r3, r1 800c324: 6553 str r3, [r2, #84] @ 0x54 } #endif /* I2C5 */ /*------------------------------ I2C4 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) 800c326: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c32a: e9d3 2300 ldrd r2, r3, [r3] 800c32e: f002 0310 and.w r3, r2, #16 800c332: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800c336: 2300 movs r3, #0 800c338: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800c33c: e9d7 1220 ldrd r1, r2, [r7, #128] @ 0x80 800c340: 460b mov r3, r1 800c342: 4313 orrs r3, r2 800c344: d01e beq.n 800c384 { /* Check the parameters */ assert_param(IS_RCC_I2C4CLKSOURCE(PeriphClkInit->I2c4ClockSelection)); if ((PeriphClkInit->I2c4ClockSelection) == RCC_I2C4CLKSOURCE_PLL3) 800c346: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c34a: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800c34e: f5b3 7f80 cmp.w r3, #256 @ 0x100 800c352: d10c bne.n 800c36e { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800c354: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c358: 3328 adds r3, #40 @ 0x28 800c35a: 2102 movs r1, #2 800c35c: 4618 mov r0, r3 800c35e: f000 fe09 bl 800cf74 800c362: 4603 mov r3, r0 800c364: 2b00 cmp r3, #0 800c366: d002 beq.n 800c36e { status = HAL_ERROR; 800c368: 2301 movs r3, #1 800c36a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C4_CONFIG(PeriphClkInit->I2c4ClockSelection); 800c36e: 4b8a ldr r3, [pc, #552] @ (800c598 ) 800c370: 6d9b ldr r3, [r3, #88] @ 0x58 800c372: f423 7140 bic.w r1, r3, #768 @ 0x300 800c376: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c37a: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800c37e: 4a86 ldr r2, [pc, #536] @ (800c598 ) 800c380: 430b orrs r3, r1 800c382: 6593 str r3, [r2, #88] @ 0x58 } /*---------------------------- ADC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) 800c384: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c388: e9d3 2300 ldrd r2, r3, [r3] 800c38c: f402 2300 and.w r3, r2, #524288 @ 0x80000 800c390: 67bb str r3, [r7, #120] @ 0x78 800c392: 2300 movs r3, #0 800c394: 67fb str r3, [r7, #124] @ 0x7c 800c396: e9d7 121e ldrd r1, r2, [r7, #120] @ 0x78 800c39a: 460b mov r3, r1 800c39c: 4313 orrs r3, r2 800c39e: d03e beq.n 800c41e { switch (PeriphClkInit->AdcClockSelection) 800c3a0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3a4: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800c3a8: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800c3ac: d022 beq.n 800c3f4 800c3ae: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800c3b2: d81b bhi.n 800c3ec 800c3b4: 2b00 cmp r3, #0 800c3b6: d003 beq.n 800c3c0 800c3b8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800c3bc: d00b beq.n 800c3d6 800c3be: e015 b.n 800c3ec { case RCC_ADCCLKSOURCE_PLL2: /* PLL2 is used as clock source for ADC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c3c0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3c4: 3308 adds r3, #8 800c3c6: 2100 movs r1, #0 800c3c8: 4618 mov r0, r3 800c3ca: f000 fd21 bl 800ce10 800c3ce: 4603 mov r3, r0 800c3d0: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800c3d4: e00f b.n 800c3f6 case RCC_ADCCLKSOURCE_PLL3: /* PLL3 is used as clock source for ADC*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c3d6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3da: 3328 adds r3, #40 @ 0x28 800c3dc: 2102 movs r1, #2 800c3de: 4618 mov r0, r3 800c3e0: f000 fdc8 bl 800cf74 800c3e4: 4603 mov r3, r0 800c3e6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800c3ea: e004 b.n 800c3f6 /* HSI, HSE, or CSI oscillator is used as source of ADC clock */ /* ADC clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c3ec: 2301 movs r3, #1 800c3ee: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c3f2: e000 b.n 800c3f6 break; 800c3f4: bf00 nop } if (ret == HAL_OK) 800c3f6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c3fa: 2b00 cmp r3, #0 800c3fc: d10b bne.n 800c416 { /* Set the source of ADC clock*/ __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); 800c3fe: 4b66 ldr r3, [pc, #408] @ (800c598 ) 800c400: 6d9b ldr r3, [r3, #88] @ 0x58 800c402: f423 3140 bic.w r1, r3, #196608 @ 0x30000 800c406: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c40a: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800c40e: 4a62 ldr r2, [pc, #392] @ (800c598 ) 800c410: 430b orrs r3, r1 800c412: 6593 str r3, [r2, #88] @ 0x58 800c414: e003 b.n 800c41e } else { /* set overall return value */ status = ret; 800c416: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c41a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ USB Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == RCC_PERIPHCLK_USB) 800c41e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c422: e9d3 2300 ldrd r2, r3, [r3] 800c426: f402 2380 and.w r3, r2, #262144 @ 0x40000 800c42a: 673b str r3, [r7, #112] @ 0x70 800c42c: 2300 movs r3, #0 800c42e: 677b str r3, [r7, #116] @ 0x74 800c430: e9d7 121c ldrd r1, r2, [r7, #112] @ 0x70 800c434: 460b mov r3, r1 800c436: 4313 orrs r3, r2 800c438: d03b beq.n 800c4b2 { switch (PeriphClkInit->UsbClockSelection) 800c43a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c43e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800c442: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800c446: d01f beq.n 800c488 800c448: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800c44c: d818 bhi.n 800c480 800c44e: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800c452: d003 beq.n 800c45c 800c454: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800c458: d007 beq.n 800c46a 800c45a: e011 b.n 800c480 { case RCC_USBCLKSOURCE_PLL: /* PLL is used as clock source for USB*/ /* Enable USB Clock output generated form System USB . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800c45c: 4b4e ldr r3, [pc, #312] @ (800c598 ) 800c45e: 6adb ldr r3, [r3, #44] @ 0x2c 800c460: 4a4d ldr r2, [pc, #308] @ (800c598 ) 800c462: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c466: 62d3 str r3, [r2, #44] @ 0x2c /* USB clock source configuration done later after clock selection check */ break; 800c468: e00f b.n 800c48a case RCC_USBCLKSOURCE_PLL3: /* PLL3 is used as clock source for USB*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c46a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c46e: 3328 adds r3, #40 @ 0x28 800c470: 2101 movs r1, #1 800c472: 4618 mov r0, r3 800c474: f000 fd7e bl 800cf74 800c478: 4603 mov r3, r0 800c47a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USB clock source configuration done later after clock selection check */ break; 800c47e: e004 b.n 800c48a /* HSI48 oscillator is used as source of USB clock */ /* USB clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c480: 2301 movs r3, #1 800c482: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c486: e000 b.n 800c48a break; 800c488: bf00 nop } if (ret == HAL_OK) 800c48a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c48e: 2b00 cmp r3, #0 800c490: d10b bne.n 800c4aa { /* Set the source of USB clock*/ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 800c492: 4b41 ldr r3, [pc, #260] @ (800c598 ) 800c494: 6d5b ldr r3, [r3, #84] @ 0x54 800c496: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800c49a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c49e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800c4a2: 4a3d ldr r2, [pc, #244] @ (800c598 ) 800c4a4: 430b orrs r3, r1 800c4a6: 6553 str r3, [r2, #84] @ 0x54 800c4a8: e003 b.n 800c4b2 } else { /* set overall return value */ status = ret; 800c4aa: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c4ae: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------------- SDMMC Configuration ------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC) == RCC_PERIPHCLK_SDMMC) 800c4b2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4b6: e9d3 2300 ldrd r2, r3, [r3] 800c4ba: f402 3380 and.w r3, r2, #65536 @ 0x10000 800c4be: 66bb str r3, [r7, #104] @ 0x68 800c4c0: 2300 movs r3, #0 800c4c2: 66fb str r3, [r7, #108] @ 0x6c 800c4c4: e9d7 121a ldrd r1, r2, [r7, #104] @ 0x68 800c4c8: 460b mov r3, r1 800c4ca: 4313 orrs r3, r2 800c4cc: d031 beq.n 800c532 { /* Check the parameters */ assert_param(IS_RCC_SDMMC(PeriphClkInit->SdmmcClockSelection)); switch (PeriphClkInit->SdmmcClockSelection) 800c4ce: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4d2: 6d1b ldr r3, [r3, #80] @ 0x50 800c4d4: 2b00 cmp r3, #0 800c4d6: d003 beq.n 800c4e0 800c4d8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800c4dc: d007 beq.n 800c4ee 800c4de: e011 b.n 800c504 { case RCC_SDMMCCLKSOURCE_PLL: /* PLL is used as clock source for SDMMC*/ /* Enable SDMMC Clock output generated form System PLL . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800c4e0: 4b2d ldr r3, [pc, #180] @ (800c598 ) 800c4e2: 6adb ldr r3, [r3, #44] @ 0x2c 800c4e4: 4a2c ldr r2, [pc, #176] @ (800c598 ) 800c4e6: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c4ea: 62d3 str r3, [r2, #44] @ 0x2c /* SDMMC clock source configuration done later after clock selection check */ break; 800c4ec: e00e b.n 800c50c case RCC_SDMMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for SDMMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800c4ee: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4f2: 3308 adds r3, #8 800c4f4: 2102 movs r1, #2 800c4f6: 4618 mov r0, r3 800c4f8: f000 fc8a bl 800ce10 800c4fc: 4603 mov r3, r0 800c4fe: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SDMMC clock source configuration done later after clock selection check */ break; 800c502: e003 b.n 800c50c default: ret = HAL_ERROR; 800c504: 2301 movs r3, #1 800c506: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c50a: bf00 nop } if (ret == HAL_OK) 800c50c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c510: 2b00 cmp r3, #0 800c512: d10a bne.n 800c52a { /* Set the source of SDMMC clock*/ __HAL_RCC_SDMMC_CONFIG(PeriphClkInit->SdmmcClockSelection); 800c514: 4b20 ldr r3, [pc, #128] @ (800c598 ) 800c516: 6cdb ldr r3, [r3, #76] @ 0x4c 800c518: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800c51c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c520: 6d1b ldr r3, [r3, #80] @ 0x50 800c522: 4a1d ldr r2, [pc, #116] @ (800c598 ) 800c524: 430b orrs r3, r1 800c526: 64d3 str r3, [r2, #76] @ 0x4c 800c528: e003 b.n 800c532 } else { /* set overall return value */ status = ret; 800c52a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c52e: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /* LTDC */ /*------------------------------ RNG Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == RCC_PERIPHCLK_RNG) 800c532: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c536: e9d3 2300 ldrd r2, r3, [r3] 800c53a: f402 3300 and.w r3, r2, #131072 @ 0x20000 800c53e: 663b str r3, [r7, #96] @ 0x60 800c540: 2300 movs r3, #0 800c542: 667b str r3, [r7, #100] @ 0x64 800c544: e9d7 1218 ldrd r1, r2, [r7, #96] @ 0x60 800c548: 460b mov r3, r1 800c54a: 4313 orrs r3, r2 800c54c: d03b beq.n 800c5c6 { switch (PeriphClkInit->RngClockSelection) 800c54e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c552: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800c556: f5b3 7f40 cmp.w r3, #768 @ 0x300 800c55a: d018 beq.n 800c58e 800c55c: f5b3 7f40 cmp.w r3, #768 @ 0x300 800c560: d811 bhi.n 800c586 800c562: f5b3 7f00 cmp.w r3, #512 @ 0x200 800c566: d014 beq.n 800c592 800c568: f5b3 7f00 cmp.w r3, #512 @ 0x200 800c56c: d80b bhi.n 800c586 800c56e: 2b00 cmp r3, #0 800c570: d014 beq.n 800c59c 800c572: f5b3 7f80 cmp.w r3, #256 @ 0x100 800c576: d106 bne.n 800c586 { case RCC_RNGCLKSOURCE_PLL: /* PLL is used as clock source for RNG*/ /* Enable RNG Clock output generated form System RNG . */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800c578: 4b07 ldr r3, [pc, #28] @ (800c598 ) 800c57a: 6adb ldr r3, [r3, #44] @ 0x2c 800c57c: 4a06 ldr r2, [pc, #24] @ (800c598 ) 800c57e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c582: 62d3 str r3, [r2, #44] @ 0x2c /* RNG clock source configuration done later after clock selection check */ break; 800c584: e00b b.n 800c59e /* HSI48 oscillator is used as source of RNG clock */ /* RNG clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c586: 2301 movs r3, #1 800c588: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c58c: e007 b.n 800c59e break; 800c58e: bf00 nop 800c590: e005 b.n 800c59e break; 800c592: bf00 nop 800c594: e003 b.n 800c59e 800c596: bf00 nop 800c598: 58024400 .word 0x58024400 break; 800c59c: bf00 nop } if (ret == HAL_OK) 800c59e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c5a2: 2b00 cmp r3, #0 800c5a4: d10b bne.n 800c5be { /* Set the source of RNG clock*/ __HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection); 800c5a6: 4bba ldr r3, [pc, #744] @ (800c890 ) 800c5a8: 6d5b ldr r3, [r3, #84] @ 0x54 800c5aa: f423 7140 bic.w r1, r3, #768 @ 0x300 800c5ae: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5b2: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800c5b6: 4ab6 ldr r2, [pc, #728] @ (800c890 ) 800c5b8: 430b orrs r3, r1 800c5ba: 6553 str r3, [r2, #84] @ 0x54 800c5bc: e003 b.n 800c5c6 } else { /* set overall return value */ status = ret; 800c5be: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c5c2: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ SWPMI1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SWPMI1) == RCC_PERIPHCLK_SWPMI1) 800c5c6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5ca: e9d3 2300 ldrd r2, r3, [r3] 800c5ce: f402 1380 and.w r3, r2, #1048576 @ 0x100000 800c5d2: 65bb str r3, [r7, #88] @ 0x58 800c5d4: 2300 movs r3, #0 800c5d6: 65fb str r3, [r7, #92] @ 0x5c 800c5d8: e9d7 1216 ldrd r1, r2, [r7, #88] @ 0x58 800c5dc: 460b mov r3, r1 800c5de: 4313 orrs r3, r2 800c5e0: d009 beq.n 800c5f6 { /* Check the parameters */ assert_param(IS_RCC_SWPMI1CLKSOURCE(PeriphClkInit->Swpmi1ClockSelection)); /* Configure the SWPMI1 interface clock source */ __HAL_RCC_SWPMI1_CONFIG(PeriphClkInit->Swpmi1ClockSelection); 800c5e2: 4bab ldr r3, [pc, #684] @ (800c890 ) 800c5e4: 6d1b ldr r3, [r3, #80] @ 0x50 800c5e6: f023 4100 bic.w r1, r3, #2147483648 @ 0x80000000 800c5ea: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5ee: 6f5b ldr r3, [r3, #116] @ 0x74 800c5f0: 4aa7 ldr r2, [pc, #668] @ (800c890 ) 800c5f2: 430b orrs r3, r1 800c5f4: 6513 str r3, [r2, #80] @ 0x50 } #if defined(HRTIM1) /*------------------------------ HRTIM1 clock Configuration ----------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_HRTIM1) == RCC_PERIPHCLK_HRTIM1) 800c5f6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5fa: e9d3 2300 ldrd r2, r3, [r3] 800c5fe: f002 5380 and.w r3, r2, #268435456 @ 0x10000000 800c602: 653b str r3, [r7, #80] @ 0x50 800c604: 2300 movs r3, #0 800c606: 657b str r3, [r7, #84] @ 0x54 800c608: e9d7 1214 ldrd r1, r2, [r7, #80] @ 0x50 800c60c: 460b mov r3, r1 800c60e: 4313 orrs r3, r2 800c610: d00a beq.n 800c628 { /* Check the parameters */ assert_param(IS_RCC_HRTIM1CLKSOURCE(PeriphClkInit->Hrtim1ClockSelection)); /* Configure the HRTIM1 clock source */ __HAL_RCC_HRTIM1_CONFIG(PeriphClkInit->Hrtim1ClockSelection); 800c612: 4b9f ldr r3, [pc, #636] @ (800c890 ) 800c614: 691b ldr r3, [r3, #16] 800c616: f423 4180 bic.w r1, r3, #16384 @ 0x4000 800c61a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c61e: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8 800c622: 4a9b ldr r2, [pc, #620] @ (800c890 ) 800c624: 430b orrs r3, r1 800c626: 6113 str r3, [r2, #16] } #endif /*HRTIM1*/ /*------------------------------ DFSDM1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1) == RCC_PERIPHCLK_DFSDM1) 800c628: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c62c: e9d3 2300 ldrd r2, r3, [r3] 800c630: f402 1300 and.w r3, r2, #2097152 @ 0x200000 800c634: 64bb str r3, [r7, #72] @ 0x48 800c636: 2300 movs r3, #0 800c638: 64fb str r3, [r7, #76] @ 0x4c 800c63a: e9d7 1212 ldrd r1, r2, [r7, #72] @ 0x48 800c63e: 460b mov r3, r1 800c640: 4313 orrs r3, r2 800c642: d009 beq.n 800c658 { /* Check the parameters */ assert_param(IS_RCC_DFSDM1CLKSOURCE(PeriphClkInit->Dfsdm1ClockSelection)); /* Configure the DFSDM1 interface clock source */ __HAL_RCC_DFSDM1_CONFIG(PeriphClkInit->Dfsdm1ClockSelection); 800c644: 4b92 ldr r3, [pc, #584] @ (800c890 ) 800c646: 6d1b ldr r3, [r3, #80] @ 0x50 800c648: f023 7180 bic.w r1, r3, #16777216 @ 0x1000000 800c64c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c650: 6edb ldr r3, [r3, #108] @ 0x6c 800c652: 4a8f ldr r2, [pc, #572] @ (800c890 ) 800c654: 430b orrs r3, r1 800c656: 6513 str r3, [r2, #80] @ 0x50 __HAL_RCC_DFSDM2_CONFIG(PeriphClkInit->Dfsdm2ClockSelection); } #endif /* DFSDM2 */ /*------------------------------------ TIM configuration --------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_TIM) == RCC_PERIPHCLK_TIM) 800c658: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c65c: e9d3 2300 ldrd r2, r3, [r3] 800c660: f002 4380 and.w r3, r2, #1073741824 @ 0x40000000 800c664: 643b str r3, [r7, #64] @ 0x40 800c666: 2300 movs r3, #0 800c668: 647b str r3, [r7, #68] @ 0x44 800c66a: e9d7 1210 ldrd r1, r2, [r7, #64] @ 0x40 800c66e: 460b mov r3, r1 800c670: 4313 orrs r3, r2 800c672: d00e beq.n 800c692 { /* Check the parameters */ assert_param(IS_RCC_TIMPRES(PeriphClkInit->TIMPresSelection)); /* Configure Timer Prescaler */ __HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection); 800c674: 4b86 ldr r3, [pc, #536] @ (800c890 ) 800c676: 691b ldr r3, [r3, #16] 800c678: 4a85 ldr r2, [pc, #532] @ (800c890 ) 800c67a: f423 4300 bic.w r3, r3, #32768 @ 0x8000 800c67e: 6113 str r3, [r2, #16] 800c680: 4b83 ldr r3, [pc, #524] @ (800c890 ) 800c682: 6919 ldr r1, [r3, #16] 800c684: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c688: f8d3 30bc ldr.w r3, [r3, #188] @ 0xbc 800c68c: 4a80 ldr r2, [pc, #512] @ (800c890 ) 800c68e: 430b orrs r3, r1 800c690: 6113 str r3, [r2, #16] } /*------------------------------------ CKPER configuration --------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CKPER) == RCC_PERIPHCLK_CKPER) 800c692: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c696: e9d3 2300 ldrd r2, r3, [r3] 800c69a: f002 4300 and.w r3, r2, #2147483648 @ 0x80000000 800c69e: 63bb str r3, [r7, #56] @ 0x38 800c6a0: 2300 movs r3, #0 800c6a2: 63fb str r3, [r7, #60] @ 0x3c 800c6a4: e9d7 120e ldrd r1, r2, [r7, #56] @ 0x38 800c6a8: 460b mov r3, r1 800c6aa: 4313 orrs r3, r2 800c6ac: d009 beq.n 800c6c2 { /* Check the parameters */ assert_param(IS_RCC_CLKPSOURCE(PeriphClkInit->CkperClockSelection)); /* Configure the CKPER clock source */ __HAL_RCC_CLKP_CONFIG(PeriphClkInit->CkperClockSelection); 800c6ae: 4b78 ldr r3, [pc, #480] @ (800c890 ) 800c6b0: 6cdb ldr r3, [r3, #76] @ 0x4c 800c6b2: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800c6b6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c6ba: 6d5b ldr r3, [r3, #84] @ 0x54 800c6bc: 4a74 ldr r2, [pc, #464] @ (800c890 ) 800c6be: 430b orrs r3, r1 800c6c0: 64d3 str r3, [r2, #76] @ 0x4c } /*------------------------------ CEC Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) 800c6c2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c6c6: e9d3 2300 ldrd r2, r3, [r3] 800c6ca: f402 0300 and.w r3, r2, #8388608 @ 0x800000 800c6ce: 633b str r3, [r7, #48] @ 0x30 800c6d0: 2300 movs r3, #0 800c6d2: 637b str r3, [r7, #52] @ 0x34 800c6d4: e9d7 120c ldrd r1, r2, [r7, #48] @ 0x30 800c6d8: 460b mov r3, r1 800c6da: 4313 orrs r3, r2 800c6dc: d00a beq.n 800c6f4 { /* Check the parameters */ assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection)); /* Configure the CEC interface clock source */ __HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection); 800c6de: 4b6c ldr r3, [pc, #432] @ (800c890 ) 800c6e0: 6d5b ldr r3, [r3, #84] @ 0x54 800c6e2: f423 0140 bic.w r1, r3, #12582912 @ 0xc00000 800c6e6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c6ea: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800c6ee: 4a68 ldr r2, [pc, #416] @ (800c890 ) 800c6f0: 430b orrs r3, r1 800c6f2: 6553 str r3, [r2, #84] @ 0x54 } /*---------------------------- PLL2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVP) == RCC_PERIPHCLK_PLL2_DIVP) 800c6f4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c6f8: e9d3 2300 ldrd r2, r3, [r3] 800c6fc: 2100 movs r1, #0 800c6fe: 62b9 str r1, [r7, #40] @ 0x28 800c700: f003 0301 and.w r3, r3, #1 800c704: 62fb str r3, [r7, #44] @ 0x2c 800c706: e9d7 120a ldrd r1, r2, [r7, #40] @ 0x28 800c70a: 460b mov r3, r1 800c70c: 4313 orrs r3, r2 800c70e: d011 beq.n 800c734 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c710: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c714: 3308 adds r3, #8 800c716: 2100 movs r1, #0 800c718: 4618 mov r0, r3 800c71a: f000 fb79 bl 800ce10 800c71e: 4603 mov r3, r0 800c720: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c724: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c728: 2b00 cmp r3, #0 800c72a: d003 beq.n 800c734 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c72c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c730: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVQ) == RCC_PERIPHCLK_PLL2_DIVQ) 800c734: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c738: e9d3 2300 ldrd r2, r3, [r3] 800c73c: 2100 movs r1, #0 800c73e: 6239 str r1, [r7, #32] 800c740: f003 0302 and.w r3, r3, #2 800c744: 627b str r3, [r7, #36] @ 0x24 800c746: e9d7 1208 ldrd r1, r2, [r7, #32] 800c74a: 460b mov r3, r1 800c74c: 4313 orrs r3, r2 800c74e: d011 beq.n 800c774 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800c750: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c754: 3308 adds r3, #8 800c756: 2101 movs r1, #1 800c758: 4618 mov r0, r3 800c75a: f000 fb59 bl 800ce10 800c75e: 4603 mov r3, r0 800c760: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c764: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c768: 2b00 cmp r3, #0 800c76a: d003 beq.n 800c774 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c76c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c770: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVR) == RCC_PERIPHCLK_PLL2_DIVR) 800c774: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c778: e9d3 2300 ldrd r2, r3, [r3] 800c77c: 2100 movs r1, #0 800c77e: 61b9 str r1, [r7, #24] 800c780: f003 0304 and.w r3, r3, #4 800c784: 61fb str r3, [r7, #28] 800c786: e9d7 1206 ldrd r1, r2, [r7, #24] 800c78a: 460b mov r3, r1 800c78c: 4313 orrs r3, r2 800c78e: d011 beq.n 800c7b4 { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800c790: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c794: 3308 adds r3, #8 800c796: 2102 movs r1, #2 800c798: 4618 mov r0, r3 800c79a: f000 fb39 bl 800ce10 800c79e: 4603 mov r3, r0 800c7a0: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c7a4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c7a8: 2b00 cmp r3, #0 800c7aa: d003 beq.n 800c7b4 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c7ac: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c7b0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- PLL3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVP) == RCC_PERIPHCLK_PLL3_DIVP) 800c7b4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7b8: e9d3 2300 ldrd r2, r3, [r3] 800c7bc: 2100 movs r1, #0 800c7be: 6139 str r1, [r7, #16] 800c7c0: f003 0308 and.w r3, r3, #8 800c7c4: 617b str r3, [r7, #20] 800c7c6: e9d7 1204 ldrd r1, r2, [r7, #16] 800c7ca: 460b mov r3, r1 800c7cc: 4313 orrs r3, r2 800c7ce: d011 beq.n 800c7f4 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800c7d0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7d4: 3328 adds r3, #40 @ 0x28 800c7d6: 2100 movs r1, #0 800c7d8: 4618 mov r0, r3 800c7da: f000 fbcb bl 800cf74 800c7de: 4603 mov r3, r0 800c7e0: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c7e4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c7e8: 2b00 cmp r3, #0 800c7ea: d003 beq.n 800c7f4 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c7ec: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c7f0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVQ) == RCC_PERIPHCLK_PLL3_DIVQ) 800c7f4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7f8: e9d3 2300 ldrd r2, r3, [r3] 800c7fc: 2100 movs r1, #0 800c7fe: 60b9 str r1, [r7, #8] 800c800: f003 0310 and.w r3, r3, #16 800c804: 60fb str r3, [r7, #12] 800c806: e9d7 1202 ldrd r1, r2, [r7, #8] 800c80a: 460b mov r3, r1 800c80c: 4313 orrs r3, r2 800c80e: d011 beq.n 800c834 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c810: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c814: 3328 adds r3, #40 @ 0x28 800c816: 2101 movs r1, #1 800c818: 4618 mov r0, r3 800c81a: f000 fbab bl 800cf74 800c81e: 4603 mov r3, r0 800c820: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c824: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c828: 2b00 cmp r3, #0 800c82a: d003 beq.n 800c834 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c82c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c830: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVR) == RCC_PERIPHCLK_PLL3_DIVR) 800c834: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c838: e9d3 2300 ldrd r2, r3, [r3] 800c83c: 2100 movs r1, #0 800c83e: 6039 str r1, [r7, #0] 800c840: f003 0320 and.w r3, r3, #32 800c844: 607b str r3, [r7, #4] 800c846: e9d7 1200 ldrd r1, r2, [r7] 800c84a: 460b mov r3, r1 800c84c: 4313 orrs r3, r2 800c84e: d011 beq.n 800c874 { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c850: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c854: 3328 adds r3, #40 @ 0x28 800c856: 2102 movs r1, #2 800c858: 4618 mov r0, r3 800c85a: f000 fb8b bl 800cf74 800c85e: 4603 mov r3, r0 800c860: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c864: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c868: 2b00 cmp r3, #0 800c86a: d003 beq.n 800c874 /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c86c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c870: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (status == HAL_OK) 800c874: f897 311e ldrb.w r3, [r7, #286] @ 0x11e 800c878: 2b00 cmp r3, #0 800c87a: d101 bne.n 800c880 { return HAL_OK; 800c87c: 2300 movs r3, #0 800c87e: e000 b.n 800c882 } return HAL_ERROR; 800c880: 2301 movs r3, #1 } 800c882: 4618 mov r0, r3 800c884: f507 7790 add.w r7, r7, #288 @ 0x120 800c888: 46bd mov sp, r7 800c88a: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800c88e: bf00 nop 800c890: 58024400 .word 0x58024400 0800c894 : * @note Each time D3PCLK1 changes, this function must be called to update the * right D3PCLK1 value. Otherwise, any configuration based on this function will be incorrect. * @retval D3PCLK1 frequency */ uint32_t HAL_RCCEx_GetD3PCLK1Freq(void) { 800c894: b580 push {r7, lr} 800c896: af00 add r7, sp, #0 #if defined(RCC_D3CFGR_D3PPRE) /* Get HCLK source and Compute D3PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> (D1CorePrescTable[(RCC->D3CFGR & RCC_D3CFGR_D3PPRE) >> RCC_D3CFGR_D3PPRE_Pos] & 0x1FU)); 800c898: f7fe fd70 bl 800b37c 800c89c: 4602 mov r2, r0 800c89e: 4b06 ldr r3, [pc, #24] @ (800c8b8 ) 800c8a0: 6a1b ldr r3, [r3, #32] 800c8a2: 091b lsrs r3, r3, #4 800c8a4: f003 0307 and.w r3, r3, #7 800c8a8: 4904 ldr r1, [pc, #16] @ (800c8bc ) 800c8aa: 5ccb ldrb r3, [r1, r3] 800c8ac: f003 031f and.w r3, r3, #31 800c8b0: fa22 f303 lsr.w r3, r2, r3 #else /* Get HCLK source and Compute D3PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> (D1CorePrescTable[(RCC->SRDCFGR & RCC_SRDCFGR_SRDPPRE) >> RCC_SRDCFGR_SRDPPRE_Pos] & 0x1FU)); #endif } 800c8b4: 4618 mov r0, r3 800c8b6: bd80 pop {r7, pc} 800c8b8: 58024400 .word 0x58024400 800c8bc: 08031a8c .word 0x08031a8c 0800c8c0 : * right PLL2CLK value. Otherwise, any configuration based on this function will be incorrect. * @param PLL2_Clocks structure. * @retval None */ void HAL_RCCEx_GetPLL2ClockFreq(PLL2_ClocksTypeDef *PLL2_Clocks) { 800c8c0: b480 push {r7} 800c8c2: b089 sub sp, #36 @ 0x24 800c8c4: af00 add r7, sp, #0 800c8c6: 6078 str r0, [r7, #4] float_t fracn2, pll2vco; /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLL2M) * PLL2N PLL2xCLK = PLL2_VCO / PLL2x */ pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC); 800c8c8: 4ba1 ldr r3, [pc, #644] @ (800cb50 ) 800c8ca: 6a9b ldr r3, [r3, #40] @ 0x28 800c8cc: f003 0303 and.w r3, r3, #3 800c8d0: 61bb str r3, [r7, #24] pll2m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM2) >> 12); 800c8d2: 4b9f ldr r3, [pc, #636] @ (800cb50 ) 800c8d4: 6a9b ldr r3, [r3, #40] @ 0x28 800c8d6: 0b1b lsrs r3, r3, #12 800c8d8: f003 033f and.w r3, r3, #63 @ 0x3f 800c8dc: 617b str r3, [r7, #20] pll2fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL2FRACEN) >> RCC_PLLCFGR_PLL2FRACEN_Pos; 800c8de: 4b9c ldr r3, [pc, #624] @ (800cb50 ) 800c8e0: 6adb ldr r3, [r3, #44] @ 0x2c 800c8e2: 091b lsrs r3, r3, #4 800c8e4: f003 0301 and.w r3, r3, #1 800c8e8: 613b str r3, [r7, #16] fracn2 = (float_t)(uint32_t)(pll2fracen * ((RCC->PLL2FRACR & RCC_PLL2FRACR_FRACN2) >> 3)); 800c8ea: 4b99 ldr r3, [pc, #612] @ (800cb50 ) 800c8ec: 6bdb ldr r3, [r3, #60] @ 0x3c 800c8ee: 08db lsrs r3, r3, #3 800c8f0: f3c3 030c ubfx r3, r3, #0, #13 800c8f4: 693a ldr r2, [r7, #16] 800c8f6: fb02 f303 mul.w r3, r2, r3 800c8fa: ee07 3a90 vmov s15, r3 800c8fe: eef8 7a67 vcvt.f32.u32 s15, s15 800c902: edc7 7a03 vstr s15, [r7, #12] if (pll2m != 0U) 800c906: 697b ldr r3, [r7, #20] 800c908: 2b00 cmp r3, #0 800c90a: f000 8111 beq.w 800cb30 { switch (pllsource) 800c90e: 69bb ldr r3, [r7, #24] 800c910: 2b02 cmp r3, #2 800c912: f000 8083 beq.w 800ca1c 800c916: 69bb ldr r3, [r7, #24] 800c918: 2b02 cmp r3, #2 800c91a: f200 80a1 bhi.w 800ca60 800c91e: 69bb ldr r3, [r7, #24] 800c920: 2b00 cmp r3, #0 800c922: d003 beq.n 800c92c 800c924: 69bb ldr r3, [r7, #24] 800c926: 2b01 cmp r3, #1 800c928: d056 beq.n 800c9d8 800c92a: e099 b.n 800ca60 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800c92c: 4b88 ldr r3, [pc, #544] @ (800cb50 ) 800c92e: 681b ldr r3, [r3, #0] 800c930: f003 0320 and.w r3, r3, #32 800c934: 2b00 cmp r3, #0 800c936: d02d beq.n 800c994 { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800c938: 4b85 ldr r3, [pc, #532] @ (800cb50 ) 800c93a: 681b ldr r3, [r3, #0] 800c93c: 08db lsrs r3, r3, #3 800c93e: f003 0303 and.w r3, r3, #3 800c942: 4a84 ldr r2, [pc, #528] @ (800cb54 ) 800c944: fa22 f303 lsr.w r3, r2, r3 800c948: 60bb str r3, [r7, #8] pll2vco = ((float_t)hsivalue / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800c94a: 68bb ldr r3, [r7, #8] 800c94c: ee07 3a90 vmov s15, r3 800c950: eef8 6a67 vcvt.f32.u32 s13, s15 800c954: 697b ldr r3, [r7, #20] 800c956: ee07 3a90 vmov s15, r3 800c95a: eef8 7a67 vcvt.f32.u32 s15, s15 800c95e: ee86 7aa7 vdiv.f32 s14, s13, s15 800c962: 4b7b ldr r3, [pc, #492] @ (800cb50 ) 800c964: 6b9b ldr r3, [r3, #56] @ 0x38 800c966: f3c3 0308 ubfx r3, r3, #0, #9 800c96a: ee07 3a90 vmov s15, r3 800c96e: eef8 6a67 vcvt.f32.u32 s13, s15 800c972: ed97 6a03 vldr s12, [r7, #12] 800c976: eddf 5a78 vldr s11, [pc, #480] @ 800cb58 800c97a: eec6 7a25 vdiv.f32 s15, s12, s11 800c97e: ee76 7aa7 vadd.f32 s15, s13, s15 800c982: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c986: ee77 7aa6 vadd.f32 s15, s15, s13 800c98a: ee67 7a27 vmul.f32 s15, s14, s15 800c98e: edc7 7a07 vstr s15, [r7, #28] } else { pll2vco = ((float_t)HSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); } break; 800c992: e087 b.n 800caa4 pll2vco = ((float_t)HSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800c994: 697b ldr r3, [r7, #20] 800c996: ee07 3a90 vmov s15, r3 800c99a: eef8 7a67 vcvt.f32.u32 s15, s15 800c99e: eddf 6a6f vldr s13, [pc, #444] @ 800cb5c 800c9a2: ee86 7aa7 vdiv.f32 s14, s13, s15 800c9a6: 4b6a ldr r3, [pc, #424] @ (800cb50 ) 800c9a8: 6b9b ldr r3, [r3, #56] @ 0x38 800c9aa: f3c3 0308 ubfx r3, r3, #0, #9 800c9ae: ee07 3a90 vmov s15, r3 800c9b2: eef8 6a67 vcvt.f32.u32 s13, s15 800c9b6: ed97 6a03 vldr s12, [r7, #12] 800c9ba: eddf 5a67 vldr s11, [pc, #412] @ 800cb58 800c9be: eec6 7a25 vdiv.f32 s15, s12, s11 800c9c2: ee76 7aa7 vadd.f32 s15, s13, s15 800c9c6: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800c9ca: ee77 7aa6 vadd.f32 s15, s15, s13 800c9ce: ee67 7a27 vmul.f32 s15, s14, s15 800c9d2: edc7 7a07 vstr s15, [r7, #28] break; 800c9d6: e065 b.n 800caa4 case RCC_PLLSOURCE_CSI: /* CSI used as PLL clock source */ pll2vco = ((float_t)CSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800c9d8: 697b ldr r3, [r7, #20] 800c9da: ee07 3a90 vmov s15, r3 800c9de: eef8 7a67 vcvt.f32.u32 s15, s15 800c9e2: eddf 6a5f vldr s13, [pc, #380] @ 800cb60 800c9e6: ee86 7aa7 vdiv.f32 s14, s13, s15 800c9ea: 4b59 ldr r3, [pc, #356] @ (800cb50 ) 800c9ec: 6b9b ldr r3, [r3, #56] @ 0x38 800c9ee: f3c3 0308 ubfx r3, r3, #0, #9 800c9f2: ee07 3a90 vmov s15, r3 800c9f6: eef8 6a67 vcvt.f32.u32 s13, s15 800c9fa: ed97 6a03 vldr s12, [r7, #12] 800c9fe: eddf 5a56 vldr s11, [pc, #344] @ 800cb58 800ca02: eec6 7a25 vdiv.f32 s15, s12, s11 800ca06: ee76 7aa7 vadd.f32 s15, s13, s15 800ca0a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ca0e: ee77 7aa6 vadd.f32 s15, s15, s13 800ca12: ee67 7a27 vmul.f32 s15, s14, s15 800ca16: edc7 7a07 vstr s15, [r7, #28] break; 800ca1a: e043 b.n 800caa4 case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ pll2vco = ((float_t)HSE_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800ca1c: 697b ldr r3, [r7, #20] 800ca1e: ee07 3a90 vmov s15, r3 800ca22: eef8 7a67 vcvt.f32.u32 s15, s15 800ca26: eddf 6a4f vldr s13, [pc, #316] @ 800cb64 800ca2a: ee86 7aa7 vdiv.f32 s14, s13, s15 800ca2e: 4b48 ldr r3, [pc, #288] @ (800cb50 ) 800ca30: 6b9b ldr r3, [r3, #56] @ 0x38 800ca32: f3c3 0308 ubfx r3, r3, #0, #9 800ca36: ee07 3a90 vmov s15, r3 800ca3a: eef8 6a67 vcvt.f32.u32 s13, s15 800ca3e: ed97 6a03 vldr s12, [r7, #12] 800ca42: eddf 5a45 vldr s11, [pc, #276] @ 800cb58 800ca46: eec6 7a25 vdiv.f32 s15, s12, s11 800ca4a: ee76 7aa7 vadd.f32 s15, s13, s15 800ca4e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ca52: ee77 7aa6 vadd.f32 s15, s15, s13 800ca56: ee67 7a27 vmul.f32 s15, s14, s15 800ca5a: edc7 7a07 vstr s15, [r7, #28] break; 800ca5e: e021 b.n 800caa4 default: pll2vco = ((float_t)CSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800ca60: 697b ldr r3, [r7, #20] 800ca62: ee07 3a90 vmov s15, r3 800ca66: eef8 7a67 vcvt.f32.u32 s15, s15 800ca6a: eddf 6a3d vldr s13, [pc, #244] @ 800cb60 800ca6e: ee86 7aa7 vdiv.f32 s14, s13, s15 800ca72: 4b37 ldr r3, [pc, #220] @ (800cb50 ) 800ca74: 6b9b ldr r3, [r3, #56] @ 0x38 800ca76: f3c3 0308 ubfx r3, r3, #0, #9 800ca7a: ee07 3a90 vmov s15, r3 800ca7e: eef8 6a67 vcvt.f32.u32 s13, s15 800ca82: ed97 6a03 vldr s12, [r7, #12] 800ca86: eddf 5a34 vldr s11, [pc, #208] @ 800cb58 800ca8a: eec6 7a25 vdiv.f32 s15, s12, s11 800ca8e: ee76 7aa7 vadd.f32 s15, s13, s15 800ca92: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ca96: ee77 7aa6 vadd.f32 s15, s15, s13 800ca9a: ee67 7a27 vmul.f32 s15, s14, s15 800ca9e: edc7 7a07 vstr s15, [r7, #28] break; 800caa2: bf00 nop } PLL2_Clocks->PLL2_P_Frequency = (uint32_t)(float_t)(pll2vco / ((float_t)(uint32_t)((RCC->PLL2DIVR & RCC_PLL2DIVR_P2) >> 9) + (float_t)1)) ; 800caa4: 4b2a ldr r3, [pc, #168] @ (800cb50 ) 800caa6: 6b9b ldr r3, [r3, #56] @ 0x38 800caa8: 0a5b lsrs r3, r3, #9 800caaa: f003 037f and.w r3, r3, #127 @ 0x7f 800caae: ee07 3a90 vmov s15, r3 800cab2: eef8 7a67 vcvt.f32.u32 s15, s15 800cab6: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800caba: ee37 7a87 vadd.f32 s14, s15, s14 800cabe: edd7 6a07 vldr s13, [r7, #28] 800cac2: eec6 7a87 vdiv.f32 s15, s13, s14 800cac6: eefc 7ae7 vcvt.u32.f32 s15, s15 800caca: ee17 2a90 vmov r2, s15 800cace: 687b ldr r3, [r7, #4] 800cad0: 601a str r2, [r3, #0] PLL2_Clocks->PLL2_Q_Frequency = (uint32_t)(float_t)(pll2vco / ((float_t)(uint32_t)((RCC->PLL2DIVR & RCC_PLL2DIVR_Q2) >> 16) + (float_t)1)) ; 800cad2: 4b1f ldr r3, [pc, #124] @ (800cb50 ) 800cad4: 6b9b ldr r3, [r3, #56] @ 0x38 800cad6: 0c1b lsrs r3, r3, #16 800cad8: f003 037f and.w r3, r3, #127 @ 0x7f 800cadc: ee07 3a90 vmov s15, r3 800cae0: eef8 7a67 vcvt.f32.u32 s15, s15 800cae4: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cae8: ee37 7a87 vadd.f32 s14, s15, s14 800caec: edd7 6a07 vldr s13, [r7, #28] 800caf0: eec6 7a87 vdiv.f32 s15, s13, s14 800caf4: eefc 7ae7 vcvt.u32.f32 s15, s15 800caf8: ee17 2a90 vmov r2, s15 800cafc: 687b ldr r3, [r7, #4] 800cafe: 605a str r2, [r3, #4] PLL2_Clocks->PLL2_R_Frequency = (uint32_t)(float_t)(pll2vco / ((float_t)(uint32_t)((RCC->PLL2DIVR & RCC_PLL2DIVR_R2) >> 24) + (float_t)1)) ; 800cb00: 4b13 ldr r3, [pc, #76] @ (800cb50 ) 800cb02: 6b9b ldr r3, [r3, #56] @ 0x38 800cb04: 0e1b lsrs r3, r3, #24 800cb06: f003 037f and.w r3, r3, #127 @ 0x7f 800cb0a: ee07 3a90 vmov s15, r3 800cb0e: eef8 7a67 vcvt.f32.u32 s15, s15 800cb12: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cb16: ee37 7a87 vadd.f32 s14, s15, s14 800cb1a: edd7 6a07 vldr s13, [r7, #28] 800cb1e: eec6 7a87 vdiv.f32 s15, s13, s14 800cb22: eefc 7ae7 vcvt.u32.f32 s15, s15 800cb26: ee17 2a90 vmov r2, s15 800cb2a: 687b ldr r3, [r7, #4] 800cb2c: 609a str r2, [r3, #8] { PLL2_Clocks->PLL2_P_Frequency = 0U; PLL2_Clocks->PLL2_Q_Frequency = 0U; PLL2_Clocks->PLL2_R_Frequency = 0U; } } 800cb2e: e008 b.n 800cb42 PLL2_Clocks->PLL2_P_Frequency = 0U; 800cb30: 687b ldr r3, [r7, #4] 800cb32: 2200 movs r2, #0 800cb34: 601a str r2, [r3, #0] PLL2_Clocks->PLL2_Q_Frequency = 0U; 800cb36: 687b ldr r3, [r7, #4] 800cb38: 2200 movs r2, #0 800cb3a: 605a str r2, [r3, #4] PLL2_Clocks->PLL2_R_Frequency = 0U; 800cb3c: 687b ldr r3, [r7, #4] 800cb3e: 2200 movs r2, #0 800cb40: 609a str r2, [r3, #8] } 800cb42: bf00 nop 800cb44: 3724 adds r7, #36 @ 0x24 800cb46: 46bd mov sp, r7 800cb48: f85d 7b04 ldr.w r7, [sp], #4 800cb4c: 4770 bx lr 800cb4e: bf00 nop 800cb50: 58024400 .word 0x58024400 800cb54: 03d09000 .word 0x03d09000 800cb58: 46000000 .word 0x46000000 800cb5c: 4c742400 .word 0x4c742400 800cb60: 4a742400 .word 0x4a742400 800cb64: 4bbebc20 .word 0x4bbebc20 0800cb68 : * right PLL3CLK value. Otherwise, any configuration based on this function will be incorrect. * @param PLL3_Clocks structure. * @retval None */ void HAL_RCCEx_GetPLL3ClockFreq(PLL3_ClocksTypeDef *PLL3_Clocks) { 800cb68: b480 push {r7} 800cb6a: b089 sub sp, #36 @ 0x24 800cb6c: af00 add r7, sp, #0 800cb6e: 6078 str r0, [r7, #4] float_t fracn3, pll3vco; /* PLL3_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLL3M) * PLL3N PLL3xCLK = PLL3_VCO / PLLxR */ pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC); 800cb70: 4ba1 ldr r3, [pc, #644] @ (800cdf8 ) 800cb72: 6a9b ldr r3, [r3, #40] @ 0x28 800cb74: f003 0303 and.w r3, r3, #3 800cb78: 61bb str r3, [r7, #24] pll3m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM3) >> 20) ; 800cb7a: 4b9f ldr r3, [pc, #636] @ (800cdf8 ) 800cb7c: 6a9b ldr r3, [r3, #40] @ 0x28 800cb7e: 0d1b lsrs r3, r3, #20 800cb80: f003 033f and.w r3, r3, #63 @ 0x3f 800cb84: 617b str r3, [r7, #20] pll3fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL3FRACEN) >> RCC_PLLCFGR_PLL3FRACEN_Pos; 800cb86: 4b9c ldr r3, [pc, #624] @ (800cdf8 ) 800cb88: 6adb ldr r3, [r3, #44] @ 0x2c 800cb8a: 0a1b lsrs r3, r3, #8 800cb8c: f003 0301 and.w r3, r3, #1 800cb90: 613b str r3, [r7, #16] fracn3 = (float_t)(uint32_t)(pll3fracen * ((RCC->PLL3FRACR & RCC_PLL3FRACR_FRACN3) >> 3)); 800cb92: 4b99 ldr r3, [pc, #612] @ (800cdf8 ) 800cb94: 6c5b ldr r3, [r3, #68] @ 0x44 800cb96: 08db lsrs r3, r3, #3 800cb98: f3c3 030c ubfx r3, r3, #0, #13 800cb9c: 693a ldr r2, [r7, #16] 800cb9e: fb02 f303 mul.w r3, r2, r3 800cba2: ee07 3a90 vmov s15, r3 800cba6: eef8 7a67 vcvt.f32.u32 s15, s15 800cbaa: edc7 7a03 vstr s15, [r7, #12] if (pll3m != 0U) 800cbae: 697b ldr r3, [r7, #20] 800cbb0: 2b00 cmp r3, #0 800cbb2: f000 8111 beq.w 800cdd8 { switch (pllsource) 800cbb6: 69bb ldr r3, [r7, #24] 800cbb8: 2b02 cmp r3, #2 800cbba: f000 8083 beq.w 800ccc4 800cbbe: 69bb ldr r3, [r7, #24] 800cbc0: 2b02 cmp r3, #2 800cbc2: f200 80a1 bhi.w 800cd08 800cbc6: 69bb ldr r3, [r7, #24] 800cbc8: 2b00 cmp r3, #0 800cbca: d003 beq.n 800cbd4 800cbcc: 69bb ldr r3, [r7, #24] 800cbce: 2b01 cmp r3, #1 800cbd0: d056 beq.n 800cc80 800cbd2: e099 b.n 800cd08 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800cbd4: 4b88 ldr r3, [pc, #544] @ (800cdf8 ) 800cbd6: 681b ldr r3, [r3, #0] 800cbd8: f003 0320 and.w r3, r3, #32 800cbdc: 2b00 cmp r3, #0 800cbde: d02d beq.n 800cc3c { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800cbe0: 4b85 ldr r3, [pc, #532] @ (800cdf8 ) 800cbe2: 681b ldr r3, [r3, #0] 800cbe4: 08db lsrs r3, r3, #3 800cbe6: f003 0303 and.w r3, r3, #3 800cbea: 4a84 ldr r2, [pc, #528] @ (800cdfc ) 800cbec: fa22 f303 lsr.w r3, r2, r3 800cbf0: 60bb str r3, [r7, #8] pll3vco = ((float_t)hsivalue / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800cbf2: 68bb ldr r3, [r7, #8] 800cbf4: ee07 3a90 vmov s15, r3 800cbf8: eef8 6a67 vcvt.f32.u32 s13, s15 800cbfc: 697b ldr r3, [r7, #20] 800cbfe: ee07 3a90 vmov s15, r3 800cc02: eef8 7a67 vcvt.f32.u32 s15, s15 800cc06: ee86 7aa7 vdiv.f32 s14, s13, s15 800cc0a: 4b7b ldr r3, [pc, #492] @ (800cdf8 ) 800cc0c: 6c1b ldr r3, [r3, #64] @ 0x40 800cc0e: f3c3 0308 ubfx r3, r3, #0, #9 800cc12: ee07 3a90 vmov s15, r3 800cc16: eef8 6a67 vcvt.f32.u32 s13, s15 800cc1a: ed97 6a03 vldr s12, [r7, #12] 800cc1e: eddf 5a78 vldr s11, [pc, #480] @ 800ce00 800cc22: eec6 7a25 vdiv.f32 s15, s12, s11 800cc26: ee76 7aa7 vadd.f32 s15, s13, s15 800cc2a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cc2e: ee77 7aa6 vadd.f32 s15, s15, s13 800cc32: ee67 7a27 vmul.f32 s15, s14, s15 800cc36: edc7 7a07 vstr s15, [r7, #28] } else { pll3vco = ((float_t)HSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); } break; 800cc3a: e087 b.n 800cd4c pll3vco = ((float_t)HSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800cc3c: 697b ldr r3, [r7, #20] 800cc3e: ee07 3a90 vmov s15, r3 800cc42: eef8 7a67 vcvt.f32.u32 s15, s15 800cc46: eddf 6a6f vldr s13, [pc, #444] @ 800ce04 800cc4a: ee86 7aa7 vdiv.f32 s14, s13, s15 800cc4e: 4b6a ldr r3, [pc, #424] @ (800cdf8 ) 800cc50: 6c1b ldr r3, [r3, #64] @ 0x40 800cc52: f3c3 0308 ubfx r3, r3, #0, #9 800cc56: ee07 3a90 vmov s15, r3 800cc5a: eef8 6a67 vcvt.f32.u32 s13, s15 800cc5e: ed97 6a03 vldr s12, [r7, #12] 800cc62: eddf 5a67 vldr s11, [pc, #412] @ 800ce00 800cc66: eec6 7a25 vdiv.f32 s15, s12, s11 800cc6a: ee76 7aa7 vadd.f32 s15, s13, s15 800cc6e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cc72: ee77 7aa6 vadd.f32 s15, s15, s13 800cc76: ee67 7a27 vmul.f32 s15, s14, s15 800cc7a: edc7 7a07 vstr s15, [r7, #28] break; 800cc7e: e065 b.n 800cd4c case RCC_PLLSOURCE_CSI: /* CSI used as PLL clock source */ pll3vco = ((float_t)CSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800cc80: 697b ldr r3, [r7, #20] 800cc82: ee07 3a90 vmov s15, r3 800cc86: eef8 7a67 vcvt.f32.u32 s15, s15 800cc8a: eddf 6a5f vldr s13, [pc, #380] @ 800ce08 800cc8e: ee86 7aa7 vdiv.f32 s14, s13, s15 800cc92: 4b59 ldr r3, [pc, #356] @ (800cdf8 ) 800cc94: 6c1b ldr r3, [r3, #64] @ 0x40 800cc96: f3c3 0308 ubfx r3, r3, #0, #9 800cc9a: ee07 3a90 vmov s15, r3 800cc9e: eef8 6a67 vcvt.f32.u32 s13, s15 800cca2: ed97 6a03 vldr s12, [r7, #12] 800cca6: eddf 5a56 vldr s11, [pc, #344] @ 800ce00 800ccaa: eec6 7a25 vdiv.f32 s15, s12, s11 800ccae: ee76 7aa7 vadd.f32 s15, s13, s15 800ccb2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ccb6: ee77 7aa6 vadd.f32 s15, s15, s13 800ccba: ee67 7a27 vmul.f32 s15, s14, s15 800ccbe: edc7 7a07 vstr s15, [r7, #28] break; 800ccc2: e043 b.n 800cd4c case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ pll3vco = ((float_t)HSE_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800ccc4: 697b ldr r3, [r7, #20] 800ccc6: ee07 3a90 vmov s15, r3 800ccca: eef8 7a67 vcvt.f32.u32 s15, s15 800ccce: eddf 6a4f vldr s13, [pc, #316] @ 800ce0c 800ccd2: ee86 7aa7 vdiv.f32 s14, s13, s15 800ccd6: 4b48 ldr r3, [pc, #288] @ (800cdf8 ) 800ccd8: 6c1b ldr r3, [r3, #64] @ 0x40 800ccda: f3c3 0308 ubfx r3, r3, #0, #9 800ccde: ee07 3a90 vmov s15, r3 800cce2: eef8 6a67 vcvt.f32.u32 s13, s15 800cce6: ed97 6a03 vldr s12, [r7, #12] 800ccea: eddf 5a45 vldr s11, [pc, #276] @ 800ce00 800ccee: eec6 7a25 vdiv.f32 s15, s12, s11 800ccf2: ee76 7aa7 vadd.f32 s15, s13, s15 800ccf6: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ccfa: ee77 7aa6 vadd.f32 s15, s15, s13 800ccfe: ee67 7a27 vmul.f32 s15, s14, s15 800cd02: edc7 7a07 vstr s15, [r7, #28] break; 800cd06: e021 b.n 800cd4c default: pll3vco = ((float_t)CSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800cd08: 697b ldr r3, [r7, #20] 800cd0a: ee07 3a90 vmov s15, r3 800cd0e: eef8 7a67 vcvt.f32.u32 s15, s15 800cd12: eddf 6a3d vldr s13, [pc, #244] @ 800ce08 800cd16: ee86 7aa7 vdiv.f32 s14, s13, s15 800cd1a: 4b37 ldr r3, [pc, #220] @ (800cdf8 ) 800cd1c: 6c1b ldr r3, [r3, #64] @ 0x40 800cd1e: f3c3 0308 ubfx r3, r3, #0, #9 800cd22: ee07 3a90 vmov s15, r3 800cd26: eef8 6a67 vcvt.f32.u32 s13, s15 800cd2a: ed97 6a03 vldr s12, [r7, #12] 800cd2e: eddf 5a34 vldr s11, [pc, #208] @ 800ce00 800cd32: eec6 7a25 vdiv.f32 s15, s12, s11 800cd36: ee76 7aa7 vadd.f32 s15, s13, s15 800cd3a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cd3e: ee77 7aa6 vadd.f32 s15, s15, s13 800cd42: ee67 7a27 vmul.f32 s15, s14, s15 800cd46: edc7 7a07 vstr s15, [r7, #28] break; 800cd4a: bf00 nop } PLL3_Clocks->PLL3_P_Frequency = (uint32_t)(float_t)(pll3vco / ((float_t)(uint32_t)((RCC->PLL3DIVR & RCC_PLL3DIVR_P3) >> 9) + (float_t)1)) ; 800cd4c: 4b2a ldr r3, [pc, #168] @ (800cdf8 ) 800cd4e: 6c1b ldr r3, [r3, #64] @ 0x40 800cd50: 0a5b lsrs r3, r3, #9 800cd52: f003 037f and.w r3, r3, #127 @ 0x7f 800cd56: ee07 3a90 vmov s15, r3 800cd5a: eef8 7a67 vcvt.f32.u32 s15, s15 800cd5e: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cd62: ee37 7a87 vadd.f32 s14, s15, s14 800cd66: edd7 6a07 vldr s13, [r7, #28] 800cd6a: eec6 7a87 vdiv.f32 s15, s13, s14 800cd6e: eefc 7ae7 vcvt.u32.f32 s15, s15 800cd72: ee17 2a90 vmov r2, s15 800cd76: 687b ldr r3, [r7, #4] 800cd78: 601a str r2, [r3, #0] PLL3_Clocks->PLL3_Q_Frequency = (uint32_t)(float_t)(pll3vco / ((float_t)(uint32_t)((RCC->PLL3DIVR & RCC_PLL3DIVR_Q3) >> 16) + (float_t)1)) ; 800cd7a: 4b1f ldr r3, [pc, #124] @ (800cdf8 ) 800cd7c: 6c1b ldr r3, [r3, #64] @ 0x40 800cd7e: 0c1b lsrs r3, r3, #16 800cd80: f003 037f and.w r3, r3, #127 @ 0x7f 800cd84: ee07 3a90 vmov s15, r3 800cd88: eef8 7a67 vcvt.f32.u32 s15, s15 800cd8c: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cd90: ee37 7a87 vadd.f32 s14, s15, s14 800cd94: edd7 6a07 vldr s13, [r7, #28] 800cd98: eec6 7a87 vdiv.f32 s15, s13, s14 800cd9c: eefc 7ae7 vcvt.u32.f32 s15, s15 800cda0: ee17 2a90 vmov r2, s15 800cda4: 687b ldr r3, [r7, #4] 800cda6: 605a str r2, [r3, #4] PLL3_Clocks->PLL3_R_Frequency = (uint32_t)(float_t)(pll3vco / ((float_t)(uint32_t)((RCC->PLL3DIVR & RCC_PLL3DIVR_R3) >> 24) + (float_t)1)) ; 800cda8: 4b13 ldr r3, [pc, #76] @ (800cdf8 ) 800cdaa: 6c1b ldr r3, [r3, #64] @ 0x40 800cdac: 0e1b lsrs r3, r3, #24 800cdae: f003 037f and.w r3, r3, #127 @ 0x7f 800cdb2: ee07 3a90 vmov s15, r3 800cdb6: eef8 7a67 vcvt.f32.u32 s15, s15 800cdba: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cdbe: ee37 7a87 vadd.f32 s14, s15, s14 800cdc2: edd7 6a07 vldr s13, [r7, #28] 800cdc6: eec6 7a87 vdiv.f32 s15, s13, s14 800cdca: eefc 7ae7 vcvt.u32.f32 s15, s15 800cdce: ee17 2a90 vmov r2, s15 800cdd2: 687b ldr r3, [r7, #4] 800cdd4: 609a str r2, [r3, #8] PLL3_Clocks->PLL3_P_Frequency = 0U; PLL3_Clocks->PLL3_Q_Frequency = 0U; PLL3_Clocks->PLL3_R_Frequency = 0U; } } 800cdd6: e008 b.n 800cdea PLL3_Clocks->PLL3_P_Frequency = 0U; 800cdd8: 687b ldr r3, [r7, #4] 800cdda: 2200 movs r2, #0 800cddc: 601a str r2, [r3, #0] PLL3_Clocks->PLL3_Q_Frequency = 0U; 800cdde: 687b ldr r3, [r7, #4] 800cde0: 2200 movs r2, #0 800cde2: 605a str r2, [r3, #4] PLL3_Clocks->PLL3_R_Frequency = 0U; 800cde4: 687b ldr r3, [r7, #4] 800cde6: 2200 movs r2, #0 800cde8: 609a str r2, [r3, #8] } 800cdea: bf00 nop 800cdec: 3724 adds r7, #36 @ 0x24 800cdee: 46bd mov sp, r7 800cdf0: f85d 7b04 ldr.w r7, [sp], #4 800cdf4: 4770 bx lr 800cdf6: bf00 nop 800cdf8: 58024400 .word 0x58024400 800cdfc: 03d09000 .word 0x03d09000 800ce00: 46000000 .word 0x46000000 800ce04: 4c742400 .word 0x4c742400 800ce08: 4a742400 .word 0x4a742400 800ce0c: 4bbebc20 .word 0x4bbebc20 0800ce10 : * @note PLL2 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider) { 800ce10: b580 push {r7, lr} 800ce12: b084 sub sp, #16 800ce14: af00 add r7, sp, #0 800ce16: 6078 str r0, [r7, #4] 800ce18: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800ce1a: 2300 movs r3, #0 800ce1c: 73fb strb r3, [r7, #15] assert_param(IS_RCC_PLL2RGE_VALUE(pll2->PLL2RGE)); assert_param(IS_RCC_PLL2VCO_VALUE(pll2->PLL2VCOSEL)); assert_param(IS_RCC_PLLFRACN_VALUE(pll2->PLL2FRACN)); /* Check that PLL2 OSC clock source is already set */ if (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_NONE) 800ce1e: 4b53 ldr r3, [pc, #332] @ (800cf6c ) 800ce20: 6a9b ldr r3, [r3, #40] @ 0x28 800ce22: f003 0303 and.w r3, r3, #3 800ce26: 2b03 cmp r3, #3 800ce28: d101 bne.n 800ce2e { return HAL_ERROR; 800ce2a: 2301 movs r3, #1 800ce2c: e099 b.n 800cf62 else { /* Disable PLL2. */ __HAL_RCC_PLL2_DISABLE(); 800ce2e: 4b4f ldr r3, [pc, #316] @ (800cf6c ) 800ce30: 681b ldr r3, [r3, #0] 800ce32: 4a4e ldr r2, [pc, #312] @ (800cf6c ) 800ce34: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800ce38: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ce3a: f7f8 fcb9 bl 80057b0 800ce3e: 60b8 str r0, [r7, #8] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800ce40: e008 b.n 800ce54 { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800ce42: f7f8 fcb5 bl 80057b0 800ce46: 4602 mov r2, r0 800ce48: 68bb ldr r3, [r7, #8] 800ce4a: 1ad3 subs r3, r2, r3 800ce4c: 2b02 cmp r3, #2 800ce4e: d901 bls.n 800ce54 { return HAL_TIMEOUT; 800ce50: 2303 movs r3, #3 800ce52: e086 b.n 800cf62 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800ce54: 4b45 ldr r3, [pc, #276] @ (800cf6c ) 800ce56: 681b ldr r3, [r3, #0] 800ce58: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800ce5c: 2b00 cmp r3, #0 800ce5e: d1f0 bne.n 800ce42 } } /* Configure PLL2 multiplication and division factors. */ __HAL_RCC_PLL2_CONFIG(pll2->PLL2M, 800ce60: 4b42 ldr r3, [pc, #264] @ (800cf6c ) 800ce62: 6a9b ldr r3, [r3, #40] @ 0x28 800ce64: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800ce68: 687b ldr r3, [r7, #4] 800ce6a: 681b ldr r3, [r3, #0] 800ce6c: 031b lsls r3, r3, #12 800ce6e: 493f ldr r1, [pc, #252] @ (800cf6c ) 800ce70: 4313 orrs r3, r2 800ce72: 628b str r3, [r1, #40] @ 0x28 800ce74: 687b ldr r3, [r7, #4] 800ce76: 685b ldr r3, [r3, #4] 800ce78: 3b01 subs r3, #1 800ce7a: f3c3 0208 ubfx r2, r3, #0, #9 800ce7e: 687b ldr r3, [r7, #4] 800ce80: 689b ldr r3, [r3, #8] 800ce82: 3b01 subs r3, #1 800ce84: 025b lsls r3, r3, #9 800ce86: b29b uxth r3, r3 800ce88: 431a orrs r2, r3 800ce8a: 687b ldr r3, [r7, #4] 800ce8c: 68db ldr r3, [r3, #12] 800ce8e: 3b01 subs r3, #1 800ce90: 041b lsls r3, r3, #16 800ce92: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800ce96: 431a orrs r2, r3 800ce98: 687b ldr r3, [r7, #4] 800ce9a: 691b ldr r3, [r3, #16] 800ce9c: 3b01 subs r3, #1 800ce9e: 061b lsls r3, r3, #24 800cea0: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800cea4: 4931 ldr r1, [pc, #196] @ (800cf6c ) 800cea6: 4313 orrs r3, r2 800cea8: 638b str r3, [r1, #56] @ 0x38 pll2->PLL2P, pll2->PLL2Q, pll2->PLL2R); /* Select PLL2 input reference frequency range: VCI */ __HAL_RCC_PLL2_VCIRANGE(pll2->PLL2RGE) ; 800ceaa: 4b30 ldr r3, [pc, #192] @ (800cf6c ) 800ceac: 6adb ldr r3, [r3, #44] @ 0x2c 800ceae: f023 02c0 bic.w r2, r3, #192 @ 0xc0 800ceb2: 687b ldr r3, [r7, #4] 800ceb4: 695b ldr r3, [r3, #20] 800ceb6: 492d ldr r1, [pc, #180] @ (800cf6c ) 800ceb8: 4313 orrs r3, r2 800ceba: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL2 output frequency range : VCO */ __HAL_RCC_PLL2_VCORANGE(pll2->PLL2VCOSEL) ; 800cebc: 4b2b ldr r3, [pc, #172] @ (800cf6c ) 800cebe: 6adb ldr r3, [r3, #44] @ 0x2c 800cec0: f023 0220 bic.w r2, r3, #32 800cec4: 687b ldr r3, [r7, #4] 800cec6: 699b ldr r3, [r3, #24] 800cec8: 4928 ldr r1, [pc, #160] @ (800cf6c ) 800ceca: 4313 orrs r3, r2 800cecc: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_DISABLE(); 800cece: 4b27 ldr r3, [pc, #156] @ (800cf6c ) 800ced0: 6adb ldr r3, [r3, #44] @ 0x2c 800ced2: 4a26 ldr r2, [pc, #152] @ (800cf6c ) 800ced4: f023 0310 bic.w r3, r3, #16 800ced8: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL2 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL2FRACN_CONFIG(pll2->PLL2FRACN); 800ceda: 4b24 ldr r3, [pc, #144] @ (800cf6c ) 800cedc: 6bda ldr r2, [r3, #60] @ 0x3c 800cede: 4b24 ldr r3, [pc, #144] @ (800cf70 ) 800cee0: 4013 ands r3, r2 800cee2: 687a ldr r2, [r7, #4] 800cee4: 69d2 ldr r2, [r2, #28] 800cee6: 00d2 lsls r2, r2, #3 800cee8: 4920 ldr r1, [pc, #128] @ (800cf6c ) 800ceea: 4313 orrs r3, r2 800ceec: 63cb str r3, [r1, #60] @ 0x3c /* Enable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_ENABLE(); 800ceee: 4b1f ldr r3, [pc, #124] @ (800cf6c ) 800cef0: 6adb ldr r3, [r3, #44] @ 0x2c 800cef2: 4a1e ldr r2, [pc, #120] @ (800cf6c ) 800cef4: f043 0310 orr.w r3, r3, #16 800cef8: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL2 clock output */ if (Divider == DIVIDER_P_UPDATE) 800cefa: 683b ldr r3, [r7, #0] 800cefc: 2b00 cmp r3, #0 800cefe: d106 bne.n 800cf0e { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVP); 800cf00: 4b1a ldr r3, [pc, #104] @ (800cf6c ) 800cf02: 6adb ldr r3, [r3, #44] @ 0x2c 800cf04: 4a19 ldr r2, [pc, #100] @ (800cf6c ) 800cf06: f443 2300 orr.w r3, r3, #524288 @ 0x80000 800cf0a: 62d3 str r3, [r2, #44] @ 0x2c 800cf0c: e00f b.n 800cf2e } else if (Divider == DIVIDER_Q_UPDATE) 800cf0e: 683b ldr r3, [r7, #0] 800cf10: 2b01 cmp r3, #1 800cf12: d106 bne.n 800cf22 { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVQ); 800cf14: 4b15 ldr r3, [pc, #84] @ (800cf6c ) 800cf16: 6adb ldr r3, [r3, #44] @ 0x2c 800cf18: 4a14 ldr r2, [pc, #80] @ (800cf6c ) 800cf1a: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 800cf1e: 62d3 str r3, [r2, #44] @ 0x2c 800cf20: e005 b.n 800cf2e } else { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVR); 800cf22: 4b12 ldr r3, [pc, #72] @ (800cf6c ) 800cf24: 6adb ldr r3, [r3, #44] @ 0x2c 800cf26: 4a11 ldr r2, [pc, #68] @ (800cf6c ) 800cf28: f443 1300 orr.w r3, r3, #2097152 @ 0x200000 800cf2c: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL2. */ __HAL_RCC_PLL2_ENABLE(); 800cf2e: 4b0f ldr r3, [pc, #60] @ (800cf6c ) 800cf30: 681b ldr r3, [r3, #0] 800cf32: 4a0e ldr r2, [pc, #56] @ (800cf6c ) 800cf34: f043 6380 orr.w r3, r3, #67108864 @ 0x4000000 800cf38: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800cf3a: f7f8 fc39 bl 80057b0 800cf3e: 60b8 str r0, [r7, #8] /* Wait till PLL2 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800cf40: e008 b.n 800cf54 { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800cf42: f7f8 fc35 bl 80057b0 800cf46: 4602 mov r2, r0 800cf48: 68bb ldr r3, [r7, #8] 800cf4a: 1ad3 subs r3, r2, r3 800cf4c: 2b02 cmp r3, #2 800cf4e: d901 bls.n 800cf54 { return HAL_TIMEOUT; 800cf50: 2303 movs r3, #3 800cf52: e006 b.n 800cf62 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800cf54: 4b05 ldr r3, [pc, #20] @ (800cf6c ) 800cf56: 681b ldr r3, [r3, #0] 800cf58: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800cf5c: 2b00 cmp r3, #0 800cf5e: d0f0 beq.n 800cf42 } } return status; 800cf60: 7bfb ldrb r3, [r7, #15] } 800cf62: 4618 mov r0, r3 800cf64: 3710 adds r7, #16 800cf66: 46bd mov sp, r7 800cf68: bd80 pop {r7, pc} 800cf6a: bf00 nop 800cf6c: 58024400 .word 0x58024400 800cf70: ffff0007 .word 0xffff0007 0800cf74 : * @note PLL3 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider) { 800cf74: b580 push {r7, lr} 800cf76: b084 sub sp, #16 800cf78: af00 add r7, sp, #0 800cf7a: 6078 str r0, [r7, #4] 800cf7c: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800cf7e: 2300 movs r3, #0 800cf80: 73fb strb r3, [r7, #15] assert_param(IS_RCC_PLL3RGE_VALUE(pll3->PLL3RGE)); assert_param(IS_RCC_PLL3VCO_VALUE(pll3->PLL3VCOSEL)); assert_param(IS_RCC_PLLFRACN_VALUE(pll3->PLL3FRACN)); /* Check that PLL3 OSC clock source is already set */ if (__HAL_RCC_GET_PLL_OSCSOURCE() == RCC_PLLSOURCE_NONE) 800cf82: 4b53 ldr r3, [pc, #332] @ (800d0d0 ) 800cf84: 6a9b ldr r3, [r3, #40] @ 0x28 800cf86: f003 0303 and.w r3, r3, #3 800cf8a: 2b03 cmp r3, #3 800cf8c: d101 bne.n 800cf92 { return HAL_ERROR; 800cf8e: 2301 movs r3, #1 800cf90: e099 b.n 800d0c6 else { /* Disable PLL3. */ __HAL_RCC_PLL3_DISABLE(); 800cf92: 4b4f ldr r3, [pc, #316] @ (800d0d0 ) 800cf94: 681b ldr r3, [r3, #0] 800cf96: 4a4e ldr r2, [pc, #312] @ (800d0d0 ) 800cf98: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800cf9c: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800cf9e: f7f8 fc07 bl 80057b0 800cfa2: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800cfa4: e008 b.n 800cfb8 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800cfa6: f7f8 fc03 bl 80057b0 800cfaa: 4602 mov r2, r0 800cfac: 68bb ldr r3, [r7, #8] 800cfae: 1ad3 subs r3, r2, r3 800cfb0: 2b02 cmp r3, #2 800cfb2: d901 bls.n 800cfb8 { return HAL_TIMEOUT; 800cfb4: 2303 movs r3, #3 800cfb6: e086 b.n 800d0c6 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800cfb8: 4b45 ldr r3, [pc, #276] @ (800d0d0 ) 800cfba: 681b ldr r3, [r3, #0] 800cfbc: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800cfc0: 2b00 cmp r3, #0 800cfc2: d1f0 bne.n 800cfa6 } } /* Configure the PLL3 multiplication and division factors. */ __HAL_RCC_PLL3_CONFIG(pll3->PLL3M, 800cfc4: 4b42 ldr r3, [pc, #264] @ (800d0d0 ) 800cfc6: 6a9b ldr r3, [r3, #40] @ 0x28 800cfc8: f023 727c bic.w r2, r3, #66060288 @ 0x3f00000 800cfcc: 687b ldr r3, [r7, #4] 800cfce: 681b ldr r3, [r3, #0] 800cfd0: 051b lsls r3, r3, #20 800cfd2: 493f ldr r1, [pc, #252] @ (800d0d0 ) 800cfd4: 4313 orrs r3, r2 800cfd6: 628b str r3, [r1, #40] @ 0x28 800cfd8: 687b ldr r3, [r7, #4] 800cfda: 685b ldr r3, [r3, #4] 800cfdc: 3b01 subs r3, #1 800cfde: f3c3 0208 ubfx r2, r3, #0, #9 800cfe2: 687b ldr r3, [r7, #4] 800cfe4: 689b ldr r3, [r3, #8] 800cfe6: 3b01 subs r3, #1 800cfe8: 025b lsls r3, r3, #9 800cfea: b29b uxth r3, r3 800cfec: 431a orrs r2, r3 800cfee: 687b ldr r3, [r7, #4] 800cff0: 68db ldr r3, [r3, #12] 800cff2: 3b01 subs r3, #1 800cff4: 041b lsls r3, r3, #16 800cff6: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800cffa: 431a orrs r2, r3 800cffc: 687b ldr r3, [r7, #4] 800cffe: 691b ldr r3, [r3, #16] 800d000: 3b01 subs r3, #1 800d002: 061b lsls r3, r3, #24 800d004: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800d008: 4931 ldr r1, [pc, #196] @ (800d0d0 ) 800d00a: 4313 orrs r3, r2 800d00c: 640b str r3, [r1, #64] @ 0x40 pll3->PLL3P, pll3->PLL3Q, pll3->PLL3R); /* Select PLL3 input reference frequency range: VCI */ __HAL_RCC_PLL3_VCIRANGE(pll3->PLL3RGE) ; 800d00e: 4b30 ldr r3, [pc, #192] @ (800d0d0 ) 800d010: 6adb ldr r3, [r3, #44] @ 0x2c 800d012: f423 6240 bic.w r2, r3, #3072 @ 0xc00 800d016: 687b ldr r3, [r7, #4] 800d018: 695b ldr r3, [r3, #20] 800d01a: 492d ldr r1, [pc, #180] @ (800d0d0 ) 800d01c: 4313 orrs r3, r2 800d01e: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL3 output frequency range : VCO */ __HAL_RCC_PLL3_VCORANGE(pll3->PLL3VCOSEL) ; 800d020: 4b2b ldr r3, [pc, #172] @ (800d0d0 ) 800d022: 6adb ldr r3, [r3, #44] @ 0x2c 800d024: f423 7200 bic.w r2, r3, #512 @ 0x200 800d028: 687b ldr r3, [r7, #4] 800d02a: 699b ldr r3, [r3, #24] 800d02c: 4928 ldr r1, [pc, #160] @ (800d0d0 ) 800d02e: 4313 orrs r3, r2 800d030: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_DISABLE(); 800d032: 4b27 ldr r3, [pc, #156] @ (800d0d0 ) 800d034: 6adb ldr r3, [r3, #44] @ 0x2c 800d036: 4a26 ldr r2, [pc, #152] @ (800d0d0 ) 800d038: f423 7380 bic.w r3, r3, #256 @ 0x100 800d03c: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL3 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL3FRACN_CONFIG(pll3->PLL3FRACN); 800d03e: 4b24 ldr r3, [pc, #144] @ (800d0d0 ) 800d040: 6c5a ldr r2, [r3, #68] @ 0x44 800d042: 4b24 ldr r3, [pc, #144] @ (800d0d4 ) 800d044: 4013 ands r3, r2 800d046: 687a ldr r2, [r7, #4] 800d048: 69d2 ldr r2, [r2, #28] 800d04a: 00d2 lsls r2, r2, #3 800d04c: 4920 ldr r1, [pc, #128] @ (800d0d0 ) 800d04e: 4313 orrs r3, r2 800d050: 644b str r3, [r1, #68] @ 0x44 /* Enable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_ENABLE(); 800d052: 4b1f ldr r3, [pc, #124] @ (800d0d0 ) 800d054: 6adb ldr r3, [r3, #44] @ 0x2c 800d056: 4a1e ldr r2, [pc, #120] @ (800d0d0 ) 800d058: f443 7380 orr.w r3, r3, #256 @ 0x100 800d05c: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL3 clock output */ if (Divider == DIVIDER_P_UPDATE) 800d05e: 683b ldr r3, [r7, #0] 800d060: 2b00 cmp r3, #0 800d062: d106 bne.n 800d072 { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVP); 800d064: 4b1a ldr r3, [pc, #104] @ (800d0d0 ) 800d066: 6adb ldr r3, [r3, #44] @ 0x2c 800d068: 4a19 ldr r2, [pc, #100] @ (800d0d0 ) 800d06a: f443 0380 orr.w r3, r3, #4194304 @ 0x400000 800d06e: 62d3 str r3, [r2, #44] @ 0x2c 800d070: e00f b.n 800d092 } else if (Divider == DIVIDER_Q_UPDATE) 800d072: 683b ldr r3, [r7, #0] 800d074: 2b01 cmp r3, #1 800d076: d106 bne.n 800d086 { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVQ); 800d078: 4b15 ldr r3, [pc, #84] @ (800d0d0 ) 800d07a: 6adb ldr r3, [r3, #44] @ 0x2c 800d07c: 4a14 ldr r2, [pc, #80] @ (800d0d0 ) 800d07e: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800d082: 62d3 str r3, [r2, #44] @ 0x2c 800d084: e005 b.n 800d092 } else { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVR); 800d086: 4b12 ldr r3, [pc, #72] @ (800d0d0 ) 800d088: 6adb ldr r3, [r3, #44] @ 0x2c 800d08a: 4a11 ldr r2, [pc, #68] @ (800d0d0 ) 800d08c: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800d090: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL3. */ __HAL_RCC_PLL3_ENABLE(); 800d092: 4b0f ldr r3, [pc, #60] @ (800d0d0 ) 800d094: 681b ldr r3, [r3, #0] 800d096: 4a0e ldr r2, [pc, #56] @ (800d0d0 ) 800d098: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800d09c: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800d09e: f7f8 fb87 bl 80057b0 800d0a2: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800d0a4: e008 b.n 800d0b8 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800d0a6: f7f8 fb83 bl 80057b0 800d0aa: 4602 mov r2, r0 800d0ac: 68bb ldr r3, [r7, #8] 800d0ae: 1ad3 subs r3, r2, r3 800d0b0: 2b02 cmp r3, #2 800d0b2: d901 bls.n 800d0b8 { return HAL_TIMEOUT; 800d0b4: 2303 movs r3, #3 800d0b6: e006 b.n 800d0c6 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800d0b8: 4b05 ldr r3, [pc, #20] @ (800d0d0 ) 800d0ba: 681b ldr r3, [r3, #0] 800d0bc: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800d0c0: 2b00 cmp r3, #0 800d0c2: d0f0 beq.n 800d0a6 } } return status; 800d0c4: 7bfb ldrb r3, [r7, #15] } 800d0c6: 4618 mov r0, r3 800d0c8: 3710 adds r7, #16 800d0ca: 46bd mov sp, r7 800d0cc: bd80 pop {r7, pc} 800d0ce: bf00 nop 800d0d0: 58024400 .word 0x58024400 800d0d4: ffff0007 .word 0xffff0007 0800d0d8 : * @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) { 800d0d8: b580 push {r7, lr} 800d0da: b084 sub sp, #16 800d0dc: af00 add r7, sp, #0 800d0de: 6078 str r0, [r7, #4] uint32_t tickstart; /* Check the RNG handle allocation */ if (hrng == NULL) 800d0e0: 687b ldr r3, [r7, #4] 800d0e2: 2b00 cmp r3, #0 800d0e4: d101 bne.n 800d0ea { return HAL_ERROR; 800d0e6: 2301 movs r3, #1 800d0e8: e054 b.n 800d194 /* Init the low level hardware */ hrng->MspInitCallback(hrng); } #else if (hrng->State == HAL_RNG_STATE_RESET) 800d0ea: 687b ldr r3, [r7, #4] 800d0ec: 7a5b ldrb r3, [r3, #9] 800d0ee: b2db uxtb r3, r3 800d0f0: 2b00 cmp r3, #0 800d0f2: d105 bne.n 800d100 { /* Allocate lock resource and initialize it */ hrng->Lock = HAL_UNLOCKED; 800d0f4: 687b ldr r3, [r7, #4] 800d0f6: 2200 movs r2, #0 800d0f8: 721a strb r2, [r3, #8] /* Init the low level hardware */ HAL_RNG_MspInit(hrng); 800d0fa: 6878 ldr r0, [r7, #4] 800d0fc: f7f6 fcb8 bl 8003a70 } #endif /* USE_HAL_RNG_REGISTER_CALLBACKS */ /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800d100: 687b ldr r3, [r7, #4] 800d102: 2202 movs r2, #2 800d104: 725a strb r2, [r3, #9] } } } #else /* Clock Error Detection Configuration */ MODIFY_REG(hrng->Instance->CR, RNG_CR_CED, hrng->Init.ClockErrorDetection); 800d106: 687b ldr r3, [r7, #4] 800d108: 681b ldr r3, [r3, #0] 800d10a: 681b ldr r3, [r3, #0] 800d10c: f023 0120 bic.w r1, r3, #32 800d110: 687b ldr r3, [r7, #4] 800d112: 685a ldr r2, [r3, #4] 800d114: 687b ldr r3, [r7, #4] 800d116: 681b ldr r3, [r3, #0] 800d118: 430a orrs r2, r1 800d11a: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ /* Enable the RNG Peripheral */ __HAL_RNG_ENABLE(hrng); 800d11c: 687b ldr r3, [r7, #4] 800d11e: 681b ldr r3, [r3, #0] 800d120: 681a ldr r2, [r3, #0] 800d122: 687b ldr r3, [r7, #4] 800d124: 681b ldr r3, [r3, #0] 800d126: f042 0204 orr.w r2, r2, #4 800d12a: 601a str r2, [r3, #0] /* verify that no seed error */ if (__HAL_RNG_GET_IT(hrng, RNG_IT_SEI) != RESET) 800d12c: 687b ldr r3, [r7, #4] 800d12e: 681b ldr r3, [r3, #0] 800d130: 685b ldr r3, [r3, #4] 800d132: f003 0340 and.w r3, r3, #64 @ 0x40 800d136: 2b40 cmp r3, #64 @ 0x40 800d138: d104 bne.n 800d144 { hrng->State = HAL_RNG_STATE_ERROR; 800d13a: 687b ldr r3, [r7, #4] 800d13c: 2204 movs r2, #4 800d13e: 725a strb r2, [r3, #9] return HAL_ERROR; 800d140: 2301 movs r3, #1 800d142: e027 b.n 800d194 } /* Get tick */ tickstart = HAL_GetTick(); 800d144: f7f8 fb34 bl 80057b0 800d148: 60f8 str r0, [r7, #12] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d14a: e015 b.n 800d178 { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800d14c: f7f8 fb30 bl 80057b0 800d150: 4602 mov r2, r0 800d152: 68fb ldr r3, [r7, #12] 800d154: 1ad3 subs r3, r2, r3 800d156: 2b02 cmp r3, #2 800d158: d90e bls.n 800d178 { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d15a: 687b ldr r3, [r7, #4] 800d15c: 681b ldr r3, [r3, #0] 800d15e: 685b ldr r3, [r3, #4] 800d160: f003 0304 and.w r3, r3, #4 800d164: 2b04 cmp r3, #4 800d166: d107 bne.n 800d178 { hrng->State = HAL_RNG_STATE_ERROR; 800d168: 687b ldr r3, [r7, #4] 800d16a: 2204 movs r2, #4 800d16c: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800d16e: 687b ldr r3, [r7, #4] 800d170: 2202 movs r2, #2 800d172: 60da str r2, [r3, #12] return HAL_ERROR; 800d174: 2301 movs r3, #1 800d176: e00d b.n 800d194 while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d178: 687b ldr r3, [r7, #4] 800d17a: 681b ldr r3, [r3, #0] 800d17c: 685b ldr r3, [r3, #4] 800d17e: f003 0304 and.w r3, r3, #4 800d182: 2b04 cmp r3, #4 800d184: d0e2 beq.n 800d14c } } } /* Initialize the RNG state */ hrng->State = HAL_RNG_STATE_READY; 800d186: 687b ldr r3, [r7, #4] 800d188: 2201 movs r2, #1 800d18a: 725a strb r2, [r3, #9] /* Initialise the error code */ hrng->ErrorCode = HAL_RNG_ERROR_NONE; 800d18c: 687b ldr r3, [r7, #4] 800d18e: 2200 movs r2, #0 800d190: 60da str r2, [r3, #12] /* Return function status */ return HAL_OK; 800d192: 2300 movs r3, #0 } 800d194: 4618 mov r0, r3 800d196: 3710 adds r7, #16 800d198: 46bd mov sp, r7 800d19a: bd80 pop {r7, pc} 0800d19c : * @param random32bit pointer to generated random number variable if successful. * @retval HAL status */ HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit) { 800d19c: b580 push {r7, lr} 800d19e: b084 sub sp, #16 800d1a0: af00 add r7, sp, #0 800d1a2: 6078 str r0, [r7, #4] 800d1a4: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800d1a6: 2300 movs r3, #0 800d1a8: 73fb strb r3, [r7, #15] /* Process Locked */ __HAL_LOCK(hrng); 800d1aa: 687b ldr r3, [r7, #4] 800d1ac: 7a1b ldrb r3, [r3, #8] 800d1ae: 2b01 cmp r3, #1 800d1b0: d101 bne.n 800d1b6 800d1b2: 2302 movs r3, #2 800d1b4: e044 b.n 800d240 800d1b6: 687b ldr r3, [r7, #4] 800d1b8: 2201 movs r2, #1 800d1ba: 721a strb r2, [r3, #8] /* Check RNG peripheral state */ if (hrng->State == HAL_RNG_STATE_READY) 800d1bc: 687b ldr r3, [r7, #4] 800d1be: 7a5b ldrb r3, [r3, #9] 800d1c0: b2db uxtb r3, r3 800d1c2: 2b01 cmp r3, #1 800d1c4: d133 bne.n 800d22e { /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800d1c6: 687b ldr r3, [r7, #4] 800d1c8: 2202 movs r2, #2 800d1ca: 725a strb r2, [r3, #9] } } #endif /* RNG_CR_CONDRST */ /* Get tick */ tickstart = HAL_GetTick(); 800d1cc: f7f8 faf0 bl 80057b0 800d1d0: 60b8 str r0, [r7, #8] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d1d2: e018 b.n 800d206 { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800d1d4: f7f8 faec bl 80057b0 800d1d8: 4602 mov r2, r0 800d1da: 68bb ldr r3, [r7, #8] 800d1dc: 1ad3 subs r3, r2, r3 800d1de: 2b02 cmp r3, #2 800d1e0: d911 bls.n 800d206 { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d1e2: 687b ldr r3, [r7, #4] 800d1e4: 681b ldr r3, [r3, #0] 800d1e6: 685b ldr r3, [r3, #4] 800d1e8: f003 0301 and.w r3, r3, #1 800d1ec: 2b01 cmp r3, #1 800d1ee: d00a beq.n 800d206 { hrng->State = HAL_RNG_STATE_READY; 800d1f0: 687b ldr r3, [r7, #4] 800d1f2: 2201 movs r2, #1 800d1f4: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800d1f6: 687b ldr r3, [r7, #4] 800d1f8: 2202 movs r2, #2 800d1fa: 60da str r2, [r3, #12] /* Process Unlocked */ __HAL_UNLOCK(hrng); 800d1fc: 687b ldr r3, [r7, #4] 800d1fe: 2200 movs r2, #0 800d200: 721a strb r2, [r3, #8] return HAL_ERROR; 800d202: 2301 movs r3, #1 800d204: e01c b.n 800d240 while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d206: 687b ldr r3, [r7, #4] 800d208: 681b ldr r3, [r3, #0] 800d20a: 685b ldr r3, [r3, #4] 800d20c: f003 0301 and.w r3, r3, #1 800d210: 2b01 cmp r3, #1 800d212: d1df bne.n 800d1d4 } } } /* Get a 32bit Random number */ hrng->RandomNumber = hrng->Instance->DR; 800d214: 687b ldr r3, [r7, #4] 800d216: 681b ldr r3, [r3, #0] 800d218: 689a ldr r2, [r3, #8] 800d21a: 687b ldr r3, [r7, #4] 800d21c: 611a str r2, [r3, #16] else /* No seed error */ { *random32bit = hrng->RandomNumber; } #else *random32bit = hrng->RandomNumber; 800d21e: 687b ldr r3, [r7, #4] 800d220: 691a ldr r2, [r3, #16] 800d222: 683b ldr r3, [r7, #0] 800d224: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ hrng->State = HAL_RNG_STATE_READY; 800d226: 687b ldr r3, [r7, #4] 800d228: 2201 movs r2, #1 800d22a: 725a strb r2, [r3, #9] 800d22c: e004 b.n 800d238 } else { hrng->ErrorCode = HAL_RNG_ERROR_BUSY; 800d22e: 687b ldr r3, [r7, #4] 800d230: 2204 movs r2, #4 800d232: 60da str r2, [r3, #12] status = HAL_ERROR; 800d234: 2301 movs r3, #1 800d236: 73fb strb r3, [r7, #15] } /* Process Unlocked */ __HAL_UNLOCK(hrng); 800d238: 687b ldr r3, [r7, #4] 800d23a: 2200 movs r2, #0 800d23c: 721a strb r2, [r3, #8] return status; 800d23e: 7bfb ldrb r3, [r7, #15] } 800d240: 4618 mov r0, r3 800d242: 3710 adds r7, #16 800d244: 46bd mov sp, r7 800d246: bd80 pop {r7, pc} 0800d248 : * 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) { 800d248: b580 push {r7, lr} 800d24a: b082 sub sp, #8 800d24c: af00 add r7, sp, #0 800d24e: 6078 str r0, [r7, #4] /* Check the TIM handle allocation */ if (htim == NULL) 800d250: 687b ldr r3, [r7, #4] 800d252: 2b00 cmp r3, #0 800d254: d101 bne.n 800d25a { return HAL_ERROR; 800d256: 2301 movs r3, #1 800d258: e049 b.n 800d2ee assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode)); assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision)); assert_param(IS_TIM_PERIOD(htim, htim->Init.Period)); assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload)); if (htim->State == HAL_TIM_STATE_RESET) 800d25a: 687b ldr r3, [r7, #4] 800d25c: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800d260: b2db uxtb r3, r3 800d262: 2b00 cmp r3, #0 800d264: d106 bne.n 800d274 { /* Allocate lock resource and initialize it */ htim->Lock = HAL_UNLOCKED; 800d266: 687b ldr r3, [r7, #4] 800d268: 2200 movs r2, #0 800d26a: 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); 800d26e: 6878 ldr r0, [r7, #4] 800d270: f000 f841 bl 800d2f6 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800d274: 687b ldr r3, [r7, #4] 800d276: 2202 movs r2, #2 800d278: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Set the Time Base configuration */ TIM_Base_SetConfig(htim->Instance, &htim->Init); 800d27c: 687b ldr r3, [r7, #4] 800d27e: 681a ldr r2, [r3, #0] 800d280: 687b ldr r3, [r7, #4] 800d282: 3304 adds r3, #4 800d284: 4619 mov r1, r3 800d286: 4610 mov r0, r2 800d288: f000 f9e8 bl 800d65c /* Initialize the DMA burst operation state */ htim->DMABurstState = HAL_DMA_BURST_STATE_READY; 800d28c: 687b ldr r3, [r7, #4] 800d28e: 2201 movs r2, #1 800d290: f883 2048 strb.w r2, [r3, #72] @ 0x48 /* Initialize the TIM channels state */ TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800d294: 687b ldr r3, [r7, #4] 800d296: 2201 movs r2, #1 800d298: f883 203e strb.w r2, [r3, #62] @ 0x3e 800d29c: 687b ldr r3, [r7, #4] 800d29e: 2201 movs r2, #1 800d2a0: f883 203f strb.w r2, [r3, #63] @ 0x3f 800d2a4: 687b ldr r3, [r7, #4] 800d2a6: 2201 movs r2, #1 800d2a8: f883 2040 strb.w r2, [r3, #64] @ 0x40 800d2ac: 687b ldr r3, [r7, #4] 800d2ae: 2201 movs r2, #1 800d2b0: f883 2041 strb.w r2, [r3, #65] @ 0x41 800d2b4: 687b ldr r3, [r7, #4] 800d2b6: 2201 movs r2, #1 800d2b8: f883 2042 strb.w r2, [r3, #66] @ 0x42 800d2bc: 687b ldr r3, [r7, #4] 800d2be: 2201 movs r2, #1 800d2c0: f883 2043 strb.w r2, [r3, #67] @ 0x43 TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800d2c4: 687b ldr r3, [r7, #4] 800d2c6: 2201 movs r2, #1 800d2c8: f883 2044 strb.w r2, [r3, #68] @ 0x44 800d2cc: 687b ldr r3, [r7, #4] 800d2ce: 2201 movs r2, #1 800d2d0: f883 2045 strb.w r2, [r3, #69] @ 0x45 800d2d4: 687b ldr r3, [r7, #4] 800d2d6: 2201 movs r2, #1 800d2d8: f883 2046 strb.w r2, [r3, #70] @ 0x46 800d2dc: 687b ldr r3, [r7, #4] 800d2de: 2201 movs r2, #1 800d2e0: f883 2047 strb.w r2, [r3, #71] @ 0x47 /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; 800d2e4: 687b ldr r3, [r7, #4] 800d2e6: 2201 movs r2, #1 800d2e8: f883 203d strb.w r2, [r3, #61] @ 0x3d return HAL_OK; 800d2ec: 2300 movs r3, #0 } 800d2ee: 4618 mov r0, r3 800d2f0: 3708 adds r7, #8 800d2f2: 46bd mov sp, r7 800d2f4: bd80 pop {r7, pc} 0800d2f6 : * @brief Initializes the TIM Base MSP. * @param htim TIM Base handle * @retval None */ __weak void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim) { 800d2f6: b480 push {r7} 800d2f8: b083 sub sp, #12 800d2fa: af00 add r7, sp, #0 800d2fc: 6078 str r0, [r7, #4] UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_Base_MspInit could be implemented in the user file */ } 800d2fe: bf00 nop 800d300: 370c adds r7, #12 800d302: 46bd mov sp, r7 800d304: f85d 7b04 ldr.w r7, [sp], #4 800d308: 4770 bx lr ... 0800d30c : * @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) { 800d30c: b480 push {r7} 800d30e: b085 sub sp, #20 800d310: af00 add r7, sp, #0 800d312: 6078 str r0, [r7, #4] /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); /* Check the TIM state */ if (htim->State != HAL_TIM_STATE_READY) 800d314: 687b ldr r3, [r7, #4] 800d316: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800d31a: b2db uxtb r3, r3 800d31c: 2b01 cmp r3, #1 800d31e: d001 beq.n 800d324 { return HAL_ERROR; 800d320: 2301 movs r3, #1 800d322: e054 b.n 800d3ce } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800d324: 687b ldr r3, [r7, #4] 800d326: 2202 movs r2, #2 800d328: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Enable the TIM Update interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE); 800d32c: 687b ldr r3, [r7, #4] 800d32e: 681b ldr r3, [r3, #0] 800d330: 68da ldr r2, [r3, #12] 800d332: 687b ldr r3, [r7, #4] 800d334: 681b ldr r3, [r3, #0] 800d336: f042 0201 orr.w r2, r2, #1 800d33a: 60da str r2, [r3, #12] /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */ if (IS_TIM_SLAVE_INSTANCE(htim->Instance)) 800d33c: 687b ldr r3, [r7, #4] 800d33e: 681b ldr r3, [r3, #0] 800d340: 4a26 ldr r2, [pc, #152] @ (800d3dc ) 800d342: 4293 cmp r3, r2 800d344: d022 beq.n 800d38c 800d346: 687b ldr r3, [r7, #4] 800d348: 681b ldr r3, [r3, #0] 800d34a: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d34e: d01d beq.n 800d38c 800d350: 687b ldr r3, [r7, #4] 800d352: 681b ldr r3, [r3, #0] 800d354: 4a22 ldr r2, [pc, #136] @ (800d3e0 ) 800d356: 4293 cmp r3, r2 800d358: d018 beq.n 800d38c 800d35a: 687b ldr r3, [r7, #4] 800d35c: 681b ldr r3, [r3, #0] 800d35e: 4a21 ldr r2, [pc, #132] @ (800d3e4 ) 800d360: 4293 cmp r3, r2 800d362: d013 beq.n 800d38c 800d364: 687b ldr r3, [r7, #4] 800d366: 681b ldr r3, [r3, #0] 800d368: 4a1f ldr r2, [pc, #124] @ (800d3e8 ) 800d36a: 4293 cmp r3, r2 800d36c: d00e beq.n 800d38c 800d36e: 687b ldr r3, [r7, #4] 800d370: 681b ldr r3, [r3, #0] 800d372: 4a1e ldr r2, [pc, #120] @ (800d3ec ) 800d374: 4293 cmp r3, r2 800d376: d009 beq.n 800d38c 800d378: 687b ldr r3, [r7, #4] 800d37a: 681b ldr r3, [r3, #0] 800d37c: 4a1c ldr r2, [pc, #112] @ (800d3f0 ) 800d37e: 4293 cmp r3, r2 800d380: d004 beq.n 800d38c 800d382: 687b ldr r3, [r7, #4] 800d384: 681b ldr r3, [r3, #0] 800d386: 4a1b ldr r2, [pc, #108] @ (800d3f4 ) 800d388: 4293 cmp r3, r2 800d38a: d115 bne.n 800d3b8 { tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS; 800d38c: 687b ldr r3, [r7, #4] 800d38e: 681b ldr r3, [r3, #0] 800d390: 689a ldr r2, [r3, #8] 800d392: 4b19 ldr r3, [pc, #100] @ (800d3f8 ) 800d394: 4013 ands r3, r2 800d396: 60fb str r3, [r7, #12] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d398: 68fb ldr r3, [r7, #12] 800d39a: 2b06 cmp r3, #6 800d39c: d015 beq.n 800d3ca 800d39e: 68fb ldr r3, [r7, #12] 800d3a0: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800d3a4: d011 beq.n 800d3ca { __HAL_TIM_ENABLE(htim); 800d3a6: 687b ldr r3, [r7, #4] 800d3a8: 681b ldr r3, [r3, #0] 800d3aa: 681a ldr r2, [r3, #0] 800d3ac: 687b ldr r3, [r7, #4] 800d3ae: 681b ldr r3, [r3, #0] 800d3b0: f042 0201 orr.w r2, r2, #1 800d3b4: 601a str r2, [r3, #0] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d3b6: e008 b.n 800d3ca } } else { __HAL_TIM_ENABLE(htim); 800d3b8: 687b ldr r3, [r7, #4] 800d3ba: 681b ldr r3, [r3, #0] 800d3bc: 681a ldr r2, [r3, #0] 800d3be: 687b ldr r3, [r7, #4] 800d3c0: 681b ldr r3, [r3, #0] 800d3c2: f042 0201 orr.w r2, r2, #1 800d3c6: 601a str r2, [r3, #0] 800d3c8: e000 b.n 800d3cc if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d3ca: bf00 nop } /* Return function status */ return HAL_OK; 800d3cc: 2300 movs r3, #0 } 800d3ce: 4618 mov r0, r3 800d3d0: 3714 adds r7, #20 800d3d2: 46bd mov sp, r7 800d3d4: f85d 7b04 ldr.w r7, [sp], #4 800d3d8: 4770 bx lr 800d3da: bf00 nop 800d3dc: 40010000 .word 0x40010000 800d3e0: 40000400 .word 0x40000400 800d3e4: 40000800 .word 0x40000800 800d3e8: 40000c00 .word 0x40000c00 800d3ec: 40010400 .word 0x40010400 800d3f0: 40001800 .word 0x40001800 800d3f4: 40014000 .word 0x40014000 800d3f8: 00010007 .word 0x00010007 0800d3fc : * @brief This function handles TIM interrupts requests. * @param htim TIM handle * @retval None */ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) { 800d3fc: b580 push {r7, lr} 800d3fe: b084 sub sp, #16 800d400: af00 add r7, sp, #0 800d402: 6078 str r0, [r7, #4] uint32_t itsource = htim->Instance->DIER; 800d404: 687b ldr r3, [r7, #4] 800d406: 681b ldr r3, [r3, #0] 800d408: 68db ldr r3, [r3, #12] 800d40a: 60fb str r3, [r7, #12] uint32_t itflag = htim->Instance->SR; 800d40c: 687b ldr r3, [r7, #4] 800d40e: 681b ldr r3, [r3, #0] 800d410: 691b ldr r3, [r3, #16] 800d412: 60bb str r3, [r7, #8] /* Capture compare 1 event */ if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1)) 800d414: 68bb ldr r3, [r7, #8] 800d416: f003 0302 and.w r3, r3, #2 800d41a: 2b00 cmp r3, #0 800d41c: d020 beq.n 800d460 { if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1)) 800d41e: 68fb ldr r3, [r7, #12] 800d420: f003 0302 and.w r3, r3, #2 800d424: 2b00 cmp r3, #0 800d426: d01b beq.n 800d460 { { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1); 800d428: 687b ldr r3, [r7, #4] 800d42a: 681b ldr r3, [r3, #0] 800d42c: f06f 0202 mvn.w r2, #2 800d430: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; 800d432: 687b ldr r3, [r7, #4] 800d434: 2201 movs r2, #1 800d436: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) 800d438: 687b ldr r3, [r7, #4] 800d43a: 681b ldr r3, [r3, #0] 800d43c: 699b ldr r3, [r3, #24] 800d43e: f003 0303 and.w r3, r3, #3 800d442: 2b00 cmp r3, #0 800d444: d003 beq.n 800d44e { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d446: 6878 ldr r0, [r7, #4] 800d448: f000 f8e9 bl 800d61e 800d44c: e005 b.n 800d45a { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d44e: 6878 ldr r0, [r7, #4] 800d450: f000 f8db bl 800d60a HAL_TIM_PWM_PulseFinishedCallback(htim); 800d454: 6878 ldr r0, [r7, #4] 800d456: f000 f8ec bl 800d632 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d45a: 687b ldr r3, [r7, #4] 800d45c: 2200 movs r2, #0 800d45e: 771a strb r2, [r3, #28] } } } /* Capture compare 2 event */ if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2)) 800d460: 68bb ldr r3, [r7, #8] 800d462: f003 0304 and.w r3, r3, #4 800d466: 2b00 cmp r3, #0 800d468: d020 beq.n 800d4ac { if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2)) 800d46a: 68fb ldr r3, [r7, #12] 800d46c: f003 0304 and.w r3, r3, #4 800d470: 2b00 cmp r3, #0 800d472: d01b beq.n 800d4ac { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2); 800d474: 687b ldr r3, [r7, #4] 800d476: 681b ldr r3, [r3, #0] 800d478: f06f 0204 mvn.w r2, #4 800d47c: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; 800d47e: 687b ldr r3, [r7, #4] 800d480: 2202 movs r2, #2 800d482: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) 800d484: 687b ldr r3, [r7, #4] 800d486: 681b ldr r3, [r3, #0] 800d488: 699b ldr r3, [r3, #24] 800d48a: f403 7340 and.w r3, r3, #768 @ 0x300 800d48e: 2b00 cmp r3, #0 800d490: d003 beq.n 800d49a { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d492: 6878 ldr r0, [r7, #4] 800d494: f000 f8c3 bl 800d61e 800d498: e005 b.n 800d4a6 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d49a: 6878 ldr r0, [r7, #4] 800d49c: f000 f8b5 bl 800d60a HAL_TIM_PWM_PulseFinishedCallback(htim); 800d4a0: 6878 ldr r0, [r7, #4] 800d4a2: f000 f8c6 bl 800d632 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d4a6: 687b ldr r3, [r7, #4] 800d4a8: 2200 movs r2, #0 800d4aa: 771a strb r2, [r3, #28] } } /* Capture compare 3 event */ if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3)) 800d4ac: 68bb ldr r3, [r7, #8] 800d4ae: f003 0308 and.w r3, r3, #8 800d4b2: 2b00 cmp r3, #0 800d4b4: d020 beq.n 800d4f8 { if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3)) 800d4b6: 68fb ldr r3, [r7, #12] 800d4b8: f003 0308 and.w r3, r3, #8 800d4bc: 2b00 cmp r3, #0 800d4be: d01b beq.n 800d4f8 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3); 800d4c0: 687b ldr r3, [r7, #4] 800d4c2: 681b ldr r3, [r3, #0] 800d4c4: f06f 0208 mvn.w r2, #8 800d4c8: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; 800d4ca: 687b ldr r3, [r7, #4] 800d4cc: 2204 movs r2, #4 800d4ce: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) 800d4d0: 687b ldr r3, [r7, #4] 800d4d2: 681b ldr r3, [r3, #0] 800d4d4: 69db ldr r3, [r3, #28] 800d4d6: f003 0303 and.w r3, r3, #3 800d4da: 2b00 cmp r3, #0 800d4dc: d003 beq.n 800d4e6 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d4de: 6878 ldr r0, [r7, #4] 800d4e0: f000 f89d bl 800d61e 800d4e4: e005 b.n 800d4f2 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d4e6: 6878 ldr r0, [r7, #4] 800d4e8: f000 f88f bl 800d60a HAL_TIM_PWM_PulseFinishedCallback(htim); 800d4ec: 6878 ldr r0, [r7, #4] 800d4ee: f000 f8a0 bl 800d632 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d4f2: 687b ldr r3, [r7, #4] 800d4f4: 2200 movs r2, #0 800d4f6: 771a strb r2, [r3, #28] } } /* Capture compare 4 event */ if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4)) 800d4f8: 68bb ldr r3, [r7, #8] 800d4fa: f003 0310 and.w r3, r3, #16 800d4fe: 2b00 cmp r3, #0 800d500: d020 beq.n 800d544 { if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4)) 800d502: 68fb ldr r3, [r7, #12] 800d504: f003 0310 and.w r3, r3, #16 800d508: 2b00 cmp r3, #0 800d50a: d01b beq.n 800d544 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4); 800d50c: 687b ldr r3, [r7, #4] 800d50e: 681b ldr r3, [r3, #0] 800d510: f06f 0210 mvn.w r2, #16 800d514: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; 800d516: 687b ldr r3, [r7, #4] 800d518: 2208 movs r2, #8 800d51a: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) 800d51c: 687b ldr r3, [r7, #4] 800d51e: 681b ldr r3, [r3, #0] 800d520: 69db ldr r3, [r3, #28] 800d522: f403 7340 and.w r3, r3, #768 @ 0x300 800d526: 2b00 cmp r3, #0 800d528: d003 beq.n 800d532 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d52a: 6878 ldr r0, [r7, #4] 800d52c: f000 f877 bl 800d61e 800d530: e005 b.n 800d53e { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d532: 6878 ldr r0, [r7, #4] 800d534: f000 f869 bl 800d60a HAL_TIM_PWM_PulseFinishedCallback(htim); 800d538: 6878 ldr r0, [r7, #4] 800d53a: f000 f87a bl 800d632 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d53e: 687b ldr r3, [r7, #4] 800d540: 2200 movs r2, #0 800d542: 771a strb r2, [r3, #28] } } /* TIM Update event */ if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE)) 800d544: 68bb ldr r3, [r7, #8] 800d546: f003 0301 and.w r3, r3, #1 800d54a: 2b00 cmp r3, #0 800d54c: d00c beq.n 800d568 { if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE)) 800d54e: 68fb ldr r3, [r7, #12] 800d550: f003 0301 and.w r3, r3, #1 800d554: 2b00 cmp r3, #0 800d556: d007 beq.n 800d568 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE); 800d558: 687b ldr r3, [r7, #4] 800d55a: 681b ldr r3, [r3, #0] 800d55c: f06f 0201 mvn.w r2, #1 800d560: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedCallback(htim); #else HAL_TIM_PeriodElapsedCallback(htim); 800d562: 6878 ldr r0, [r7, #4] 800d564: f7f5 f890 bl 8002688 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break input event */ if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800d568: 68bb ldr r3, [r7, #8] 800d56a: f003 0380 and.w r3, r3, #128 @ 0x80 800d56e: 2b00 cmp r3, #0 800d570: d104 bne.n 800d57c ((itflag & (TIM_FLAG_SYSTEM_BREAK)) == (TIM_FLAG_SYSTEM_BREAK))) 800d572: 68bb ldr r3, [r7, #8] 800d574: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800d578: 2b00 cmp r3, #0 800d57a: d00c beq.n 800d596 { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800d57c: 68fb ldr r3, [r7, #12] 800d57e: f003 0380 and.w r3, r3, #128 @ 0x80 800d582: 2b00 cmp r3, #0 800d584: d007 beq.n 800d596 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK | TIM_FLAG_SYSTEM_BREAK); 800d586: 687b ldr r3, [r7, #4] 800d588: 681b ldr r3, [r3, #0] 800d58a: f46f 5202 mvn.w r2, #8320 @ 0x2080 800d58e: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->BreakCallback(htim); #else HAL_TIMEx_BreakCallback(htim); 800d590: 6878 ldr r0, [r7, #4] 800d592: f000 f913 bl 800d7bc #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break2 input event */ if ((itflag & (TIM_FLAG_BREAK2)) == (TIM_FLAG_BREAK2)) 800d596: 68bb ldr r3, [r7, #8] 800d598: f403 7380 and.w r3, r3, #256 @ 0x100 800d59c: 2b00 cmp r3, #0 800d59e: d00c beq.n 800d5ba { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800d5a0: 68fb ldr r3, [r7, #12] 800d5a2: f003 0380 and.w r3, r3, #128 @ 0x80 800d5a6: 2b00 cmp r3, #0 800d5a8: d007 beq.n 800d5ba { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2); 800d5aa: 687b ldr r3, [r7, #4] 800d5ac: 681b ldr r3, [r3, #0] 800d5ae: f46f 7280 mvn.w r2, #256 @ 0x100 800d5b2: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->Break2Callback(htim); #else HAL_TIMEx_Break2Callback(htim); 800d5b4: 6878 ldr r0, [r7, #4] 800d5b6: f000 f90b bl 800d7d0 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Trigger detection event */ if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER)) 800d5ba: 68bb ldr r3, [r7, #8] 800d5bc: f003 0340 and.w r3, r3, #64 @ 0x40 800d5c0: 2b00 cmp r3, #0 800d5c2: d00c beq.n 800d5de { if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER)) 800d5c4: 68fb ldr r3, [r7, #12] 800d5c6: f003 0340 and.w r3, r3, #64 @ 0x40 800d5ca: 2b00 cmp r3, #0 800d5cc: d007 beq.n 800d5de { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER); 800d5ce: 687b ldr r3, [r7, #4] 800d5d0: 681b ldr r3, [r3, #0] 800d5d2: f06f 0240 mvn.w r2, #64 @ 0x40 800d5d6: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->TriggerCallback(htim); #else HAL_TIM_TriggerCallback(htim); 800d5d8: 6878 ldr r0, [r7, #4] 800d5da: f000 f834 bl 800d646 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM commutation event */ if ((itflag & (TIM_FLAG_COM)) == (TIM_FLAG_COM)) 800d5de: 68bb ldr r3, [r7, #8] 800d5e0: f003 0320 and.w r3, r3, #32 800d5e4: 2b00 cmp r3, #0 800d5e6: d00c beq.n 800d602 { if ((itsource & (TIM_IT_COM)) == (TIM_IT_COM)) 800d5e8: 68fb ldr r3, [r7, #12] 800d5ea: f003 0320 and.w r3, r3, #32 800d5ee: 2b00 cmp r3, #0 800d5f0: d007 beq.n 800d602 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_COM); 800d5f2: 687b ldr r3, [r7, #4] 800d5f4: 681b ldr r3, [r3, #0] 800d5f6: f06f 0220 mvn.w r2, #32 800d5fa: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->CommutationCallback(htim); #else HAL_TIMEx_CommutCallback(htim); 800d5fc: 6878 ldr r0, [r7, #4] 800d5fe: f000 f8d3 bl 800d7a8 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } } 800d602: bf00 nop 800d604: 3710 adds r7, #16 800d606: 46bd mov sp, r7 800d608: bd80 pop {r7, pc} 0800d60a : * @brief Output Compare callback in non-blocking mode * @param htim TIM OC handle * @retval None */ __weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) { 800d60a: b480 push {r7} 800d60c: b083 sub sp, #12 800d60e: af00 add r7, sp, #0 800d610: 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 */ } 800d612: bf00 nop 800d614: 370c adds r7, #12 800d616: 46bd mov sp, r7 800d618: f85d 7b04 ldr.w r7, [sp], #4 800d61c: 4770 bx lr 0800d61e : * @brief Input Capture callback in non-blocking mode * @param htim TIM IC handle * @retval None */ __weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) { 800d61e: b480 push {r7} 800d620: b083 sub sp, #12 800d622: af00 add r7, sp, #0 800d624: 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 */ } 800d626: bf00 nop 800d628: 370c adds r7, #12 800d62a: 46bd mov sp, r7 800d62c: f85d 7b04 ldr.w r7, [sp], #4 800d630: 4770 bx lr 0800d632 : * @brief PWM Pulse finished callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) { 800d632: b480 push {r7} 800d634: b083 sub sp, #12 800d636: af00 add r7, sp, #0 800d638: 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 */ } 800d63a: bf00 nop 800d63c: 370c adds r7, #12 800d63e: 46bd mov sp, r7 800d640: f85d 7b04 ldr.w r7, [sp], #4 800d644: 4770 bx lr 0800d646 : * @brief Hall Trigger detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim) { 800d646: b480 push {r7} 800d648: b083 sub sp, #12 800d64a: af00 add r7, sp, #0 800d64c: 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 */ } 800d64e: bf00 nop 800d650: 370c adds r7, #12 800d652: 46bd mov sp, r7 800d654: f85d 7b04 ldr.w r7, [sp], #4 800d658: 4770 bx lr ... 0800d65c : * @param TIMx TIM peripheral * @param Structure TIM Base configuration structure * @retval None */ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure) { 800d65c: b480 push {r7} 800d65e: b085 sub sp, #20 800d660: af00 add r7, sp, #0 800d662: 6078 str r0, [r7, #4] 800d664: 6039 str r1, [r7, #0] uint32_t tmpcr1; tmpcr1 = TIMx->CR1; 800d666: 687b ldr r3, [r7, #4] 800d668: 681b ldr r3, [r3, #0] 800d66a: 60fb str r3, [r7, #12] /* Set TIM Time Base Unit parameters ---------------------------------------*/ if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) 800d66c: 687b ldr r3, [r7, #4] 800d66e: 4a46 ldr r2, [pc, #280] @ (800d788 ) 800d670: 4293 cmp r3, r2 800d672: d013 beq.n 800d69c 800d674: 687b ldr r3, [r7, #4] 800d676: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d67a: d00f beq.n 800d69c 800d67c: 687b ldr r3, [r7, #4] 800d67e: 4a43 ldr r2, [pc, #268] @ (800d78c ) 800d680: 4293 cmp r3, r2 800d682: d00b beq.n 800d69c 800d684: 687b ldr r3, [r7, #4] 800d686: 4a42 ldr r2, [pc, #264] @ (800d790 ) 800d688: 4293 cmp r3, r2 800d68a: d007 beq.n 800d69c 800d68c: 687b ldr r3, [r7, #4] 800d68e: 4a41 ldr r2, [pc, #260] @ (800d794 ) 800d690: 4293 cmp r3, r2 800d692: d003 beq.n 800d69c 800d694: 687b ldr r3, [r7, #4] 800d696: 4a40 ldr r2, [pc, #256] @ (800d798 ) 800d698: 4293 cmp r3, r2 800d69a: d108 bne.n 800d6ae { /* Select the Counter Mode */ tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); 800d69c: 68fb ldr r3, [r7, #12] 800d69e: f023 0370 bic.w r3, r3, #112 @ 0x70 800d6a2: 60fb str r3, [r7, #12] tmpcr1 |= Structure->CounterMode; 800d6a4: 683b ldr r3, [r7, #0] 800d6a6: 685b ldr r3, [r3, #4] 800d6a8: 68fa ldr r2, [r7, #12] 800d6aa: 4313 orrs r3, r2 800d6ac: 60fb str r3, [r7, #12] } if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) 800d6ae: 687b ldr r3, [r7, #4] 800d6b0: 4a35 ldr r2, [pc, #212] @ (800d788 ) 800d6b2: 4293 cmp r3, r2 800d6b4: d01f beq.n 800d6f6 800d6b6: 687b ldr r3, [r7, #4] 800d6b8: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d6bc: d01b beq.n 800d6f6 800d6be: 687b ldr r3, [r7, #4] 800d6c0: 4a32 ldr r2, [pc, #200] @ (800d78c ) 800d6c2: 4293 cmp r3, r2 800d6c4: d017 beq.n 800d6f6 800d6c6: 687b ldr r3, [r7, #4] 800d6c8: 4a31 ldr r2, [pc, #196] @ (800d790 ) 800d6ca: 4293 cmp r3, r2 800d6cc: d013 beq.n 800d6f6 800d6ce: 687b ldr r3, [r7, #4] 800d6d0: 4a30 ldr r2, [pc, #192] @ (800d794 ) 800d6d2: 4293 cmp r3, r2 800d6d4: d00f beq.n 800d6f6 800d6d6: 687b ldr r3, [r7, #4] 800d6d8: 4a2f ldr r2, [pc, #188] @ (800d798 ) 800d6da: 4293 cmp r3, r2 800d6dc: d00b beq.n 800d6f6 800d6de: 687b ldr r3, [r7, #4] 800d6e0: 4a2e ldr r2, [pc, #184] @ (800d79c ) 800d6e2: 4293 cmp r3, r2 800d6e4: d007 beq.n 800d6f6 800d6e6: 687b ldr r3, [r7, #4] 800d6e8: 4a2d ldr r2, [pc, #180] @ (800d7a0 ) 800d6ea: 4293 cmp r3, r2 800d6ec: d003 beq.n 800d6f6 800d6ee: 687b ldr r3, [r7, #4] 800d6f0: 4a2c ldr r2, [pc, #176] @ (800d7a4 ) 800d6f2: 4293 cmp r3, r2 800d6f4: d108 bne.n 800d708 { /* Set the clock division */ tmpcr1 &= ~TIM_CR1_CKD; 800d6f6: 68fb ldr r3, [r7, #12] 800d6f8: f423 7340 bic.w r3, r3, #768 @ 0x300 800d6fc: 60fb str r3, [r7, #12] tmpcr1 |= (uint32_t)Structure->ClockDivision; 800d6fe: 683b ldr r3, [r7, #0] 800d700: 68db ldr r3, [r3, #12] 800d702: 68fa ldr r2, [r7, #12] 800d704: 4313 orrs r3, r2 800d706: 60fb str r3, [r7, #12] } /* Set the auto-reload preload */ MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); 800d708: 68fb ldr r3, [r7, #12] 800d70a: f023 0280 bic.w r2, r3, #128 @ 0x80 800d70e: 683b ldr r3, [r7, #0] 800d710: 695b ldr r3, [r3, #20] 800d712: 4313 orrs r3, r2 800d714: 60fb str r3, [r7, #12] TIMx->CR1 = tmpcr1; 800d716: 687b ldr r3, [r7, #4] 800d718: 68fa ldr r2, [r7, #12] 800d71a: 601a str r2, [r3, #0] /* Set the Autoreload value */ TIMx->ARR = (uint32_t)Structure->Period ; 800d71c: 683b ldr r3, [r7, #0] 800d71e: 689a ldr r2, [r3, #8] 800d720: 687b ldr r3, [r7, #4] 800d722: 62da str r2, [r3, #44] @ 0x2c /* Set the Prescaler value */ TIMx->PSC = Structure->Prescaler; 800d724: 683b ldr r3, [r7, #0] 800d726: 681a ldr r2, [r3, #0] 800d728: 687b ldr r3, [r7, #4] 800d72a: 629a str r2, [r3, #40] @ 0x28 if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) 800d72c: 687b ldr r3, [r7, #4] 800d72e: 4a16 ldr r2, [pc, #88] @ (800d788 ) 800d730: 4293 cmp r3, r2 800d732: d00f beq.n 800d754 800d734: 687b ldr r3, [r7, #4] 800d736: 4a18 ldr r2, [pc, #96] @ (800d798 ) 800d738: 4293 cmp r3, r2 800d73a: d00b beq.n 800d754 800d73c: 687b ldr r3, [r7, #4] 800d73e: 4a17 ldr r2, [pc, #92] @ (800d79c ) 800d740: 4293 cmp r3, r2 800d742: d007 beq.n 800d754 800d744: 687b ldr r3, [r7, #4] 800d746: 4a16 ldr r2, [pc, #88] @ (800d7a0 ) 800d748: 4293 cmp r3, r2 800d74a: d003 beq.n 800d754 800d74c: 687b ldr r3, [r7, #4] 800d74e: 4a15 ldr r2, [pc, #84] @ (800d7a4 ) 800d750: 4293 cmp r3, r2 800d752: d103 bne.n 800d75c { /* Set the Repetition Counter value */ TIMx->RCR = Structure->RepetitionCounter; 800d754: 683b ldr r3, [r7, #0] 800d756: 691a ldr r2, [r3, #16] 800d758: 687b ldr r3, [r7, #4] 800d75a: 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; 800d75c: 687b ldr r3, [r7, #4] 800d75e: 2201 movs r2, #1 800d760: 615a str r2, [r3, #20] /* Check if the update flag is set after the Update Generation, if so clear the UIF flag */ if (HAL_IS_BIT_SET(TIMx->SR, TIM_FLAG_UPDATE)) 800d762: 687b ldr r3, [r7, #4] 800d764: 691b ldr r3, [r3, #16] 800d766: f003 0301 and.w r3, r3, #1 800d76a: 2b01 cmp r3, #1 800d76c: d105 bne.n 800d77a { /* Clear the update flag */ CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE); 800d76e: 687b ldr r3, [r7, #4] 800d770: 691b ldr r3, [r3, #16] 800d772: f023 0201 bic.w r2, r3, #1 800d776: 687b ldr r3, [r7, #4] 800d778: 611a str r2, [r3, #16] } } 800d77a: bf00 nop 800d77c: 3714 adds r7, #20 800d77e: 46bd mov sp, r7 800d780: f85d 7b04 ldr.w r7, [sp], #4 800d784: 4770 bx lr 800d786: bf00 nop 800d788: 40010000 .word 0x40010000 800d78c: 40000400 .word 0x40000400 800d790: 40000800 .word 0x40000800 800d794: 40000c00 .word 0x40000c00 800d798: 40010400 .word 0x40010400 800d79c: 40014000 .word 0x40014000 800d7a0: 40014400 .word 0x40014400 800d7a4: 40014800 .word 0x40014800 0800d7a8 : * @brief Commutation callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim) { 800d7a8: b480 push {r7} 800d7aa: b083 sub sp, #12 800d7ac: af00 add r7, sp, #0 800d7ae: 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 */ } 800d7b0: bf00 nop 800d7b2: 370c adds r7, #12 800d7b4: 46bd mov sp, r7 800d7b6: f85d 7b04 ldr.w r7, [sp], #4 800d7ba: 4770 bx lr 0800d7bc : * @brief Break detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim) { 800d7bc: b480 push {r7} 800d7be: b083 sub sp, #12 800d7c0: af00 add r7, sp, #0 800d7c2: 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 */ } 800d7c4: bf00 nop 800d7c6: 370c adds r7, #12 800d7c8: 46bd mov sp, r7 800d7ca: f85d 7b04 ldr.w r7, [sp], #4 800d7ce: 4770 bx lr 0800d7d0 : * @brief Break2 detection callback in non blocking mode * @param htim: TIM handle * @retval None */ __weak void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim) { 800d7d0: b480 push {r7} 800d7d2: b083 sub sp, #12 800d7d4: af00 add r7, sp, #0 800d7d6: 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 */ } 800d7d8: bf00 nop 800d7da: 370c adds r7, #12 800d7dc: 46bd mov sp, r7 800d7de: f85d 7b04 ldr.w r7, [sp], #4 800d7e2: 4770 bx lr 0800d7e4 : * 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) { 800d7e4: b580 push {r7, lr} 800d7e6: b082 sub sp, #8 800d7e8: af00 add r7, sp, #0 800d7ea: 6078 str r0, [r7, #4] /* Check the UART handle allocation */ if (huart == NULL) 800d7ec: 687b ldr r3, [r7, #4] 800d7ee: 2b00 cmp r3, #0 800d7f0: d101 bne.n 800d7f6 { return HAL_ERROR; 800d7f2: 2301 movs r3, #1 800d7f4: e042 b.n 800d87c { /* Check the parameters */ assert_param((IS_UART_INSTANCE(huart->Instance)) || (IS_LPUART_INSTANCE(huart->Instance))); } if (huart->gState == HAL_UART_STATE_RESET) 800d7f6: 687b ldr r3, [r7, #4] 800d7f8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800d7fc: 2b00 cmp r3, #0 800d7fe: d106 bne.n 800d80e { /* Allocate lock resource and initialize it */ huart->Lock = HAL_UNLOCKED; 800d800: 687b ldr r3, [r7, #4] 800d802: 2200 movs r2, #0 800d804: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Init the low level hardware */ huart->MspInitCallback(huart); #else /* Init the low level hardware : GPIO, CLOCK */ HAL_UART_MspInit(huart); 800d808: 6878 ldr r0, [r7, #4] 800d80a: f7f6 f96b bl 8003ae4 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } huart->gState = HAL_UART_STATE_BUSY; 800d80e: 687b ldr r3, [r7, #4] 800d810: 2224 movs r2, #36 @ 0x24 800d812: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UART_DISABLE(huart); 800d816: 687b ldr r3, [r7, #4] 800d818: 681b ldr r3, [r3, #0] 800d81a: 681a ldr r2, [r3, #0] 800d81c: 687b ldr r3, [r7, #4] 800d81e: 681b ldr r3, [r3, #0] 800d820: f022 0201 bic.w r2, r2, #1 800d824: 601a str r2, [r3, #0] /* Perform advanced settings configuration */ /* For some items, configuration requires to be done prior TE and RE bits are set */ if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT) 800d826: 687b ldr r3, [r7, #4] 800d828: 6a9b ldr r3, [r3, #40] @ 0x28 800d82a: 2b00 cmp r3, #0 800d82c: d002 beq.n 800d834 { UART_AdvFeatureConfig(huart); 800d82e: 6878 ldr r0, [r7, #4] 800d830: f001 fa76 bl 800ed20 } /* Set the UART Communication parameters */ if (UART_SetConfig(huart) == HAL_ERROR) 800d834: 6878 ldr r0, [r7, #4] 800d836: f000 fd0b bl 800e250 800d83a: 4603 mov r3, r0 800d83c: 2b01 cmp r3, #1 800d83e: d101 bne.n 800d844 { return HAL_ERROR; 800d840: 2301 movs r3, #1 800d842: e01b b.n 800d87c } /* 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)); 800d844: 687b ldr r3, [r7, #4] 800d846: 681b ldr r3, [r3, #0] 800d848: 685a ldr r2, [r3, #4] 800d84a: 687b ldr r3, [r7, #4] 800d84c: 681b ldr r3, [r3, #0] 800d84e: f422 4290 bic.w r2, r2, #18432 @ 0x4800 800d852: 605a str r2, [r3, #4] CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN)); 800d854: 687b ldr r3, [r7, #4] 800d856: 681b ldr r3, [r3, #0] 800d858: 689a ldr r2, [r3, #8] 800d85a: 687b ldr r3, [r7, #4] 800d85c: 681b ldr r3, [r3, #0] 800d85e: f022 022a bic.w r2, r2, #42 @ 0x2a 800d862: 609a str r2, [r3, #8] __HAL_UART_ENABLE(huart); 800d864: 687b ldr r3, [r7, #4] 800d866: 681b ldr r3, [r3, #0] 800d868: 681a ldr r2, [r3, #0] 800d86a: 687b ldr r3, [r7, #4] 800d86c: 681b ldr r3, [r3, #0] 800d86e: f042 0201 orr.w r2, r2, #1 800d872: 601a str r2, [r3, #0] /* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */ return (UART_CheckIdleState(huart)); 800d874: 6878 ldr r0, [r7, #4] 800d876: f001 faf5 bl 800ee64 800d87a: 4603 mov r3, r0 } 800d87c: 4618 mov r0, r3 800d87e: 3708 adds r7, #8 800d880: 46bd mov sp, r7 800d882: bd80 pop {r7, pc} 0800d884 : * @param Size Amount of data elements (u8 or u16) to be sent. * @param Timeout Timeout duration. * @retval HAL status */ HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout) { 800d884: b580 push {r7, lr} 800d886: b08a sub sp, #40 @ 0x28 800d888: af02 add r7, sp, #8 800d88a: 60f8 str r0, [r7, #12] 800d88c: 60b9 str r1, [r7, #8] 800d88e: 603b str r3, [r7, #0] 800d890: 4613 mov r3, r2 800d892: 80fb strh r3, [r7, #6] const uint8_t *pdata8bits; const uint16_t *pdata16bits; uint32_t tickstart; /* Check that a Tx process is not already ongoing */ if (huart->gState == HAL_UART_STATE_READY) 800d894: 68fb ldr r3, [r7, #12] 800d896: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800d89a: 2b20 cmp r3, #32 800d89c: d17b bne.n 800d996 { if ((pData == NULL) || (Size == 0U)) 800d89e: 68bb ldr r3, [r7, #8] 800d8a0: 2b00 cmp r3, #0 800d8a2: d002 beq.n 800d8aa 800d8a4: 88fb ldrh r3, [r7, #6] 800d8a6: 2b00 cmp r3, #0 800d8a8: d101 bne.n 800d8ae { return HAL_ERROR; 800d8aa: 2301 movs r3, #1 800d8ac: e074 b.n 800d998 } huart->ErrorCode = HAL_UART_ERROR_NONE; 800d8ae: 68fb ldr r3, [r7, #12] 800d8b0: 2200 movs r2, #0 800d8b2: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->gState = HAL_UART_STATE_BUSY_TX; 800d8b6: 68fb ldr r3, [r7, #12] 800d8b8: 2221 movs r2, #33 @ 0x21 800d8ba: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Init tickstart for timeout management */ tickstart = HAL_GetTick(); 800d8be: f7f7 ff77 bl 80057b0 800d8c2: 6178 str r0, [r7, #20] huart->TxXferSize = Size; 800d8c4: 68fb ldr r3, [r7, #12] 800d8c6: 88fa ldrh r2, [r7, #6] 800d8c8: f8a3 2054 strh.w r2, [r3, #84] @ 0x54 huart->TxXferCount = Size; 800d8cc: 68fb ldr r3, [r7, #12] 800d8ce: 88fa ldrh r2, [r7, #6] 800d8d0: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 /* In case of 9bits/No Parity transfer, pData needs to be handled as a uint16_t pointer */ if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE)) 800d8d4: 68fb ldr r3, [r7, #12] 800d8d6: 689b ldr r3, [r3, #8] 800d8d8: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800d8dc: d108 bne.n 800d8f0 800d8de: 68fb ldr r3, [r7, #12] 800d8e0: 691b ldr r3, [r3, #16] 800d8e2: 2b00 cmp r3, #0 800d8e4: d104 bne.n 800d8f0 { pdata8bits = NULL; 800d8e6: 2300 movs r3, #0 800d8e8: 61fb str r3, [r7, #28] pdata16bits = (const uint16_t *) pData; 800d8ea: 68bb ldr r3, [r7, #8] 800d8ec: 61bb str r3, [r7, #24] 800d8ee: e003 b.n 800d8f8 } else { pdata8bits = pData; 800d8f0: 68bb ldr r3, [r7, #8] 800d8f2: 61fb str r3, [r7, #28] pdata16bits = NULL; 800d8f4: 2300 movs r3, #0 800d8f6: 61bb str r3, [r7, #24] } while (huart->TxXferCount > 0U) 800d8f8: e030 b.n 800d95c { if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TXE, RESET, tickstart, Timeout) != HAL_OK) 800d8fa: 683b ldr r3, [r7, #0] 800d8fc: 9300 str r3, [sp, #0] 800d8fe: 697b ldr r3, [r7, #20] 800d900: 2200 movs r2, #0 800d902: 2180 movs r1, #128 @ 0x80 800d904: 68f8 ldr r0, [r7, #12] 800d906: f001 fb57 bl 800efb8 800d90a: 4603 mov r3, r0 800d90c: 2b00 cmp r3, #0 800d90e: d005 beq.n 800d91c { huart->gState = HAL_UART_STATE_READY; 800d910: 68fb ldr r3, [r7, #12] 800d912: 2220 movs r2, #32 800d914: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_TIMEOUT; 800d918: 2303 movs r3, #3 800d91a: e03d b.n 800d998 } if (pdata8bits == NULL) 800d91c: 69fb ldr r3, [r7, #28] 800d91e: 2b00 cmp r3, #0 800d920: d10b bne.n 800d93a { huart->Instance->TDR = (uint16_t)(*pdata16bits & 0x01FFU); 800d922: 69bb ldr r3, [r7, #24] 800d924: 881b ldrh r3, [r3, #0] 800d926: 461a mov r2, r3 800d928: 68fb ldr r3, [r7, #12] 800d92a: 681b ldr r3, [r3, #0] 800d92c: f3c2 0208 ubfx r2, r2, #0, #9 800d930: 629a str r2, [r3, #40] @ 0x28 pdata16bits++; 800d932: 69bb ldr r3, [r7, #24] 800d934: 3302 adds r3, #2 800d936: 61bb str r3, [r7, #24] 800d938: e007 b.n 800d94a } else { huart->Instance->TDR = (uint8_t)(*pdata8bits & 0xFFU); 800d93a: 69fb ldr r3, [r7, #28] 800d93c: 781a ldrb r2, [r3, #0] 800d93e: 68fb ldr r3, [r7, #12] 800d940: 681b ldr r3, [r3, #0] 800d942: 629a str r2, [r3, #40] @ 0x28 pdata8bits++; 800d944: 69fb ldr r3, [r7, #28] 800d946: 3301 adds r3, #1 800d948: 61fb str r3, [r7, #28] } huart->TxXferCount--; 800d94a: 68fb ldr r3, [r7, #12] 800d94c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800d950: b29b uxth r3, r3 800d952: 3b01 subs r3, #1 800d954: b29a uxth r2, r3 800d956: 68fb ldr r3, [r7, #12] 800d958: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 while (huart->TxXferCount > 0U) 800d95c: 68fb ldr r3, [r7, #12] 800d95e: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800d962: b29b uxth r3, r3 800d964: 2b00 cmp r3, #0 800d966: d1c8 bne.n 800d8fa } if (UART_WaitOnFlagUntilTimeout(huart, UART_FLAG_TC, RESET, tickstart, Timeout) != HAL_OK) 800d968: 683b ldr r3, [r7, #0] 800d96a: 9300 str r3, [sp, #0] 800d96c: 697b ldr r3, [r7, #20] 800d96e: 2200 movs r2, #0 800d970: 2140 movs r1, #64 @ 0x40 800d972: 68f8 ldr r0, [r7, #12] 800d974: f001 fb20 bl 800efb8 800d978: 4603 mov r3, r0 800d97a: 2b00 cmp r3, #0 800d97c: d005 beq.n 800d98a { huart->gState = HAL_UART_STATE_READY; 800d97e: 68fb ldr r3, [r7, #12] 800d980: 2220 movs r2, #32 800d982: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_TIMEOUT; 800d986: 2303 movs r3, #3 800d988: e006 b.n 800d998 } /* At end of Tx process, restore huart->gState to Ready */ huart->gState = HAL_UART_STATE_READY; 800d98a: 68fb ldr r3, [r7, #12] 800d98c: 2220 movs r2, #32 800d98e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_OK; 800d992: 2300 movs r3, #0 800d994: e000 b.n 800d998 } else { return HAL_BUSY; 800d996: 2302 movs r3, #2 } } 800d998: 4618 mov r0, r3 800d99a: 3720 adds r7, #32 800d99c: 46bd mov sp, r7 800d99e: bd80 pop {r7, pc} 0800d9a0 : * @param pData Pointer to data buffer (u8 or u16 data elements). * @param Size Amount of data elements (u8 or u16) to be sent. * @retval HAL status */ HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size) { 800d9a0: b480 push {r7} 800d9a2: b091 sub sp, #68 @ 0x44 800d9a4: af00 add r7, sp, #0 800d9a6: 60f8 str r0, [r7, #12] 800d9a8: 60b9 str r1, [r7, #8] 800d9aa: 4613 mov r3, r2 800d9ac: 80fb strh r3, [r7, #6] /* Check that a Tx process is not already ongoing */ if (huart->gState == HAL_UART_STATE_READY) 800d9ae: 68fb ldr r3, [r7, #12] 800d9b0: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800d9b4: 2b20 cmp r3, #32 800d9b6: d178 bne.n 800daaa { if ((pData == NULL) || (Size == 0U)) 800d9b8: 68bb ldr r3, [r7, #8] 800d9ba: 2b00 cmp r3, #0 800d9bc: d002 beq.n 800d9c4 800d9be: 88fb ldrh r3, [r7, #6] 800d9c0: 2b00 cmp r3, #0 800d9c2: d101 bne.n 800d9c8 { return HAL_ERROR; 800d9c4: 2301 movs r3, #1 800d9c6: e071 b.n 800daac } huart->pTxBuffPtr = pData; 800d9c8: 68fb ldr r3, [r7, #12] 800d9ca: 68ba ldr r2, [r7, #8] 800d9cc: 651a str r2, [r3, #80] @ 0x50 huart->TxXferSize = Size; 800d9ce: 68fb ldr r3, [r7, #12] 800d9d0: 88fa ldrh r2, [r7, #6] 800d9d2: f8a3 2054 strh.w r2, [r3, #84] @ 0x54 huart->TxXferCount = Size; 800d9d6: 68fb ldr r3, [r7, #12] 800d9d8: 88fa ldrh r2, [r7, #6] 800d9da: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 huart->TxISR = NULL; 800d9de: 68fb ldr r3, [r7, #12] 800d9e0: 2200 movs r2, #0 800d9e2: 679a str r2, [r3, #120] @ 0x78 huart->ErrorCode = HAL_UART_ERROR_NONE; 800d9e4: 68fb ldr r3, [r7, #12] 800d9e6: 2200 movs r2, #0 800d9e8: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->gState = HAL_UART_STATE_BUSY_TX; 800d9ec: 68fb ldr r3, [r7, #12] 800d9ee: 2221 movs r2, #33 @ 0x21 800d9f0: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Configure Tx interrupt processing */ if (huart->FifoMode == UART_FIFOMODE_ENABLE) 800d9f4: 68fb ldr r3, [r7, #12] 800d9f6: 6e5b ldr r3, [r3, #100] @ 0x64 800d9f8: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800d9fc: d12a bne.n 800da54 { /* Set the Tx ISR function pointer according to the data word length */ if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE)) 800d9fe: 68fb ldr r3, [r7, #12] 800da00: 689b ldr r3, [r3, #8] 800da02: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800da06: d107 bne.n 800da18 800da08: 68fb ldr r3, [r7, #12] 800da0a: 691b ldr r3, [r3, #16] 800da0c: 2b00 cmp r3, #0 800da0e: d103 bne.n 800da18 { huart->TxISR = UART_TxISR_16BIT_FIFOEN; 800da10: 68fb ldr r3, [r7, #12] 800da12: 4a29 ldr r2, [pc, #164] @ (800dab8 ) 800da14: 679a str r2, [r3, #120] @ 0x78 800da16: e002 b.n 800da1e } else { huart->TxISR = UART_TxISR_8BIT_FIFOEN; 800da18: 68fb ldr r3, [r7, #12] 800da1a: 4a28 ldr r2, [pc, #160] @ (800dabc ) 800da1c: 679a str r2, [r3, #120] @ 0x78 } /* Enable the TX FIFO threshold interrupt */ ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800da1e: 68fb ldr r3, [r7, #12] 800da20: 681b ldr r3, [r3, #0] 800da22: 3308 adds r3, #8 800da24: 62bb str r3, [r7, #40] @ 0x28 */ __STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr) { uint32_t result; __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800da26: 6abb ldr r3, [r7, #40] @ 0x28 800da28: e853 3f00 ldrex r3, [r3] 800da2c: 627b str r3, [r7, #36] @ 0x24 return(result); 800da2e: 6a7b ldr r3, [r7, #36] @ 0x24 800da30: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800da34: 63bb str r3, [r7, #56] @ 0x38 800da36: 68fb ldr r3, [r7, #12] 800da38: 681b ldr r3, [r3, #0] 800da3a: 3308 adds r3, #8 800da3c: 6bba ldr r2, [r7, #56] @ 0x38 800da3e: 637a str r2, [r7, #52] @ 0x34 800da40: 633b str r3, [r7, #48] @ 0x30 */ __STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr) { uint32_t result; __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800da42: 6b39 ldr r1, [r7, #48] @ 0x30 800da44: 6b7a ldr r2, [r7, #52] @ 0x34 800da46: e841 2300 strex r3, r2, [r1] 800da4a: 62fb str r3, [r7, #44] @ 0x2c return(result); 800da4c: 6afb ldr r3, [r7, #44] @ 0x2c 800da4e: 2b00 cmp r3, #0 800da50: d1e5 bne.n 800da1e 800da52: e028 b.n 800daa6 } else { /* Set the Tx ISR function pointer according to the data word length */ if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE)) 800da54: 68fb ldr r3, [r7, #12] 800da56: 689b ldr r3, [r3, #8] 800da58: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800da5c: d107 bne.n 800da6e 800da5e: 68fb ldr r3, [r7, #12] 800da60: 691b ldr r3, [r3, #16] 800da62: 2b00 cmp r3, #0 800da64: d103 bne.n 800da6e { huart->TxISR = UART_TxISR_16BIT; 800da66: 68fb ldr r3, [r7, #12] 800da68: 4a15 ldr r2, [pc, #84] @ (800dac0 ) 800da6a: 679a str r2, [r3, #120] @ 0x78 800da6c: e002 b.n 800da74 } else { huart->TxISR = UART_TxISR_8BIT; 800da6e: 68fb ldr r3, [r7, #12] 800da70: 4a14 ldr r2, [pc, #80] @ (800dac4 ) 800da72: 679a str r2, [r3, #120] @ 0x78 } /* Enable the Transmit Data Register Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800da74: 68fb ldr r3, [r7, #12] 800da76: 681b ldr r3, [r3, #0] 800da78: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800da7a: 697b ldr r3, [r7, #20] 800da7c: e853 3f00 ldrex r3, [r3] 800da80: 613b str r3, [r7, #16] return(result); 800da82: 693b ldr r3, [r7, #16] 800da84: f043 0380 orr.w r3, r3, #128 @ 0x80 800da88: 63fb str r3, [r7, #60] @ 0x3c 800da8a: 68fb ldr r3, [r7, #12] 800da8c: 681b ldr r3, [r3, #0] 800da8e: 461a mov r2, r3 800da90: 6bfb ldr r3, [r7, #60] @ 0x3c 800da92: 623b str r3, [r7, #32] 800da94: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800da96: 69f9 ldr r1, [r7, #28] 800da98: 6a3a ldr r2, [r7, #32] 800da9a: e841 2300 strex r3, r2, [r1] 800da9e: 61bb str r3, [r7, #24] return(result); 800daa0: 69bb ldr r3, [r7, #24] 800daa2: 2b00 cmp r3, #0 800daa4: d1e6 bne.n 800da74 } return HAL_OK; 800daa6: 2300 movs r3, #0 800daa8: e000 b.n 800daac } else { return HAL_BUSY; 800daaa: 2302 movs r3, #2 } } 800daac: 4618 mov r0, r3 800daae: 3744 adds r7, #68 @ 0x44 800dab0: 46bd mov sp, r7 800dab2: f85d 7b04 ldr.w r7, [sp], #4 800dab6: 4770 bx lr 800dab8: 0800f62b .word 0x0800f62b 800dabc: 0800f54b .word 0x0800f54b 800dac0: 0800f489 .word 0x0800f489 800dac4: 0800f3d1 .word 0x0800f3d1 0800dac8 : * @brief Handle UART interrupt request. * @param huart UART handle. * @retval None */ void HAL_UART_IRQHandler(UART_HandleTypeDef *huart) { 800dac8: b580 push {r7, lr} 800daca: b0ba sub sp, #232 @ 0xe8 800dacc: af00 add r7, sp, #0 800dace: 6078 str r0, [r7, #4] uint32_t isrflags = READ_REG(huart->Instance->ISR); 800dad0: 687b ldr r3, [r7, #4] 800dad2: 681b ldr r3, [r3, #0] 800dad4: 69db ldr r3, [r3, #28] 800dad6: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800dada: 687b ldr r3, [r7, #4] 800dadc: 681b ldr r3, [r3, #0] 800dade: 681b ldr r3, [r3, #0] 800dae0: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800dae4: 687b ldr r3, [r7, #4] 800dae6: 681b ldr r3, [r3, #0] 800dae8: 689b ldr r3, [r3, #8] 800daea: f8c7 30dc str.w r3, [r7, #220] @ 0xdc uint32_t errorflags; uint32_t errorcode; /* If no error occurs */ errorflags = (isrflags & (uint32_t)(USART_ISR_PE | USART_ISR_FE | USART_ISR_ORE | USART_ISR_NE | USART_ISR_RTOF)); 800daee: f8d7 20e4 ldr.w r2, [r7, #228] @ 0xe4 800daf2: f640 030f movw r3, #2063 @ 0x80f 800daf6: 4013 ands r3, r2 800daf8: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 if (errorflags == 0U) 800dafc: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800db00: 2b00 cmp r3, #0 800db02: d11b bne.n 800db3c { /* UART in mode Receiver ---------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800db04: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800db08: f003 0320 and.w r3, r3, #32 800db0c: 2b00 cmp r3, #0 800db0e: d015 beq.n 800db3c && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800db10: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800db14: f003 0320 and.w r3, r3, #32 800db18: 2b00 cmp r3, #0 800db1a: d105 bne.n 800db28 || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800db1c: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800db20: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800db24: 2b00 cmp r3, #0 800db26: d009 beq.n 800db3c { if (huart->RxISR != NULL) 800db28: 687b ldr r3, [r7, #4] 800db2a: 6f5b ldr r3, [r3, #116] @ 0x74 800db2c: 2b00 cmp r3, #0 800db2e: f000 8377 beq.w 800e220 { huart->RxISR(huart); 800db32: 687b ldr r3, [r7, #4] 800db34: 6f5b ldr r3, [r3, #116] @ 0x74 800db36: 6878 ldr r0, [r7, #4] 800db38: 4798 blx r3 } return; 800db3a: e371 b.n 800e220 } } /* If some errors occur */ if ((errorflags != 0U) 800db3c: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800db40: 2b00 cmp r3, #0 800db42: f000 8123 beq.w 800dd8c && ((((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U) 800db46: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800db4a: 4b8d ldr r3, [pc, #564] @ (800dd80 ) 800db4c: 4013 ands r3, r2 800db4e: 2b00 cmp r3, #0 800db50: d106 bne.n 800db60 || ((cr1its & (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_RTOIE)) != 0U)))) 800db52: f8d7 20e0 ldr.w r2, [r7, #224] @ 0xe0 800db56: 4b8b ldr r3, [pc, #556] @ (800dd84 ) 800db58: 4013 ands r3, r2 800db5a: 2b00 cmp r3, #0 800db5c: f000 8116 beq.w 800dd8c { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800db60: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800db64: f003 0301 and.w r3, r3, #1 800db68: 2b00 cmp r3, #0 800db6a: d011 beq.n 800db90 800db6c: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800db70: f403 7380 and.w r3, r3, #256 @ 0x100 800db74: 2b00 cmp r3, #0 800db76: d00b beq.n 800db90 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800db78: 687b ldr r3, [r7, #4] 800db7a: 681b ldr r3, [r3, #0] 800db7c: 2201 movs r2, #1 800db7e: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800db80: 687b ldr r3, [r7, #4] 800db82: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800db86: f043 0201 orr.w r2, r3, #1 800db8a: 687b ldr r3, [r7, #4] 800db8c: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800db90: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800db94: f003 0302 and.w r3, r3, #2 800db98: 2b00 cmp r3, #0 800db9a: d011 beq.n 800dbc0 800db9c: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dba0: f003 0301 and.w r3, r3, #1 800dba4: 2b00 cmp r3, #0 800dba6: d00b beq.n 800dbc0 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800dba8: 687b ldr r3, [r7, #4] 800dbaa: 681b ldr r3, [r3, #0] 800dbac: 2202 movs r2, #2 800dbae: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800dbb0: 687b ldr r3, [r7, #4] 800dbb2: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dbb6: f043 0204 orr.w r2, r3, #4 800dbba: 687b ldr r3, [r7, #4] 800dbbc: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800dbc0: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dbc4: f003 0304 and.w r3, r3, #4 800dbc8: 2b00 cmp r3, #0 800dbca: d011 beq.n 800dbf0 800dbcc: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dbd0: f003 0301 and.w r3, r3, #1 800dbd4: 2b00 cmp r3, #0 800dbd6: d00b beq.n 800dbf0 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800dbd8: 687b ldr r3, [r7, #4] 800dbda: 681b ldr r3, [r3, #0] 800dbdc: 2204 movs r2, #4 800dbde: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800dbe0: 687b ldr r3, [r7, #4] 800dbe2: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dbe6: f043 0202 orr.w r2, r3, #2 800dbea: 687b ldr r3, [r7, #4] 800dbec: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Over-Run interrupt occurred -----------------------------------------*/ if (((isrflags & USART_ISR_ORE) != 0U) 800dbf0: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dbf4: f003 0308 and.w r3, r3, #8 800dbf8: 2b00 cmp r3, #0 800dbfa: d017 beq.n 800dc2c && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800dbfc: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dc00: f003 0320 and.w r3, r3, #32 800dc04: 2b00 cmp r3, #0 800dc06: d105 bne.n 800dc14 ((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U))) 800dc08: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800dc0c: 4b5c ldr r3, [pc, #368] @ (800dd80 ) 800dc0e: 4013 ands r3, r2 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800dc10: 2b00 cmp r3, #0 800dc12: d00b beq.n 800dc2c { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800dc14: 687b ldr r3, [r7, #4] 800dc16: 681b ldr r3, [r3, #0] 800dc18: 2208 movs r2, #8 800dc1a: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_ORE; 800dc1c: 687b ldr r3, [r7, #4] 800dc1e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc22: f043 0208 orr.w r2, r3, #8 800dc26: 687b ldr r3, [r7, #4] 800dc28: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Receiver Timeout interrupt occurred ---------------------------------*/ if (((isrflags & USART_ISR_RTOF) != 0U) && ((cr1its & USART_CR1_RTOIE) != 0U)) 800dc2c: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dc30: f403 6300 and.w r3, r3, #2048 @ 0x800 800dc34: 2b00 cmp r3, #0 800dc36: d012 beq.n 800dc5e 800dc38: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dc3c: f003 6380 and.w r3, r3, #67108864 @ 0x4000000 800dc40: 2b00 cmp r3, #0 800dc42: d00c beq.n 800dc5e { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800dc44: 687b ldr r3, [r7, #4] 800dc46: 681b ldr r3, [r3, #0] 800dc48: f44f 6200 mov.w r2, #2048 @ 0x800 800dc4c: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_RTO; 800dc4e: 687b ldr r3, [r7, #4] 800dc50: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc54: f043 0220 orr.w r2, r3, #32 800dc58: 687b ldr r3, [r7, #4] 800dc5a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800dc5e: 687b ldr r3, [r7, #4] 800dc60: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc64: 2b00 cmp r3, #0 800dc66: f000 82dd beq.w 800e224 { /* UART in mode Receiver --------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800dc6a: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dc6e: f003 0320 and.w r3, r3, #32 800dc72: 2b00 cmp r3, #0 800dc74: d013 beq.n 800dc9e && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800dc76: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dc7a: f003 0320 and.w r3, r3, #32 800dc7e: 2b00 cmp r3, #0 800dc80: d105 bne.n 800dc8e || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800dc82: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dc86: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800dc8a: 2b00 cmp r3, #0 800dc8c: d007 beq.n 800dc9e { if (huart->RxISR != NULL) 800dc8e: 687b ldr r3, [r7, #4] 800dc90: 6f5b ldr r3, [r3, #116] @ 0x74 800dc92: 2b00 cmp r3, #0 800dc94: d003 beq.n 800dc9e { huart->RxISR(huart); 800dc96: 687b ldr r3, [r7, #4] 800dc98: 6f5b ldr r3, [r3, #116] @ 0x74 800dc9a: 6878 ldr r0, [r7, #4] 800dc9c: 4798 blx r3 /* If Error is to be considered as blocking : - Receiver Timeout error in Reception - Overrun error in Reception - any error occurs in DMA mode reception */ errorcode = huart->ErrorCode; 800dc9e: 687b ldr r3, [r7, #4] 800dca0: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dca4: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800dca8: 687b ldr r3, [r7, #4] 800dcaa: 681b ldr r3, [r3, #0] 800dcac: 689b ldr r3, [r3, #8] 800dcae: f003 0340 and.w r3, r3, #64 @ 0x40 800dcb2: 2b40 cmp r3, #64 @ 0x40 800dcb4: d005 beq.n 800dcc2 ((errorcode & (HAL_UART_ERROR_RTO | HAL_UART_ERROR_ORE)) != 0U)) 800dcb6: f8d7 30d4 ldr.w r3, [r7, #212] @ 0xd4 800dcba: f003 0328 and.w r3, r3, #40 @ 0x28 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800dcbe: 2b00 cmp r3, #0 800dcc0: d054 beq.n 800dd6c { /* Blocking error : transfer is aborted Set the UART state ready to be able to start again the process, Disable Rx Interrupts, and disable Rx DMA request, if ongoing */ UART_EndRxTransfer(huart); 800dcc2: 6878 ldr r0, [r7, #4] 800dcc4: f001 fb08 bl 800f2d8 /* Abort the UART DMA Rx channel if enabled */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dcc8: 687b ldr r3, [r7, #4] 800dcca: 681b ldr r3, [r3, #0] 800dccc: 689b ldr r3, [r3, #8] 800dcce: f003 0340 and.w r3, r3, #64 @ 0x40 800dcd2: 2b40 cmp r3, #64 @ 0x40 800dcd4: d146 bne.n 800dd64 { /* Disable the UART DMA Rx request if enabled */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR); 800dcd6: 687b ldr r3, [r7, #4] 800dcd8: 681b ldr r3, [r3, #0] 800dcda: 3308 adds r3, #8 800dcdc: f8c7 309c str.w r3, [r7, #156] @ 0x9c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800dce0: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800dce4: e853 3f00 ldrex r3, [r3] 800dce8: f8c7 3098 str.w r3, [r7, #152] @ 0x98 return(result); 800dcec: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800dcf0: f023 0340 bic.w r3, r3, #64 @ 0x40 800dcf4: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800dcf8: 687b ldr r3, [r7, #4] 800dcfa: 681b ldr r3, [r3, #0] 800dcfc: 3308 adds r3, #8 800dcfe: f8d7 20d0 ldr.w r2, [r7, #208] @ 0xd0 800dd02: f8c7 20a8 str.w r2, [r7, #168] @ 0xa8 800dd06: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dd0a: f8d7 10a4 ldr.w r1, [r7, #164] @ 0xa4 800dd0e: f8d7 20a8 ldr.w r2, [r7, #168] @ 0xa8 800dd12: e841 2300 strex r3, r2, [r1] 800dd16: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 return(result); 800dd1a: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800dd1e: 2b00 cmp r3, #0 800dd20: d1d9 bne.n 800dcd6 /* Abort the UART DMA Rx channel */ if (huart->hdmarx != NULL) 800dd22: 687b ldr r3, [r7, #4] 800dd24: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd28: 2b00 cmp r3, #0 800dd2a: d017 beq.n 800dd5c { /* Set the UART DMA Abort callback : will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */ huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError; 800dd2c: 687b ldr r3, [r7, #4] 800dd2e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd32: 4a15 ldr r2, [pc, #84] @ (800dd88 ) 800dd34: 651a str r2, [r3, #80] @ 0x50 /* Abort DMA RX */ if (HAL_DMA_Abort_IT(huart->hdmarx) != HAL_OK) 800dd36: 687b ldr r3, [r7, #4] 800dd38: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd3c: 4618 mov r0, r3 800dd3e: f7f8 ff5f bl 8006c00 800dd42: 4603 mov r3, r0 800dd44: 2b00 cmp r3, #0 800dd46: d019 beq.n 800dd7c { /* Call Directly huart->hdmarx->XferAbortCallback function in case of error */ huart->hdmarx->XferAbortCallback(huart->hdmarx); 800dd48: 687b ldr r3, [r7, #4] 800dd4a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd4e: 6d1b ldr r3, [r3, #80] @ 0x50 800dd50: 687a ldr r2, [r7, #4] 800dd52: f8d2 2080 ldr.w r2, [r2, #128] @ 0x80 800dd56: 4610 mov r0, r2 800dd58: 4798 blx r3 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd5a: e00f b.n 800dd7c #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd5c: 6878 ldr r0, [r7, #4] 800dd5e: f000 fa6d bl 800e23c if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd62: e00b b.n 800dd7c #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd64: 6878 ldr r0, [r7, #4] 800dd66: f000 fa69 bl 800e23c if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd6a: e007 b.n 800dd7c #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd6c: 6878 ldr r0, [r7, #4] 800dd6e: f000 fa65 bl 800e23c #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800dd72: 687b ldr r3, [r7, #4] 800dd74: 2200 movs r2, #0 800dd76: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } return; 800dd7a: e253 b.n 800e224 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd7c: bf00 nop return; 800dd7e: e251 b.n 800e224 800dd80: 10000001 .word 0x10000001 800dd84: 04000120 .word 0x04000120 800dd88: 0800f3a5 .word 0x0800f3a5 } /* End if some error occurs */ /* Check current reception Mode : If Reception till IDLE event has been selected : */ if ((huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800dd8c: 687b ldr r3, [r7, #4] 800dd8e: 6edb ldr r3, [r3, #108] @ 0x6c 800dd90: 2b01 cmp r3, #1 800dd92: f040 81e7 bne.w 800e164 && ((isrflags & USART_ISR_IDLE) != 0U) 800dd96: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dd9a: f003 0310 and.w r3, r3, #16 800dd9e: 2b00 cmp r3, #0 800dda0: f000 81e0 beq.w 800e164 && ((cr1its & USART_ISR_IDLE) != 0U)) 800dda4: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dda8: f003 0310 and.w r3, r3, #16 800ddac: 2b00 cmp r3, #0 800ddae: f000 81d9 beq.w 800e164 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800ddb2: 687b ldr r3, [r7, #4] 800ddb4: 681b ldr r3, [r3, #0] 800ddb6: 2210 movs r2, #16 800ddb8: 621a str r2, [r3, #32] /* Check if DMA mode is enabled in UART */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800ddba: 687b ldr r3, [r7, #4] 800ddbc: 681b ldr r3, [r3, #0] 800ddbe: 689b ldr r3, [r3, #8] 800ddc0: f003 0340 and.w r3, r3, #64 @ 0x40 800ddc4: 2b40 cmp r3, #64 @ 0x40 800ddc6: f040 8151 bne.w 800e06c { /* DMA mode enabled */ /* Check received length : If all expected data are received, do nothing, (DMA cplt callback will be called). Otherwise, if at least one data has already been received, IDLE event is to be notified to user */ uint16_t nb_remaining_rx_data = (uint16_t) __HAL_DMA_GET_COUNTER(huart->hdmarx); 800ddca: 687b ldr r3, [r7, #4] 800ddcc: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800ddd0: 681b ldr r3, [r3, #0] 800ddd2: 4a96 ldr r2, [pc, #600] @ (800e02c ) 800ddd4: 4293 cmp r3, r2 800ddd6: d068 beq.n 800deaa 800ddd8: 687b ldr r3, [r7, #4] 800ddda: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800ddde: 681b ldr r3, [r3, #0] 800dde0: 4a93 ldr r2, [pc, #588] @ (800e030 ) 800dde2: 4293 cmp r3, r2 800dde4: d061 beq.n 800deaa 800dde6: 687b ldr r3, [r7, #4] 800dde8: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800ddec: 681b ldr r3, [r3, #0] 800ddee: 4a91 ldr r2, [pc, #580] @ (800e034 ) 800ddf0: 4293 cmp r3, r2 800ddf2: d05a beq.n 800deaa 800ddf4: 687b ldr r3, [r7, #4] 800ddf6: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800ddfa: 681b ldr r3, [r3, #0] 800ddfc: 4a8e ldr r2, [pc, #568] @ (800e038 ) 800ddfe: 4293 cmp r3, r2 800de00: d053 beq.n 800deaa 800de02: 687b ldr r3, [r7, #4] 800de04: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de08: 681b ldr r3, [r3, #0] 800de0a: 4a8c ldr r2, [pc, #560] @ (800e03c ) 800de0c: 4293 cmp r3, r2 800de0e: d04c beq.n 800deaa 800de10: 687b ldr r3, [r7, #4] 800de12: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de16: 681b ldr r3, [r3, #0] 800de18: 4a89 ldr r2, [pc, #548] @ (800e040 ) 800de1a: 4293 cmp r3, r2 800de1c: d045 beq.n 800deaa 800de1e: 687b ldr r3, [r7, #4] 800de20: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de24: 681b ldr r3, [r3, #0] 800de26: 4a87 ldr r2, [pc, #540] @ (800e044 ) 800de28: 4293 cmp r3, r2 800de2a: d03e beq.n 800deaa 800de2c: 687b ldr r3, [r7, #4] 800de2e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de32: 681b ldr r3, [r3, #0] 800de34: 4a84 ldr r2, [pc, #528] @ (800e048 ) 800de36: 4293 cmp r3, r2 800de38: d037 beq.n 800deaa 800de3a: 687b ldr r3, [r7, #4] 800de3c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de40: 681b ldr r3, [r3, #0] 800de42: 4a82 ldr r2, [pc, #520] @ (800e04c ) 800de44: 4293 cmp r3, r2 800de46: d030 beq.n 800deaa 800de48: 687b ldr r3, [r7, #4] 800de4a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de4e: 681b ldr r3, [r3, #0] 800de50: 4a7f ldr r2, [pc, #508] @ (800e050 ) 800de52: 4293 cmp r3, r2 800de54: d029 beq.n 800deaa 800de56: 687b ldr r3, [r7, #4] 800de58: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de5c: 681b ldr r3, [r3, #0] 800de5e: 4a7d ldr r2, [pc, #500] @ (800e054 ) 800de60: 4293 cmp r3, r2 800de62: d022 beq.n 800deaa 800de64: 687b ldr r3, [r7, #4] 800de66: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de6a: 681b ldr r3, [r3, #0] 800de6c: 4a7a ldr r2, [pc, #488] @ (800e058 ) 800de6e: 4293 cmp r3, r2 800de70: d01b beq.n 800deaa 800de72: 687b ldr r3, [r7, #4] 800de74: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de78: 681b ldr r3, [r3, #0] 800de7a: 4a78 ldr r2, [pc, #480] @ (800e05c ) 800de7c: 4293 cmp r3, r2 800de7e: d014 beq.n 800deaa 800de80: 687b ldr r3, [r7, #4] 800de82: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de86: 681b ldr r3, [r3, #0] 800de88: 4a75 ldr r2, [pc, #468] @ (800e060 ) 800de8a: 4293 cmp r3, r2 800de8c: d00d beq.n 800deaa 800de8e: 687b ldr r3, [r7, #4] 800de90: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de94: 681b ldr r3, [r3, #0] 800de96: 4a73 ldr r2, [pc, #460] @ (800e064 ) 800de98: 4293 cmp r3, r2 800de9a: d006 beq.n 800deaa 800de9c: 687b ldr r3, [r7, #4] 800de9e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dea2: 681b ldr r3, [r3, #0] 800dea4: 4a70 ldr r2, [pc, #448] @ (800e068 ) 800dea6: 4293 cmp r3, r2 800dea8: d106 bne.n 800deb8 800deaa: 687b ldr r3, [r7, #4] 800deac: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800deb0: 681b ldr r3, [r3, #0] 800deb2: 685b ldr r3, [r3, #4] 800deb4: b29b uxth r3, r3 800deb6: e005 b.n 800dec4 800deb8: 687b ldr r3, [r7, #4] 800deba: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800debe: 681b ldr r3, [r3, #0] 800dec0: 685b ldr r3, [r3, #4] 800dec2: b29b uxth r3, r3 800dec4: f8a7 30be strh.w r3, [r7, #190] @ 0xbe if ((nb_remaining_rx_data > 0U) 800dec8: f8b7 30be ldrh.w r3, [r7, #190] @ 0xbe 800decc: 2b00 cmp r3, #0 800dece: f000 81ab beq.w 800e228 && (nb_remaining_rx_data < huart->RxXferSize)) 800ded2: 687b ldr r3, [r7, #4] 800ded4: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800ded8: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800dedc: 429a cmp r2, r3 800dede: f080 81a3 bcs.w 800e228 { /* Reception is not complete */ huart->RxXferCount = nb_remaining_rx_data; 800dee2: 687b ldr r3, [r7, #4] 800dee4: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800dee8: f8a3 205e strh.w r2, [r3, #94] @ 0x5e /* In Normal mode, end DMA xfer and HAL UART Rx process*/ if (huart->hdmarx->Init.Mode != DMA_CIRCULAR) 800deec: 687b ldr r3, [r7, #4] 800deee: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800def2: 69db ldr r3, [r3, #28] 800def4: f5b3 7f80 cmp.w r3, #256 @ 0x100 800def8: f000 8087 beq.w 800e00a { /* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800defc: 687b ldr r3, [r7, #4] 800defe: 681b ldr r3, [r3, #0] 800df00: f8c7 3088 str.w r3, [r7, #136] @ 0x88 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800df04: f8d7 3088 ldr.w r3, [r7, #136] @ 0x88 800df08: e853 3f00 ldrex r3, [r3] 800df0c: f8c7 3084 str.w r3, [r7, #132] @ 0x84 return(result); 800df10: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 800df14: f423 7380 bic.w r3, r3, #256 @ 0x100 800df18: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800df1c: 687b ldr r3, [r7, #4] 800df1e: 681b ldr r3, [r3, #0] 800df20: 461a mov r2, r3 800df22: f8d7 30b8 ldr.w r3, [r7, #184] @ 0xb8 800df26: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800df2a: f8c7 2090 str.w r2, [r7, #144] @ 0x90 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800df2e: f8d7 1090 ldr.w r1, [r7, #144] @ 0x90 800df32: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800df36: e841 2300 strex r3, r2, [r1] 800df3a: f8c7 308c str.w r3, [r7, #140] @ 0x8c return(result); 800df3e: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800df42: 2b00 cmp r3, #0 800df44: d1da bne.n 800defc ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800df46: 687b ldr r3, [r7, #4] 800df48: 681b ldr r3, [r3, #0] 800df4a: 3308 adds r3, #8 800df4c: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800df4e: 6f7b ldr r3, [r7, #116] @ 0x74 800df50: e853 3f00 ldrex r3, [r3] 800df54: 673b str r3, [r7, #112] @ 0x70 return(result); 800df56: 6f3b ldr r3, [r7, #112] @ 0x70 800df58: f023 0301 bic.w r3, r3, #1 800df5c: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800df60: 687b ldr r3, [r7, #4] 800df62: 681b ldr r3, [r3, #0] 800df64: 3308 adds r3, #8 800df66: f8d7 20b4 ldr.w r2, [r7, #180] @ 0xb4 800df6a: f8c7 2080 str.w r2, [r7, #128] @ 0x80 800df6e: 67fb str r3, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800df70: 6ff9 ldr r1, [r7, #124] @ 0x7c 800df72: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800df76: e841 2300 strex r3, r2, [r1] 800df7a: 67bb str r3, [r7, #120] @ 0x78 return(result); 800df7c: 6fbb ldr r3, [r7, #120] @ 0x78 800df7e: 2b00 cmp r3, #0 800df80: d1e1 bne.n 800df46 /* Disable the DMA transfer for the receiver request by resetting the DMAR bit in the UART CR3 register */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR); 800df82: 687b ldr r3, [r7, #4] 800df84: 681b ldr r3, [r3, #0] 800df86: 3308 adds r3, #8 800df88: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800df8a: 6e3b ldr r3, [r7, #96] @ 0x60 800df8c: e853 3f00 ldrex r3, [r3] 800df90: 65fb str r3, [r7, #92] @ 0x5c return(result); 800df92: 6dfb ldr r3, [r7, #92] @ 0x5c 800df94: f023 0340 bic.w r3, r3, #64 @ 0x40 800df98: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800df9c: 687b ldr r3, [r7, #4] 800df9e: 681b ldr r3, [r3, #0] 800dfa0: 3308 adds r3, #8 800dfa2: f8d7 20b0 ldr.w r2, [r7, #176] @ 0xb0 800dfa6: 66fa str r2, [r7, #108] @ 0x6c 800dfa8: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dfaa: 6eb9 ldr r1, [r7, #104] @ 0x68 800dfac: 6efa ldr r2, [r7, #108] @ 0x6c 800dfae: e841 2300 strex r3, r2, [r1] 800dfb2: 667b str r3, [r7, #100] @ 0x64 return(result); 800dfb4: 6e7b ldr r3, [r7, #100] @ 0x64 800dfb6: 2b00 cmp r3, #0 800dfb8: d1e3 bne.n 800df82 /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800dfba: 687b ldr r3, [r7, #4] 800dfbc: 2220 movs r2, #32 800dfbe: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800dfc2: 687b ldr r3, [r7, #4] 800dfc4: 2200 movs r2, #0 800dfc6: 66da str r2, [r3, #108] @ 0x6c ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800dfc8: 687b ldr r3, [r7, #4] 800dfca: 681b ldr r3, [r3, #0] 800dfcc: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800dfce: 6cfb ldr r3, [r7, #76] @ 0x4c 800dfd0: e853 3f00 ldrex r3, [r3] 800dfd4: 64bb str r3, [r7, #72] @ 0x48 return(result); 800dfd6: 6cbb ldr r3, [r7, #72] @ 0x48 800dfd8: f023 0310 bic.w r3, r3, #16 800dfdc: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800dfe0: 687b ldr r3, [r7, #4] 800dfe2: 681b ldr r3, [r3, #0] 800dfe4: 461a mov r2, r3 800dfe6: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800dfea: 65bb str r3, [r7, #88] @ 0x58 800dfec: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dfee: 6d79 ldr r1, [r7, #84] @ 0x54 800dff0: 6dba ldr r2, [r7, #88] @ 0x58 800dff2: e841 2300 strex r3, r2, [r1] 800dff6: 653b str r3, [r7, #80] @ 0x50 return(result); 800dff8: 6d3b ldr r3, [r7, #80] @ 0x50 800dffa: 2b00 cmp r3, #0 800dffc: d1e4 bne.n 800dfc8 /* Last bytes received, so no need as the abort is immediate */ (void)HAL_DMA_Abort(huart->hdmarx); 800dffe: 687b ldr r3, [r7, #4] 800e000: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800e004: 4618 mov r0, r3 800e006: f7f8 fadd bl 80065c4 } /* Initialize type of RxEvent that correspond to RxEvent callback execution; In this case, Rx Event type is Idle Event */ huart->RxEventType = HAL_UART_RXEVENT_IDLE; 800e00a: 687b ldr r3, [r7, #4] 800e00c: 2202 movs r2, #2 800e00e: 671a str r2, [r3, #112] @ 0x70 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx Event callback*/ huart->RxEventCallback(huart, (huart->RxXferSize - huart->RxXferCount)); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, (huart->RxXferSize - huart->RxXferCount)); 800e010: 687b ldr r3, [r7, #4] 800e012: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800e016: 687b ldr r3, [r7, #4] 800e018: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e01c: b29b uxth r3, r3 800e01e: 1ad3 subs r3, r2, r3 800e020: b29b uxth r3, r3 800e022: 4619 mov r1, r3 800e024: 6878 ldr r0, [r7, #4] 800e026: f7f6 fb37 bl 8004698 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800e02a: e0fd b.n 800e228 800e02c: 40020010 .word 0x40020010 800e030: 40020028 .word 0x40020028 800e034: 40020040 .word 0x40020040 800e038: 40020058 .word 0x40020058 800e03c: 40020070 .word 0x40020070 800e040: 40020088 .word 0x40020088 800e044: 400200a0 .word 0x400200a0 800e048: 400200b8 .word 0x400200b8 800e04c: 40020410 .word 0x40020410 800e050: 40020428 .word 0x40020428 800e054: 40020440 .word 0x40020440 800e058: 40020458 .word 0x40020458 800e05c: 40020470 .word 0x40020470 800e060: 40020488 .word 0x40020488 800e064: 400204a0 .word 0x400204a0 800e068: 400204b8 .word 0x400204b8 else { /* DMA mode not enabled */ /* Check received length : If all expected data are received, do nothing. Otherwise, if at least one data has already been received, IDLE event is to be notified to user */ uint16_t nb_rx_data = huart->RxXferSize - huart->RxXferCount; 800e06c: 687b ldr r3, [r7, #4] 800e06e: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800e072: 687b ldr r3, [r7, #4] 800e074: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e078: b29b uxth r3, r3 800e07a: 1ad3 subs r3, r2, r3 800e07c: f8a7 30ce strh.w r3, [r7, #206] @ 0xce if ((huart->RxXferCount > 0U) 800e080: 687b ldr r3, [r7, #4] 800e082: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e086: b29b uxth r3, r3 800e088: 2b00 cmp r3, #0 800e08a: f000 80cf beq.w 800e22c && (nb_rx_data > 0U)) 800e08e: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800e092: 2b00 cmp r3, #0 800e094: f000 80ca beq.w 800e22c { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800e098: 687b ldr r3, [r7, #4] 800e09a: 681b ldr r3, [r3, #0] 800e09c: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e09e: 6bbb ldr r3, [r7, #56] @ 0x38 800e0a0: e853 3f00 ldrex r3, [r3] 800e0a4: 637b str r3, [r7, #52] @ 0x34 return(result); 800e0a6: 6b7b ldr r3, [r7, #52] @ 0x34 800e0a8: f423 7390 bic.w r3, r3, #288 @ 0x120 800e0ac: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800e0b0: 687b ldr r3, [r7, #4] 800e0b2: 681b ldr r3, [r3, #0] 800e0b4: 461a mov r2, r3 800e0b6: f8d7 30c8 ldr.w r3, [r7, #200] @ 0xc8 800e0ba: 647b str r3, [r7, #68] @ 0x44 800e0bc: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e0be: 6c39 ldr r1, [r7, #64] @ 0x40 800e0c0: 6c7a ldr r2, [r7, #68] @ 0x44 800e0c2: e841 2300 strex r3, r2, [r1] 800e0c6: 63fb str r3, [r7, #60] @ 0x3c return(result); 800e0c8: 6bfb ldr r3, [r7, #60] @ 0x3c 800e0ca: 2b00 cmp r3, #0 800e0cc: d1e4 bne.n 800e098 /* Disable the UART Error Interrupt:(Frame error, noise error, overrun error) and RX FIFO Threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800e0ce: 687b ldr r3, [r7, #4] 800e0d0: 681b ldr r3, [r3, #0] 800e0d2: 3308 adds r3, #8 800e0d4: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e0d6: 6a7b ldr r3, [r7, #36] @ 0x24 800e0d8: e853 3f00 ldrex r3, [r3] 800e0dc: 623b str r3, [r7, #32] return(result); 800e0de: 6a3a ldr r2, [r7, #32] 800e0e0: 4b55 ldr r3, [pc, #340] @ (800e238 ) 800e0e2: 4013 ands r3, r2 800e0e4: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800e0e8: 687b ldr r3, [r7, #4] 800e0ea: 681b ldr r3, [r3, #0] 800e0ec: 3308 adds r3, #8 800e0ee: f8d7 20c4 ldr.w r2, [r7, #196] @ 0xc4 800e0f2: 633a str r2, [r7, #48] @ 0x30 800e0f4: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e0f6: 6af9 ldr r1, [r7, #44] @ 0x2c 800e0f8: 6b3a ldr r2, [r7, #48] @ 0x30 800e0fa: e841 2300 strex r3, r2, [r1] 800e0fe: 62bb str r3, [r7, #40] @ 0x28 return(result); 800e100: 6abb ldr r3, [r7, #40] @ 0x28 800e102: 2b00 cmp r3, #0 800e104: d1e3 bne.n 800e0ce /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800e106: 687b ldr r3, [r7, #4] 800e108: 2220 movs r2, #32 800e10a: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800e10e: 687b ldr r3, [r7, #4] 800e110: 2200 movs r2, #0 800e112: 66da str r2, [r3, #108] @ 0x6c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800e114: 687b ldr r3, [r7, #4] 800e116: 2200 movs r2, #0 800e118: 675a str r2, [r3, #116] @ 0x74 ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800e11a: 687b ldr r3, [r7, #4] 800e11c: 681b ldr r3, [r3, #0] 800e11e: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e120: 693b ldr r3, [r7, #16] 800e122: e853 3f00 ldrex r3, [r3] 800e126: 60fb str r3, [r7, #12] return(result); 800e128: 68fb ldr r3, [r7, #12] 800e12a: f023 0310 bic.w r3, r3, #16 800e12e: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800e132: 687b ldr r3, [r7, #4] 800e134: 681b ldr r3, [r3, #0] 800e136: 461a mov r2, r3 800e138: f8d7 30c0 ldr.w r3, [r7, #192] @ 0xc0 800e13c: 61fb str r3, [r7, #28] 800e13e: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e140: 69b9 ldr r1, [r7, #24] 800e142: 69fa ldr r2, [r7, #28] 800e144: e841 2300 strex r3, r2, [r1] 800e148: 617b str r3, [r7, #20] return(result); 800e14a: 697b ldr r3, [r7, #20] 800e14c: 2b00 cmp r3, #0 800e14e: d1e4 bne.n 800e11a /* Initialize type of RxEvent that correspond to RxEvent callback execution; In this case, Rx Event type is Idle Event */ huart->RxEventType = HAL_UART_RXEVENT_IDLE; 800e150: 687b ldr r3, [r7, #4] 800e152: 2202 movs r2, #2 800e154: 671a str r2, [r3, #112] @ 0x70 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx complete callback*/ huart->RxEventCallback(huart, nb_rx_data); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, nb_rx_data); 800e156: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800e15a: 4619 mov r1, r3 800e15c: 6878 ldr r0, [r7, #4] 800e15e: f7f6 fa9b bl 8004698 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800e162: e063 b.n 800e22c } } /* UART wakeup from Stop mode interrupt occurred ---------------------------*/ if (((isrflags & USART_ISR_WUF) != 0U) && ((cr3its & USART_CR3_WUFIE) != 0U)) 800e164: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e168: f403 1380 and.w r3, r3, #1048576 @ 0x100000 800e16c: 2b00 cmp r3, #0 800e16e: d00e beq.n 800e18e 800e170: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800e174: f403 0380 and.w r3, r3, #4194304 @ 0x400000 800e178: 2b00 cmp r3, #0 800e17a: d008 beq.n 800e18e { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_WUF); 800e17c: 687b ldr r3, [r7, #4] 800e17e: 681b ldr r3, [r3, #0] 800e180: f44f 1280 mov.w r2, #1048576 @ 0x100000 800e184: 621a str r2, [r3, #32] #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /* Call registered Wakeup Callback */ huart->WakeupCallback(huart); #else /* Call legacy weak Wakeup Callback */ HAL_UARTEx_WakeupCallback(huart); 800e186: 6878 ldr r0, [r7, #4] 800e188: f002 f80c bl 80101a4 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e18c: e051 b.n 800e232 } /* UART in mode Transmitter ------------------------------------------------*/ if (((isrflags & USART_ISR_TXE_TXFNF) != 0U) 800e18e: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e192: f003 0380 and.w r3, r3, #128 @ 0x80 800e196: 2b00 cmp r3, #0 800e198: d014 beq.n 800e1c4 && (((cr1its & USART_CR1_TXEIE_TXFNFIE) != 0U) 800e19a: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e19e: f003 0380 and.w r3, r3, #128 @ 0x80 800e1a2: 2b00 cmp r3, #0 800e1a4: d105 bne.n 800e1b2 || ((cr3its & USART_CR3_TXFTIE) != 0U))) 800e1a6: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800e1aa: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800e1ae: 2b00 cmp r3, #0 800e1b0: d008 beq.n 800e1c4 { if (huart->TxISR != NULL) 800e1b2: 687b ldr r3, [r7, #4] 800e1b4: 6f9b ldr r3, [r3, #120] @ 0x78 800e1b6: 2b00 cmp r3, #0 800e1b8: d03a beq.n 800e230 { huart->TxISR(huart); 800e1ba: 687b ldr r3, [r7, #4] 800e1bc: 6f9b ldr r3, [r3, #120] @ 0x78 800e1be: 6878 ldr r0, [r7, #4] 800e1c0: 4798 blx r3 } return; 800e1c2: e035 b.n 800e230 } /* UART in mode Transmitter (transmission end) -----------------------------*/ if (((isrflags & USART_ISR_TC) != 0U) && ((cr1its & USART_CR1_TCIE) != 0U)) 800e1c4: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e1c8: f003 0340 and.w r3, r3, #64 @ 0x40 800e1cc: 2b00 cmp r3, #0 800e1ce: d009 beq.n 800e1e4 800e1d0: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e1d4: f003 0340 and.w r3, r3, #64 @ 0x40 800e1d8: 2b00 cmp r3, #0 800e1da: d003 beq.n 800e1e4 { UART_EndTransmit_IT(huart); 800e1dc: 6878 ldr r0, [r7, #4] 800e1de: f001 fa99 bl 800f714 return; 800e1e2: e026 b.n 800e232 } /* UART TX Fifo Empty occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_TXFE) != 0U) && ((cr1its & USART_CR1_TXFEIE) != 0U)) 800e1e4: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e1e8: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800e1ec: 2b00 cmp r3, #0 800e1ee: d009 beq.n 800e204 800e1f0: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e1f4: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 800e1f8: 2b00 cmp r3, #0 800e1fa: d003 beq.n 800e204 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /* Call registered Tx Fifo Empty Callback */ huart->TxFifoEmptyCallback(huart); #else /* Call legacy weak Tx Fifo Empty Callback */ HAL_UARTEx_TxFifoEmptyCallback(huart); 800e1fc: 6878 ldr r0, [r7, #4] 800e1fe: f001 ffe5 bl 80101cc #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e202: e016 b.n 800e232 } /* UART RX Fifo Full occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_RXFF) != 0U) && ((cr1its & USART_CR1_RXFFIE) != 0U)) 800e204: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e208: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 800e20c: 2b00 cmp r3, #0 800e20e: d010 beq.n 800e232 800e210: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e214: 2b00 cmp r3, #0 800e216: da0c bge.n 800e232 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /* Call registered Rx Fifo Full Callback */ huart->RxFifoFullCallback(huart); #else /* Call legacy weak Rx Fifo Full Callback */ HAL_UARTEx_RxFifoFullCallback(huart); 800e218: 6878 ldr r0, [r7, #4] 800e21a: f001 ffcd bl 80101b8 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e21e: e008 b.n 800e232 return; 800e220: bf00 nop 800e222: e006 b.n 800e232 return; 800e224: bf00 nop 800e226: e004 b.n 800e232 return; 800e228: bf00 nop 800e22a: e002 b.n 800e232 return; 800e22c: bf00 nop 800e22e: e000 b.n 800e232 return; 800e230: bf00 nop } } 800e232: 37e8 adds r7, #232 @ 0xe8 800e234: 46bd mov sp, r7 800e236: bd80 pop {r7, pc} 800e238: effffffe .word 0xeffffffe 0800e23c : * @brief UART error callback. * @param huart UART handle. * @retval None */ __weak void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) { 800e23c: b480 push {r7} 800e23e: b083 sub sp, #12 800e240: af00 add r7, sp, #0 800e242: 6078 str r0, [r7, #4] UNUSED(huart); /* NOTE : This function should not be modified, when the callback is needed, the HAL_UART_ErrorCallback can be implemented in the user file. */ } 800e244: bf00 nop 800e246: 370c adds r7, #12 800e248: 46bd mov sp, r7 800e24a: f85d 7b04 ldr.w r7, [sp], #4 800e24e: 4770 bx lr 0800e250 : * @brief Configure the UART peripheral. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { 800e250: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800e254: b092 sub sp, #72 @ 0x48 800e256: af00 add r7, sp, #0 800e258: 6178 str r0, [r7, #20] uint32_t tmpreg; uint16_t brrtemp; UART_ClockSourceTypeDef clocksource; uint32_t usartdiv; HAL_StatusTypeDef ret = HAL_OK; 800e25a: 2300 movs r3, #0 800e25c: f887 3042 strb.w r3, [r7, #66] @ 0x42 * 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 ; 800e260: 697b ldr r3, [r7, #20] 800e262: 689a ldr r2, [r3, #8] 800e264: 697b ldr r3, [r7, #20] 800e266: 691b ldr r3, [r3, #16] 800e268: 431a orrs r2, r3 800e26a: 697b ldr r3, [r7, #20] 800e26c: 695b ldr r3, [r3, #20] 800e26e: 431a orrs r2, r3 800e270: 697b ldr r3, [r7, #20] 800e272: 69db ldr r3, [r3, #28] 800e274: 4313 orrs r3, r2 800e276: 647b str r3, [r7, #68] @ 0x44 MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg); 800e278: 697b ldr r3, [r7, #20] 800e27a: 681b ldr r3, [r3, #0] 800e27c: 681a ldr r2, [r3, #0] 800e27e: 4bbe ldr r3, [pc, #760] @ (800e578 ) 800e280: 4013 ands r3, r2 800e282: 697a ldr r2, [r7, #20] 800e284: 6812 ldr r2, [r2, #0] 800e286: 6c79 ldr r1, [r7, #68] @ 0x44 800e288: 430b orrs r3, r1 800e28a: 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); 800e28c: 697b ldr r3, [r7, #20] 800e28e: 681b ldr r3, [r3, #0] 800e290: 685b ldr r3, [r3, #4] 800e292: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800e296: 697b ldr r3, [r7, #20] 800e298: 68da ldr r2, [r3, #12] 800e29a: 697b ldr r3, [r7, #20] 800e29c: 681b ldr r3, [r3, #0] 800e29e: 430a orrs r2, r1 800e2a0: 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; 800e2a2: 697b ldr r3, [r7, #20] 800e2a4: 699b ldr r3, [r3, #24] 800e2a6: 647b str r3, [r7, #68] @ 0x44 if (!(UART_INSTANCE_LOWPOWER(huart))) 800e2a8: 697b ldr r3, [r7, #20] 800e2aa: 681b ldr r3, [r3, #0] 800e2ac: 4ab3 ldr r2, [pc, #716] @ (800e57c ) 800e2ae: 4293 cmp r3, r2 800e2b0: d004 beq.n 800e2bc { tmpreg |= huart->Init.OneBitSampling; 800e2b2: 697b ldr r3, [r7, #20] 800e2b4: 6a1b ldr r3, [r3, #32] 800e2b6: 6c7a ldr r2, [r7, #68] @ 0x44 800e2b8: 4313 orrs r3, r2 800e2ba: 647b str r3, [r7, #68] @ 0x44 } MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg); 800e2bc: 697b ldr r3, [r7, #20] 800e2be: 681b ldr r3, [r3, #0] 800e2c0: 689a ldr r2, [r3, #8] 800e2c2: 4baf ldr r3, [pc, #700] @ (800e580 ) 800e2c4: 4013 ands r3, r2 800e2c6: 697a ldr r2, [r7, #20] 800e2c8: 6812 ldr r2, [r2, #0] 800e2ca: 6c79 ldr r1, [r7, #68] @ 0x44 800e2cc: 430b orrs r3, r1 800e2ce: 6093 str r3, [r2, #8] /*-------------------------- USART PRESC Configuration -----------------------*/ /* Configure * - UART Clock Prescaler : set PRESCALER according to huart->Init.ClockPrescaler value */ MODIFY_REG(huart->Instance->PRESC, USART_PRESC_PRESCALER, huart->Init.ClockPrescaler); 800e2d0: 697b ldr r3, [r7, #20] 800e2d2: 681b ldr r3, [r3, #0] 800e2d4: 6adb ldr r3, [r3, #44] @ 0x2c 800e2d6: f023 010f bic.w r1, r3, #15 800e2da: 697b ldr r3, [r7, #20] 800e2dc: 6a5a ldr r2, [r3, #36] @ 0x24 800e2de: 697b ldr r3, [r7, #20] 800e2e0: 681b ldr r3, [r3, #0] 800e2e2: 430a orrs r2, r1 800e2e4: 62da str r2, [r3, #44] @ 0x2c /*-------------------------- USART BRR Configuration -----------------------*/ UART_GETCLOCKSOURCE(huart, clocksource); 800e2e6: 697b ldr r3, [r7, #20] 800e2e8: 681b ldr r3, [r3, #0] 800e2ea: 4aa6 ldr r2, [pc, #664] @ (800e584 ) 800e2ec: 4293 cmp r3, r2 800e2ee: d177 bne.n 800e3e0 800e2f0: 4ba5 ldr r3, [pc, #660] @ (800e588 ) 800e2f2: 6d5b ldr r3, [r3, #84] @ 0x54 800e2f4: f003 0338 and.w r3, r3, #56 @ 0x38 800e2f8: 2b28 cmp r3, #40 @ 0x28 800e2fa: d86d bhi.n 800e3d8 800e2fc: a201 add r2, pc, #4 @ (adr r2, 800e304 ) 800e2fe: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e302: bf00 nop 800e304: 0800e3a9 .word 0x0800e3a9 800e308: 0800e3d9 .word 0x0800e3d9 800e30c: 0800e3d9 .word 0x0800e3d9 800e310: 0800e3d9 .word 0x0800e3d9 800e314: 0800e3d9 .word 0x0800e3d9 800e318: 0800e3d9 .word 0x0800e3d9 800e31c: 0800e3d9 .word 0x0800e3d9 800e320: 0800e3d9 .word 0x0800e3d9 800e324: 0800e3b1 .word 0x0800e3b1 800e328: 0800e3d9 .word 0x0800e3d9 800e32c: 0800e3d9 .word 0x0800e3d9 800e330: 0800e3d9 .word 0x0800e3d9 800e334: 0800e3d9 .word 0x0800e3d9 800e338: 0800e3d9 .word 0x0800e3d9 800e33c: 0800e3d9 .word 0x0800e3d9 800e340: 0800e3d9 .word 0x0800e3d9 800e344: 0800e3b9 .word 0x0800e3b9 800e348: 0800e3d9 .word 0x0800e3d9 800e34c: 0800e3d9 .word 0x0800e3d9 800e350: 0800e3d9 .word 0x0800e3d9 800e354: 0800e3d9 .word 0x0800e3d9 800e358: 0800e3d9 .word 0x0800e3d9 800e35c: 0800e3d9 .word 0x0800e3d9 800e360: 0800e3d9 .word 0x0800e3d9 800e364: 0800e3c1 .word 0x0800e3c1 800e368: 0800e3d9 .word 0x0800e3d9 800e36c: 0800e3d9 .word 0x0800e3d9 800e370: 0800e3d9 .word 0x0800e3d9 800e374: 0800e3d9 .word 0x0800e3d9 800e378: 0800e3d9 .word 0x0800e3d9 800e37c: 0800e3d9 .word 0x0800e3d9 800e380: 0800e3d9 .word 0x0800e3d9 800e384: 0800e3c9 .word 0x0800e3c9 800e388: 0800e3d9 .word 0x0800e3d9 800e38c: 0800e3d9 .word 0x0800e3d9 800e390: 0800e3d9 .word 0x0800e3d9 800e394: 0800e3d9 .word 0x0800e3d9 800e398: 0800e3d9 .word 0x0800e3d9 800e39c: 0800e3d9 .word 0x0800e3d9 800e3a0: 0800e3d9 .word 0x0800e3d9 800e3a4: 0800e3d1 .word 0x0800e3d1 800e3a8: 2301 movs r3, #1 800e3aa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3ae: e222 b.n 800e7f6 800e3b0: 2304 movs r3, #4 800e3b2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3b6: e21e b.n 800e7f6 800e3b8: 2308 movs r3, #8 800e3ba: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3be: e21a b.n 800e7f6 800e3c0: 2310 movs r3, #16 800e3c2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3c6: e216 b.n 800e7f6 800e3c8: 2320 movs r3, #32 800e3ca: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3ce: e212 b.n 800e7f6 800e3d0: 2340 movs r3, #64 @ 0x40 800e3d2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3d6: e20e b.n 800e7f6 800e3d8: 2380 movs r3, #128 @ 0x80 800e3da: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3de: e20a b.n 800e7f6 800e3e0: 697b ldr r3, [r7, #20] 800e3e2: 681b ldr r3, [r3, #0] 800e3e4: 4a69 ldr r2, [pc, #420] @ (800e58c ) 800e3e6: 4293 cmp r3, r2 800e3e8: d130 bne.n 800e44c 800e3ea: 4b67 ldr r3, [pc, #412] @ (800e588 ) 800e3ec: 6d5b ldr r3, [r3, #84] @ 0x54 800e3ee: f003 0307 and.w r3, r3, #7 800e3f2: 2b05 cmp r3, #5 800e3f4: d826 bhi.n 800e444 800e3f6: a201 add r2, pc, #4 @ (adr r2, 800e3fc ) 800e3f8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e3fc: 0800e415 .word 0x0800e415 800e400: 0800e41d .word 0x0800e41d 800e404: 0800e425 .word 0x0800e425 800e408: 0800e42d .word 0x0800e42d 800e40c: 0800e435 .word 0x0800e435 800e410: 0800e43d .word 0x0800e43d 800e414: 2300 movs r3, #0 800e416: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e41a: e1ec b.n 800e7f6 800e41c: 2304 movs r3, #4 800e41e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e422: e1e8 b.n 800e7f6 800e424: 2308 movs r3, #8 800e426: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e42a: e1e4 b.n 800e7f6 800e42c: 2310 movs r3, #16 800e42e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e432: e1e0 b.n 800e7f6 800e434: 2320 movs r3, #32 800e436: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e43a: e1dc b.n 800e7f6 800e43c: 2340 movs r3, #64 @ 0x40 800e43e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e442: e1d8 b.n 800e7f6 800e444: 2380 movs r3, #128 @ 0x80 800e446: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e44a: e1d4 b.n 800e7f6 800e44c: 697b ldr r3, [r7, #20] 800e44e: 681b ldr r3, [r3, #0] 800e450: 4a4f ldr r2, [pc, #316] @ (800e590 ) 800e452: 4293 cmp r3, r2 800e454: d130 bne.n 800e4b8 800e456: 4b4c ldr r3, [pc, #304] @ (800e588 ) 800e458: 6d5b ldr r3, [r3, #84] @ 0x54 800e45a: f003 0307 and.w r3, r3, #7 800e45e: 2b05 cmp r3, #5 800e460: d826 bhi.n 800e4b0 800e462: a201 add r2, pc, #4 @ (adr r2, 800e468 ) 800e464: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e468: 0800e481 .word 0x0800e481 800e46c: 0800e489 .word 0x0800e489 800e470: 0800e491 .word 0x0800e491 800e474: 0800e499 .word 0x0800e499 800e478: 0800e4a1 .word 0x0800e4a1 800e47c: 0800e4a9 .word 0x0800e4a9 800e480: 2300 movs r3, #0 800e482: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e486: e1b6 b.n 800e7f6 800e488: 2304 movs r3, #4 800e48a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e48e: e1b2 b.n 800e7f6 800e490: 2308 movs r3, #8 800e492: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e496: e1ae b.n 800e7f6 800e498: 2310 movs r3, #16 800e49a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e49e: e1aa b.n 800e7f6 800e4a0: 2320 movs r3, #32 800e4a2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4a6: e1a6 b.n 800e7f6 800e4a8: 2340 movs r3, #64 @ 0x40 800e4aa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4ae: e1a2 b.n 800e7f6 800e4b0: 2380 movs r3, #128 @ 0x80 800e4b2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4b6: e19e b.n 800e7f6 800e4b8: 697b ldr r3, [r7, #20] 800e4ba: 681b ldr r3, [r3, #0] 800e4bc: 4a35 ldr r2, [pc, #212] @ (800e594 ) 800e4be: 4293 cmp r3, r2 800e4c0: d130 bne.n 800e524 800e4c2: 4b31 ldr r3, [pc, #196] @ (800e588 ) 800e4c4: 6d5b ldr r3, [r3, #84] @ 0x54 800e4c6: f003 0307 and.w r3, r3, #7 800e4ca: 2b05 cmp r3, #5 800e4cc: d826 bhi.n 800e51c 800e4ce: a201 add r2, pc, #4 @ (adr r2, 800e4d4 ) 800e4d0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e4d4: 0800e4ed .word 0x0800e4ed 800e4d8: 0800e4f5 .word 0x0800e4f5 800e4dc: 0800e4fd .word 0x0800e4fd 800e4e0: 0800e505 .word 0x0800e505 800e4e4: 0800e50d .word 0x0800e50d 800e4e8: 0800e515 .word 0x0800e515 800e4ec: 2300 movs r3, #0 800e4ee: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4f2: e180 b.n 800e7f6 800e4f4: 2304 movs r3, #4 800e4f6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4fa: e17c b.n 800e7f6 800e4fc: 2308 movs r3, #8 800e4fe: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e502: e178 b.n 800e7f6 800e504: 2310 movs r3, #16 800e506: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e50a: e174 b.n 800e7f6 800e50c: 2320 movs r3, #32 800e50e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e512: e170 b.n 800e7f6 800e514: 2340 movs r3, #64 @ 0x40 800e516: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e51a: e16c b.n 800e7f6 800e51c: 2380 movs r3, #128 @ 0x80 800e51e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e522: e168 b.n 800e7f6 800e524: 697b ldr r3, [r7, #20] 800e526: 681b ldr r3, [r3, #0] 800e528: 4a1b ldr r2, [pc, #108] @ (800e598 ) 800e52a: 4293 cmp r3, r2 800e52c: d142 bne.n 800e5b4 800e52e: 4b16 ldr r3, [pc, #88] @ (800e588 ) 800e530: 6d5b ldr r3, [r3, #84] @ 0x54 800e532: f003 0307 and.w r3, r3, #7 800e536: 2b05 cmp r3, #5 800e538: d838 bhi.n 800e5ac 800e53a: a201 add r2, pc, #4 @ (adr r2, 800e540 ) 800e53c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e540: 0800e559 .word 0x0800e559 800e544: 0800e561 .word 0x0800e561 800e548: 0800e569 .word 0x0800e569 800e54c: 0800e571 .word 0x0800e571 800e550: 0800e59d .word 0x0800e59d 800e554: 0800e5a5 .word 0x0800e5a5 800e558: 2300 movs r3, #0 800e55a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e55e: e14a b.n 800e7f6 800e560: 2304 movs r3, #4 800e562: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e566: e146 b.n 800e7f6 800e568: 2308 movs r3, #8 800e56a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e56e: e142 b.n 800e7f6 800e570: 2310 movs r3, #16 800e572: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e576: e13e b.n 800e7f6 800e578: cfff69f3 .word 0xcfff69f3 800e57c: 58000c00 .word 0x58000c00 800e580: 11fff4ff .word 0x11fff4ff 800e584: 40011000 .word 0x40011000 800e588: 58024400 .word 0x58024400 800e58c: 40004400 .word 0x40004400 800e590: 40004800 .word 0x40004800 800e594: 40004c00 .word 0x40004c00 800e598: 40005000 .word 0x40005000 800e59c: 2320 movs r3, #32 800e59e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5a2: e128 b.n 800e7f6 800e5a4: 2340 movs r3, #64 @ 0x40 800e5a6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5aa: e124 b.n 800e7f6 800e5ac: 2380 movs r3, #128 @ 0x80 800e5ae: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5b2: e120 b.n 800e7f6 800e5b4: 697b ldr r3, [r7, #20] 800e5b6: 681b ldr r3, [r3, #0] 800e5b8: 4acb ldr r2, [pc, #812] @ (800e8e8 ) 800e5ba: 4293 cmp r3, r2 800e5bc: d176 bne.n 800e6ac 800e5be: 4bcb ldr r3, [pc, #812] @ (800e8ec ) 800e5c0: 6d5b ldr r3, [r3, #84] @ 0x54 800e5c2: f003 0338 and.w r3, r3, #56 @ 0x38 800e5c6: 2b28 cmp r3, #40 @ 0x28 800e5c8: d86c bhi.n 800e6a4 800e5ca: a201 add r2, pc, #4 @ (adr r2, 800e5d0 ) 800e5cc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e5d0: 0800e675 .word 0x0800e675 800e5d4: 0800e6a5 .word 0x0800e6a5 800e5d8: 0800e6a5 .word 0x0800e6a5 800e5dc: 0800e6a5 .word 0x0800e6a5 800e5e0: 0800e6a5 .word 0x0800e6a5 800e5e4: 0800e6a5 .word 0x0800e6a5 800e5e8: 0800e6a5 .word 0x0800e6a5 800e5ec: 0800e6a5 .word 0x0800e6a5 800e5f0: 0800e67d .word 0x0800e67d 800e5f4: 0800e6a5 .word 0x0800e6a5 800e5f8: 0800e6a5 .word 0x0800e6a5 800e5fc: 0800e6a5 .word 0x0800e6a5 800e600: 0800e6a5 .word 0x0800e6a5 800e604: 0800e6a5 .word 0x0800e6a5 800e608: 0800e6a5 .word 0x0800e6a5 800e60c: 0800e6a5 .word 0x0800e6a5 800e610: 0800e685 .word 0x0800e685 800e614: 0800e6a5 .word 0x0800e6a5 800e618: 0800e6a5 .word 0x0800e6a5 800e61c: 0800e6a5 .word 0x0800e6a5 800e620: 0800e6a5 .word 0x0800e6a5 800e624: 0800e6a5 .word 0x0800e6a5 800e628: 0800e6a5 .word 0x0800e6a5 800e62c: 0800e6a5 .word 0x0800e6a5 800e630: 0800e68d .word 0x0800e68d 800e634: 0800e6a5 .word 0x0800e6a5 800e638: 0800e6a5 .word 0x0800e6a5 800e63c: 0800e6a5 .word 0x0800e6a5 800e640: 0800e6a5 .word 0x0800e6a5 800e644: 0800e6a5 .word 0x0800e6a5 800e648: 0800e6a5 .word 0x0800e6a5 800e64c: 0800e6a5 .word 0x0800e6a5 800e650: 0800e695 .word 0x0800e695 800e654: 0800e6a5 .word 0x0800e6a5 800e658: 0800e6a5 .word 0x0800e6a5 800e65c: 0800e6a5 .word 0x0800e6a5 800e660: 0800e6a5 .word 0x0800e6a5 800e664: 0800e6a5 .word 0x0800e6a5 800e668: 0800e6a5 .word 0x0800e6a5 800e66c: 0800e6a5 .word 0x0800e6a5 800e670: 0800e69d .word 0x0800e69d 800e674: 2301 movs r3, #1 800e676: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e67a: e0bc b.n 800e7f6 800e67c: 2304 movs r3, #4 800e67e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e682: e0b8 b.n 800e7f6 800e684: 2308 movs r3, #8 800e686: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e68a: e0b4 b.n 800e7f6 800e68c: 2310 movs r3, #16 800e68e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e692: e0b0 b.n 800e7f6 800e694: 2320 movs r3, #32 800e696: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e69a: e0ac b.n 800e7f6 800e69c: 2340 movs r3, #64 @ 0x40 800e69e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6a2: e0a8 b.n 800e7f6 800e6a4: 2380 movs r3, #128 @ 0x80 800e6a6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6aa: e0a4 b.n 800e7f6 800e6ac: 697b ldr r3, [r7, #20] 800e6ae: 681b ldr r3, [r3, #0] 800e6b0: 4a8f ldr r2, [pc, #572] @ (800e8f0 ) 800e6b2: 4293 cmp r3, r2 800e6b4: d130 bne.n 800e718 800e6b6: 4b8d ldr r3, [pc, #564] @ (800e8ec ) 800e6b8: 6d5b ldr r3, [r3, #84] @ 0x54 800e6ba: f003 0307 and.w r3, r3, #7 800e6be: 2b05 cmp r3, #5 800e6c0: d826 bhi.n 800e710 800e6c2: a201 add r2, pc, #4 @ (adr r2, 800e6c8 ) 800e6c4: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e6c8: 0800e6e1 .word 0x0800e6e1 800e6cc: 0800e6e9 .word 0x0800e6e9 800e6d0: 0800e6f1 .word 0x0800e6f1 800e6d4: 0800e6f9 .word 0x0800e6f9 800e6d8: 0800e701 .word 0x0800e701 800e6dc: 0800e709 .word 0x0800e709 800e6e0: 2300 movs r3, #0 800e6e2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6e6: e086 b.n 800e7f6 800e6e8: 2304 movs r3, #4 800e6ea: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6ee: e082 b.n 800e7f6 800e6f0: 2308 movs r3, #8 800e6f2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6f6: e07e b.n 800e7f6 800e6f8: 2310 movs r3, #16 800e6fa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6fe: e07a b.n 800e7f6 800e700: 2320 movs r3, #32 800e702: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e706: e076 b.n 800e7f6 800e708: 2340 movs r3, #64 @ 0x40 800e70a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e70e: e072 b.n 800e7f6 800e710: 2380 movs r3, #128 @ 0x80 800e712: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e716: e06e b.n 800e7f6 800e718: 697b ldr r3, [r7, #20] 800e71a: 681b ldr r3, [r3, #0] 800e71c: 4a75 ldr r2, [pc, #468] @ (800e8f4 ) 800e71e: 4293 cmp r3, r2 800e720: d130 bne.n 800e784 800e722: 4b72 ldr r3, [pc, #456] @ (800e8ec ) 800e724: 6d5b ldr r3, [r3, #84] @ 0x54 800e726: f003 0307 and.w r3, r3, #7 800e72a: 2b05 cmp r3, #5 800e72c: d826 bhi.n 800e77c 800e72e: a201 add r2, pc, #4 @ (adr r2, 800e734 ) 800e730: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e734: 0800e74d .word 0x0800e74d 800e738: 0800e755 .word 0x0800e755 800e73c: 0800e75d .word 0x0800e75d 800e740: 0800e765 .word 0x0800e765 800e744: 0800e76d .word 0x0800e76d 800e748: 0800e775 .word 0x0800e775 800e74c: 2300 movs r3, #0 800e74e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e752: e050 b.n 800e7f6 800e754: 2304 movs r3, #4 800e756: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e75a: e04c b.n 800e7f6 800e75c: 2308 movs r3, #8 800e75e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e762: e048 b.n 800e7f6 800e764: 2310 movs r3, #16 800e766: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e76a: e044 b.n 800e7f6 800e76c: 2320 movs r3, #32 800e76e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e772: e040 b.n 800e7f6 800e774: 2340 movs r3, #64 @ 0x40 800e776: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e77a: e03c b.n 800e7f6 800e77c: 2380 movs r3, #128 @ 0x80 800e77e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e782: e038 b.n 800e7f6 800e784: 697b ldr r3, [r7, #20] 800e786: 681b ldr r3, [r3, #0] 800e788: 4a5b ldr r2, [pc, #364] @ (800e8f8 ) 800e78a: 4293 cmp r3, r2 800e78c: d130 bne.n 800e7f0 800e78e: 4b57 ldr r3, [pc, #348] @ (800e8ec ) 800e790: 6d9b ldr r3, [r3, #88] @ 0x58 800e792: f003 0307 and.w r3, r3, #7 800e796: 2b05 cmp r3, #5 800e798: d826 bhi.n 800e7e8 800e79a: a201 add r2, pc, #4 @ (adr r2, 800e7a0 ) 800e79c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e7a0: 0800e7b9 .word 0x0800e7b9 800e7a4: 0800e7c1 .word 0x0800e7c1 800e7a8: 0800e7c9 .word 0x0800e7c9 800e7ac: 0800e7d1 .word 0x0800e7d1 800e7b0: 0800e7d9 .word 0x0800e7d9 800e7b4: 0800e7e1 .word 0x0800e7e1 800e7b8: 2302 movs r3, #2 800e7ba: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7be: e01a b.n 800e7f6 800e7c0: 2304 movs r3, #4 800e7c2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7c6: e016 b.n 800e7f6 800e7c8: 2308 movs r3, #8 800e7ca: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7ce: e012 b.n 800e7f6 800e7d0: 2310 movs r3, #16 800e7d2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7d6: e00e b.n 800e7f6 800e7d8: 2320 movs r3, #32 800e7da: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7de: e00a b.n 800e7f6 800e7e0: 2340 movs r3, #64 @ 0x40 800e7e2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7e6: e006 b.n 800e7f6 800e7e8: 2380 movs r3, #128 @ 0x80 800e7ea: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7ee: e002 b.n 800e7f6 800e7f0: 2380 movs r3, #128 @ 0x80 800e7f2: f887 3043 strb.w r3, [r7, #67] @ 0x43 /* Check LPUART instance */ if (UART_INSTANCE_LOWPOWER(huart)) 800e7f6: 697b ldr r3, [r7, #20] 800e7f8: 681b ldr r3, [r3, #0] 800e7fa: 4a3f ldr r2, [pc, #252] @ (800e8f8 ) 800e7fc: 4293 cmp r3, r2 800e7fe: f040 80f8 bne.w 800e9f2 { /* Retrieve frequency clock */ switch (clocksource) 800e802: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800e806: 2b20 cmp r3, #32 800e808: dc46 bgt.n 800e898 800e80a: 2b02 cmp r3, #2 800e80c: f2c0 8082 blt.w 800e914 800e810: 3b02 subs r3, #2 800e812: 2b1e cmp r3, #30 800e814: d87e bhi.n 800e914 800e816: a201 add r2, pc, #4 @ (adr r2, 800e81c ) 800e818: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e81c: 0800e89f .word 0x0800e89f 800e820: 0800e915 .word 0x0800e915 800e824: 0800e8a7 .word 0x0800e8a7 800e828: 0800e915 .word 0x0800e915 800e82c: 0800e915 .word 0x0800e915 800e830: 0800e915 .word 0x0800e915 800e834: 0800e8b7 .word 0x0800e8b7 800e838: 0800e915 .word 0x0800e915 800e83c: 0800e915 .word 0x0800e915 800e840: 0800e915 .word 0x0800e915 800e844: 0800e915 .word 0x0800e915 800e848: 0800e915 .word 0x0800e915 800e84c: 0800e915 .word 0x0800e915 800e850: 0800e915 .word 0x0800e915 800e854: 0800e8c7 .word 0x0800e8c7 800e858: 0800e915 .word 0x0800e915 800e85c: 0800e915 .word 0x0800e915 800e860: 0800e915 .word 0x0800e915 800e864: 0800e915 .word 0x0800e915 800e868: 0800e915 .word 0x0800e915 800e86c: 0800e915 .word 0x0800e915 800e870: 0800e915 .word 0x0800e915 800e874: 0800e915 .word 0x0800e915 800e878: 0800e915 .word 0x0800e915 800e87c: 0800e915 .word 0x0800e915 800e880: 0800e915 .word 0x0800e915 800e884: 0800e915 .word 0x0800e915 800e888: 0800e915 .word 0x0800e915 800e88c: 0800e915 .word 0x0800e915 800e890: 0800e915 .word 0x0800e915 800e894: 0800e907 .word 0x0800e907 800e898: 2b40 cmp r3, #64 @ 0x40 800e89a: d037 beq.n 800e90c 800e89c: e03a b.n 800e914 { case UART_CLOCKSOURCE_D3PCLK1: pclk = HAL_RCCEx_GetD3PCLK1Freq(); 800e89e: f7fd fff9 bl 800c894 800e8a2: 63f8 str r0, [r7, #60] @ 0x3c break; 800e8a4: e03c b.n 800e920 case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800e8a6: f107 0324 add.w r3, r7, #36 @ 0x24 800e8aa: 4618 mov r0, r3 800e8ac: f7fe f808 bl 800c8c0 pclk = pll2_clocks.PLL2_Q_Frequency; 800e8b0: 6abb ldr r3, [r7, #40] @ 0x28 800e8b2: 63fb str r3, [r7, #60] @ 0x3c break; 800e8b4: e034 b.n 800e920 case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800e8b6: f107 0318 add.w r3, r7, #24 800e8ba: 4618 mov r0, r3 800e8bc: f7fe f954 bl 800cb68 pclk = pll3_clocks.PLL3_Q_Frequency; 800e8c0: 69fb ldr r3, [r7, #28] 800e8c2: 63fb str r3, [r7, #60] @ 0x3c break; 800e8c4: e02c b.n 800e920 case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800e8c6: 4b09 ldr r3, [pc, #36] @ (800e8ec ) 800e8c8: 681b ldr r3, [r3, #0] 800e8ca: f003 0320 and.w r3, r3, #32 800e8ce: 2b00 cmp r3, #0 800e8d0: d016 beq.n 800e900 { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800e8d2: 4b06 ldr r3, [pc, #24] @ (800e8ec ) 800e8d4: 681b ldr r3, [r3, #0] 800e8d6: 08db lsrs r3, r3, #3 800e8d8: f003 0303 and.w r3, r3, #3 800e8dc: 4a07 ldr r2, [pc, #28] @ (800e8fc ) 800e8de: fa22 f303 lsr.w r3, r2, r3 800e8e2: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800e8e4: e01c b.n 800e920 800e8e6: bf00 nop 800e8e8: 40011400 .word 0x40011400 800e8ec: 58024400 .word 0x58024400 800e8f0: 40007800 .word 0x40007800 800e8f4: 40007c00 .word 0x40007c00 800e8f8: 58000c00 .word 0x58000c00 800e8fc: 03d09000 .word 0x03d09000 pclk = (uint32_t) HSI_VALUE; 800e900: 4b9d ldr r3, [pc, #628] @ (800eb78 ) 800e902: 63fb str r3, [r7, #60] @ 0x3c break; 800e904: e00c b.n 800e920 case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800e906: 4b9d ldr r3, [pc, #628] @ (800eb7c ) 800e908: 63fb str r3, [r7, #60] @ 0x3c break; 800e90a: e009 b.n 800e920 case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800e90c: f44f 4300 mov.w r3, #32768 @ 0x8000 800e910: 63fb str r3, [r7, #60] @ 0x3c break; 800e912: e005 b.n 800e920 default: pclk = 0U; 800e914: 2300 movs r3, #0 800e916: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800e918: 2301 movs r3, #1 800e91a: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800e91e: bf00 nop } /* If proper clock source reported */ if (pclk != 0U) 800e920: 6bfb ldr r3, [r7, #60] @ 0x3c 800e922: 2b00 cmp r3, #0 800e924: f000 81de beq.w 800ece4 { /* Compute clock after Prescaler */ lpuart_ker_ck_pres = (pclk / UARTPrescTable[huart->Init.ClockPrescaler]); 800e928: 697b ldr r3, [r7, #20] 800e92a: 6a5b ldr r3, [r3, #36] @ 0x24 800e92c: 4a94 ldr r2, [pc, #592] @ (800eb80 ) 800e92e: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e932: 461a mov r2, r3 800e934: 6bfb ldr r3, [r7, #60] @ 0x3c 800e936: fbb3 f3f2 udiv r3, r3, r2 800e93a: 633b str r3, [r7, #48] @ 0x30 /* Ensure that Frequency clock is in the range [3 * baudrate, 4096 * baudrate] */ if ((lpuart_ker_ck_pres < (3U * huart->Init.BaudRate)) || 800e93c: 697b ldr r3, [r7, #20] 800e93e: 685a ldr r2, [r3, #4] 800e940: 4613 mov r3, r2 800e942: 005b lsls r3, r3, #1 800e944: 4413 add r3, r2 800e946: 6b3a ldr r2, [r7, #48] @ 0x30 800e948: 429a cmp r2, r3 800e94a: d305 bcc.n 800e958 (lpuart_ker_ck_pres > (4096U * huart->Init.BaudRate))) 800e94c: 697b ldr r3, [r7, #20] 800e94e: 685b ldr r3, [r3, #4] 800e950: 031b lsls r3, r3, #12 if ((lpuart_ker_ck_pres < (3U * huart->Init.BaudRate)) || 800e952: 6b3a ldr r2, [r7, #48] @ 0x30 800e954: 429a cmp r2, r3 800e956: d903 bls.n 800e960 { ret = HAL_ERROR; 800e958: 2301 movs r3, #1 800e95a: f887 3042 strb.w r3, [r7, #66] @ 0x42 800e95e: e1c1 b.n 800ece4 } else { /* Check computed UsartDiv value is in allocated range (it is forbidden to write values lower than 0x300 in the LPUART_BRR register) */ usartdiv = (uint32_t)(UART_DIV_LPUART(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800e960: 6bfb ldr r3, [r7, #60] @ 0x3c 800e962: 2200 movs r2, #0 800e964: 60bb str r3, [r7, #8] 800e966: 60fa str r2, [r7, #12] 800e968: 697b ldr r3, [r7, #20] 800e96a: 6a5b ldr r3, [r3, #36] @ 0x24 800e96c: 4a84 ldr r2, [pc, #528] @ (800eb80 ) 800e96e: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e972: b29b uxth r3, r3 800e974: 2200 movs r2, #0 800e976: 603b str r3, [r7, #0] 800e978: 607a str r2, [r7, #4] 800e97a: e9d7 2300 ldrd r2, r3, [r7] 800e97e: e9d7 0102 ldrd r0, r1, [r7, #8] 800e982: f7f1 fed1 bl 8000728 <__aeabi_uldivmod> 800e986: 4602 mov r2, r0 800e988: 460b mov r3, r1 800e98a: 4610 mov r0, r2 800e98c: 4619 mov r1, r3 800e98e: f04f 0200 mov.w r2, #0 800e992: f04f 0300 mov.w r3, #0 800e996: 020b lsls r3, r1, #8 800e998: ea43 6310 orr.w r3, r3, r0, lsr #24 800e99c: 0202 lsls r2, r0, #8 800e99e: 6979 ldr r1, [r7, #20] 800e9a0: 6849 ldr r1, [r1, #4] 800e9a2: 0849 lsrs r1, r1, #1 800e9a4: 2000 movs r0, #0 800e9a6: 460c mov r4, r1 800e9a8: 4605 mov r5, r0 800e9aa: eb12 0804 adds.w r8, r2, r4 800e9ae: eb43 0905 adc.w r9, r3, r5 800e9b2: 697b ldr r3, [r7, #20] 800e9b4: 685b ldr r3, [r3, #4] 800e9b6: 2200 movs r2, #0 800e9b8: 469a mov sl, r3 800e9ba: 4693 mov fp, r2 800e9bc: 4652 mov r2, sl 800e9be: 465b mov r3, fp 800e9c0: 4640 mov r0, r8 800e9c2: 4649 mov r1, r9 800e9c4: f7f1 feb0 bl 8000728 <__aeabi_uldivmod> 800e9c8: 4602 mov r2, r0 800e9ca: 460b mov r3, r1 800e9cc: 4613 mov r3, r2 800e9ce: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= LPUART_BRR_MIN) && (usartdiv <= LPUART_BRR_MAX)) 800e9d0: 6bbb ldr r3, [r7, #56] @ 0x38 800e9d2: f5b3 7f40 cmp.w r3, #768 @ 0x300 800e9d6: d308 bcc.n 800e9ea 800e9d8: 6bbb ldr r3, [r7, #56] @ 0x38 800e9da: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800e9de: d204 bcs.n 800e9ea { huart->Instance->BRR = usartdiv; 800e9e0: 697b ldr r3, [r7, #20] 800e9e2: 681b ldr r3, [r3, #0] 800e9e4: 6bba ldr r2, [r7, #56] @ 0x38 800e9e6: 60da str r2, [r3, #12] 800e9e8: e17c b.n 800ece4 } else { ret = HAL_ERROR; 800e9ea: 2301 movs r3, #1 800e9ec: f887 3042 strb.w r3, [r7, #66] @ 0x42 800e9f0: e178 b.n 800ece4 } /* if ( (lpuart_ker_ck_pres < (3 * huart->Init.BaudRate) ) || (lpuart_ker_ck_pres > (4096 * huart->Init.BaudRate) )) */ } /* if (pclk != 0) */ } /* Check UART Over Sampling to set Baud Rate Register */ else if (huart->Init.OverSampling == UART_OVERSAMPLING_8) 800e9f2: 697b ldr r3, [r7, #20] 800e9f4: 69db ldr r3, [r3, #28] 800e9f6: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800e9fa: f040 80c5 bne.w 800eb88 { switch (clocksource) 800e9fe: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800ea02: 2b20 cmp r3, #32 800ea04: dc48 bgt.n 800ea98 800ea06: 2b00 cmp r3, #0 800ea08: db7b blt.n 800eb02 800ea0a: 2b20 cmp r3, #32 800ea0c: d879 bhi.n 800eb02 800ea0e: a201 add r2, pc, #4 @ (adr r2, 800ea14 ) 800ea10: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800ea14: 0800ea9f .word 0x0800ea9f 800ea18: 0800eaa7 .word 0x0800eaa7 800ea1c: 0800eb03 .word 0x0800eb03 800ea20: 0800eb03 .word 0x0800eb03 800ea24: 0800eaaf .word 0x0800eaaf 800ea28: 0800eb03 .word 0x0800eb03 800ea2c: 0800eb03 .word 0x0800eb03 800ea30: 0800eb03 .word 0x0800eb03 800ea34: 0800eabf .word 0x0800eabf 800ea38: 0800eb03 .word 0x0800eb03 800ea3c: 0800eb03 .word 0x0800eb03 800ea40: 0800eb03 .word 0x0800eb03 800ea44: 0800eb03 .word 0x0800eb03 800ea48: 0800eb03 .word 0x0800eb03 800ea4c: 0800eb03 .word 0x0800eb03 800ea50: 0800eb03 .word 0x0800eb03 800ea54: 0800eacf .word 0x0800eacf 800ea58: 0800eb03 .word 0x0800eb03 800ea5c: 0800eb03 .word 0x0800eb03 800ea60: 0800eb03 .word 0x0800eb03 800ea64: 0800eb03 .word 0x0800eb03 800ea68: 0800eb03 .word 0x0800eb03 800ea6c: 0800eb03 .word 0x0800eb03 800ea70: 0800eb03 .word 0x0800eb03 800ea74: 0800eb03 .word 0x0800eb03 800ea78: 0800eb03 .word 0x0800eb03 800ea7c: 0800eb03 .word 0x0800eb03 800ea80: 0800eb03 .word 0x0800eb03 800ea84: 0800eb03 .word 0x0800eb03 800ea88: 0800eb03 .word 0x0800eb03 800ea8c: 0800eb03 .word 0x0800eb03 800ea90: 0800eb03 .word 0x0800eb03 800ea94: 0800eaf5 .word 0x0800eaf5 800ea98: 2b40 cmp r3, #64 @ 0x40 800ea9a: d02e beq.n 800eafa 800ea9c: e031 b.n 800eb02 { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800ea9e: f7fc fc9d bl 800b3dc 800eaa2: 63f8 str r0, [r7, #60] @ 0x3c break; 800eaa4: e033 b.n 800eb0e case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800eaa6: f7fc fcaf bl 800b408 800eaaa: 63f8 str r0, [r7, #60] @ 0x3c break; 800eaac: e02f b.n 800eb0e case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800eaae: f107 0324 add.w r3, r7, #36 @ 0x24 800eab2: 4618 mov r0, r3 800eab4: f7fd ff04 bl 800c8c0 pclk = pll2_clocks.PLL2_Q_Frequency; 800eab8: 6abb ldr r3, [r7, #40] @ 0x28 800eaba: 63fb str r3, [r7, #60] @ 0x3c break; 800eabc: e027 b.n 800eb0e case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800eabe: f107 0318 add.w r3, r7, #24 800eac2: 4618 mov r0, r3 800eac4: f7fe f850 bl 800cb68 pclk = pll3_clocks.PLL3_Q_Frequency; 800eac8: 69fb ldr r3, [r7, #28] 800eaca: 63fb str r3, [r7, #60] @ 0x3c break; 800eacc: e01f b.n 800eb0e case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800eace: 4b2d ldr r3, [pc, #180] @ (800eb84 ) 800ead0: 681b ldr r3, [r3, #0] 800ead2: f003 0320 and.w r3, r3, #32 800ead6: 2b00 cmp r3, #0 800ead8: d009 beq.n 800eaee { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800eada: 4b2a ldr r3, [pc, #168] @ (800eb84 ) 800eadc: 681b ldr r3, [r3, #0] 800eade: 08db lsrs r3, r3, #3 800eae0: f003 0303 and.w r3, r3, #3 800eae4: 4a24 ldr r2, [pc, #144] @ (800eb78 ) 800eae6: fa22 f303 lsr.w r3, r2, r3 800eaea: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800eaec: e00f b.n 800eb0e pclk = (uint32_t) HSI_VALUE; 800eaee: 4b22 ldr r3, [pc, #136] @ (800eb78 ) 800eaf0: 63fb str r3, [r7, #60] @ 0x3c break; 800eaf2: e00c b.n 800eb0e case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800eaf4: 4b21 ldr r3, [pc, #132] @ (800eb7c ) 800eaf6: 63fb str r3, [r7, #60] @ 0x3c break; 800eaf8: e009 b.n 800eb0e case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800eafa: f44f 4300 mov.w r3, #32768 @ 0x8000 800eafe: 63fb str r3, [r7, #60] @ 0x3c break; 800eb00: e005 b.n 800eb0e default: pclk = 0U; 800eb02: 2300 movs r3, #0 800eb04: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800eb06: 2301 movs r3, #1 800eb08: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800eb0c: bf00 nop } /* USARTDIV must be greater than or equal to 0d16 */ if (pclk != 0U) 800eb0e: 6bfb ldr r3, [r7, #60] @ 0x3c 800eb10: 2b00 cmp r3, #0 800eb12: f000 80e7 beq.w 800ece4 { usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800eb16: 697b ldr r3, [r7, #20] 800eb18: 6a5b ldr r3, [r3, #36] @ 0x24 800eb1a: 4a19 ldr r2, [pc, #100] @ (800eb80 ) 800eb1c: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800eb20: 461a mov r2, r3 800eb22: 6bfb ldr r3, [r7, #60] @ 0x3c 800eb24: fbb3 f3f2 udiv r3, r3, r2 800eb28: 005a lsls r2, r3, #1 800eb2a: 697b ldr r3, [r7, #20] 800eb2c: 685b ldr r3, [r3, #4] 800eb2e: 085b lsrs r3, r3, #1 800eb30: 441a add r2, r3 800eb32: 697b ldr r3, [r7, #20] 800eb34: 685b ldr r3, [r3, #4] 800eb36: fbb2 f3f3 udiv r3, r2, r3 800eb3a: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800eb3c: 6bbb ldr r3, [r7, #56] @ 0x38 800eb3e: 2b0f cmp r3, #15 800eb40: d916 bls.n 800eb70 800eb42: 6bbb ldr r3, [r7, #56] @ 0x38 800eb44: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800eb48: d212 bcs.n 800eb70 { brrtemp = (uint16_t)(usartdiv & 0xFFF0U); 800eb4a: 6bbb ldr r3, [r7, #56] @ 0x38 800eb4c: b29b uxth r3, r3 800eb4e: f023 030f bic.w r3, r3, #15 800eb52: 86fb strh r3, [r7, #54] @ 0x36 brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U); 800eb54: 6bbb ldr r3, [r7, #56] @ 0x38 800eb56: 085b lsrs r3, r3, #1 800eb58: b29b uxth r3, r3 800eb5a: f003 0307 and.w r3, r3, #7 800eb5e: b29a uxth r2, r3 800eb60: 8efb ldrh r3, [r7, #54] @ 0x36 800eb62: 4313 orrs r3, r2 800eb64: 86fb strh r3, [r7, #54] @ 0x36 huart->Instance->BRR = brrtemp; 800eb66: 697b ldr r3, [r7, #20] 800eb68: 681b ldr r3, [r3, #0] 800eb6a: 8efa ldrh r2, [r7, #54] @ 0x36 800eb6c: 60da str r2, [r3, #12] 800eb6e: e0b9 b.n 800ece4 } else { ret = HAL_ERROR; 800eb70: 2301 movs r3, #1 800eb72: f887 3042 strb.w r3, [r7, #66] @ 0x42 800eb76: e0b5 b.n 800ece4 800eb78: 03d09000 .word 0x03d09000 800eb7c: 003d0900 .word 0x003d0900 800eb80: 08031aa4 .word 0x08031aa4 800eb84: 58024400 .word 0x58024400 } } } else { switch (clocksource) 800eb88: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800eb8c: 2b20 cmp r3, #32 800eb8e: dc49 bgt.n 800ec24 800eb90: 2b00 cmp r3, #0 800eb92: db7c blt.n 800ec8e 800eb94: 2b20 cmp r3, #32 800eb96: d87a bhi.n 800ec8e 800eb98: a201 add r2, pc, #4 @ (adr r2, 800eba0 ) 800eb9a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800eb9e: bf00 nop 800eba0: 0800ec2b .word 0x0800ec2b 800eba4: 0800ec33 .word 0x0800ec33 800eba8: 0800ec8f .word 0x0800ec8f 800ebac: 0800ec8f .word 0x0800ec8f 800ebb0: 0800ec3b .word 0x0800ec3b 800ebb4: 0800ec8f .word 0x0800ec8f 800ebb8: 0800ec8f .word 0x0800ec8f 800ebbc: 0800ec8f .word 0x0800ec8f 800ebc0: 0800ec4b .word 0x0800ec4b 800ebc4: 0800ec8f .word 0x0800ec8f 800ebc8: 0800ec8f .word 0x0800ec8f 800ebcc: 0800ec8f .word 0x0800ec8f 800ebd0: 0800ec8f .word 0x0800ec8f 800ebd4: 0800ec8f .word 0x0800ec8f 800ebd8: 0800ec8f .word 0x0800ec8f 800ebdc: 0800ec8f .word 0x0800ec8f 800ebe0: 0800ec5b .word 0x0800ec5b 800ebe4: 0800ec8f .word 0x0800ec8f 800ebe8: 0800ec8f .word 0x0800ec8f 800ebec: 0800ec8f .word 0x0800ec8f 800ebf0: 0800ec8f .word 0x0800ec8f 800ebf4: 0800ec8f .word 0x0800ec8f 800ebf8: 0800ec8f .word 0x0800ec8f 800ebfc: 0800ec8f .word 0x0800ec8f 800ec00: 0800ec8f .word 0x0800ec8f 800ec04: 0800ec8f .word 0x0800ec8f 800ec08: 0800ec8f .word 0x0800ec8f 800ec0c: 0800ec8f .word 0x0800ec8f 800ec10: 0800ec8f .word 0x0800ec8f 800ec14: 0800ec8f .word 0x0800ec8f 800ec18: 0800ec8f .word 0x0800ec8f 800ec1c: 0800ec8f .word 0x0800ec8f 800ec20: 0800ec81 .word 0x0800ec81 800ec24: 2b40 cmp r3, #64 @ 0x40 800ec26: d02e beq.n 800ec86 800ec28: e031 b.n 800ec8e { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800ec2a: f7fc fbd7 bl 800b3dc 800ec2e: 63f8 str r0, [r7, #60] @ 0x3c break; 800ec30: e033 b.n 800ec9a case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800ec32: f7fc fbe9 bl 800b408 800ec36: 63f8 str r0, [r7, #60] @ 0x3c break; 800ec38: e02f b.n 800ec9a case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800ec3a: f107 0324 add.w r3, r7, #36 @ 0x24 800ec3e: 4618 mov r0, r3 800ec40: f7fd fe3e bl 800c8c0 pclk = pll2_clocks.PLL2_Q_Frequency; 800ec44: 6abb ldr r3, [r7, #40] @ 0x28 800ec46: 63fb str r3, [r7, #60] @ 0x3c break; 800ec48: e027 b.n 800ec9a case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800ec4a: f107 0318 add.w r3, r7, #24 800ec4e: 4618 mov r0, r3 800ec50: f7fd ff8a bl 800cb68 pclk = pll3_clocks.PLL3_Q_Frequency; 800ec54: 69fb ldr r3, [r7, #28] 800ec56: 63fb str r3, [r7, #60] @ 0x3c break; 800ec58: e01f b.n 800ec9a case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800ec5a: 4b2d ldr r3, [pc, #180] @ (800ed10 ) 800ec5c: 681b ldr r3, [r3, #0] 800ec5e: f003 0320 and.w r3, r3, #32 800ec62: 2b00 cmp r3, #0 800ec64: d009 beq.n 800ec7a { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800ec66: 4b2a ldr r3, [pc, #168] @ (800ed10 ) 800ec68: 681b ldr r3, [r3, #0] 800ec6a: 08db lsrs r3, r3, #3 800ec6c: f003 0303 and.w r3, r3, #3 800ec70: 4a28 ldr r2, [pc, #160] @ (800ed14 ) 800ec72: fa22 f303 lsr.w r3, r2, r3 800ec76: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800ec78: e00f b.n 800ec9a pclk = (uint32_t) HSI_VALUE; 800ec7a: 4b26 ldr r3, [pc, #152] @ (800ed14 ) 800ec7c: 63fb str r3, [r7, #60] @ 0x3c break; 800ec7e: e00c b.n 800ec9a case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800ec80: 4b25 ldr r3, [pc, #148] @ (800ed18 ) 800ec82: 63fb str r3, [r7, #60] @ 0x3c break; 800ec84: e009 b.n 800ec9a case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800ec86: f44f 4300 mov.w r3, #32768 @ 0x8000 800ec8a: 63fb str r3, [r7, #60] @ 0x3c break; 800ec8c: e005 b.n 800ec9a default: pclk = 0U; 800ec8e: 2300 movs r3, #0 800ec90: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800ec92: 2301 movs r3, #1 800ec94: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800ec98: bf00 nop } if (pclk != 0U) 800ec9a: 6bfb ldr r3, [r7, #60] @ 0x3c 800ec9c: 2b00 cmp r3, #0 800ec9e: d021 beq.n 800ece4 { /* USARTDIV must be greater than or equal to 0d16 */ usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800eca0: 697b ldr r3, [r7, #20] 800eca2: 6a5b ldr r3, [r3, #36] @ 0x24 800eca4: 4a1d ldr r2, [pc, #116] @ (800ed1c ) 800eca6: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800ecaa: 461a mov r2, r3 800ecac: 6bfb ldr r3, [r7, #60] @ 0x3c 800ecae: fbb3 f2f2 udiv r2, r3, r2 800ecb2: 697b ldr r3, [r7, #20] 800ecb4: 685b ldr r3, [r3, #4] 800ecb6: 085b lsrs r3, r3, #1 800ecb8: 441a add r2, r3 800ecba: 697b ldr r3, [r7, #20] 800ecbc: 685b ldr r3, [r3, #4] 800ecbe: fbb2 f3f3 udiv r3, r2, r3 800ecc2: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800ecc4: 6bbb ldr r3, [r7, #56] @ 0x38 800ecc6: 2b0f cmp r3, #15 800ecc8: d909 bls.n 800ecde 800ecca: 6bbb ldr r3, [r7, #56] @ 0x38 800eccc: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800ecd0: d205 bcs.n 800ecde { huart->Instance->BRR = (uint16_t)usartdiv; 800ecd2: 6bbb ldr r3, [r7, #56] @ 0x38 800ecd4: b29a uxth r2, r3 800ecd6: 697b ldr r3, [r7, #20] 800ecd8: 681b ldr r3, [r3, #0] 800ecda: 60da str r2, [r3, #12] 800ecdc: e002 b.n 800ece4 } else { ret = HAL_ERROR; 800ecde: 2301 movs r3, #1 800ece0: f887 3042 strb.w r3, [r7, #66] @ 0x42 } } } /* Initialize the number of data to process during RX/TX ISR execution */ huart->NbTxDataToProcess = 1; 800ece4: 697b ldr r3, [r7, #20] 800ece6: 2201 movs r2, #1 800ece8: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1; 800ecec: 697b ldr r3, [r7, #20] 800ecee: 2201 movs r2, #1 800ecf0: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 /* Clear ISR function pointers */ huart->RxISR = NULL; 800ecf4: 697b ldr r3, [r7, #20] 800ecf6: 2200 movs r2, #0 800ecf8: 675a str r2, [r3, #116] @ 0x74 huart->TxISR = NULL; 800ecfa: 697b ldr r3, [r7, #20] 800ecfc: 2200 movs r2, #0 800ecfe: 679a str r2, [r3, #120] @ 0x78 return ret; 800ed00: f897 3042 ldrb.w r3, [r7, #66] @ 0x42 } 800ed04: 4618 mov r0, r3 800ed06: 3748 adds r7, #72 @ 0x48 800ed08: 46bd mov sp, r7 800ed0a: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800ed0e: bf00 nop 800ed10: 58024400 .word 0x58024400 800ed14: 03d09000 .word 0x03d09000 800ed18: 003d0900 .word 0x003d0900 800ed1c: 08031aa4 .word 0x08031aa4 0800ed20 : * @brief Configure the UART peripheral advanced features. * @param huart UART handle. * @retval None */ void UART_AdvFeatureConfig(UART_HandleTypeDef *huart) { 800ed20: b480 push {r7} 800ed22: b083 sub sp, #12 800ed24: af00 add r7, sp, #0 800ed26: 6078 str r0, [r7, #4] /* Check whether the set of advanced features to configure is properly set */ assert_param(IS_UART_ADVFEATURE_INIT(huart->AdvancedInit.AdvFeatureInit)); /* if required, configure RX/TX pins swap */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_SWAP_INIT)) 800ed28: 687b ldr r3, [r7, #4] 800ed2a: 6a9b ldr r3, [r3, #40] @ 0x28 800ed2c: f003 0308 and.w r3, r3, #8 800ed30: 2b00 cmp r3, #0 800ed32: d00a beq.n 800ed4a { assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap)); MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap); 800ed34: 687b ldr r3, [r7, #4] 800ed36: 681b ldr r3, [r3, #0] 800ed38: 685b ldr r3, [r3, #4] 800ed3a: f423 4100 bic.w r1, r3, #32768 @ 0x8000 800ed3e: 687b ldr r3, [r7, #4] 800ed40: 6b9a ldr r2, [r3, #56] @ 0x38 800ed42: 687b ldr r3, [r7, #4] 800ed44: 681b ldr r3, [r3, #0] 800ed46: 430a orrs r2, r1 800ed48: 605a str r2, [r3, #4] } /* if required, configure TX pin active level inversion */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_TXINVERT_INIT)) 800ed4a: 687b ldr r3, [r7, #4] 800ed4c: 6a9b ldr r3, [r3, #40] @ 0x28 800ed4e: f003 0301 and.w r3, r3, #1 800ed52: 2b00 cmp r3, #0 800ed54: d00a beq.n 800ed6c { assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert); 800ed56: 687b ldr r3, [r7, #4] 800ed58: 681b ldr r3, [r3, #0] 800ed5a: 685b ldr r3, [r3, #4] 800ed5c: f423 3100 bic.w r1, r3, #131072 @ 0x20000 800ed60: 687b ldr r3, [r7, #4] 800ed62: 6ada ldr r2, [r3, #44] @ 0x2c 800ed64: 687b ldr r3, [r7, #4] 800ed66: 681b ldr r3, [r3, #0] 800ed68: 430a orrs r2, r1 800ed6a: 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)) 800ed6c: 687b ldr r3, [r7, #4] 800ed6e: 6a9b ldr r3, [r3, #40] @ 0x28 800ed70: f003 0302 and.w r3, r3, #2 800ed74: 2b00 cmp r3, #0 800ed76: d00a beq.n 800ed8e { assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert); 800ed78: 687b ldr r3, [r7, #4] 800ed7a: 681b ldr r3, [r3, #0] 800ed7c: 685b ldr r3, [r3, #4] 800ed7e: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800ed82: 687b ldr r3, [r7, #4] 800ed84: 6b1a ldr r2, [r3, #48] @ 0x30 800ed86: 687b ldr r3, [r7, #4] 800ed88: 681b ldr r3, [r3, #0] 800ed8a: 430a orrs r2, r1 800ed8c: 605a str r2, [r3, #4] } /* if required, configure data inversion */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT)) 800ed8e: 687b ldr r3, [r7, #4] 800ed90: 6a9b ldr r3, [r3, #40] @ 0x28 800ed92: f003 0304 and.w r3, r3, #4 800ed96: 2b00 cmp r3, #0 800ed98: d00a beq.n 800edb0 { assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert); 800ed9a: 687b ldr r3, [r7, #4] 800ed9c: 681b ldr r3, [r3, #0] 800ed9e: 685b ldr r3, [r3, #4] 800eda0: f423 2180 bic.w r1, r3, #262144 @ 0x40000 800eda4: 687b ldr r3, [r7, #4] 800eda6: 6b5a ldr r2, [r3, #52] @ 0x34 800eda8: 687b ldr r3, [r7, #4] 800edaa: 681b ldr r3, [r3, #0] 800edac: 430a orrs r2, r1 800edae: 605a str r2, [r3, #4] } /* if required, configure RX overrun detection disabling */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT)) 800edb0: 687b ldr r3, [r7, #4] 800edb2: 6a9b ldr r3, [r3, #40] @ 0x28 800edb4: f003 0310 and.w r3, r3, #16 800edb8: 2b00 cmp r3, #0 800edba: d00a beq.n 800edd2 { assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable)); MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable); 800edbc: 687b ldr r3, [r7, #4] 800edbe: 681b ldr r3, [r3, #0] 800edc0: 689b ldr r3, [r3, #8] 800edc2: f423 5180 bic.w r1, r3, #4096 @ 0x1000 800edc6: 687b ldr r3, [r7, #4] 800edc8: 6bda ldr r2, [r3, #60] @ 0x3c 800edca: 687b ldr r3, [r7, #4] 800edcc: 681b ldr r3, [r3, #0] 800edce: 430a orrs r2, r1 800edd0: 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)) 800edd2: 687b ldr r3, [r7, #4] 800edd4: 6a9b ldr r3, [r3, #40] @ 0x28 800edd6: f003 0320 and.w r3, r3, #32 800edda: 2b00 cmp r3, #0 800eddc: d00a beq.n 800edf4 { assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError)); MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError); 800edde: 687b ldr r3, [r7, #4] 800ede0: 681b ldr r3, [r3, #0] 800ede2: 689b ldr r3, [r3, #8] 800ede4: f423 5100 bic.w r1, r3, #8192 @ 0x2000 800ede8: 687b ldr r3, [r7, #4] 800edea: 6c1a ldr r2, [r3, #64] @ 0x40 800edec: 687b ldr r3, [r7, #4] 800edee: 681b ldr r3, [r3, #0] 800edf0: 430a orrs r2, r1 800edf2: 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)) 800edf4: 687b ldr r3, [r7, #4] 800edf6: 6a9b ldr r3, [r3, #40] @ 0x28 800edf8: f003 0340 and.w r3, r3, #64 @ 0x40 800edfc: 2b00 cmp r3, #0 800edfe: d01a beq.n 800ee36 { 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); 800ee00: 687b ldr r3, [r7, #4] 800ee02: 681b ldr r3, [r3, #0] 800ee04: 685b ldr r3, [r3, #4] 800ee06: f423 1180 bic.w r1, r3, #1048576 @ 0x100000 800ee0a: 687b ldr r3, [r7, #4] 800ee0c: 6c5a ldr r2, [r3, #68] @ 0x44 800ee0e: 687b ldr r3, [r7, #4] 800ee10: 681b ldr r3, [r3, #0] 800ee12: 430a orrs r2, r1 800ee14: 605a str r2, [r3, #4] /* set auto Baudrate detection parameters if detection is enabled */ if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE) 800ee16: 687b ldr r3, [r7, #4] 800ee18: 6c5b ldr r3, [r3, #68] @ 0x44 800ee1a: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800ee1e: d10a bne.n 800ee36 { assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode)); MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode); 800ee20: 687b ldr r3, [r7, #4] 800ee22: 681b ldr r3, [r3, #0] 800ee24: 685b ldr r3, [r3, #4] 800ee26: f423 01c0 bic.w r1, r3, #6291456 @ 0x600000 800ee2a: 687b ldr r3, [r7, #4] 800ee2c: 6c9a ldr r2, [r3, #72] @ 0x48 800ee2e: 687b ldr r3, [r7, #4] 800ee30: 681b ldr r3, [r3, #0] 800ee32: 430a orrs r2, r1 800ee34: 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)) 800ee36: 687b ldr r3, [r7, #4] 800ee38: 6a9b ldr r3, [r3, #40] @ 0x28 800ee3a: f003 0380 and.w r3, r3, #128 @ 0x80 800ee3e: 2b00 cmp r3, #0 800ee40: d00a beq.n 800ee58 { assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst)); MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst); 800ee42: 687b ldr r3, [r7, #4] 800ee44: 681b ldr r3, [r3, #0] 800ee46: 685b ldr r3, [r3, #4] 800ee48: f423 2100 bic.w r1, r3, #524288 @ 0x80000 800ee4c: 687b ldr r3, [r7, #4] 800ee4e: 6cda ldr r2, [r3, #76] @ 0x4c 800ee50: 687b ldr r3, [r7, #4] 800ee52: 681b ldr r3, [r3, #0] 800ee54: 430a orrs r2, r1 800ee56: 605a str r2, [r3, #4] } } 800ee58: bf00 nop 800ee5a: 370c adds r7, #12 800ee5c: 46bd mov sp, r7 800ee5e: f85d 7b04 ldr.w r7, [sp], #4 800ee62: 4770 bx lr 0800ee64 : * @brief Check the UART Idle State. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart) { 800ee64: b580 push {r7, lr} 800ee66: b098 sub sp, #96 @ 0x60 800ee68: af02 add r7, sp, #8 800ee6a: 6078 str r0, [r7, #4] uint32_t tickstart; /* Initialize the UART ErrorCode */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800ee6c: 687b ldr r3, [r7, #4] 800ee6e: 2200 movs r2, #0 800ee70: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Init tickstart for timeout management */ tickstart = HAL_GetTick(); 800ee74: f7f6 fc9c bl 80057b0 800ee78: 6578 str r0, [r7, #84] @ 0x54 /* Check if the Transmitter is enabled */ if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE) 800ee7a: 687b ldr r3, [r7, #4] 800ee7c: 681b ldr r3, [r3, #0] 800ee7e: 681b ldr r3, [r3, #0] 800ee80: f003 0308 and.w r3, r3, #8 800ee84: 2b08 cmp r3, #8 800ee86: d12f bne.n 800eee8 { /* Wait until TEACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800ee88: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800ee8c: 9300 str r3, [sp, #0] 800ee8e: 6d7b ldr r3, [r7, #84] @ 0x54 800ee90: 2200 movs r2, #0 800ee92: f44f 1100 mov.w r1, #2097152 @ 0x200000 800ee96: 6878 ldr r0, [r7, #4] 800ee98: f000 f88e bl 800efb8 800ee9c: 4603 mov r3, r0 800ee9e: 2b00 cmp r3, #0 800eea0: d022 beq.n 800eee8 { /* Disable TXE interrupt for the interrupt process */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE)); 800eea2: 687b ldr r3, [r7, #4] 800eea4: 681b ldr r3, [r3, #0] 800eea6: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eea8: 6bbb ldr r3, [r7, #56] @ 0x38 800eeaa: e853 3f00 ldrex r3, [r3] 800eeae: 637b str r3, [r7, #52] @ 0x34 return(result); 800eeb0: 6b7b ldr r3, [r7, #52] @ 0x34 800eeb2: f023 0380 bic.w r3, r3, #128 @ 0x80 800eeb6: 653b str r3, [r7, #80] @ 0x50 800eeb8: 687b ldr r3, [r7, #4] 800eeba: 681b ldr r3, [r3, #0] 800eebc: 461a mov r2, r3 800eebe: 6d3b ldr r3, [r7, #80] @ 0x50 800eec0: 647b str r3, [r7, #68] @ 0x44 800eec2: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eec4: 6c39 ldr r1, [r7, #64] @ 0x40 800eec6: 6c7a ldr r2, [r7, #68] @ 0x44 800eec8: e841 2300 strex r3, r2, [r1] 800eecc: 63fb str r3, [r7, #60] @ 0x3c return(result); 800eece: 6bfb ldr r3, [r7, #60] @ 0x3c 800eed0: 2b00 cmp r3, #0 800eed2: d1e6 bne.n 800eea2 huart->gState = HAL_UART_STATE_READY; 800eed4: 687b ldr r3, [r7, #4] 800eed6: 2220 movs r2, #32 800eed8: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UNLOCK(huart); 800eedc: 687b ldr r3, [r7, #4] 800eede: 2200 movs r2, #0 800eee0: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800eee4: 2303 movs r3, #3 800eee6: e063 b.n 800efb0 } } /* Check if the Receiver is enabled */ if ((huart->Instance->CR1 & USART_CR1_RE) == USART_CR1_RE) 800eee8: 687b ldr r3, [r7, #4] 800eeea: 681b ldr r3, [r3, #0] 800eeec: 681b ldr r3, [r3, #0] 800eeee: f003 0304 and.w r3, r3, #4 800eef2: 2b04 cmp r3, #4 800eef4: d149 bne.n 800ef8a { /* Wait until REACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800eef6: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800eefa: 9300 str r3, [sp, #0] 800eefc: 6d7b ldr r3, [r7, #84] @ 0x54 800eefe: 2200 movs r2, #0 800ef00: f44f 0180 mov.w r1, #4194304 @ 0x400000 800ef04: 6878 ldr r0, [r7, #4] 800ef06: f000 f857 bl 800efb8 800ef0a: 4603 mov r3, r0 800ef0c: 2b00 cmp r3, #0 800ef0e: d03c beq.n 800ef8a { /* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts for the interrupt process */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800ef10: 687b ldr r3, [r7, #4] 800ef12: 681b ldr r3, [r3, #0] 800ef14: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef16: 6a7b ldr r3, [r7, #36] @ 0x24 800ef18: e853 3f00 ldrex r3, [r3] 800ef1c: 623b str r3, [r7, #32] return(result); 800ef1e: 6a3b ldr r3, [r7, #32] 800ef20: f423 7390 bic.w r3, r3, #288 @ 0x120 800ef24: 64fb str r3, [r7, #76] @ 0x4c 800ef26: 687b ldr r3, [r7, #4] 800ef28: 681b ldr r3, [r3, #0] 800ef2a: 461a mov r2, r3 800ef2c: 6cfb ldr r3, [r7, #76] @ 0x4c 800ef2e: 633b str r3, [r7, #48] @ 0x30 800ef30: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef32: 6af9 ldr r1, [r7, #44] @ 0x2c 800ef34: 6b3a ldr r2, [r7, #48] @ 0x30 800ef36: e841 2300 strex r3, r2, [r1] 800ef3a: 62bb str r3, [r7, #40] @ 0x28 return(result); 800ef3c: 6abb ldr r3, [r7, #40] @ 0x28 800ef3e: 2b00 cmp r3, #0 800ef40: d1e6 bne.n 800ef10 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800ef42: 687b ldr r3, [r7, #4] 800ef44: 681b ldr r3, [r3, #0] 800ef46: 3308 adds r3, #8 800ef48: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef4a: 693b ldr r3, [r7, #16] 800ef4c: e853 3f00 ldrex r3, [r3] 800ef50: 60fb str r3, [r7, #12] return(result); 800ef52: 68fb ldr r3, [r7, #12] 800ef54: f023 0301 bic.w r3, r3, #1 800ef58: 64bb str r3, [r7, #72] @ 0x48 800ef5a: 687b ldr r3, [r7, #4] 800ef5c: 681b ldr r3, [r3, #0] 800ef5e: 3308 adds r3, #8 800ef60: 6cba ldr r2, [r7, #72] @ 0x48 800ef62: 61fa str r2, [r7, #28] 800ef64: 61bb str r3, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef66: 69b9 ldr r1, [r7, #24] 800ef68: 69fa ldr r2, [r7, #28] 800ef6a: e841 2300 strex r3, r2, [r1] 800ef6e: 617b str r3, [r7, #20] return(result); 800ef70: 697b ldr r3, [r7, #20] 800ef72: 2b00 cmp r3, #0 800ef74: d1e5 bne.n 800ef42 huart->RxState = HAL_UART_STATE_READY; 800ef76: 687b ldr r3, [r7, #4] 800ef78: 2220 movs r2, #32 800ef7a: f8c3 208c str.w r2, [r3, #140] @ 0x8c __HAL_UNLOCK(huart); 800ef7e: 687b ldr r3, [r7, #4] 800ef80: 2200 movs r2, #0 800ef82: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800ef86: 2303 movs r3, #3 800ef88: e012 b.n 800efb0 } } /* Initialize the UART State */ huart->gState = HAL_UART_STATE_READY; 800ef8a: 687b ldr r3, [r7, #4] 800ef8c: 2220 movs r2, #32 800ef8e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 huart->RxState = HAL_UART_STATE_READY; 800ef92: 687b ldr r3, [r7, #4] 800ef94: 2220 movs r2, #32 800ef96: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800ef9a: 687b ldr r3, [r7, #4] 800ef9c: 2200 movs r2, #0 800ef9e: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 800efa0: 687b ldr r3, [r7, #4] 800efa2: 2200 movs r2, #0 800efa4: 671a str r2, [r3, #112] @ 0x70 __HAL_UNLOCK(huart); 800efa6: 687b ldr r3, [r7, #4] 800efa8: 2200 movs r2, #0 800efaa: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800efae: 2300 movs r3, #0 } 800efb0: 4618 mov r0, r3 800efb2: 3758 adds r7, #88 @ 0x58 800efb4: 46bd mov sp, r7 800efb6: bd80 pop {r7, pc} 0800efb8 : * @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) { 800efb8: b580 push {r7, lr} 800efba: b084 sub sp, #16 800efbc: af00 add r7, sp, #0 800efbe: 60f8 str r0, [r7, #12] 800efc0: 60b9 str r1, [r7, #8] 800efc2: 603b str r3, [r7, #0] 800efc4: 4613 mov r3, r2 800efc6: 71fb strb r3, [r7, #7] /* Wait until flag is set */ while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800efc8: e04f b.n 800f06a { /* Check for the Timeout */ if (Timeout != HAL_MAX_DELAY) 800efca: 69bb ldr r3, [r7, #24] 800efcc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800efd0: d04b beq.n 800f06a { if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 800efd2: f7f6 fbed bl 80057b0 800efd6: 4602 mov r2, r0 800efd8: 683b ldr r3, [r7, #0] 800efda: 1ad3 subs r3, r2, r3 800efdc: 69ba ldr r2, [r7, #24] 800efde: 429a cmp r2, r3 800efe0: d302 bcc.n 800efe8 800efe2: 69bb ldr r3, [r7, #24] 800efe4: 2b00 cmp r3, #0 800efe6: d101 bne.n 800efec { return HAL_TIMEOUT; 800efe8: 2303 movs r3, #3 800efea: e04e b.n 800f08a } if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC)) 800efec: 68fb ldr r3, [r7, #12] 800efee: 681b ldr r3, [r3, #0] 800eff0: 681b ldr r3, [r3, #0] 800eff2: f003 0304 and.w r3, r3, #4 800eff6: 2b00 cmp r3, #0 800eff8: d037 beq.n 800f06a 800effa: 68bb ldr r3, [r7, #8] 800effc: 2b80 cmp r3, #128 @ 0x80 800effe: d034 beq.n 800f06a 800f000: 68bb ldr r3, [r7, #8] 800f002: 2b40 cmp r3, #64 @ 0x40 800f004: d031 beq.n 800f06a { if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET) 800f006: 68fb ldr r3, [r7, #12] 800f008: 681b ldr r3, [r3, #0] 800f00a: 69db ldr r3, [r3, #28] 800f00c: f003 0308 and.w r3, r3, #8 800f010: 2b08 cmp r3, #8 800f012: d110 bne.n 800f036 { /* Clear Overrun Error flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800f014: 68fb ldr r3, [r7, #12] 800f016: 681b ldr r3, [r3, #0] 800f018: 2208 movs r2, #8 800f01a: 621a str r2, [r3, #32] /* Blocking error : transfer is aborted Set the UART state ready to be able to start again the process, Disable Rx Interrupts if ongoing */ UART_EndRxTransfer(huart); 800f01c: 68f8 ldr r0, [r7, #12] 800f01e: f000 f95b bl 800f2d8 huart->ErrorCode = HAL_UART_ERROR_ORE; 800f022: 68fb ldr r3, [r7, #12] 800f024: 2208 movs r2, #8 800f026: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f02a: 68fb ldr r3, [r7, #12] 800f02c: 2200 movs r2, #0 800f02e: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_ERROR; 800f032: 2301 movs r3, #1 800f034: e029 b.n 800f08a } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 800f036: 68fb ldr r3, [r7, #12] 800f038: 681b ldr r3, [r3, #0] 800f03a: 69db ldr r3, [r3, #28] 800f03c: f403 6300 and.w r3, r3, #2048 @ 0x800 800f040: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800f044: d111 bne.n 800f06a { /* Clear Receiver Timeout flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800f046: 68fb ldr r3, [r7, #12] 800f048: 681b ldr r3, [r3, #0] 800f04a: f44f 6200 mov.w r2, #2048 @ 0x800 800f04e: 621a str r2, [r3, #32] /* Blocking error : transfer is aborted Set the UART state ready to be able to start again the process, Disable Rx Interrupts if ongoing */ UART_EndRxTransfer(huart); 800f050: 68f8 ldr r0, [r7, #12] 800f052: f000 f941 bl 800f2d8 huart->ErrorCode = HAL_UART_ERROR_RTO; 800f056: 68fb ldr r3, [r7, #12] 800f058: 2220 movs r2, #32 800f05a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f05e: 68fb ldr r3, [r7, #12] 800f060: 2200 movs r2, #0 800f062: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_TIMEOUT; 800f066: 2303 movs r3, #3 800f068: e00f b.n 800f08a while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800f06a: 68fb ldr r3, [r7, #12] 800f06c: 681b ldr r3, [r3, #0] 800f06e: 69da ldr r2, [r3, #28] 800f070: 68bb ldr r3, [r7, #8] 800f072: 4013 ands r3, r2 800f074: 68ba ldr r2, [r7, #8] 800f076: 429a cmp r2, r3 800f078: bf0c ite eq 800f07a: 2301 moveq r3, #1 800f07c: 2300 movne r3, #0 800f07e: b2db uxtb r3, r3 800f080: 461a mov r2, r3 800f082: 79fb ldrb r3, [r7, #7] 800f084: 429a cmp r2, r3 800f086: d0a0 beq.n 800efca } } } } return HAL_OK; 800f088: 2300 movs r3, #0 } 800f08a: 4618 mov r0, r3 800f08c: 3710 adds r7, #16 800f08e: 46bd mov sp, r7 800f090: bd80 pop {r7, pc} ... 0800f094 : * @param pData Pointer to data buffer (u8 or u16 data elements). * @param Size Amount of data elements (u8 or u16) to be received. * @retval HAL status */ HAL_StatusTypeDef UART_Start_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) { 800f094: b480 push {r7} 800f096: b0a3 sub sp, #140 @ 0x8c 800f098: af00 add r7, sp, #0 800f09a: 60f8 str r0, [r7, #12] 800f09c: 60b9 str r1, [r7, #8] 800f09e: 4613 mov r3, r2 800f0a0: 80fb strh r3, [r7, #6] huart->pRxBuffPtr = pData; 800f0a2: 68fb ldr r3, [r7, #12] 800f0a4: 68ba ldr r2, [r7, #8] 800f0a6: 659a str r2, [r3, #88] @ 0x58 huart->RxXferSize = Size; 800f0a8: 68fb ldr r3, [r7, #12] 800f0aa: 88fa ldrh r2, [r7, #6] 800f0ac: f8a3 205c strh.w r2, [r3, #92] @ 0x5c huart->RxXferCount = Size; 800f0b0: 68fb ldr r3, [r7, #12] 800f0b2: 88fa ldrh r2, [r7, #6] 800f0b4: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->RxISR = NULL; 800f0b8: 68fb ldr r3, [r7, #12] 800f0ba: 2200 movs r2, #0 800f0bc: 675a str r2, [r3, #116] @ 0x74 /* Computation of UART mask to apply to RDR register */ UART_MASK_COMPUTATION(huart); 800f0be: 68fb ldr r3, [r7, #12] 800f0c0: 689b ldr r3, [r3, #8] 800f0c2: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f0c6: d10e bne.n 800f0e6 800f0c8: 68fb ldr r3, [r7, #12] 800f0ca: 691b ldr r3, [r3, #16] 800f0cc: 2b00 cmp r3, #0 800f0ce: d105 bne.n 800f0dc 800f0d0: 68fb ldr r3, [r7, #12] 800f0d2: f240 12ff movw r2, #511 @ 0x1ff 800f0d6: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f0da: e02d b.n 800f138 800f0dc: 68fb ldr r3, [r7, #12] 800f0de: 22ff movs r2, #255 @ 0xff 800f0e0: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f0e4: e028 b.n 800f138 800f0e6: 68fb ldr r3, [r7, #12] 800f0e8: 689b ldr r3, [r3, #8] 800f0ea: 2b00 cmp r3, #0 800f0ec: d10d bne.n 800f10a 800f0ee: 68fb ldr r3, [r7, #12] 800f0f0: 691b ldr r3, [r3, #16] 800f0f2: 2b00 cmp r3, #0 800f0f4: d104 bne.n 800f100 800f0f6: 68fb ldr r3, [r7, #12] 800f0f8: 22ff movs r2, #255 @ 0xff 800f0fa: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f0fe: e01b b.n 800f138 800f100: 68fb ldr r3, [r7, #12] 800f102: 227f movs r2, #127 @ 0x7f 800f104: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f108: e016 b.n 800f138 800f10a: 68fb ldr r3, [r7, #12] 800f10c: 689b ldr r3, [r3, #8] 800f10e: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800f112: d10d bne.n 800f130 800f114: 68fb ldr r3, [r7, #12] 800f116: 691b ldr r3, [r3, #16] 800f118: 2b00 cmp r3, #0 800f11a: d104 bne.n 800f126 800f11c: 68fb ldr r3, [r7, #12] 800f11e: 227f movs r2, #127 @ 0x7f 800f120: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f124: e008 b.n 800f138 800f126: 68fb ldr r3, [r7, #12] 800f128: 223f movs r2, #63 @ 0x3f 800f12a: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f12e: e003 b.n 800f138 800f130: 68fb ldr r3, [r7, #12] 800f132: 2200 movs r2, #0 800f134: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 huart->ErrorCode = HAL_UART_ERROR_NONE; 800f138: 68fb ldr r3, [r7, #12] 800f13a: 2200 movs r2, #0 800f13c: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->RxState = HAL_UART_STATE_BUSY_RX; 800f140: 68fb ldr r3, [r7, #12] 800f142: 2222 movs r2, #34 @ 0x22 800f144: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_EIE); 800f148: 68fb ldr r3, [r7, #12] 800f14a: 681b ldr r3, [r3, #0] 800f14c: 3308 adds r3, #8 800f14e: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f150: 6e7b ldr r3, [r7, #100] @ 0x64 800f152: e853 3f00 ldrex r3, [r3] 800f156: 663b str r3, [r7, #96] @ 0x60 return(result); 800f158: 6e3b ldr r3, [r7, #96] @ 0x60 800f15a: f043 0301 orr.w r3, r3, #1 800f15e: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800f162: 68fb ldr r3, [r7, #12] 800f164: 681b ldr r3, [r3, #0] 800f166: 3308 adds r3, #8 800f168: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800f16c: 673a str r2, [r7, #112] @ 0x70 800f16e: 66fb str r3, [r7, #108] @ 0x6c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f170: 6ef9 ldr r1, [r7, #108] @ 0x6c 800f172: 6f3a ldr r2, [r7, #112] @ 0x70 800f174: e841 2300 strex r3, r2, [r1] 800f178: 66bb str r3, [r7, #104] @ 0x68 return(result); 800f17a: 6ebb ldr r3, [r7, #104] @ 0x68 800f17c: 2b00 cmp r3, #0 800f17e: d1e3 bne.n 800f148 /* Configure Rx interrupt processing */ if ((huart->FifoMode == UART_FIFOMODE_ENABLE) && (Size >= huart->NbRxDataToProcess)) 800f180: 68fb ldr r3, [r7, #12] 800f182: 6e5b ldr r3, [r3, #100] @ 0x64 800f184: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800f188: d14f bne.n 800f22a 800f18a: 68fb ldr r3, [r7, #12] 800f18c: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f190: 88fa ldrh r2, [r7, #6] 800f192: 429a cmp r2, r3 800f194: d349 bcc.n 800f22a { /* Set the Rx ISR function pointer according to the data word length */ if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE)) 800f196: 68fb ldr r3, [r7, #12] 800f198: 689b ldr r3, [r3, #8] 800f19a: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f19e: d107 bne.n 800f1b0 800f1a0: 68fb ldr r3, [r7, #12] 800f1a2: 691b ldr r3, [r3, #16] 800f1a4: 2b00 cmp r3, #0 800f1a6: d103 bne.n 800f1b0 { huart->RxISR = UART_RxISR_16BIT_FIFOEN; 800f1a8: 68fb ldr r3, [r7, #12] 800f1aa: 4a47 ldr r2, [pc, #284] @ (800f2c8 ) 800f1ac: 675a str r2, [r3, #116] @ 0x74 800f1ae: e002 b.n 800f1b6 } else { huart->RxISR = UART_RxISR_8BIT_FIFOEN; 800f1b0: 68fb ldr r3, [r7, #12] 800f1b2: 4a46 ldr r2, [pc, #280] @ (800f2cc ) 800f1b4: 675a str r2, [r3, #116] @ 0x74 } /* Enable the UART Parity Error interrupt and RX FIFO Threshold interrupt */ if (huart->Init.Parity != UART_PARITY_NONE) 800f1b6: 68fb ldr r3, [r7, #12] 800f1b8: 691b ldr r3, [r3, #16] 800f1ba: 2b00 cmp r3, #0 800f1bc: d01a beq.n 800f1f4 { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800f1be: 68fb ldr r3, [r7, #12] 800f1c0: 681b ldr r3, [r3, #0] 800f1c2: 653b str r3, [r7, #80] @ 0x50 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f1c4: 6d3b ldr r3, [r7, #80] @ 0x50 800f1c6: e853 3f00 ldrex r3, [r3] 800f1ca: 64fb str r3, [r7, #76] @ 0x4c return(result); 800f1cc: 6cfb ldr r3, [r7, #76] @ 0x4c 800f1ce: f443 7380 orr.w r3, r3, #256 @ 0x100 800f1d2: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800f1d6: 68fb ldr r3, [r7, #12] 800f1d8: 681b ldr r3, [r3, #0] 800f1da: 461a mov r2, r3 800f1dc: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800f1e0: 65fb str r3, [r7, #92] @ 0x5c 800f1e2: 65ba str r2, [r7, #88] @ 0x58 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f1e4: 6db9 ldr r1, [r7, #88] @ 0x58 800f1e6: 6dfa ldr r2, [r7, #92] @ 0x5c 800f1e8: e841 2300 strex r3, r2, [r1] 800f1ec: 657b str r3, [r7, #84] @ 0x54 return(result); 800f1ee: 6d7b ldr r3, [r7, #84] @ 0x54 800f1f0: 2b00 cmp r3, #0 800f1f2: d1e4 bne.n 800f1be } ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800f1f4: 68fb ldr r3, [r7, #12] 800f1f6: 681b ldr r3, [r3, #0] 800f1f8: 3308 adds r3, #8 800f1fa: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f1fc: 6bfb ldr r3, [r7, #60] @ 0x3c 800f1fe: e853 3f00 ldrex r3, [r3] 800f202: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f204: 6bbb ldr r3, [r7, #56] @ 0x38 800f206: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800f20a: 67fb str r3, [r7, #124] @ 0x7c 800f20c: 68fb ldr r3, [r7, #12] 800f20e: 681b ldr r3, [r3, #0] 800f210: 3308 adds r3, #8 800f212: 6ffa ldr r2, [r7, #124] @ 0x7c 800f214: 64ba str r2, [r7, #72] @ 0x48 800f216: 647b str r3, [r7, #68] @ 0x44 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f218: 6c79 ldr r1, [r7, #68] @ 0x44 800f21a: 6cba ldr r2, [r7, #72] @ 0x48 800f21c: e841 2300 strex r3, r2, [r1] 800f220: 643b str r3, [r7, #64] @ 0x40 return(result); 800f222: 6c3b ldr r3, [r7, #64] @ 0x40 800f224: 2b00 cmp r3, #0 800f226: d1e5 bne.n 800f1f4 800f228: e046 b.n 800f2b8 } else { /* Set the Rx ISR function pointer according to the data word length */ if ((huart->Init.WordLength == UART_WORDLENGTH_9B) && (huart->Init.Parity == UART_PARITY_NONE)) 800f22a: 68fb ldr r3, [r7, #12] 800f22c: 689b ldr r3, [r3, #8] 800f22e: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f232: d107 bne.n 800f244 800f234: 68fb ldr r3, [r7, #12] 800f236: 691b ldr r3, [r3, #16] 800f238: 2b00 cmp r3, #0 800f23a: d103 bne.n 800f244 { huart->RxISR = UART_RxISR_16BIT; 800f23c: 68fb ldr r3, [r7, #12] 800f23e: 4a24 ldr r2, [pc, #144] @ (800f2d0 ) 800f240: 675a str r2, [r3, #116] @ 0x74 800f242: e002 b.n 800f24a } else { huart->RxISR = UART_RxISR_8BIT; 800f244: 68fb ldr r3, [r7, #12] 800f246: 4a23 ldr r2, [pc, #140] @ (800f2d4 ) 800f248: 675a str r2, [r3, #116] @ 0x74 } /* Enable the UART Parity Error interrupt and Data Register Not Empty interrupt */ if (huart->Init.Parity != UART_PARITY_NONE) 800f24a: 68fb ldr r3, [r7, #12] 800f24c: 691b ldr r3, [r3, #16] 800f24e: 2b00 cmp r3, #0 800f250: d019 beq.n 800f286 { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE | USART_CR1_RXNEIE_RXFNEIE); 800f252: 68fb ldr r3, [r7, #12] 800f254: 681b ldr r3, [r3, #0] 800f256: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f258: 6abb ldr r3, [r7, #40] @ 0x28 800f25a: e853 3f00 ldrex r3, [r3] 800f25e: 627b str r3, [r7, #36] @ 0x24 return(result); 800f260: 6a7b ldr r3, [r7, #36] @ 0x24 800f262: f443 7390 orr.w r3, r3, #288 @ 0x120 800f266: 677b str r3, [r7, #116] @ 0x74 800f268: 68fb ldr r3, [r7, #12] 800f26a: 681b ldr r3, [r3, #0] 800f26c: 461a mov r2, r3 800f26e: 6f7b ldr r3, [r7, #116] @ 0x74 800f270: 637b str r3, [r7, #52] @ 0x34 800f272: 633a str r2, [r7, #48] @ 0x30 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f274: 6b39 ldr r1, [r7, #48] @ 0x30 800f276: 6b7a ldr r2, [r7, #52] @ 0x34 800f278: e841 2300 strex r3, r2, [r1] 800f27c: 62fb str r3, [r7, #44] @ 0x2c return(result); 800f27e: 6afb ldr r3, [r7, #44] @ 0x2c 800f280: 2b00 cmp r3, #0 800f282: d1e6 bne.n 800f252 800f284: e018 b.n 800f2b8 } else { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800f286: 68fb ldr r3, [r7, #12] 800f288: 681b ldr r3, [r3, #0] 800f28a: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f28c: 697b ldr r3, [r7, #20] 800f28e: e853 3f00 ldrex r3, [r3] 800f292: 613b str r3, [r7, #16] return(result); 800f294: 693b ldr r3, [r7, #16] 800f296: f043 0320 orr.w r3, r3, #32 800f29a: 67bb str r3, [r7, #120] @ 0x78 800f29c: 68fb ldr r3, [r7, #12] 800f29e: 681b ldr r3, [r3, #0] 800f2a0: 461a mov r2, r3 800f2a2: 6fbb ldr r3, [r7, #120] @ 0x78 800f2a4: 623b str r3, [r7, #32] 800f2a6: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f2a8: 69f9 ldr r1, [r7, #28] 800f2aa: 6a3a ldr r2, [r7, #32] 800f2ac: e841 2300 strex r3, r2, [r1] 800f2b0: 61bb str r3, [r7, #24] return(result); 800f2b2: 69bb ldr r3, [r7, #24] 800f2b4: 2b00 cmp r3, #0 800f2b6: d1e6 bne.n 800f286 } } return HAL_OK; 800f2b8: 2300 movs r3, #0 } 800f2ba: 4618 mov r0, r3 800f2bc: 378c adds r7, #140 @ 0x8c 800f2be: 46bd mov sp, r7 800f2c0: f85d 7b04 ldr.w r7, [sp], #4 800f2c4: 4770 bx lr 800f2c6: bf00 nop 800f2c8: 0800fe3d .word 0x0800fe3d 800f2cc: 0800fadd .word 0x0800fadd 800f2d0: 0800f925 .word 0x0800f925 800f2d4: 0800f76d .word 0x0800f76d 0800f2d8 : * @brief End ongoing Rx transfer on UART peripheral (following error detection or Reception completion). * @param huart UART handle. * @retval None */ static void UART_EndRxTransfer(UART_HandleTypeDef *huart) { 800f2d8: b480 push {r7} 800f2da: b095 sub sp, #84 @ 0x54 800f2dc: af00 add r7, sp, #0 800f2de: 6078 str r0, [r7, #4] /* Disable RXNE, PE and ERR (Frame error, noise error, overrun error) interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800f2e0: 687b ldr r3, [r7, #4] 800f2e2: 681b ldr r3, [r3, #0] 800f2e4: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f2e6: 6b7b ldr r3, [r7, #52] @ 0x34 800f2e8: e853 3f00 ldrex r3, [r3] 800f2ec: 633b str r3, [r7, #48] @ 0x30 return(result); 800f2ee: 6b3b ldr r3, [r7, #48] @ 0x30 800f2f0: f423 7390 bic.w r3, r3, #288 @ 0x120 800f2f4: 64fb str r3, [r7, #76] @ 0x4c 800f2f6: 687b ldr r3, [r7, #4] 800f2f8: 681b ldr r3, [r3, #0] 800f2fa: 461a mov r2, r3 800f2fc: 6cfb ldr r3, [r7, #76] @ 0x4c 800f2fe: 643b str r3, [r7, #64] @ 0x40 800f300: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f302: 6bf9 ldr r1, [r7, #60] @ 0x3c 800f304: 6c3a ldr r2, [r7, #64] @ 0x40 800f306: e841 2300 strex r3, r2, [r1] 800f30a: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f30c: 6bbb ldr r3, [r7, #56] @ 0x38 800f30e: 2b00 cmp r3, #0 800f310: d1e6 bne.n 800f2e0 ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800f312: 687b ldr r3, [r7, #4] 800f314: 681b ldr r3, [r3, #0] 800f316: 3308 adds r3, #8 800f318: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f31a: 6a3b ldr r3, [r7, #32] 800f31c: e853 3f00 ldrex r3, [r3] 800f320: 61fb str r3, [r7, #28] return(result); 800f322: 69fa ldr r2, [r7, #28] 800f324: 4b1e ldr r3, [pc, #120] @ (800f3a0 ) 800f326: 4013 ands r3, r2 800f328: 64bb str r3, [r7, #72] @ 0x48 800f32a: 687b ldr r3, [r7, #4] 800f32c: 681b ldr r3, [r3, #0] 800f32e: 3308 adds r3, #8 800f330: 6cba ldr r2, [r7, #72] @ 0x48 800f332: 62fa str r2, [r7, #44] @ 0x2c 800f334: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f336: 6ab9 ldr r1, [r7, #40] @ 0x28 800f338: 6afa ldr r2, [r7, #44] @ 0x2c 800f33a: e841 2300 strex r3, r2, [r1] 800f33e: 627b str r3, [r7, #36] @ 0x24 return(result); 800f340: 6a7b ldr r3, [r7, #36] @ 0x24 800f342: 2b00 cmp r3, #0 800f344: d1e5 bne.n 800f312 /* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f346: 687b ldr r3, [r7, #4] 800f348: 6edb ldr r3, [r3, #108] @ 0x6c 800f34a: 2b01 cmp r3, #1 800f34c: d118 bne.n 800f380 { ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f34e: 687b ldr r3, [r7, #4] 800f350: 681b ldr r3, [r3, #0] 800f352: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f354: 68fb ldr r3, [r7, #12] 800f356: e853 3f00 ldrex r3, [r3] 800f35a: 60bb str r3, [r7, #8] return(result); 800f35c: 68bb ldr r3, [r7, #8] 800f35e: f023 0310 bic.w r3, r3, #16 800f362: 647b str r3, [r7, #68] @ 0x44 800f364: 687b ldr r3, [r7, #4] 800f366: 681b ldr r3, [r3, #0] 800f368: 461a mov r2, r3 800f36a: 6c7b ldr r3, [r7, #68] @ 0x44 800f36c: 61bb str r3, [r7, #24] 800f36e: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f370: 6979 ldr r1, [r7, #20] 800f372: 69ba ldr r2, [r7, #24] 800f374: e841 2300 strex r3, r2, [r1] 800f378: 613b str r3, [r7, #16] return(result); 800f37a: 693b ldr r3, [r7, #16] 800f37c: 2b00 cmp r3, #0 800f37e: d1e6 bne.n 800f34e } /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f380: 687b ldr r3, [r7, #4] 800f382: 2220 movs r2, #32 800f384: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f388: 687b ldr r3, [r7, #4] 800f38a: 2200 movs r2, #0 800f38c: 66da str r2, [r3, #108] @ 0x6c /* Reset RxIsr function pointer */ huart->RxISR = NULL; 800f38e: 687b ldr r3, [r7, #4] 800f390: 2200 movs r2, #0 800f392: 675a str r2, [r3, #116] @ 0x74 } 800f394: bf00 nop 800f396: 3754 adds r7, #84 @ 0x54 800f398: 46bd mov sp, r7 800f39a: f85d 7b04 ldr.w r7, [sp], #4 800f39e: 4770 bx lr 800f3a0: effffffe .word 0xeffffffe 0800f3a4 : * (To be called at end of DMA Abort procedure following error occurrence). * @param hdma DMA handle. * @retval None */ static void UART_DMAAbortOnError(DMA_HandleTypeDef *hdma) { 800f3a4: b580 push {r7, lr} 800f3a6: b084 sub sp, #16 800f3a8: af00 add r7, sp, #0 800f3aa: 6078 str r0, [r7, #4] UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent); 800f3ac: 687b ldr r3, [r7, #4] 800f3ae: 6b9b ldr r3, [r3, #56] @ 0x38 800f3b0: 60fb str r3, [r7, #12] huart->RxXferCount = 0U; 800f3b2: 68fb ldr r3, [r7, #12] 800f3b4: 2200 movs r2, #0 800f3b6: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->TxXferCount = 0U; 800f3ba: 68fb ldr r3, [r7, #12] 800f3bc: 2200 movs r2, #0 800f3be: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800f3c2: 68f8 ldr r0, [r7, #12] 800f3c4: f7fe ff3a bl 800e23c #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800f3c8: bf00 nop 800f3ca: 3710 adds r7, #16 800f3cc: 46bd mov sp, r7 800f3ce: bd80 pop {r7, pc} 0800f3d0 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT(UART_HandleTypeDef *huart) { 800f3d0: b480 push {r7} 800f3d2: b08f sub sp, #60 @ 0x3c 800f3d4: af00 add r7, sp, #0 800f3d6: 6078 str r0, [r7, #4] /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f3d8: 687b ldr r3, [r7, #4] 800f3da: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f3de: 2b21 cmp r3, #33 @ 0x21 800f3e0: d14c bne.n 800f47c { if (huart->TxXferCount == 0U) 800f3e2: 687b ldr r3, [r7, #4] 800f3e4: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f3e8: b29b uxth r3, r3 800f3ea: 2b00 cmp r3, #0 800f3ec: d132 bne.n 800f454 { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800f3ee: 687b ldr r3, [r7, #4] 800f3f0: 681b ldr r3, [r3, #0] 800f3f2: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f3f4: 6a3b ldr r3, [r7, #32] 800f3f6: e853 3f00 ldrex r3, [r3] 800f3fa: 61fb str r3, [r7, #28] return(result); 800f3fc: 69fb ldr r3, [r7, #28] 800f3fe: f023 0380 bic.w r3, r3, #128 @ 0x80 800f402: 637b str r3, [r7, #52] @ 0x34 800f404: 687b ldr r3, [r7, #4] 800f406: 681b ldr r3, [r3, #0] 800f408: 461a mov r2, r3 800f40a: 6b7b ldr r3, [r7, #52] @ 0x34 800f40c: 62fb str r3, [r7, #44] @ 0x2c 800f40e: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f410: 6ab9 ldr r1, [r7, #40] @ 0x28 800f412: 6afa ldr r2, [r7, #44] @ 0x2c 800f414: e841 2300 strex r3, r2, [r1] 800f418: 627b str r3, [r7, #36] @ 0x24 return(result); 800f41a: 6a7b ldr r3, [r7, #36] @ 0x24 800f41c: 2b00 cmp r3, #0 800f41e: d1e6 bne.n 800f3ee /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f420: 687b ldr r3, [r7, #4] 800f422: 681b ldr r3, [r3, #0] 800f424: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f426: 68fb ldr r3, [r7, #12] 800f428: e853 3f00 ldrex r3, [r3] 800f42c: 60bb str r3, [r7, #8] return(result); 800f42e: 68bb ldr r3, [r7, #8] 800f430: f043 0340 orr.w r3, r3, #64 @ 0x40 800f434: 633b str r3, [r7, #48] @ 0x30 800f436: 687b ldr r3, [r7, #4] 800f438: 681b ldr r3, [r3, #0] 800f43a: 461a mov r2, r3 800f43c: 6b3b ldr r3, [r7, #48] @ 0x30 800f43e: 61bb str r3, [r7, #24] 800f440: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f442: 6979 ldr r1, [r7, #20] 800f444: 69ba ldr r2, [r7, #24] 800f446: e841 2300 strex r3, r2, [r1] 800f44a: 613b str r3, [r7, #16] return(result); 800f44c: 693b ldr r3, [r7, #16] 800f44e: 2b00 cmp r3, #0 800f450: d1e6 bne.n 800f420 huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); huart->pTxBuffPtr++; huart->TxXferCount--; } } } 800f452: e013 b.n 800f47c huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800f454: 687b ldr r3, [r7, #4] 800f456: 6d1b ldr r3, [r3, #80] @ 0x50 800f458: 781a ldrb r2, [r3, #0] 800f45a: 687b ldr r3, [r7, #4] 800f45c: 681b ldr r3, [r3, #0] 800f45e: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800f460: 687b ldr r3, [r7, #4] 800f462: 6d1b ldr r3, [r3, #80] @ 0x50 800f464: 1c5a adds r2, r3, #1 800f466: 687b ldr r3, [r7, #4] 800f468: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f46a: 687b ldr r3, [r7, #4] 800f46c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f470: b29b uxth r3, r3 800f472: 3b01 subs r3, #1 800f474: b29a uxth r2, r3 800f476: 687b ldr r3, [r7, #4] 800f478: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800f47c: bf00 nop 800f47e: 373c adds r7, #60 @ 0x3c 800f480: 46bd mov sp, r7 800f482: f85d 7b04 ldr.w r7, [sp], #4 800f486: 4770 bx lr 0800f488 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT(UART_HandleTypeDef *huart) { 800f488: b480 push {r7} 800f48a: b091 sub sp, #68 @ 0x44 800f48c: af00 add r7, sp, #0 800f48e: 6078 str r0, [r7, #4] const uint16_t *tmp; /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f490: 687b ldr r3, [r7, #4] 800f492: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f496: 2b21 cmp r3, #33 @ 0x21 800f498: d151 bne.n 800f53e { if (huart->TxXferCount == 0U) 800f49a: 687b ldr r3, [r7, #4] 800f49c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f4a0: b29b uxth r3, r3 800f4a2: 2b00 cmp r3, #0 800f4a4: d132 bne.n 800f50c { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800f4a6: 687b ldr r3, [r7, #4] 800f4a8: 681b ldr r3, [r3, #0] 800f4aa: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f4ac: 6a7b ldr r3, [r7, #36] @ 0x24 800f4ae: e853 3f00 ldrex r3, [r3] 800f4b2: 623b str r3, [r7, #32] return(result); 800f4b4: 6a3b ldr r3, [r7, #32] 800f4b6: f023 0380 bic.w r3, r3, #128 @ 0x80 800f4ba: 63bb str r3, [r7, #56] @ 0x38 800f4bc: 687b ldr r3, [r7, #4] 800f4be: 681b ldr r3, [r3, #0] 800f4c0: 461a mov r2, r3 800f4c2: 6bbb ldr r3, [r7, #56] @ 0x38 800f4c4: 633b str r3, [r7, #48] @ 0x30 800f4c6: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f4c8: 6af9 ldr r1, [r7, #44] @ 0x2c 800f4ca: 6b3a ldr r2, [r7, #48] @ 0x30 800f4cc: e841 2300 strex r3, r2, [r1] 800f4d0: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f4d2: 6abb ldr r3, [r7, #40] @ 0x28 800f4d4: 2b00 cmp r3, #0 800f4d6: d1e6 bne.n 800f4a6 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f4d8: 687b ldr r3, [r7, #4] 800f4da: 681b ldr r3, [r3, #0] 800f4dc: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f4de: 693b ldr r3, [r7, #16] 800f4e0: e853 3f00 ldrex r3, [r3] 800f4e4: 60fb str r3, [r7, #12] return(result); 800f4e6: 68fb ldr r3, [r7, #12] 800f4e8: f043 0340 orr.w r3, r3, #64 @ 0x40 800f4ec: 637b str r3, [r7, #52] @ 0x34 800f4ee: 687b ldr r3, [r7, #4] 800f4f0: 681b ldr r3, [r3, #0] 800f4f2: 461a mov r2, r3 800f4f4: 6b7b ldr r3, [r7, #52] @ 0x34 800f4f6: 61fb str r3, [r7, #28] 800f4f8: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f4fa: 69b9 ldr r1, [r7, #24] 800f4fc: 69fa ldr r2, [r7, #28] 800f4fe: e841 2300 strex r3, r2, [r1] 800f502: 617b str r3, [r7, #20] return(result); 800f504: 697b ldr r3, [r7, #20] 800f506: 2b00 cmp r3, #0 800f508: d1e6 bne.n 800f4d8 huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); huart->pTxBuffPtr += 2U; huart->TxXferCount--; } } } 800f50a: e018 b.n 800f53e tmp = (const uint16_t *) huart->pTxBuffPtr; 800f50c: 687b ldr r3, [r7, #4] 800f50e: 6d1b ldr r3, [r3, #80] @ 0x50 800f510: 63fb str r3, [r7, #60] @ 0x3c huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800f512: 6bfb ldr r3, [r7, #60] @ 0x3c 800f514: 881b ldrh r3, [r3, #0] 800f516: 461a mov r2, r3 800f518: 687b ldr r3, [r7, #4] 800f51a: 681b ldr r3, [r3, #0] 800f51c: f3c2 0208 ubfx r2, r2, #0, #9 800f520: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800f522: 687b ldr r3, [r7, #4] 800f524: 6d1b ldr r3, [r3, #80] @ 0x50 800f526: 1c9a adds r2, r3, #2 800f528: 687b ldr r3, [r7, #4] 800f52a: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f52c: 687b ldr r3, [r7, #4] 800f52e: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f532: b29b uxth r3, r3 800f534: 3b01 subs r3, #1 800f536: b29a uxth r2, r3 800f538: 687b ldr r3, [r7, #4] 800f53a: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800f53e: bf00 nop 800f540: 3744 adds r7, #68 @ 0x44 800f542: 46bd mov sp, r7 800f544: f85d 7b04 ldr.w r7, [sp], #4 800f548: 4770 bx lr 0800f54a : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800f54a: b480 push {r7} 800f54c: b091 sub sp, #68 @ 0x44 800f54e: af00 add r7, sp, #0 800f550: 6078 str r0, [r7, #4] uint16_t nb_tx_data; /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f552: 687b ldr r3, [r7, #4] 800f554: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f558: 2b21 cmp r3, #33 @ 0x21 800f55a: d160 bne.n 800f61e { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f55c: 687b ldr r3, [r7, #4] 800f55e: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800f562: 87fb strh r3, [r7, #62] @ 0x3e 800f564: e057 b.n 800f616 { if (huart->TxXferCount == 0U) 800f566: 687b ldr r3, [r7, #4] 800f568: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f56c: b29b uxth r3, r3 800f56e: 2b00 cmp r3, #0 800f570: d133 bne.n 800f5da { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800f572: 687b ldr r3, [r7, #4] 800f574: 681b ldr r3, [r3, #0] 800f576: 3308 adds r3, #8 800f578: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f57a: 6a7b ldr r3, [r7, #36] @ 0x24 800f57c: e853 3f00 ldrex r3, [r3] 800f580: 623b str r3, [r7, #32] return(result); 800f582: 6a3b ldr r3, [r7, #32] 800f584: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800f588: 63bb str r3, [r7, #56] @ 0x38 800f58a: 687b ldr r3, [r7, #4] 800f58c: 681b ldr r3, [r3, #0] 800f58e: 3308 adds r3, #8 800f590: 6bba ldr r2, [r7, #56] @ 0x38 800f592: 633a str r2, [r7, #48] @ 0x30 800f594: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f596: 6af9 ldr r1, [r7, #44] @ 0x2c 800f598: 6b3a ldr r2, [r7, #48] @ 0x30 800f59a: e841 2300 strex r3, r2, [r1] 800f59e: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f5a0: 6abb ldr r3, [r7, #40] @ 0x28 800f5a2: 2b00 cmp r3, #0 800f5a4: d1e5 bne.n 800f572 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f5a6: 687b ldr r3, [r7, #4] 800f5a8: 681b ldr r3, [r3, #0] 800f5aa: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f5ac: 693b ldr r3, [r7, #16] 800f5ae: e853 3f00 ldrex r3, [r3] 800f5b2: 60fb str r3, [r7, #12] return(result); 800f5b4: 68fb ldr r3, [r7, #12] 800f5b6: f043 0340 orr.w r3, r3, #64 @ 0x40 800f5ba: 637b str r3, [r7, #52] @ 0x34 800f5bc: 687b ldr r3, [r7, #4] 800f5be: 681b ldr r3, [r3, #0] 800f5c0: 461a mov r2, r3 800f5c2: 6b7b ldr r3, [r7, #52] @ 0x34 800f5c4: 61fb str r3, [r7, #28] 800f5c6: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f5c8: 69b9 ldr r1, [r7, #24] 800f5ca: 69fa ldr r2, [r7, #28] 800f5cc: e841 2300 strex r3, r2, [r1] 800f5d0: 617b str r3, [r7, #20] return(result); 800f5d2: 697b ldr r3, [r7, #20] 800f5d4: 2b00 cmp r3, #0 800f5d6: d1e6 bne.n 800f5a6 break; /* force exit loop */ 800f5d8: e021 b.n 800f61e } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800f5da: 687b ldr r3, [r7, #4] 800f5dc: 681b ldr r3, [r3, #0] 800f5de: 69db ldr r3, [r3, #28] 800f5e0: f003 0380 and.w r3, r3, #128 @ 0x80 800f5e4: 2b00 cmp r3, #0 800f5e6: d013 beq.n 800f610 { huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800f5e8: 687b ldr r3, [r7, #4] 800f5ea: 6d1b ldr r3, [r3, #80] @ 0x50 800f5ec: 781a ldrb r2, [r3, #0] 800f5ee: 687b ldr r3, [r7, #4] 800f5f0: 681b ldr r3, [r3, #0] 800f5f2: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800f5f4: 687b ldr r3, [r7, #4] 800f5f6: 6d1b ldr r3, [r3, #80] @ 0x50 800f5f8: 1c5a adds r2, r3, #1 800f5fa: 687b ldr r3, [r7, #4] 800f5fc: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f5fe: 687b ldr r3, [r7, #4] 800f600: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f604: b29b uxth r3, r3 800f606: 3b01 subs r3, #1 800f608: b29a uxth r2, r3 800f60a: 687b ldr r3, [r7, #4] 800f60c: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f610: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f612: 3b01 subs r3, #1 800f614: 87fb strh r3, [r7, #62] @ 0x3e 800f616: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f618: 2b00 cmp r3, #0 800f61a: d1a4 bne.n 800f566 { /* Nothing to do */ } } } } 800f61c: e7ff b.n 800f61e 800f61e: bf00 nop 800f620: 3744 adds r7, #68 @ 0x44 800f622: 46bd mov sp, r7 800f624: f85d 7b04 ldr.w r7, [sp], #4 800f628: 4770 bx lr 0800f62a : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800f62a: b480 push {r7} 800f62c: b091 sub sp, #68 @ 0x44 800f62e: af00 add r7, sp, #0 800f630: 6078 str r0, [r7, #4] const uint16_t *tmp; uint16_t nb_tx_data; /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f632: 687b ldr r3, [r7, #4] 800f634: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f638: 2b21 cmp r3, #33 @ 0x21 800f63a: d165 bne.n 800f708 { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f63c: 687b ldr r3, [r7, #4] 800f63e: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800f642: 87fb strh r3, [r7, #62] @ 0x3e 800f644: e05c b.n 800f700 { if (huart->TxXferCount == 0U) 800f646: 687b ldr r3, [r7, #4] 800f648: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f64c: b29b uxth r3, r3 800f64e: 2b00 cmp r3, #0 800f650: d133 bne.n 800f6ba { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800f652: 687b ldr r3, [r7, #4] 800f654: 681b ldr r3, [r3, #0] 800f656: 3308 adds r3, #8 800f658: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f65a: 6a3b ldr r3, [r7, #32] 800f65c: e853 3f00 ldrex r3, [r3] 800f660: 61fb str r3, [r7, #28] return(result); 800f662: 69fb ldr r3, [r7, #28] 800f664: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800f668: 637b str r3, [r7, #52] @ 0x34 800f66a: 687b ldr r3, [r7, #4] 800f66c: 681b ldr r3, [r3, #0] 800f66e: 3308 adds r3, #8 800f670: 6b7a ldr r2, [r7, #52] @ 0x34 800f672: 62fa str r2, [r7, #44] @ 0x2c 800f674: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f676: 6ab9 ldr r1, [r7, #40] @ 0x28 800f678: 6afa ldr r2, [r7, #44] @ 0x2c 800f67a: e841 2300 strex r3, r2, [r1] 800f67e: 627b str r3, [r7, #36] @ 0x24 return(result); 800f680: 6a7b ldr r3, [r7, #36] @ 0x24 800f682: 2b00 cmp r3, #0 800f684: d1e5 bne.n 800f652 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f686: 687b ldr r3, [r7, #4] 800f688: 681b ldr r3, [r3, #0] 800f68a: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f68c: 68fb ldr r3, [r7, #12] 800f68e: e853 3f00 ldrex r3, [r3] 800f692: 60bb str r3, [r7, #8] return(result); 800f694: 68bb ldr r3, [r7, #8] 800f696: f043 0340 orr.w r3, r3, #64 @ 0x40 800f69a: 633b str r3, [r7, #48] @ 0x30 800f69c: 687b ldr r3, [r7, #4] 800f69e: 681b ldr r3, [r3, #0] 800f6a0: 461a mov r2, r3 800f6a2: 6b3b ldr r3, [r7, #48] @ 0x30 800f6a4: 61bb str r3, [r7, #24] 800f6a6: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f6a8: 6979 ldr r1, [r7, #20] 800f6aa: 69ba ldr r2, [r7, #24] 800f6ac: e841 2300 strex r3, r2, [r1] 800f6b0: 613b str r3, [r7, #16] return(result); 800f6b2: 693b ldr r3, [r7, #16] 800f6b4: 2b00 cmp r3, #0 800f6b6: d1e6 bne.n 800f686 break; /* force exit loop */ 800f6b8: e026 b.n 800f708 } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800f6ba: 687b ldr r3, [r7, #4] 800f6bc: 681b ldr r3, [r3, #0] 800f6be: 69db ldr r3, [r3, #28] 800f6c0: f003 0380 and.w r3, r3, #128 @ 0x80 800f6c4: 2b00 cmp r3, #0 800f6c6: d018 beq.n 800f6fa { tmp = (const uint16_t *) huart->pTxBuffPtr; 800f6c8: 687b ldr r3, [r7, #4] 800f6ca: 6d1b ldr r3, [r3, #80] @ 0x50 800f6cc: 63bb str r3, [r7, #56] @ 0x38 huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800f6ce: 6bbb ldr r3, [r7, #56] @ 0x38 800f6d0: 881b ldrh r3, [r3, #0] 800f6d2: 461a mov r2, r3 800f6d4: 687b ldr r3, [r7, #4] 800f6d6: 681b ldr r3, [r3, #0] 800f6d8: f3c2 0208 ubfx r2, r2, #0, #9 800f6dc: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800f6de: 687b ldr r3, [r7, #4] 800f6e0: 6d1b ldr r3, [r3, #80] @ 0x50 800f6e2: 1c9a adds r2, r3, #2 800f6e4: 687b ldr r3, [r7, #4] 800f6e6: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f6e8: 687b ldr r3, [r7, #4] 800f6ea: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f6ee: b29b uxth r3, r3 800f6f0: 3b01 subs r3, #1 800f6f2: b29a uxth r2, r3 800f6f4: 687b ldr r3, [r7, #4] 800f6f6: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f6fa: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f6fc: 3b01 subs r3, #1 800f6fe: 87fb strh r3, [r7, #62] @ 0x3e 800f700: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f702: 2b00 cmp r3, #0 800f704: d19f bne.n 800f646 { /* Nothing to do */ } } } } 800f706: e7ff b.n 800f708 800f708: bf00 nop 800f70a: 3744 adds r7, #68 @ 0x44 800f70c: 46bd mov sp, r7 800f70e: f85d 7b04 ldr.w r7, [sp], #4 800f712: 4770 bx lr 0800f714 : * @param huart pointer to a UART_HandleTypeDef structure that contains * the configuration information for the specified UART module. * @retval None */ static void UART_EndTransmit_IT(UART_HandleTypeDef *huart) { 800f714: b580 push {r7, lr} 800f716: b088 sub sp, #32 800f718: af00 add r7, sp, #0 800f71a: 6078 str r0, [r7, #4] /* Disable the UART Transmit Complete Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f71c: 687b ldr r3, [r7, #4] 800f71e: 681b ldr r3, [r3, #0] 800f720: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f722: 68fb ldr r3, [r7, #12] 800f724: e853 3f00 ldrex r3, [r3] 800f728: 60bb str r3, [r7, #8] return(result); 800f72a: 68bb ldr r3, [r7, #8] 800f72c: f023 0340 bic.w r3, r3, #64 @ 0x40 800f730: 61fb str r3, [r7, #28] 800f732: 687b ldr r3, [r7, #4] 800f734: 681b ldr r3, [r3, #0] 800f736: 461a mov r2, r3 800f738: 69fb ldr r3, [r7, #28] 800f73a: 61bb str r3, [r7, #24] 800f73c: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f73e: 6979 ldr r1, [r7, #20] 800f740: 69ba ldr r2, [r7, #24] 800f742: e841 2300 strex r3, r2, [r1] 800f746: 613b str r3, [r7, #16] return(result); 800f748: 693b ldr r3, [r7, #16] 800f74a: 2b00 cmp r3, #0 800f74c: d1e6 bne.n 800f71c /* Tx process is ended, restore huart->gState to Ready */ huart->gState = HAL_UART_STATE_READY; 800f74e: 687b ldr r3, [r7, #4] 800f750: 2220 movs r2, #32 800f752: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Cleat TxISR function pointer */ huart->TxISR = NULL; 800f756: 687b ldr r3, [r7, #4] 800f758: 2200 movs r2, #0 800f75a: 679a str r2, [r3, #120] @ 0x78 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Tx complete callback*/ huart->TxCpltCallback(huart); #else /*Call legacy weak Tx complete callback*/ HAL_UART_TxCpltCallback(huart); 800f75c: 6878 ldr r0, [r7, #4] 800f75e: f7f4 fff5 bl 800474c #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800f762: bf00 nop 800f764: 3720 adds r7, #32 800f766: 46bd mov sp, r7 800f768: bd80 pop {r7, pc} ... 0800f76c : * @brief RX interrupt handler for 7 or 8 bits data word length . * @param huart UART handle. * @retval None */ static void UART_RxISR_8BIT(UART_HandleTypeDef *huart) { 800f76c: b580 push {r7, lr} 800f76e: b09c sub sp, #112 @ 0x70 800f770: af00 add r7, sp, #0 800f772: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800f774: 687b ldr r3, [r7, #4] 800f776: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800f77a: f8a7 306e strh.w r3, [r7, #110] @ 0x6e uint16_t uhdata; /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800f77e: 687b ldr r3, [r7, #4] 800f780: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f784: 2b22 cmp r3, #34 @ 0x22 800f786: f040 80be bne.w 800f906 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f78a: 687b ldr r3, [r7, #4] 800f78c: 681b ldr r3, [r3, #0] 800f78e: 6a5b ldr r3, [r3, #36] @ 0x24 800f790: f8a7 306c strh.w r3, [r7, #108] @ 0x6c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800f794: f8b7 306c ldrh.w r3, [r7, #108] @ 0x6c 800f798: b2d9 uxtb r1, r3 800f79a: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800f79e: b2da uxtb r2, r3 800f7a0: 687b ldr r3, [r7, #4] 800f7a2: 6d9b ldr r3, [r3, #88] @ 0x58 800f7a4: 400a ands r2, r1 800f7a6: b2d2 uxtb r2, r2 800f7a8: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800f7aa: 687b ldr r3, [r7, #4] 800f7ac: 6d9b ldr r3, [r3, #88] @ 0x58 800f7ae: 1c5a adds r2, r3, #1 800f7b0: 687b ldr r3, [r7, #4] 800f7b2: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f7b4: 687b ldr r3, [r7, #4] 800f7b6: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f7ba: b29b uxth r3, r3 800f7bc: 3b01 subs r3, #1 800f7be: b29a uxth r2, r3 800f7c0: 687b ldr r3, [r7, #4] 800f7c2: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800f7c6: 687b ldr r3, [r7, #4] 800f7c8: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f7cc: b29b uxth r3, r3 800f7ce: 2b00 cmp r3, #0 800f7d0: f040 80a1 bne.w 800f916 { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800f7d4: 687b ldr r3, [r7, #4] 800f7d6: 681b ldr r3, [r3, #0] 800f7d8: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f7da: 6cfb ldr r3, [r7, #76] @ 0x4c 800f7dc: e853 3f00 ldrex r3, [r3] 800f7e0: 64bb str r3, [r7, #72] @ 0x48 return(result); 800f7e2: 6cbb ldr r3, [r7, #72] @ 0x48 800f7e4: f423 7390 bic.w r3, r3, #288 @ 0x120 800f7e8: 66bb str r3, [r7, #104] @ 0x68 800f7ea: 687b ldr r3, [r7, #4] 800f7ec: 681b ldr r3, [r3, #0] 800f7ee: 461a mov r2, r3 800f7f0: 6ebb ldr r3, [r7, #104] @ 0x68 800f7f2: 65bb str r3, [r7, #88] @ 0x58 800f7f4: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f7f6: 6d79 ldr r1, [r7, #84] @ 0x54 800f7f8: 6dba ldr r2, [r7, #88] @ 0x58 800f7fa: e841 2300 strex r3, r2, [r1] 800f7fe: 653b str r3, [r7, #80] @ 0x50 return(result); 800f800: 6d3b ldr r3, [r7, #80] @ 0x50 800f802: 2b00 cmp r3, #0 800f804: d1e6 bne.n 800f7d4 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800f806: 687b ldr r3, [r7, #4] 800f808: 681b ldr r3, [r3, #0] 800f80a: 3308 adds r3, #8 800f80c: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f80e: 6bbb ldr r3, [r7, #56] @ 0x38 800f810: e853 3f00 ldrex r3, [r3] 800f814: 637b str r3, [r7, #52] @ 0x34 return(result); 800f816: 6b7b ldr r3, [r7, #52] @ 0x34 800f818: f023 0301 bic.w r3, r3, #1 800f81c: 667b str r3, [r7, #100] @ 0x64 800f81e: 687b ldr r3, [r7, #4] 800f820: 681b ldr r3, [r3, #0] 800f822: 3308 adds r3, #8 800f824: 6e7a ldr r2, [r7, #100] @ 0x64 800f826: 647a str r2, [r7, #68] @ 0x44 800f828: 643b str r3, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f82a: 6c39 ldr r1, [r7, #64] @ 0x40 800f82c: 6c7a ldr r2, [r7, #68] @ 0x44 800f82e: e841 2300 strex r3, r2, [r1] 800f832: 63fb str r3, [r7, #60] @ 0x3c return(result); 800f834: 6bfb ldr r3, [r7, #60] @ 0x3c 800f836: 2b00 cmp r3, #0 800f838: d1e5 bne.n 800f806 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f83a: 687b ldr r3, [r7, #4] 800f83c: 2220 movs r2, #32 800f83e: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800f842: 687b ldr r3, [r7, #4] 800f844: 2200 movs r2, #0 800f846: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800f848: 687b ldr r3, [r7, #4] 800f84a: 2200 movs r2, #0 800f84c: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800f84e: 687b ldr r3, [r7, #4] 800f850: 681b ldr r3, [r3, #0] 800f852: 4a33 ldr r2, [pc, #204] @ (800f920 ) 800f854: 4293 cmp r3, r2 800f856: d01f beq.n 800f898 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800f858: 687b ldr r3, [r7, #4] 800f85a: 681b ldr r3, [r3, #0] 800f85c: 685b ldr r3, [r3, #4] 800f85e: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800f862: 2b00 cmp r3, #0 800f864: d018 beq.n 800f898 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800f866: 687b ldr r3, [r7, #4] 800f868: 681b ldr r3, [r3, #0] 800f86a: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f86c: 6a7b ldr r3, [r7, #36] @ 0x24 800f86e: e853 3f00 ldrex r3, [r3] 800f872: 623b str r3, [r7, #32] return(result); 800f874: 6a3b ldr r3, [r7, #32] 800f876: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800f87a: 663b str r3, [r7, #96] @ 0x60 800f87c: 687b ldr r3, [r7, #4] 800f87e: 681b ldr r3, [r3, #0] 800f880: 461a mov r2, r3 800f882: 6e3b ldr r3, [r7, #96] @ 0x60 800f884: 633b str r3, [r7, #48] @ 0x30 800f886: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f888: 6af9 ldr r1, [r7, #44] @ 0x2c 800f88a: 6b3a ldr r2, [r7, #48] @ 0x30 800f88c: e841 2300 strex r3, r2, [r1] 800f890: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f892: 6abb ldr r3, [r7, #40] @ 0x28 800f894: 2b00 cmp r3, #0 800f896: d1e6 bne.n 800f866 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f898: 687b ldr r3, [r7, #4] 800f89a: 6edb ldr r3, [r3, #108] @ 0x6c 800f89c: 2b01 cmp r3, #1 800f89e: d12e bne.n 800f8fe { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f8a0: 687b ldr r3, [r7, #4] 800f8a2: 2200 movs r2, #0 800f8a4: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f8a6: 687b ldr r3, [r7, #4] 800f8a8: 681b ldr r3, [r3, #0] 800f8aa: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f8ac: 693b ldr r3, [r7, #16] 800f8ae: e853 3f00 ldrex r3, [r3] 800f8b2: 60fb str r3, [r7, #12] return(result); 800f8b4: 68fb ldr r3, [r7, #12] 800f8b6: f023 0310 bic.w r3, r3, #16 800f8ba: 65fb str r3, [r7, #92] @ 0x5c 800f8bc: 687b ldr r3, [r7, #4] 800f8be: 681b ldr r3, [r3, #0] 800f8c0: 461a mov r2, r3 800f8c2: 6dfb ldr r3, [r7, #92] @ 0x5c 800f8c4: 61fb str r3, [r7, #28] 800f8c6: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f8c8: 69b9 ldr r1, [r7, #24] 800f8ca: 69fa ldr r2, [r7, #28] 800f8cc: e841 2300 strex r3, r2, [r1] 800f8d0: 617b str r3, [r7, #20] return(result); 800f8d2: 697b ldr r3, [r7, #20] 800f8d4: 2b00 cmp r3, #0 800f8d6: d1e6 bne.n 800f8a6 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800f8d8: 687b ldr r3, [r7, #4] 800f8da: 681b ldr r3, [r3, #0] 800f8dc: 69db ldr r3, [r3, #28] 800f8de: f003 0310 and.w r3, r3, #16 800f8e2: 2b10 cmp r3, #16 800f8e4: d103 bne.n 800f8ee { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800f8e6: 687b ldr r3, [r7, #4] 800f8e8: 681b ldr r3, [r3, #0] 800f8ea: 2210 movs r2, #16 800f8ec: 621a str r2, [r3, #32] #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx Event callback*/ huart->RxEventCallback(huart, huart->RxXferSize); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize); 800f8ee: 687b ldr r3, [r7, #4] 800f8f0: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800f8f4: 4619 mov r1, r3 800f8f6: 6878 ldr r0, [r7, #4] 800f8f8: f7f4 fece bl 8004698 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800f8fc: e00b b.n 800f916 HAL_UART_RxCpltCallback(huart); 800f8fe: 6878 ldr r0, [r7, #4] 800f900: f7f4 fec0 bl 8004684 } 800f904: e007 b.n 800f916 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800f906: 687b ldr r3, [r7, #4] 800f908: 681b ldr r3, [r3, #0] 800f90a: 699a ldr r2, [r3, #24] 800f90c: 687b ldr r3, [r7, #4] 800f90e: 681b ldr r3, [r3, #0] 800f910: f042 0208 orr.w r2, r2, #8 800f914: 619a str r2, [r3, #24] } 800f916: bf00 nop 800f918: 3770 adds r7, #112 @ 0x70 800f91a: 46bd mov sp, r7 800f91c: bd80 pop {r7, pc} 800f91e: bf00 nop 800f920: 58000c00 .word 0x58000c00 0800f924 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT(UART_HandleTypeDef *huart) { 800f924: b580 push {r7, lr} 800f926: b09c sub sp, #112 @ 0x70 800f928: af00 add r7, sp, #0 800f92a: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800f92c: 687b ldr r3, [r7, #4] 800f92e: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800f932: f8a7 306e strh.w r3, [r7, #110] @ 0x6e uint16_t uhdata; /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800f936: 687b ldr r3, [r7, #4] 800f938: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f93c: 2b22 cmp r3, #34 @ 0x22 800f93e: f040 80be bne.w 800fabe { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f942: 687b ldr r3, [r7, #4] 800f944: 681b ldr r3, [r3, #0] 800f946: 6a5b ldr r3, [r3, #36] @ 0x24 800f948: f8a7 306c strh.w r3, [r7, #108] @ 0x6c tmp = (uint16_t *) huart->pRxBuffPtr ; 800f94c: 687b ldr r3, [r7, #4] 800f94e: 6d9b ldr r3, [r3, #88] @ 0x58 800f950: 66bb str r3, [r7, #104] @ 0x68 *tmp = (uint16_t)(uhdata & uhMask); 800f952: f8b7 206c ldrh.w r2, [r7, #108] @ 0x6c 800f956: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800f95a: 4013 ands r3, r2 800f95c: b29a uxth r2, r3 800f95e: 6ebb ldr r3, [r7, #104] @ 0x68 800f960: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800f962: 687b ldr r3, [r7, #4] 800f964: 6d9b ldr r3, [r3, #88] @ 0x58 800f966: 1c9a adds r2, r3, #2 800f968: 687b ldr r3, [r7, #4] 800f96a: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f96c: 687b ldr r3, [r7, #4] 800f96e: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f972: b29b uxth r3, r3 800f974: 3b01 subs r3, #1 800f976: b29a uxth r2, r3 800f978: 687b ldr r3, [r7, #4] 800f97a: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800f97e: 687b ldr r3, [r7, #4] 800f980: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f984: b29b uxth r3, r3 800f986: 2b00 cmp r3, #0 800f988: f040 80a1 bne.w 800face { /* Disable the UART Parity Error Interrupt and RXNE interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800f98c: 687b ldr r3, [r7, #4] 800f98e: 681b ldr r3, [r3, #0] 800f990: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f992: 6cbb ldr r3, [r7, #72] @ 0x48 800f994: e853 3f00 ldrex r3, [r3] 800f998: 647b str r3, [r7, #68] @ 0x44 return(result); 800f99a: 6c7b ldr r3, [r7, #68] @ 0x44 800f99c: f423 7390 bic.w r3, r3, #288 @ 0x120 800f9a0: 667b str r3, [r7, #100] @ 0x64 800f9a2: 687b ldr r3, [r7, #4] 800f9a4: 681b ldr r3, [r3, #0] 800f9a6: 461a mov r2, r3 800f9a8: 6e7b ldr r3, [r7, #100] @ 0x64 800f9aa: 657b str r3, [r7, #84] @ 0x54 800f9ac: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f9ae: 6d39 ldr r1, [r7, #80] @ 0x50 800f9b0: 6d7a ldr r2, [r7, #84] @ 0x54 800f9b2: e841 2300 strex r3, r2, [r1] 800f9b6: 64fb str r3, [r7, #76] @ 0x4c return(result); 800f9b8: 6cfb ldr r3, [r7, #76] @ 0x4c 800f9ba: 2b00 cmp r3, #0 800f9bc: d1e6 bne.n 800f98c /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800f9be: 687b ldr r3, [r7, #4] 800f9c0: 681b ldr r3, [r3, #0] 800f9c2: 3308 adds r3, #8 800f9c4: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f9c6: 6b7b ldr r3, [r7, #52] @ 0x34 800f9c8: e853 3f00 ldrex r3, [r3] 800f9cc: 633b str r3, [r7, #48] @ 0x30 return(result); 800f9ce: 6b3b ldr r3, [r7, #48] @ 0x30 800f9d0: f023 0301 bic.w r3, r3, #1 800f9d4: 663b str r3, [r7, #96] @ 0x60 800f9d6: 687b ldr r3, [r7, #4] 800f9d8: 681b ldr r3, [r3, #0] 800f9da: 3308 adds r3, #8 800f9dc: 6e3a ldr r2, [r7, #96] @ 0x60 800f9de: 643a str r2, [r7, #64] @ 0x40 800f9e0: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f9e2: 6bf9 ldr r1, [r7, #60] @ 0x3c 800f9e4: 6c3a ldr r2, [r7, #64] @ 0x40 800f9e6: e841 2300 strex r3, r2, [r1] 800f9ea: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f9ec: 6bbb ldr r3, [r7, #56] @ 0x38 800f9ee: 2b00 cmp r3, #0 800f9f0: d1e5 bne.n 800f9be /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f9f2: 687b ldr r3, [r7, #4] 800f9f4: 2220 movs r2, #32 800f9f6: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800f9fa: 687b ldr r3, [r7, #4] 800f9fc: 2200 movs r2, #0 800f9fe: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800fa00: 687b ldr r3, [r7, #4] 800fa02: 2200 movs r2, #0 800fa04: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800fa06: 687b ldr r3, [r7, #4] 800fa08: 681b ldr r3, [r3, #0] 800fa0a: 4a33 ldr r2, [pc, #204] @ (800fad8 ) 800fa0c: 4293 cmp r3, r2 800fa0e: d01f beq.n 800fa50 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800fa10: 687b ldr r3, [r7, #4] 800fa12: 681b ldr r3, [r3, #0] 800fa14: 685b ldr r3, [r3, #4] 800fa16: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800fa1a: 2b00 cmp r3, #0 800fa1c: d018 beq.n 800fa50 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800fa1e: 687b ldr r3, [r7, #4] 800fa20: 681b ldr r3, [r3, #0] 800fa22: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fa24: 6a3b ldr r3, [r7, #32] 800fa26: e853 3f00 ldrex r3, [r3] 800fa2a: 61fb str r3, [r7, #28] return(result); 800fa2c: 69fb ldr r3, [r7, #28] 800fa2e: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800fa32: 65fb str r3, [r7, #92] @ 0x5c 800fa34: 687b ldr r3, [r7, #4] 800fa36: 681b ldr r3, [r3, #0] 800fa38: 461a mov r2, r3 800fa3a: 6dfb ldr r3, [r7, #92] @ 0x5c 800fa3c: 62fb str r3, [r7, #44] @ 0x2c 800fa3e: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fa40: 6ab9 ldr r1, [r7, #40] @ 0x28 800fa42: 6afa ldr r2, [r7, #44] @ 0x2c 800fa44: e841 2300 strex r3, r2, [r1] 800fa48: 627b str r3, [r7, #36] @ 0x24 return(result); 800fa4a: 6a7b ldr r3, [r7, #36] @ 0x24 800fa4c: 2b00 cmp r3, #0 800fa4e: d1e6 bne.n 800fa1e } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800fa50: 687b ldr r3, [r7, #4] 800fa52: 6edb ldr r3, [r3, #108] @ 0x6c 800fa54: 2b01 cmp r3, #1 800fa56: d12e bne.n 800fab6 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800fa58: 687b ldr r3, [r7, #4] 800fa5a: 2200 movs r2, #0 800fa5c: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800fa5e: 687b ldr r3, [r7, #4] 800fa60: 681b ldr r3, [r3, #0] 800fa62: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fa64: 68fb ldr r3, [r7, #12] 800fa66: e853 3f00 ldrex r3, [r3] 800fa6a: 60bb str r3, [r7, #8] return(result); 800fa6c: 68bb ldr r3, [r7, #8] 800fa6e: f023 0310 bic.w r3, r3, #16 800fa72: 65bb str r3, [r7, #88] @ 0x58 800fa74: 687b ldr r3, [r7, #4] 800fa76: 681b ldr r3, [r3, #0] 800fa78: 461a mov r2, r3 800fa7a: 6dbb ldr r3, [r7, #88] @ 0x58 800fa7c: 61bb str r3, [r7, #24] 800fa7e: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fa80: 6979 ldr r1, [r7, #20] 800fa82: 69ba ldr r2, [r7, #24] 800fa84: e841 2300 strex r3, r2, [r1] 800fa88: 613b str r3, [r7, #16] return(result); 800fa8a: 693b ldr r3, [r7, #16] 800fa8c: 2b00 cmp r3, #0 800fa8e: d1e6 bne.n 800fa5e if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800fa90: 687b ldr r3, [r7, #4] 800fa92: 681b ldr r3, [r3, #0] 800fa94: 69db ldr r3, [r3, #28] 800fa96: f003 0310 and.w r3, r3, #16 800fa9a: 2b10 cmp r3, #16 800fa9c: d103 bne.n 800faa6 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800fa9e: 687b ldr r3, [r7, #4] 800faa0: 681b ldr r3, [r3, #0] 800faa2: 2210 movs r2, #16 800faa4: 621a str r2, [r3, #32] #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx Event callback*/ huart->RxEventCallback(huart, huart->RxXferSize); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize); 800faa6: 687b ldr r3, [r7, #4] 800faa8: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800faac: 4619 mov r1, r3 800faae: 6878 ldr r0, [r7, #4] 800fab0: f7f4 fdf2 bl 8004698 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800fab4: e00b b.n 800face HAL_UART_RxCpltCallback(huart); 800fab6: 6878 ldr r0, [r7, #4] 800fab8: f7f4 fde4 bl 8004684 } 800fabc: e007 b.n 800face __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800fabe: 687b ldr r3, [r7, #4] 800fac0: 681b ldr r3, [r3, #0] 800fac2: 699a ldr r2, [r3, #24] 800fac4: 687b ldr r3, [r7, #4] 800fac6: 681b ldr r3, [r3, #0] 800fac8: f042 0208 orr.w r2, r2, #8 800facc: 619a str r2, [r3, #24] } 800face: bf00 nop 800fad0: 3770 adds r7, #112 @ 0x70 800fad2: 46bd mov sp, r7 800fad4: bd80 pop {r7, pc} 800fad6: bf00 nop 800fad8: 58000c00 .word 0x58000c00 0800fadc : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800fadc: b580 push {r7, lr} 800fade: b0ac sub sp, #176 @ 0xb0 800fae0: af00 add r7, sp, #0 800fae2: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800fae4: 687b ldr r3, [r7, #4] 800fae6: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800faea: f8a7 30aa strh.w r3, [r7, #170] @ 0xaa uint16_t uhdata; uint16_t nb_rx_data; uint16_t rxdatacount; uint32_t isrflags = READ_REG(huart->Instance->ISR); 800faee: 687b ldr r3, [r7, #4] 800faf0: 681b ldr r3, [r3, #0] 800faf2: 69db ldr r3, [r3, #28] 800faf4: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr1its = READ_REG(huart->Instance->CR1); 800faf8: 687b ldr r3, [r7, #4] 800fafa: 681b ldr r3, [r3, #0] 800fafc: 681b ldr r3, [r3, #0] 800fafe: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800fb02: 687b ldr r3, [r7, #4] 800fb04: 681b ldr r3, [r3, #0] 800fb06: 689b ldr r3, [r3, #8] 800fb08: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800fb0c: 687b ldr r3, [r7, #4] 800fb0e: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800fb12: 2b22 cmp r3, #34 @ 0x22 800fb14: f040 8180 bne.w 800fe18 { nb_rx_data = huart->NbRxDataToProcess; 800fb18: 687b ldr r3, [r7, #4] 800fb1a: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800fb1e: f8a7 309e strh.w r3, [r7, #158] @ 0x9e while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800fb22: e123 b.n 800fd6c { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800fb24: 687b ldr r3, [r7, #4] 800fb26: 681b ldr r3, [r3, #0] 800fb28: 6a5b ldr r3, [r3, #36] @ 0x24 800fb2a: f8a7 309c strh.w r3, [r7, #156] @ 0x9c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800fb2e: f8b7 309c ldrh.w r3, [r7, #156] @ 0x9c 800fb32: b2d9 uxtb r1, r3 800fb34: f8b7 30aa ldrh.w r3, [r7, #170] @ 0xaa 800fb38: b2da uxtb r2, r3 800fb3a: 687b ldr r3, [r7, #4] 800fb3c: 6d9b ldr r3, [r3, #88] @ 0x58 800fb3e: 400a ands r2, r1 800fb40: b2d2 uxtb r2, r2 800fb42: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800fb44: 687b ldr r3, [r7, #4] 800fb46: 6d9b ldr r3, [r3, #88] @ 0x58 800fb48: 1c5a adds r2, r3, #1 800fb4a: 687b ldr r3, [r7, #4] 800fb4c: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800fb4e: 687b ldr r3, [r7, #4] 800fb50: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fb54: b29b uxth r3, r3 800fb56: 3b01 subs r3, #1 800fb58: b29a uxth r2, r3 800fb5a: 687b ldr r3, [r7, #4] 800fb5c: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800fb60: 687b ldr r3, [r7, #4] 800fb62: 681b ldr r3, [r3, #0] 800fb64: 69db ldr r3, [r3, #28] 800fb66: f8c7 30ac str.w r3, [r7, #172] @ 0xac /* If some non blocking errors occurred */ if ((isrflags & (USART_ISR_PE | USART_ISR_FE | USART_ISR_NE)) != 0U) 800fb6a: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fb6e: f003 0307 and.w r3, r3, #7 800fb72: 2b00 cmp r3, #0 800fb74: d053 beq.n 800fc1e { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800fb76: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fb7a: f003 0301 and.w r3, r3, #1 800fb7e: 2b00 cmp r3, #0 800fb80: d011 beq.n 800fba6 800fb82: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 800fb86: f403 7380 and.w r3, r3, #256 @ 0x100 800fb8a: 2b00 cmp r3, #0 800fb8c: d00b beq.n 800fba6 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800fb8e: 687b ldr r3, [r7, #4] 800fb90: 681b ldr r3, [r3, #0] 800fb92: 2201 movs r2, #1 800fb94: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800fb96: 687b ldr r3, [r7, #4] 800fb98: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fb9c: f043 0201 orr.w r2, r3, #1 800fba0: 687b ldr r3, [r7, #4] 800fba2: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800fba6: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fbaa: f003 0302 and.w r3, r3, #2 800fbae: 2b00 cmp r3, #0 800fbb0: d011 beq.n 800fbd6 800fbb2: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fbb6: f003 0301 and.w r3, r3, #1 800fbba: 2b00 cmp r3, #0 800fbbc: d00b beq.n 800fbd6 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800fbbe: 687b ldr r3, [r7, #4] 800fbc0: 681b ldr r3, [r3, #0] 800fbc2: 2202 movs r2, #2 800fbc4: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800fbc6: 687b ldr r3, [r7, #4] 800fbc8: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fbcc: f043 0204 orr.w r2, r3, #4 800fbd0: 687b ldr r3, [r7, #4] 800fbd2: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800fbd6: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fbda: f003 0304 and.w r3, r3, #4 800fbde: 2b00 cmp r3, #0 800fbe0: d011 beq.n 800fc06 800fbe2: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fbe6: f003 0301 and.w r3, r3, #1 800fbea: 2b00 cmp r3, #0 800fbec: d00b beq.n 800fc06 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800fbee: 687b ldr r3, [r7, #4] 800fbf0: 681b ldr r3, [r3, #0] 800fbf2: 2204 movs r2, #4 800fbf4: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800fbf6: 687b ldr r3, [r7, #4] 800fbf8: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fbfc: f043 0202 orr.w r2, r3, #2 800fc00: 687b ldr r3, [r7, #4] 800fc02: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800fc06: 687b ldr r3, [r7, #4] 800fc08: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fc0c: 2b00 cmp r3, #0 800fc0e: d006 beq.n 800fc1e #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800fc10: 6878 ldr r0, [r7, #4] 800fc12: f7fe fb13 bl 800e23c #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800fc16: 687b ldr r3, [r7, #4] 800fc18: 2200 movs r2, #0 800fc1a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800fc1e: 687b ldr r3, [r7, #4] 800fc20: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fc24: b29b uxth r3, r3 800fc26: 2b00 cmp r3, #0 800fc28: f040 80a0 bne.w 800fd6c { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800fc2c: 687b ldr r3, [r7, #4] 800fc2e: 681b ldr r3, [r3, #0] 800fc30: 673b str r3, [r7, #112] @ 0x70 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fc32: 6f3b ldr r3, [r7, #112] @ 0x70 800fc34: e853 3f00 ldrex r3, [r3] 800fc38: 66fb str r3, [r7, #108] @ 0x6c return(result); 800fc3a: 6efb ldr r3, [r7, #108] @ 0x6c 800fc3c: f423 7380 bic.w r3, r3, #256 @ 0x100 800fc40: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800fc44: 687b ldr r3, [r7, #4] 800fc46: 681b ldr r3, [r3, #0] 800fc48: 461a mov r2, r3 800fc4a: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800fc4e: 67fb str r3, [r7, #124] @ 0x7c 800fc50: 67ba str r2, [r7, #120] @ 0x78 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fc52: 6fb9 ldr r1, [r7, #120] @ 0x78 800fc54: 6ffa ldr r2, [r7, #124] @ 0x7c 800fc56: e841 2300 strex r3, r2, [r1] 800fc5a: 677b str r3, [r7, #116] @ 0x74 return(result); 800fc5c: 6f7b ldr r3, [r7, #116] @ 0x74 800fc5e: 2b00 cmp r3, #0 800fc60: d1e4 bne.n 800fc2c /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) and RX FIFO Threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800fc62: 687b ldr r3, [r7, #4] 800fc64: 681b ldr r3, [r3, #0] 800fc66: 3308 adds r3, #8 800fc68: 65fb str r3, [r7, #92] @ 0x5c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fc6a: 6dfb ldr r3, [r7, #92] @ 0x5c 800fc6c: e853 3f00 ldrex r3, [r3] 800fc70: 65bb str r3, [r7, #88] @ 0x58 return(result); 800fc72: 6dba ldr r2, [r7, #88] @ 0x58 800fc74: 4b6e ldr r3, [pc, #440] @ (800fe30 ) 800fc76: 4013 ands r3, r2 800fc78: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800fc7c: 687b ldr r3, [r7, #4] 800fc7e: 681b ldr r3, [r3, #0] 800fc80: 3308 adds r3, #8 800fc82: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800fc86: 66ba str r2, [r7, #104] @ 0x68 800fc88: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fc8a: 6e79 ldr r1, [r7, #100] @ 0x64 800fc8c: 6eba ldr r2, [r7, #104] @ 0x68 800fc8e: e841 2300 strex r3, r2, [r1] 800fc92: 663b str r3, [r7, #96] @ 0x60 return(result); 800fc94: 6e3b ldr r3, [r7, #96] @ 0x60 800fc96: 2b00 cmp r3, #0 800fc98: d1e3 bne.n 800fc62 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800fc9a: 687b ldr r3, [r7, #4] 800fc9c: 2220 movs r2, #32 800fc9e: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800fca2: 687b ldr r3, [r7, #4] 800fca4: 2200 movs r2, #0 800fca6: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800fca8: 687b ldr r3, [r7, #4] 800fcaa: 2200 movs r2, #0 800fcac: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800fcae: 687b ldr r3, [r7, #4] 800fcb0: 681b ldr r3, [r3, #0] 800fcb2: 4a60 ldr r2, [pc, #384] @ (800fe34 ) 800fcb4: 4293 cmp r3, r2 800fcb6: d021 beq.n 800fcfc { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800fcb8: 687b ldr r3, [r7, #4] 800fcba: 681b ldr r3, [r3, #0] 800fcbc: 685b ldr r3, [r3, #4] 800fcbe: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800fcc2: 2b00 cmp r3, #0 800fcc4: d01a beq.n 800fcfc { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800fcc6: 687b ldr r3, [r7, #4] 800fcc8: 681b ldr r3, [r3, #0] 800fcca: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fccc: 6cbb ldr r3, [r7, #72] @ 0x48 800fcce: e853 3f00 ldrex r3, [r3] 800fcd2: 647b str r3, [r7, #68] @ 0x44 return(result); 800fcd4: 6c7b ldr r3, [r7, #68] @ 0x44 800fcd6: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800fcda: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800fcde: 687b ldr r3, [r7, #4] 800fce0: 681b ldr r3, [r3, #0] 800fce2: 461a mov r2, r3 800fce4: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 800fce8: 657b str r3, [r7, #84] @ 0x54 800fcea: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fcec: 6d39 ldr r1, [r7, #80] @ 0x50 800fcee: 6d7a ldr r2, [r7, #84] @ 0x54 800fcf0: e841 2300 strex r3, r2, [r1] 800fcf4: 64fb str r3, [r7, #76] @ 0x4c return(result); 800fcf6: 6cfb ldr r3, [r7, #76] @ 0x4c 800fcf8: 2b00 cmp r3, #0 800fcfa: d1e4 bne.n 800fcc6 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800fcfc: 687b ldr r3, [r7, #4] 800fcfe: 6edb ldr r3, [r3, #108] @ 0x6c 800fd00: 2b01 cmp r3, #1 800fd02: d130 bne.n 800fd66 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800fd04: 687b ldr r3, [r7, #4] 800fd06: 2200 movs r2, #0 800fd08: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800fd0a: 687b ldr r3, [r7, #4] 800fd0c: 681b ldr r3, [r3, #0] 800fd0e: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fd10: 6b7b ldr r3, [r7, #52] @ 0x34 800fd12: e853 3f00 ldrex r3, [r3] 800fd16: 633b str r3, [r7, #48] @ 0x30 return(result); 800fd18: 6b3b ldr r3, [r7, #48] @ 0x30 800fd1a: f023 0310 bic.w r3, r3, #16 800fd1e: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800fd22: 687b ldr r3, [r7, #4] 800fd24: 681b ldr r3, [r3, #0] 800fd26: 461a mov r2, r3 800fd28: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800fd2c: 643b str r3, [r7, #64] @ 0x40 800fd2e: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fd30: 6bf9 ldr r1, [r7, #60] @ 0x3c 800fd32: 6c3a ldr r2, [r7, #64] @ 0x40 800fd34: e841 2300 strex r3, r2, [r1] 800fd38: 63bb str r3, [r7, #56] @ 0x38 return(result); 800fd3a: 6bbb ldr r3, [r7, #56] @ 0x38 800fd3c: 2b00 cmp r3, #0 800fd3e: d1e4 bne.n 800fd0a if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800fd40: 687b ldr r3, [r7, #4] 800fd42: 681b ldr r3, [r3, #0] 800fd44: 69db ldr r3, [r3, #28] 800fd46: f003 0310 and.w r3, r3, #16 800fd4a: 2b10 cmp r3, #16 800fd4c: d103 bne.n 800fd56 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800fd4e: 687b ldr r3, [r7, #4] 800fd50: 681b ldr r3, [r3, #0] 800fd52: 2210 movs r2, #16 800fd54: 621a str r2, [r3, #32] #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx Event callback*/ huart->RxEventCallback(huart, huart->RxXferSize); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize); 800fd56: 687b ldr r3, [r7, #4] 800fd58: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800fd5c: 4619 mov r1, r3 800fd5e: 6878 ldr r0, [r7, #4] 800fd60: f7f4 fc9a bl 8004698 800fd64: e002 b.n 800fd6c #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx complete callback*/ huart->RxCpltCallback(huart); #else /*Call legacy weak Rx complete callback*/ HAL_UART_RxCpltCallback(huart); 800fd66: 6878 ldr r0, [r7, #4] 800fd68: f7f4 fc8c bl 8004684 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800fd6c: f8b7 309e ldrh.w r3, [r7, #158] @ 0x9e 800fd70: 2b00 cmp r3, #0 800fd72: d006 beq.n 800fd82 800fd74: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fd78: f003 0320 and.w r3, r3, #32 800fd7c: 2b00 cmp r3, #0 800fd7e: f47f aed1 bne.w 800fb24 /* When remaining number of bytes to receive is less than the RX FIFO threshold, next incoming frames are processed as if FIFO mode was disabled (i.e. one interrupt per received frame). */ rxdatacount = huart->RxXferCount; 800fd82: 687b ldr r3, [r7, #4] 800fd84: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fd88: f8a7 308a strh.w r3, [r7, #138] @ 0x8a if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 800fd8c: f8b7 308a ldrh.w r3, [r7, #138] @ 0x8a 800fd90: 2b00 cmp r3, #0 800fd92: d049 beq.n 800fe28 800fd94: 687b ldr r3, [r7, #4] 800fd96: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800fd9a: f8b7 208a ldrh.w r2, [r7, #138] @ 0x8a 800fd9e: 429a cmp r2, r3 800fda0: d242 bcs.n 800fe28 { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800fda2: 687b ldr r3, [r7, #4] 800fda4: 681b ldr r3, [r3, #0] 800fda6: 3308 adds r3, #8 800fda8: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fdaa: 6a3b ldr r3, [r7, #32] 800fdac: e853 3f00 ldrex r3, [r3] 800fdb0: 61fb str r3, [r7, #28] return(result); 800fdb2: 69fb ldr r3, [r7, #28] 800fdb4: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800fdb8: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800fdbc: 687b ldr r3, [r7, #4] 800fdbe: 681b ldr r3, [r3, #0] 800fdc0: 3308 adds r3, #8 800fdc2: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800fdc6: 62fa str r2, [r7, #44] @ 0x2c 800fdc8: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fdca: 6ab9 ldr r1, [r7, #40] @ 0x28 800fdcc: 6afa ldr r2, [r7, #44] @ 0x2c 800fdce: e841 2300 strex r3, r2, [r1] 800fdd2: 627b str r3, [r7, #36] @ 0x24 return(result); 800fdd4: 6a7b ldr r3, [r7, #36] @ 0x24 800fdd6: 2b00 cmp r3, #0 800fdd8: d1e3 bne.n 800fda2 /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_8BIT; 800fdda: 687b ldr r3, [r7, #4] 800fddc: 4a16 ldr r2, [pc, #88] @ (800fe38 ) 800fdde: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800fde0: 687b ldr r3, [r7, #4] 800fde2: 681b ldr r3, [r3, #0] 800fde4: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fde6: 68fb ldr r3, [r7, #12] 800fde8: e853 3f00 ldrex r3, [r3] 800fdec: 60bb str r3, [r7, #8] return(result); 800fdee: 68bb ldr r3, [r7, #8] 800fdf0: f043 0320 orr.w r3, r3, #32 800fdf4: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800fdf8: 687b ldr r3, [r7, #4] 800fdfa: 681b ldr r3, [r3, #0] 800fdfc: 461a mov r2, r3 800fdfe: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800fe02: 61bb str r3, [r7, #24] 800fe04: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fe06: 6979 ldr r1, [r7, #20] 800fe08: 69ba ldr r2, [r7, #24] 800fe0a: e841 2300 strex r3, r2, [r1] 800fe0e: 613b str r3, [r7, #16] return(result); 800fe10: 693b ldr r3, [r7, #16] 800fe12: 2b00 cmp r3, #0 800fe14: d1e4 bne.n 800fde0 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800fe16: e007 b.n 800fe28 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800fe18: 687b ldr r3, [r7, #4] 800fe1a: 681b ldr r3, [r3, #0] 800fe1c: 699a ldr r2, [r3, #24] 800fe1e: 687b ldr r3, [r7, #4] 800fe20: 681b ldr r3, [r3, #0] 800fe22: f042 0208 orr.w r2, r2, #8 800fe26: 619a str r2, [r3, #24] } 800fe28: bf00 nop 800fe2a: 37b0 adds r7, #176 @ 0xb0 800fe2c: 46bd mov sp, r7 800fe2e: bd80 pop {r7, pc} 800fe30: effffffe .word 0xeffffffe 800fe34: 58000c00 .word 0x58000c00 800fe38: 0800f76d .word 0x0800f76d 0800fe3c : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800fe3c: b580 push {r7, lr} 800fe3e: b0ae sub sp, #184 @ 0xb8 800fe40: af00 add r7, sp, #0 800fe42: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800fe44: 687b ldr r3, [r7, #4] 800fe46: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800fe4a: f8a7 30b2 strh.w r3, [r7, #178] @ 0xb2 uint16_t uhdata; uint16_t nb_rx_data; uint16_t rxdatacount; uint32_t isrflags = READ_REG(huart->Instance->ISR); 800fe4e: 687b ldr r3, [r7, #4] 800fe50: 681b ldr r3, [r3, #0] 800fe52: 69db ldr r3, [r3, #28] 800fe54: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800fe58: 687b ldr r3, [r7, #4] 800fe5a: 681b ldr r3, [r3, #0] 800fe5c: 681b ldr r3, [r3, #0] 800fe5e: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr3its = READ_REG(huart->Instance->CR3); 800fe62: 687b ldr r3, [r7, #4] 800fe64: 681b ldr r3, [r3, #0] 800fe66: 689b ldr r3, [r3, #8] 800fe68: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800fe6c: 687b ldr r3, [r7, #4] 800fe6e: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800fe72: 2b22 cmp r3, #34 @ 0x22 800fe74: f040 8184 bne.w 8010180 { nb_rx_data = huart->NbRxDataToProcess; 800fe78: 687b ldr r3, [r7, #4] 800fe7a: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800fe7e: f8a7 30a6 strh.w r3, [r7, #166] @ 0xa6 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800fe82: e127 b.n 80100d4 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800fe84: 687b ldr r3, [r7, #4] 800fe86: 681b ldr r3, [r3, #0] 800fe88: 6a5b ldr r3, [r3, #36] @ 0x24 800fe8a: f8a7 30a4 strh.w r3, [r7, #164] @ 0xa4 tmp = (uint16_t *) huart->pRxBuffPtr ; 800fe8e: 687b ldr r3, [r7, #4] 800fe90: 6d9b ldr r3, [r3, #88] @ 0x58 800fe92: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 *tmp = (uint16_t)(uhdata & uhMask); 800fe96: f8b7 20a4 ldrh.w r2, [r7, #164] @ 0xa4 800fe9a: f8b7 30b2 ldrh.w r3, [r7, #178] @ 0xb2 800fe9e: 4013 ands r3, r2 800fea0: b29a uxth r2, r3 800fea2: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fea6: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800fea8: 687b ldr r3, [r7, #4] 800feaa: 6d9b ldr r3, [r3, #88] @ 0x58 800feac: 1c9a adds r2, r3, #2 800feae: 687b ldr r3, [r7, #4] 800feb0: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800feb2: 687b ldr r3, [r7, #4] 800feb4: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800feb8: b29b uxth r3, r3 800feba: 3b01 subs r3, #1 800febc: b29a uxth r2, r3 800febe: 687b ldr r3, [r7, #4] 800fec0: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800fec4: 687b ldr r3, [r7, #4] 800fec6: 681b ldr r3, [r3, #0] 800fec8: 69db ldr r3, [r3, #28] 800feca: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 /* If some non blocking errors occurred */ if ((isrflags & (USART_ISR_PE | USART_ISR_FE | USART_ISR_NE)) != 0U) 800fece: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800fed2: f003 0307 and.w r3, r3, #7 800fed6: 2b00 cmp r3, #0 800fed8: d053 beq.n 800ff82 { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800feda: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800fede: f003 0301 and.w r3, r3, #1 800fee2: 2b00 cmp r3, #0 800fee4: d011 beq.n 800ff0a 800fee6: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800feea: f403 7380 and.w r3, r3, #256 @ 0x100 800feee: 2b00 cmp r3, #0 800fef0: d00b beq.n 800ff0a { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800fef2: 687b ldr r3, [r7, #4] 800fef4: 681b ldr r3, [r3, #0] 800fef6: 2201 movs r2, #1 800fef8: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800fefa: 687b ldr r3, [r7, #4] 800fefc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff00: f043 0201 orr.w r2, r3, #1 800ff04: 687b ldr r3, [r7, #4] 800ff06: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800ff0a: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800ff0e: f003 0302 and.w r3, r3, #2 800ff12: 2b00 cmp r3, #0 800ff14: d011 beq.n 800ff3a 800ff16: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800ff1a: f003 0301 and.w r3, r3, #1 800ff1e: 2b00 cmp r3, #0 800ff20: d00b beq.n 800ff3a { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800ff22: 687b ldr r3, [r7, #4] 800ff24: 681b ldr r3, [r3, #0] 800ff26: 2202 movs r2, #2 800ff28: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800ff2a: 687b ldr r3, [r7, #4] 800ff2c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff30: f043 0204 orr.w r2, r3, #4 800ff34: 687b ldr r3, [r7, #4] 800ff36: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800ff3a: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800ff3e: f003 0304 and.w r3, r3, #4 800ff42: 2b00 cmp r3, #0 800ff44: d011 beq.n 800ff6a 800ff46: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800ff4a: f003 0301 and.w r3, r3, #1 800ff4e: 2b00 cmp r3, #0 800ff50: d00b beq.n 800ff6a { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800ff52: 687b ldr r3, [r7, #4] 800ff54: 681b ldr r3, [r3, #0] 800ff56: 2204 movs r2, #4 800ff58: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800ff5a: 687b ldr r3, [r7, #4] 800ff5c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff60: f043 0202 orr.w r2, r3, #2 800ff64: 687b ldr r3, [r7, #4] 800ff66: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800ff6a: 687b ldr r3, [r7, #4] 800ff6c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff70: 2b00 cmp r3, #0 800ff72: d006 beq.n 800ff82 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800ff74: 6878 ldr r0, [r7, #4] 800ff76: f7fe f961 bl 800e23c #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800ff7a: 687b ldr r3, [r7, #4] 800ff7c: 2200 movs r2, #0 800ff7e: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800ff82: 687b ldr r3, [r7, #4] 800ff84: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ff88: b29b uxth r3, r3 800ff8a: 2b00 cmp r3, #0 800ff8c: f040 80a2 bne.w 80100d4 { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800ff90: 687b ldr r3, [r7, #4] 800ff92: 681b ldr r3, [r3, #0] 800ff94: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ff96: 6f7b ldr r3, [r7, #116] @ 0x74 800ff98: e853 3f00 ldrex r3, [r3] 800ff9c: 673b str r3, [r7, #112] @ 0x70 return(result); 800ff9e: 6f3b ldr r3, [r7, #112] @ 0x70 800ffa0: f423 7380 bic.w r3, r3, #256 @ 0x100 800ffa4: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800ffa8: 687b ldr r3, [r7, #4] 800ffaa: 681b ldr r3, [r3, #0] 800ffac: 461a mov r2, r3 800ffae: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800ffb2: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800ffb6: 67fa str r2, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ffb8: 6ff9 ldr r1, [r7, #124] @ 0x7c 800ffba: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800ffbe: e841 2300 strex r3, r2, [r1] 800ffc2: 67bb str r3, [r7, #120] @ 0x78 return(result); 800ffc4: 6fbb ldr r3, [r7, #120] @ 0x78 800ffc6: 2b00 cmp r3, #0 800ffc8: d1e2 bne.n 800ff90 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) and RX FIFO Threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800ffca: 687b ldr r3, [r7, #4] 800ffcc: 681b ldr r3, [r3, #0] 800ffce: 3308 adds r3, #8 800ffd0: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ffd2: 6e3b ldr r3, [r7, #96] @ 0x60 800ffd4: e853 3f00 ldrex r3, [r3] 800ffd8: 65fb str r3, [r7, #92] @ 0x5c return(result); 800ffda: 6dfa ldr r2, [r7, #92] @ 0x5c 800ffdc: 4b6e ldr r3, [pc, #440] @ (8010198 ) 800ffde: 4013 ands r3, r2 800ffe0: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800ffe4: 687b ldr r3, [r7, #4] 800ffe6: 681b ldr r3, [r3, #0] 800ffe8: 3308 adds r3, #8 800ffea: f8d7 2098 ldr.w r2, [r7, #152] @ 0x98 800ffee: 66fa str r2, [r7, #108] @ 0x6c 800fff0: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fff2: 6eb9 ldr r1, [r7, #104] @ 0x68 800fff4: 6efa ldr r2, [r7, #108] @ 0x6c 800fff6: e841 2300 strex r3, r2, [r1] 800fffa: 667b str r3, [r7, #100] @ 0x64 return(result); 800fffc: 6e7b ldr r3, [r7, #100] @ 0x64 800fffe: 2b00 cmp r3, #0 8010000: d1e3 bne.n 800ffca /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 8010002: 687b ldr r3, [r7, #4] 8010004: 2220 movs r2, #32 8010006: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 801000a: 687b ldr r3, [r7, #4] 801000c: 2200 movs r2, #0 801000e: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 8010010: 687b ldr r3, [r7, #4] 8010012: 2200 movs r2, #0 8010014: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 8010016: 687b ldr r3, [r7, #4] 8010018: 681b ldr r3, [r3, #0] 801001a: 4a60 ldr r2, [pc, #384] @ (801019c ) 801001c: 4293 cmp r3, r2 801001e: d021 beq.n 8010064 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 8010020: 687b ldr r3, [r7, #4] 8010022: 681b ldr r3, [r3, #0] 8010024: 685b ldr r3, [r3, #4] 8010026: f403 0300 and.w r3, r3, #8388608 @ 0x800000 801002a: 2b00 cmp r3, #0 801002c: d01a beq.n 8010064 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 801002e: 687b ldr r3, [r7, #4] 8010030: 681b ldr r3, [r3, #0] 8010032: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 8010034: 6cfb ldr r3, [r7, #76] @ 0x4c 8010036: e853 3f00 ldrex r3, [r3] 801003a: 64bb str r3, [r7, #72] @ 0x48 return(result); 801003c: 6cbb ldr r3, [r7, #72] @ 0x48 801003e: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 8010042: f8c7 3094 str.w r3, [r7, #148] @ 0x94 8010046: 687b ldr r3, [r7, #4] 8010048: 681b ldr r3, [r3, #0] 801004a: 461a mov r2, r3 801004c: f8d7 3094 ldr.w r3, [r7, #148] @ 0x94 8010050: 65bb str r3, [r7, #88] @ 0x58 8010052: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 8010054: 6d79 ldr r1, [r7, #84] @ 0x54 8010056: 6dba ldr r2, [r7, #88] @ 0x58 8010058: e841 2300 strex r3, r2, [r1] 801005c: 653b str r3, [r7, #80] @ 0x50 return(result); 801005e: 6d3b ldr r3, [r7, #80] @ 0x50 8010060: 2b00 cmp r3, #0 8010062: d1e4 bne.n 801002e } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 8010064: 687b ldr r3, [r7, #4] 8010066: 6edb ldr r3, [r3, #108] @ 0x6c 8010068: 2b01 cmp r3, #1 801006a: d130 bne.n 80100ce { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 801006c: 687b ldr r3, [r7, #4] 801006e: 2200 movs r2, #0 8010070: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 8010072: 687b ldr r3, [r7, #4] 8010074: 681b ldr r3, [r3, #0] 8010076: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 8010078: 6bbb ldr r3, [r7, #56] @ 0x38 801007a: e853 3f00 ldrex r3, [r3] 801007e: 637b str r3, [r7, #52] @ 0x34 return(result); 8010080: 6b7b ldr r3, [r7, #52] @ 0x34 8010082: f023 0310 bic.w r3, r3, #16 8010086: f8c7 3090 str.w r3, [r7, #144] @ 0x90 801008a: 687b ldr r3, [r7, #4] 801008c: 681b ldr r3, [r3, #0] 801008e: 461a mov r2, r3 8010090: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 8010094: 647b str r3, [r7, #68] @ 0x44 8010096: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 8010098: 6c39 ldr r1, [r7, #64] @ 0x40 801009a: 6c7a ldr r2, [r7, #68] @ 0x44 801009c: e841 2300 strex r3, r2, [r1] 80100a0: 63fb str r3, [r7, #60] @ 0x3c return(result); 80100a2: 6bfb ldr r3, [r7, #60] @ 0x3c 80100a4: 2b00 cmp r3, #0 80100a6: d1e4 bne.n 8010072 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 80100a8: 687b ldr r3, [r7, #4] 80100aa: 681b ldr r3, [r3, #0] 80100ac: 69db ldr r3, [r3, #28] 80100ae: f003 0310 and.w r3, r3, #16 80100b2: 2b10 cmp r3, #16 80100b4: d103 bne.n 80100be { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 80100b6: 687b ldr r3, [r7, #4] 80100b8: 681b ldr r3, [r3, #0] 80100ba: 2210 movs r2, #16 80100bc: 621a str r2, [r3, #32] #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx Event callback*/ huart->RxEventCallback(huart, huart->RxXferSize); #else /*Call legacy weak Rx Event callback*/ HAL_UARTEx_RxEventCallback(huart, huart->RxXferSize); 80100be: 687b ldr r3, [r7, #4] 80100c0: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 80100c4: 4619 mov r1, r3 80100c6: 6878 ldr r0, [r7, #4] 80100c8: f7f4 fae6 bl 8004698 80100cc: e002 b.n 80100d4 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered Rx complete callback*/ huart->RxCpltCallback(huart); #else /*Call legacy weak Rx complete callback*/ HAL_UART_RxCpltCallback(huart); 80100ce: 6878 ldr r0, [r7, #4] 80100d0: f7f4 fad8 bl 8004684 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 80100d4: f8b7 30a6 ldrh.w r3, [r7, #166] @ 0xa6 80100d8: 2b00 cmp r3, #0 80100da: d006 beq.n 80100ea 80100dc: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 80100e0: f003 0320 and.w r3, r3, #32 80100e4: 2b00 cmp r3, #0 80100e6: f47f aecd bne.w 800fe84 /* When remaining number of bytes to receive is less than the RX FIFO threshold, next incoming frames are processed as if FIFO mode was disabled (i.e. one interrupt per received frame). */ rxdatacount = huart->RxXferCount; 80100ea: 687b ldr r3, [r7, #4] 80100ec: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 80100f0: f8a7 308e strh.w r3, [r7, #142] @ 0x8e if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 80100f4: f8b7 308e ldrh.w r3, [r7, #142] @ 0x8e 80100f8: 2b00 cmp r3, #0 80100fa: d049 beq.n 8010190 80100fc: 687b ldr r3, [r7, #4] 80100fe: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 8010102: f8b7 208e ldrh.w r2, [r7, #142] @ 0x8e 8010106: 429a cmp r2, r3 8010108: d242 bcs.n 8010190 { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 801010a: 687b ldr r3, [r7, #4] 801010c: 681b ldr r3, [r3, #0] 801010e: 3308 adds r3, #8 8010110: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 8010112: 6a7b ldr r3, [r7, #36] @ 0x24 8010114: e853 3f00 ldrex r3, [r3] 8010118: 623b str r3, [r7, #32] return(result); 801011a: 6a3b ldr r3, [r7, #32] 801011c: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 8010120: f8c7 3088 str.w r3, [r7, #136] @ 0x88 8010124: 687b ldr r3, [r7, #4] 8010126: 681b ldr r3, [r3, #0] 8010128: 3308 adds r3, #8 801012a: f8d7 2088 ldr.w r2, [r7, #136] @ 0x88 801012e: 633a str r2, [r7, #48] @ 0x30 8010130: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 8010132: 6af9 ldr r1, [r7, #44] @ 0x2c 8010134: 6b3a ldr r2, [r7, #48] @ 0x30 8010136: e841 2300 strex r3, r2, [r1] 801013a: 62bb str r3, [r7, #40] @ 0x28 return(result); 801013c: 6abb ldr r3, [r7, #40] @ 0x28 801013e: 2b00 cmp r3, #0 8010140: d1e3 bne.n 801010a /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_16BIT; 8010142: 687b ldr r3, [r7, #4] 8010144: 4a16 ldr r2, [pc, #88] @ (80101a0 ) 8010146: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 8010148: 687b ldr r3, [r7, #4] 801014a: 681b ldr r3, [r3, #0] 801014c: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 801014e: 693b ldr r3, [r7, #16] 8010150: e853 3f00 ldrex r3, [r3] 8010154: 60fb str r3, [r7, #12] return(result); 8010156: 68fb ldr r3, [r7, #12] 8010158: f043 0320 orr.w r3, r3, #32 801015c: f8c7 3084 str.w r3, [r7, #132] @ 0x84 8010160: 687b ldr r3, [r7, #4] 8010162: 681b ldr r3, [r3, #0] 8010164: 461a mov r2, r3 8010166: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 801016a: 61fb str r3, [r7, #28] 801016c: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 801016e: 69b9 ldr r1, [r7, #24] 8010170: 69fa ldr r2, [r7, #28] 8010172: e841 2300 strex r3, r2, [r1] 8010176: 617b str r3, [r7, #20] return(result); 8010178: 697b ldr r3, [r7, #20] 801017a: 2b00 cmp r3, #0 801017c: d1e4 bne.n 8010148 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 801017e: e007 b.n 8010190 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 8010180: 687b ldr r3, [r7, #4] 8010182: 681b ldr r3, [r3, #0] 8010184: 699a ldr r2, [r3, #24] 8010186: 687b ldr r3, [r7, #4] 8010188: 681b ldr r3, [r3, #0] 801018a: f042 0208 orr.w r2, r2, #8 801018e: 619a str r2, [r3, #24] } 8010190: bf00 nop 8010192: 37b8 adds r7, #184 @ 0xb8 8010194: 46bd mov sp, r7 8010196: bd80 pop {r7, pc} 8010198: effffffe .word 0xeffffffe 801019c: 58000c00 .word 0x58000c00 80101a0: 0800f925 .word 0x0800f925 080101a4 : * @brief UART wakeup from Stop mode callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart) { 80101a4: b480 push {r7} 80101a6: b083 sub sp, #12 80101a8: af00 add r7, sp, #0 80101aa: 6078 str r0, [r7, #4] UNUSED(huart); /* NOTE : This function should not be modified, when the callback is needed, the HAL_UARTEx_WakeupCallback can be implemented in the user file. */ } 80101ac: bf00 nop 80101ae: 370c adds r7, #12 80101b0: 46bd mov sp, r7 80101b2: f85d 7b04 ldr.w r7, [sp], #4 80101b6: 4770 bx lr 080101b8 : * @brief UART RX Fifo full callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_RxFifoFullCallback(UART_HandleTypeDef *huart) { 80101b8: b480 push {r7} 80101ba: b083 sub sp, #12 80101bc: af00 add r7, sp, #0 80101be: 6078 str r0, [r7, #4] UNUSED(huart); /* NOTE : This function should not be modified, when the callback is needed, the HAL_UARTEx_RxFifoFullCallback can be implemented in the user file. */ } 80101c0: bf00 nop 80101c2: 370c adds r7, #12 80101c4: 46bd mov sp, r7 80101c6: f85d 7b04 ldr.w r7, [sp], #4 80101ca: 4770 bx lr 080101cc : * @brief UART TX Fifo empty callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_TxFifoEmptyCallback(UART_HandleTypeDef *huart) { 80101cc: b480 push {r7} 80101ce: b083 sub sp, #12 80101d0: af00 add r7, sp, #0 80101d2: 6078 str r0, [r7, #4] UNUSED(huart); /* NOTE : This function should not be modified, when the callback is needed, the HAL_UARTEx_TxFifoEmptyCallback can be implemented in the user file. */ } 80101d4: bf00 nop 80101d6: 370c adds r7, #12 80101d8: 46bd mov sp, r7 80101da: f85d 7b04 ldr.w r7, [sp], #4 80101de: 4770 bx lr 080101e0 : * @brief Disable the FIFO mode. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_DisableFifoMode(UART_HandleTypeDef *huart) { 80101e0: b480 push {r7} 80101e2: b085 sub sp, #20 80101e4: af00 add r7, sp, #0 80101e6: 6078 str r0, [r7, #4] /* Check parameters */ assert_param(IS_UART_FIFO_INSTANCE(huart->Instance)); /* Process Locked */ __HAL_LOCK(huart); 80101e8: 687b ldr r3, [r7, #4] 80101ea: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 80101ee: 2b01 cmp r3, #1 80101f0: d101 bne.n 80101f6 80101f2: 2302 movs r3, #2 80101f4: e027 b.n 8010246 80101f6: 687b ldr r3, [r7, #4] 80101f8: 2201 movs r2, #1 80101fa: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 80101fe: 687b ldr r3, [r7, #4] 8010200: 2224 movs r2, #36 @ 0x24 8010202: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 8010206: 687b ldr r3, [r7, #4] 8010208: 681b ldr r3, [r3, #0] 801020a: 681b ldr r3, [r3, #0] 801020c: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 801020e: 687b ldr r3, [r7, #4] 8010210: 681b ldr r3, [r3, #0] 8010212: 681a ldr r2, [r3, #0] 8010214: 687b ldr r3, [r7, #4] 8010216: 681b ldr r3, [r3, #0] 8010218: f022 0201 bic.w r2, r2, #1 801021c: 601a str r2, [r3, #0] /* Enable FIFO mode */ CLEAR_BIT(tmpcr1, USART_CR1_FIFOEN); 801021e: 68fb ldr r3, [r7, #12] 8010220: f023 5300 bic.w r3, r3, #536870912 @ 0x20000000 8010224: 60fb str r3, [r7, #12] huart->FifoMode = UART_FIFOMODE_DISABLE; 8010226: 687b ldr r3, [r7, #4] 8010228: 2200 movs r2, #0 801022a: 665a str r2, [r3, #100] @ 0x64 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 801022c: 687b ldr r3, [r7, #4] 801022e: 681b ldr r3, [r3, #0] 8010230: 68fa ldr r2, [r7, #12] 8010232: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 8010234: 687b ldr r3, [r7, #4] 8010236: 2220 movs r2, #32 8010238: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 801023c: 687b ldr r3, [r7, #4] 801023e: 2200 movs r2, #0 8010240: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 8010244: 2300 movs r3, #0 } 8010246: 4618 mov r0, r3 8010248: 3714 adds r7, #20 801024a: 46bd mov sp, r7 801024c: f85d 7b04 ldr.w r7, [sp], #4 8010250: 4770 bx lr 08010252 : * @arg @ref UART_TXFIFO_THRESHOLD_7_8 * @arg @ref UART_TXFIFO_THRESHOLD_8_8 * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_SetTxFifoThreshold(UART_HandleTypeDef *huart, uint32_t Threshold) { 8010252: b580 push {r7, lr} 8010254: b084 sub sp, #16 8010256: af00 add r7, sp, #0 8010258: 6078 str r0, [r7, #4] 801025a: 6039 str r1, [r7, #0] /* Check parameters */ assert_param(IS_UART_FIFO_INSTANCE(huart->Instance)); assert_param(IS_UART_TXFIFO_THRESHOLD(Threshold)); /* Process Locked */ __HAL_LOCK(huart); 801025c: 687b ldr r3, [r7, #4] 801025e: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 8010262: 2b01 cmp r3, #1 8010264: d101 bne.n 801026a 8010266: 2302 movs r3, #2 8010268: e02d b.n 80102c6 801026a: 687b ldr r3, [r7, #4] 801026c: 2201 movs r2, #1 801026e: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 8010272: 687b ldr r3, [r7, #4] 8010274: 2224 movs r2, #36 @ 0x24 8010276: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 801027a: 687b ldr r3, [r7, #4] 801027c: 681b ldr r3, [r3, #0] 801027e: 681b ldr r3, [r3, #0] 8010280: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 8010282: 687b ldr r3, [r7, #4] 8010284: 681b ldr r3, [r3, #0] 8010286: 681a ldr r2, [r3, #0] 8010288: 687b ldr r3, [r7, #4] 801028a: 681b ldr r3, [r3, #0] 801028c: f022 0201 bic.w r2, r2, #1 8010290: 601a str r2, [r3, #0] /* Update TX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_TXFTCFG, Threshold); 8010292: 687b ldr r3, [r7, #4] 8010294: 681b ldr r3, [r3, #0] 8010296: 689b ldr r3, [r3, #8] 8010298: f023 4160 bic.w r1, r3, #3758096384 @ 0xe0000000 801029c: 687b ldr r3, [r7, #4] 801029e: 681b ldr r3, [r3, #0] 80102a0: 683a ldr r2, [r7, #0] 80102a2: 430a orrs r2, r1 80102a4: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 80102a6: 6878 ldr r0, [r7, #4] 80102a8: f000 f8a0 bl 80103ec /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 80102ac: 687b ldr r3, [r7, #4] 80102ae: 681b ldr r3, [r3, #0] 80102b0: 68fa ldr r2, [r7, #12] 80102b2: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 80102b4: 687b ldr r3, [r7, #4] 80102b6: 2220 movs r2, #32 80102b8: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 80102bc: 687b ldr r3, [r7, #4] 80102be: 2200 movs r2, #0 80102c0: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 80102c4: 2300 movs r3, #0 } 80102c6: 4618 mov r0, r3 80102c8: 3710 adds r7, #16 80102ca: 46bd mov sp, r7 80102cc: bd80 pop {r7, pc} 080102ce : * @arg @ref UART_RXFIFO_THRESHOLD_7_8 * @arg @ref UART_RXFIFO_THRESHOLD_8_8 * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_SetRxFifoThreshold(UART_HandleTypeDef *huart, uint32_t Threshold) { 80102ce: b580 push {r7, lr} 80102d0: b084 sub sp, #16 80102d2: af00 add r7, sp, #0 80102d4: 6078 str r0, [r7, #4] 80102d6: 6039 str r1, [r7, #0] /* Check the parameters */ assert_param(IS_UART_FIFO_INSTANCE(huart->Instance)); assert_param(IS_UART_RXFIFO_THRESHOLD(Threshold)); /* Process Locked */ __HAL_LOCK(huart); 80102d8: 687b ldr r3, [r7, #4] 80102da: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 80102de: 2b01 cmp r3, #1 80102e0: d101 bne.n 80102e6 80102e2: 2302 movs r3, #2 80102e4: e02d b.n 8010342 80102e6: 687b ldr r3, [r7, #4] 80102e8: 2201 movs r2, #1 80102ea: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 80102ee: 687b ldr r3, [r7, #4] 80102f0: 2224 movs r2, #36 @ 0x24 80102f2: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 80102f6: 687b ldr r3, [r7, #4] 80102f8: 681b ldr r3, [r3, #0] 80102fa: 681b ldr r3, [r3, #0] 80102fc: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 80102fe: 687b ldr r3, [r7, #4] 8010300: 681b ldr r3, [r3, #0] 8010302: 681a ldr r2, [r3, #0] 8010304: 687b ldr r3, [r7, #4] 8010306: 681b ldr r3, [r3, #0] 8010308: f022 0201 bic.w r2, r2, #1 801030c: 601a str r2, [r3, #0] /* Update RX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_RXFTCFG, Threshold); 801030e: 687b ldr r3, [r7, #4] 8010310: 681b ldr r3, [r3, #0] 8010312: 689b ldr r3, [r3, #8] 8010314: f023 6160 bic.w r1, r3, #234881024 @ 0xe000000 8010318: 687b ldr r3, [r7, #4] 801031a: 681b ldr r3, [r3, #0] 801031c: 683a ldr r2, [r7, #0] 801031e: 430a orrs r2, r1 8010320: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 8010322: 6878 ldr r0, [r7, #4] 8010324: f000 f862 bl 80103ec /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 8010328: 687b ldr r3, [r7, #4] 801032a: 681b ldr r3, [r3, #0] 801032c: 68fa ldr r2, [r7, #12] 801032e: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 8010330: 687b ldr r3, [r7, #4] 8010332: 2220 movs r2, #32 8010334: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 8010338: 687b ldr r3, [r7, #4] 801033a: 2200 movs r2, #0 801033c: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 8010340: 2300 movs r3, #0 } 8010342: 4618 mov r0, r3 8010344: 3710 adds r7, #16 8010346: 46bd mov sp, r7 8010348: bd80 pop {r7, pc} 0801034a : * @param pData Pointer to data buffer (uint8_t or uint16_t data elements). * @param Size Amount of data elements (uint8_t or uint16_t) to be received. * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size) { 801034a: b580 push {r7, lr} 801034c: b08c sub sp, #48 @ 0x30 801034e: af00 add r7, sp, #0 8010350: 60f8 str r0, [r7, #12] 8010352: 60b9 str r1, [r7, #8] 8010354: 4613 mov r3, r2 8010356: 80fb strh r3, [r7, #6] HAL_StatusTypeDef status = HAL_OK; 8010358: 2300 movs r3, #0 801035a: f887 302f strb.w r3, [r7, #47] @ 0x2f /* Check that a Rx process is not already ongoing */ if (huart->RxState == HAL_UART_STATE_READY) 801035e: 68fb ldr r3, [r7, #12] 8010360: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 8010364: 2b20 cmp r3, #32 8010366: d13b bne.n 80103e0 { if ((pData == NULL) || (Size == 0U)) 8010368: 68bb ldr r3, [r7, #8] 801036a: 2b00 cmp r3, #0 801036c: d002 beq.n 8010374 801036e: 88fb ldrh r3, [r7, #6] 8010370: 2b00 cmp r3, #0 8010372: d101 bne.n 8010378 { return HAL_ERROR; 8010374: 2301 movs r3, #1 8010376: e034 b.n 80103e2 } /* Set Reception type to reception till IDLE Event*/ huart->ReceptionType = HAL_UART_RECEPTION_TOIDLE; 8010378: 68fb ldr r3, [r7, #12] 801037a: 2201 movs r2, #1 801037c: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 801037e: 68fb ldr r3, [r7, #12] 8010380: 2200 movs r2, #0 8010382: 671a str r2, [r3, #112] @ 0x70 (void)UART_Start_Receive_IT(huart, pData, Size); 8010384: 88fb ldrh r3, [r7, #6] 8010386: 461a mov r2, r3 8010388: 68b9 ldr r1, [r7, #8] 801038a: 68f8 ldr r0, [r7, #12] 801038c: f7fe fe82 bl 800f094 if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 8010390: 68fb ldr r3, [r7, #12] 8010392: 6edb ldr r3, [r3, #108] @ 0x6c 8010394: 2b01 cmp r3, #1 8010396: d11d bne.n 80103d4 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 8010398: 68fb ldr r3, [r7, #12] 801039a: 681b ldr r3, [r3, #0] 801039c: 2210 movs r2, #16 801039e: 621a str r2, [r3, #32] ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 80103a0: 68fb ldr r3, [r7, #12] 80103a2: 681b ldr r3, [r3, #0] 80103a4: 61bb str r3, [r7, #24] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 80103a6: 69bb ldr r3, [r7, #24] 80103a8: e853 3f00 ldrex r3, [r3] 80103ac: 617b str r3, [r7, #20] return(result); 80103ae: 697b ldr r3, [r7, #20] 80103b0: f043 0310 orr.w r3, r3, #16 80103b4: 62bb str r3, [r7, #40] @ 0x28 80103b6: 68fb ldr r3, [r7, #12] 80103b8: 681b ldr r3, [r3, #0] 80103ba: 461a mov r2, r3 80103bc: 6abb ldr r3, [r7, #40] @ 0x28 80103be: 627b str r3, [r7, #36] @ 0x24 80103c0: 623a str r2, [r7, #32] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 80103c2: 6a39 ldr r1, [r7, #32] 80103c4: 6a7a ldr r2, [r7, #36] @ 0x24 80103c6: e841 2300 strex r3, r2, [r1] 80103ca: 61fb str r3, [r7, #28] return(result); 80103cc: 69fb ldr r3, [r7, #28] 80103ce: 2b00 cmp r3, #0 80103d0: d1e6 bne.n 80103a0 80103d2: e002 b.n 80103da { /* In case of errors already pending when reception is started, Interrupts may have already been raised and lead to reception abortion. (Overrun error for instance). In such case Reception Type has been reset to HAL_UART_RECEPTION_STANDARD. */ status = HAL_ERROR; 80103d4: 2301 movs r3, #1 80103d6: f887 302f strb.w r3, [r7, #47] @ 0x2f } return status; 80103da: f897 302f ldrb.w r3, [r7, #47] @ 0x2f 80103de: e000 b.n 80103e2 } else { return HAL_BUSY; 80103e0: 2302 movs r3, #2 } } 80103e2: 4618 mov r0, r3 80103e4: 3730 adds r7, #48 @ 0x30 80103e6: 46bd mov sp, r7 80103e8: bd80 pop {r7, pc} ... 080103ec : * the UART configuration registers. * @param huart UART handle. * @retval None */ static void UARTEx_SetNbDataToProcess(UART_HandleTypeDef *huart) { 80103ec: b480 push {r7} 80103ee: b085 sub sp, #20 80103f0: af00 add r7, sp, #0 80103f2: 6078 str r0, [r7, #4] uint8_t rx_fifo_threshold; uint8_t tx_fifo_threshold; static const uint8_t numerator[] = {1U, 1U, 1U, 3U, 7U, 1U, 0U, 0U}; static const uint8_t denominator[] = {8U, 4U, 2U, 4U, 8U, 1U, 1U, 1U}; if (huart->FifoMode == UART_FIFOMODE_DISABLE) 80103f4: 687b ldr r3, [r7, #4] 80103f6: 6e5b ldr r3, [r3, #100] @ 0x64 80103f8: 2b00 cmp r3, #0 80103fa: d108 bne.n 801040e { huart->NbTxDataToProcess = 1U; 80103fc: 687b ldr r3, [r7, #4] 80103fe: 2201 movs r2, #1 8010400: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1U; 8010404: 687b ldr r3, [r7, #4] 8010406: 2201 movs r2, #1 8010408: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / (uint16_t)denominator[tx_fifo_threshold]; huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / (uint16_t)denominator[rx_fifo_threshold]; } } 801040c: e031 b.n 8010472 rx_fifo_depth = RX_FIFO_DEPTH; 801040e: 2310 movs r3, #16 8010410: 73fb strb r3, [r7, #15] tx_fifo_depth = TX_FIFO_DEPTH; 8010412: 2310 movs r3, #16 8010414: 73bb strb r3, [r7, #14] rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos); 8010416: 687b ldr r3, [r7, #4] 8010418: 681b ldr r3, [r3, #0] 801041a: 689b ldr r3, [r3, #8] 801041c: 0e5b lsrs r3, r3, #25 801041e: b2db uxtb r3, r3 8010420: f003 0307 and.w r3, r3, #7 8010424: 737b strb r3, [r7, #13] tx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos); 8010426: 687b ldr r3, [r7, #4] 8010428: 681b ldr r3, [r3, #0] 801042a: 689b ldr r3, [r3, #8] 801042c: 0f5b lsrs r3, r3, #29 801042e: b2db uxtb r3, r3 8010430: f003 0307 and.w r3, r3, #7 8010434: 733b strb r3, [r7, #12] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 8010436: 7bbb ldrb r3, [r7, #14] 8010438: 7b3a ldrb r2, [r7, #12] 801043a: 4911 ldr r1, [pc, #68] @ (8010480 ) 801043c: 5c8a ldrb r2, [r1, r2] 801043e: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[tx_fifo_threshold]; 8010442: 7b3a ldrb r2, [r7, #12] 8010444: 490f ldr r1, [pc, #60] @ (8010484 ) 8010446: 5c8a ldrb r2, [r1, r2] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 8010448: fb93 f3f2 sdiv r3, r3, r2 801044c: b29a uxth r2, r3 801044e: 687b ldr r3, [r7, #4] 8010450: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 8010454: 7bfb ldrb r3, [r7, #15] 8010456: 7b7a ldrb r2, [r7, #13] 8010458: 4909 ldr r1, [pc, #36] @ (8010480 ) 801045a: 5c8a ldrb r2, [r1, r2] 801045c: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[rx_fifo_threshold]; 8010460: 7b7a ldrb r2, [r7, #13] 8010462: 4908 ldr r1, [pc, #32] @ (8010484 ) 8010464: 5c8a ldrb r2, [r1, r2] huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 8010466: fb93 f3f2 sdiv r3, r3, r2 801046a: b29a uxth r2, r3 801046c: 687b ldr r3, [r7, #4] 801046e: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } 8010472: bf00 nop 8010474: 3714 adds r7, #20 8010476: 46bd mov sp, r7 8010478: f85d 7b04 ldr.w r7, [sp], #4 801047c: 4770 bx lr 801047e: bf00 nop 8010480: 08031abc .word 0x08031abc 8010484: 08031ac4 .word 0x08031ac4 08010488 : /* USER CODE END OS_THREAD_ATTR_CMSIS_RTOS_V2 */ /* USER CODE BEGIN 2 */ /* ETH_CODE: workaround to call LOCK_TCPIP_CORE after tcpip_init in MX_LWIP_Init * This is to keep the code after MX code re-generation */ static inline void tcpip_init_wrap(tcpip_init_done_fn tcpip_init_done, void *arg){ 8010488: b580 push {r7, lr} 801048a: b082 sub sp, #8 801048c: af00 add r7, sp, #0 801048e: 6078 str r0, [r7, #4] 8010490: 6039 str r1, [r7, #0] tcpip_init(tcpip_init_done, arg); 8010492: 6839 ldr r1, [r7, #0] 8010494: 6878 ldr r0, [r7, #4] 8010496: f009 fa45 bl 8019924 LOCK_TCPIP_CORE(); 801049a: f000 fda1 bl 8010fe0 } 801049e: bf00 nop 80104a0: 3708 adds r7, #8 80104a2: 46bd mov sp, r7 80104a4: bd80 pop {r7, pc} ... 080104a8 : #define tcpip_init tcpip_init_wrap uint8_t is_link_up(void) { 80104a8: b480 push {r7} 80104aa: af00 add r7, sp, #0 return netif_is_up(&gnetif); 80104ac: 4b05 ldr r3, [pc, #20] @ (80104c4 ) 80104ae: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80104b2: f003 0301 and.w r3, r3, #1 80104b6: b2db uxtb r3, r3 } 80104b8: 4618 mov r0, r3 80104ba: 46bd mov sp, r7 80104bc: f85d 7b04 ldr.w r7, [sp], #4 80104c0: 4770 bx lr 80104c2: bf00 nop 80104c4: 24002254 .word 0x24002254 080104c8 : /** * LwIP initialization function */ void MX_LWIP_Init(void) { 80104c8: b580 push {r7, lr} 80104ca: b084 sub sp, #16 80104cc: af04 add r7, sp, #16 /* IP addresses initialization without DHCP (IPv4) */ ipaddr_aton(STATIC_IP, &ipaddr); ipaddr_aton(STATIC_MASK, &netmask); ipaddr_aton(STATIC_GW, &gw); #else ip_addr_set_zero_ip4(&ipaddr); 80104ce: 4b27 ldr r3, [pc, #156] @ (801056c ) 80104d0: 2200 movs r2, #0 80104d2: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&netmask); 80104d4: 4b26 ldr r3, [pc, #152] @ (8010570 ) 80104d6: 2200 movs r2, #0 80104d8: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&gw); 80104da: 4b26 ldr r3, [pc, #152] @ (8010574 ) 80104dc: 2200 movs r2, #0 80104de: 601a str r2, [r3, #0] #endif /* USER CODE END IP_ADDRESSES */ /* Initilialize the LwIP stack with RTOS */ tcpip_init( NULL, NULL ); 80104e0: 2100 movs r1, #0 80104e2: 2000 movs r0, #0 80104e4: f7ff ffd0 bl 8010488 // IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]); // IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]); // IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]); /* add the network interface (IPv4/IPv6) with RTOS */ netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 80104e8: 4b23 ldr r3, [pc, #140] @ (8010578 ) 80104ea: 9302 str r3, [sp, #8] 80104ec: 4b23 ldr r3, [pc, #140] @ (801057c ) 80104ee: 9301 str r3, [sp, #4] 80104f0: 2300 movs r3, #0 80104f2: 9300 str r3, [sp, #0] 80104f4: 4b1f ldr r3, [pc, #124] @ (8010574 ) 80104f6: 4a1e ldr r2, [pc, #120] @ (8010570 ) 80104f8: 491c ldr r1, [pc, #112] @ (801056c ) 80104fa: 4821 ldr r0, [pc, #132] @ (8010580 ) 80104fc: f00a f882 bl 801a604 /* Registers the default network interface */ netif_set_default(&gnetif); 8010500: 481f ldr r0, [pc, #124] @ (8010580 ) 8010502: f00a fa3d bl 801a980 if (netif_is_link_up(&gnetif)) 8010506: 4b1e ldr r3, [pc, #120] @ (8010580 ) 8010508: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801050c: 089b lsrs r3, r3, #2 801050e: f003 0301 and.w r3, r3, #1 8010512: b2db uxtb r3, r3 8010514: 2b00 cmp r3, #0 8010516: d003 beq.n 8010520 { /* When the netif is fully configured this function must be called */ netif_set_up(&gnetif); 8010518: 4819 ldr r0, [pc, #100] @ (8010580 ) 801051a: f00a fa41 bl 801a9a0 801051e: e002 b.n 8010526 } else { /* When the netif link is down this function must be called */ netif_set_down(&gnetif); 8010520: 4817 ldr r0, [pc, #92] @ (8010580 ) 8010522: f00a faab bl 801aa7c } /* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernet_link_status_updated); 8010526: 4917 ldr r1, [pc, #92] @ (8010584 ) 8010528: 4815 ldr r0, [pc, #84] @ (8010580 ) 801052a: f00a fb47 bl 801abbc /* Create the Ethernet link handler thread */ /* USER CODE BEGIN H7_OS_THREAD_NEW_CMSIS_RTOS_V2 */ memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 801052e: 2224 movs r2, #36 @ 0x24 8010530: 2100 movs r1, #0 8010532: 4815 ldr r0, [pc, #84] @ (8010588 ) 8010534: f01a fb2c bl 802ab90 attributes.name = "EthLink"; 8010538: 4b13 ldr r3, [pc, #76] @ (8010588 ) 801053a: 4a14 ldr r2, [pc, #80] @ (801058c ) 801053c: 601a str r2, [r3, #0] attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2; 801053e: 4b12 ldr r3, [pc, #72] @ (8010588 ) 8010540: f44f 6200 mov.w r2, #2048 @ 0x800 8010544: 615a str r2, [r3, #20] attributes.priority = osPriorityBelowNormal; 8010546: 4b10 ldr r3, [pc, #64] @ (8010588 ) 8010548: 2210 movs r2, #16 801054a: 619a str r2, [r3, #24] osThreadNew(ethernet_link_thread, &gnetif, &attributes); 801054c: 4a0e ldr r2, [pc, #56] @ (8010588 ) 801054e: 490c ldr r1, [pc, #48] @ (8010580 ) 8010550: 480f ldr r0, [pc, #60] @ (8010590 ) 8010552: f000 feee bl 8011332 /* USER CODE END H7_OS_THREAD_NEW_CMSIS_RTOS_V2 */ /* USER CODE BEGIN 3 */ /* Start DHCP negotiation for a network interface (IPv4) */ #if USE_DHCP netif_set_up(&gnetif); 8010556: 480a ldr r0, [pc, #40] @ (8010580 ) 8010558: f00a fa22 bl 801a9a0 dhcp_start(&gnetif); 801055c: 4808 ldr r0, [pc, #32] @ (8010580 ) 801055e: f012 fd0f bl 8022f80 #else netif_set_addr(&gnetif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); #endif /* ETH_CODE: call UNLOCK_TCPIP_CORE after we are done */ UNLOCK_TCPIP_CORE(); 8010562: f000 fd4d bl 8011000 /* USER CODE END 3 */ } 8010566: bf00 nop 8010568: 46bd mov sp, r7 801056a: bd80 pop {r7, pc} 801056c: 2400228c .word 0x2400228c 8010570: 24002290 .word 0x24002290 8010574: 24002294 .word 0x24002294 8010578: 0801983d .word 0x0801983d 801057c: 08010a49 .word 0x08010a49 8010580: 24002254 .word 0x24002254 8010584: 08010595 .word 0x08010595 8010588: 24002298 .word 0x24002298 801058c: 0802d9d8 .word 0x0802d9d8 8010590: 08010d19 .word 0x08010d19 08010594 : * @brief Notify the User about the network interface config status * @param netif: the network interface * @retval None */ static void ethernet_link_status_updated(struct netif *netif) { 8010594: b480 push {r7} 8010596: b083 sub sp, #12 8010598: af00 add r7, sp, #0 801059a: 6078 str r0, [r7, #4] else /* netif is down */ { /* USER CODE BEGIN 6 */ /* USER CODE END 6 */ } } 801059c: bf00 nop 801059e: 370c adds r7, #12 80105a0: 46bd mov sp, r7 80105a2: f85d 7b04 ldr.w r7, [sp], #4 80105a6: 4770 bx lr 080105a8 : * @brief Ethernet Rx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *handlerEth) { 80105a8: b580 push {r7, lr} 80105aa: b082 sub sp, #8 80105ac: af00 add r7, sp, #0 80105ae: 6078 str r0, [r7, #4] osSemaphoreRelease(RxPktSemaphore); 80105b0: 4b04 ldr r3, [pc, #16] @ (80105c4 ) 80105b2: 681b ldr r3, [r3, #0] 80105b4: 4618 mov r0, r3 80105b6: f001 fa55 bl 8011a64 } 80105ba: bf00 nop 80105bc: 3708 adds r7, #8 80105be: 46bd mov sp, r7 80105c0: bd80 pop {r7, pc} 80105c2: bf00 nop 80105c4: 240022c4 .word 0x240022c4 080105c8 : * @brief Ethernet Tx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *handlerEth) { 80105c8: b580 push {r7, lr} 80105ca: b082 sub sp, #8 80105cc: af00 add r7, sp, #0 80105ce: 6078 str r0, [r7, #4] osSemaphoreRelease(TxPktSemaphore); 80105d0: 4b04 ldr r3, [pc, #16] @ (80105e4 ) 80105d2: 681b ldr r3, [r3, #0] 80105d4: 4618 mov r0, r3 80105d6: f001 fa45 bl 8011a64 } 80105da: bf00 nop 80105dc: 3708 adds r7, #8 80105de: 46bd mov sp, r7 80105e0: bd80 pop {r7, pc} 80105e2: bf00 nop 80105e4: 240022c8 .word 0x240022c8 080105e8 : * @brief Ethernet DMA transfer error callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *handlerEth) { 80105e8: b580 push {r7, lr} 80105ea: b082 sub sp, #8 80105ec: af00 add r7, sp, #0 80105ee: 6078 str r0, [r7, #4] if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU) 80105f0: 6878 ldr r0, [r7, #4] 80105f2: f7f8 fe7d bl 80092f0 80105f6: 4603 mov r3, r0 80105f8: f003 0380 and.w r3, r3, #128 @ 0x80 80105fc: 2b80 cmp r3, #128 @ 0x80 80105fe: d104 bne.n 801060a { osSemaphoreRelease(RxPktSemaphore); 8010600: 4b04 ldr r3, [pc, #16] @ (8010614 ) 8010602: 681b ldr r3, [r3, #0] 8010604: 4618 mov r0, r3 8010606: f001 fa2d bl 8011a64 } } 801060a: bf00 nop 801060c: 3708 adds r7, #8 801060e: 46bd mov sp, r7 8010610: bd80 pop {r7, pc} 8010612: bf00 nop 8010614: 240022c4 .word 0x240022c4 08010618 : * * @param netif the already initialized lwip network interface structure * for this ethernetif */ static void low_level_init(struct netif *netif) { 8010618: b580 push {r7, lr} 801061a: b0aa sub sp, #168 @ 0xa8 801061c: af00 add r7, sp, #0 801061e: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_eth_init_status = HAL_OK; 8010620: 2300 movs r3, #0 8010622: f887 309f strb.w r3, [r7, #159] @ 0x9f /* USER CODE BEGIN OS_THREAD_ATTR_CMSIS_RTOS_V2 */ osThreadAttr_t attributes; /* USER CODE END OS_THREAD_ATTR_CMSIS_RTOS_V2 */ uint32_t duplex, speed = 0; 8010626: 2300 movs r3, #0 8010628: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 int32_t PHYLinkState = 0; 801062c: 2300 movs r3, #0 801062e: f8c7 3098 str.w r3, [r7, #152] @ 0x98 ETH_MACConfigTypeDef MACConf = {0}; 8010632: f107 0310 add.w r3, r7, #16 8010636: 2264 movs r2, #100 @ 0x64 8010638: 2100 movs r1, #0 801063a: 4618 mov r0, r3 801063c: f01a faa8 bl 802ab90 /* Start ETH HAL Init */ uint8_t MACAddr[6] ; heth.Instance = ETH; 8010640: 4b86 ldr r3, [pc, #536] @ (801085c ) 8010642: 4a87 ldr r2, [pc, #540] @ (8010860 ) 8010644: 601a str r2, [r3, #0] // MACAddr[1] = 0x80; // MACAddr[2] = 0xE1; // MACAddr[3] = 0x00; // MACAddr[4] = 0x00; // MACAddr[5] = 0x00; MACAddr[0] = 0x7C; 8010646: 237c movs r3, #124 @ 0x7c 8010648: 723b strb r3, [r7, #8] MACAddr[1] = 0xF6; 801064a: 23f6 movs r3, #246 @ 0xf6 801064c: 727b strb r3, [r7, #9] MACAddr[2] = 0x66; 801064e: 2366 movs r3, #102 @ 0x66 8010650: 72bb strb r3, [r7, #10] MACAddr[3] = 0xE4; 8010652: 23e4 movs r3, #228 @ 0xe4 8010654: 72fb strb r3, [r7, #11] MACAddr[4] = 0xB5; 8010656: 23b5 movs r3, #181 @ 0xb5 8010658: 733b strb r3, [r7, #12] MACAddr[5] = 0x41; 801065a: 2341 movs r3, #65 @ 0x41 801065c: 737b strb r3, [r7, #13] heth.Init.MACAddr = &MACAddr[0]; 801065e: 4a7f ldr r2, [pc, #508] @ (801085c ) 8010660: f107 0308 add.w r3, r7, #8 8010664: 6053 str r3, [r2, #4] heth.Init.MediaInterface = HAL_ETH_MII_MODE; 8010666: 4b7d ldr r3, [pc, #500] @ (801085c ) 8010668: 2200 movs r2, #0 801066a: 721a strb r2, [r3, #8] heth.Init.TxDesc = DMATxDscrTab; 801066c: 4b7b ldr r3, [pc, #492] @ (801085c ) 801066e: 4a7d ldr r2, [pc, #500] @ (8010864 ) 8010670: 60da str r2, [r3, #12] heth.Init.RxDesc = DMARxDscrTab; 8010672: 4b7a ldr r3, [pc, #488] @ (801085c ) 8010674: 4a7c ldr r2, [pc, #496] @ (8010868 ) 8010676: 611a str r2, [r3, #16] heth.Init.RxBuffLen = 1536; 8010678: 4b78 ldr r3, [pc, #480] @ (801085c ) 801067a: f44f 62c0 mov.w r2, #1536 @ 0x600 801067e: 615a str r2, [r3, #20] /* USER CODE BEGIN MACADDRESS */ /* USER CODE END MACADDRESS */ hal_eth_init_status = HAL_ETH_Init(&heth); 8010680: 4876 ldr r0, [pc, #472] @ (801085c ) 8010682: f7f7 fe69 bl 8008358 8010686: 4603 mov r3, r0 8010688: f887 309f strb.w r3, [r7, #159] @ 0x9f memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig)); 801068c: 2238 movs r2, #56 @ 0x38 801068e: 2100 movs r1, #0 8010690: 4876 ldr r0, [pc, #472] @ (801086c ) 8010692: f01a fa7d bl 802ab90 TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; 8010696: 4b75 ldr r3, [pc, #468] @ (801086c ) 8010698: 2221 movs r2, #33 @ 0x21 801069a: 601a str r2, [r3, #0] TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; 801069c: 4b73 ldr r3, [pc, #460] @ (801086c ) 801069e: f44f 3240 mov.w r2, #196608 @ 0x30000 80106a2: 615a str r2, [r3, #20] TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; 80106a4: 4b71 ldr r3, [pc, #452] @ (801086c ) 80106a6: 2200 movs r2, #0 80106a8: 611a str r2, [r3, #16] /* End ETH HAL Init */ /* Initialize the RX POOL */ LWIP_MEMPOOL_INIT(RX_POOL); 80106aa: 4871 ldr r0, [pc, #452] @ (8010870 ) 80106ac: f009 fe64 bl 801a378 #if LWIP_ARP || LWIP_ETHERNET /* set MAC hardware address length */ netif->hwaddr_len = ETH_HWADDR_LEN; 80106b0: 687b ldr r3, [r7, #4] 80106b2: 2206 movs r2, #6 80106b4: f883 2030 strb.w r2, [r3, #48] @ 0x30 /* set MAC hardware address */ netif->hwaddr[0] = heth.Init.MACAddr[0]; 80106b8: 4b68 ldr r3, [pc, #416] @ (801085c ) 80106ba: 685b ldr r3, [r3, #4] 80106bc: 781a ldrb r2, [r3, #0] 80106be: 687b ldr r3, [r7, #4] 80106c0: f883 202a strb.w r2, [r3, #42] @ 0x2a netif->hwaddr[1] = heth.Init.MACAddr[1]; 80106c4: 4b65 ldr r3, [pc, #404] @ (801085c ) 80106c6: 685b ldr r3, [r3, #4] 80106c8: 785a ldrb r2, [r3, #1] 80106ca: 687b ldr r3, [r7, #4] 80106cc: f883 202b strb.w r2, [r3, #43] @ 0x2b netif->hwaddr[2] = heth.Init.MACAddr[2]; 80106d0: 4b62 ldr r3, [pc, #392] @ (801085c ) 80106d2: 685b ldr r3, [r3, #4] 80106d4: 789a ldrb r2, [r3, #2] 80106d6: 687b ldr r3, [r7, #4] 80106d8: f883 202c strb.w r2, [r3, #44] @ 0x2c netif->hwaddr[3] = heth.Init.MACAddr[3]; 80106dc: 4b5f ldr r3, [pc, #380] @ (801085c ) 80106de: 685b ldr r3, [r3, #4] 80106e0: 78da ldrb r2, [r3, #3] 80106e2: 687b ldr r3, [r7, #4] 80106e4: f883 202d strb.w r2, [r3, #45] @ 0x2d netif->hwaddr[4] = heth.Init.MACAddr[4]; 80106e8: 4b5c ldr r3, [pc, #368] @ (801085c ) 80106ea: 685b ldr r3, [r3, #4] 80106ec: 791a ldrb r2, [r3, #4] 80106ee: 687b ldr r3, [r7, #4] 80106f0: f883 202e strb.w r2, [r3, #46] @ 0x2e netif->hwaddr[5] = heth.Init.MACAddr[5]; 80106f4: 4b59 ldr r3, [pc, #356] @ (801085c ) 80106f6: 685b ldr r3, [r3, #4] 80106f8: 795a ldrb r2, [r3, #5] 80106fa: 687b ldr r3, [r7, #4] 80106fc: f883 202f strb.w r2, [r3, #47] @ 0x2f /* maximum transfer unit */ netif->mtu = ETH_MAX_PAYLOAD; 8010700: 687b ldr r3, [r7, #4] 8010702: f240 52dc movw r2, #1500 @ 0x5dc 8010706: 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; 8010708: 687b ldr r3, [r7, #4] 801070a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801070e: f043 030a orr.w r3, r3, #10 8010712: b2da uxtb r2, r3 8010714: 687b ldr r3, [r7, #4] 8010716: 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 */ RxPktSemaphore = osSemaphoreNew(1, 1, NULL); 801071a: 2200 movs r2, #0 801071c: 2101 movs r1, #1 801071e: 2001 movs r0, #1 8010720: f001 f8c5 bl 80118ae 8010724: 4603 mov r3, r0 8010726: 4a53 ldr r2, [pc, #332] @ (8010874 ) 8010728: 6013 str r3, [r2, #0] /* create a binary semaphore used for informing ethernetif of frame transmission */ TxPktSemaphore = osSemaphoreNew(1, 1, NULL); 801072a: 2200 movs r2, #0 801072c: 2101 movs r1, #1 801072e: 2001 movs r0, #1 8010730: f001 f8bd bl 80118ae 8010734: 4603 mov r3, r0 8010736: 4a50 ldr r2, [pc, #320] @ (8010878 ) 8010738: 6013 str r3, [r2, #0] /* create the task that handles the ETH_MAC */ /* USER CODE BEGIN OS_THREAD_NEW_CMSIS_RTOS_V2 */ memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 801073a: f107 0374 add.w r3, r7, #116 @ 0x74 801073e: 2224 movs r2, #36 @ 0x24 8010740: 2100 movs r1, #0 8010742: 4618 mov r0, r3 8010744: f01a fa24 bl 802ab90 attributes.name = "EthIf"; 8010748: 4b4c ldr r3, [pc, #304] @ (801087c ) 801074a: 677b str r3, [r7, #116] @ 0x74 attributes.stack_size = INTERFACE_THREAD_STACK_SIZE; 801074c: f44f 6380 mov.w r3, #1024 @ 0x400 8010750: f8c7 3088 str.w r3, [r7, #136] @ 0x88 attributes.priority = osPriorityRealtime; 8010754: 2330 movs r3, #48 @ 0x30 8010756: f8c7 308c str.w r3, [r7, #140] @ 0x8c osThreadNew(ethernetif_input, netif, &attributes); 801075a: f107 0374 add.w r3, r7, #116 @ 0x74 801075e: 461a mov r2, r3 8010760: 6879 ldr r1, [r7, #4] 8010762: 4847 ldr r0, [pc, #284] @ (8010880 ) 8010764: f000 fde5 bl 8011332 /* USER CODE BEGIN PHY_PRE_CONFIG */ /* USER CODE END PHY_PRE_CONFIG */ /* Set PHY IO functions */ DP83848_RegisterBusIO(&DP83848, &DP83848_IOCtx); 8010768: 4946 ldr r1, [pc, #280] @ (8010884 ) 801076a: 4847 ldr r0, [pc, #284] @ (8010888 ) 801076c: f7f4 fec9 bl 8005502 /* Initialize the DP83848 ETH PHY */ DP83848_Init(&DP83848); 8010770: 4845 ldr r0, [pc, #276] @ (8010888 ) 8010772: f7f4 fef8 bl 8005566 if (hal_eth_init_status == HAL_OK) 8010776: f897 309f ldrb.w r3, [r7, #159] @ 0x9f 801077a: 2b00 cmp r3, #0 801077c: d168 bne.n 8010850 { PHYLinkState = DP83848_GetLinkState(&DP83848); 801077e: 4842 ldr r0, [pc, #264] @ (8010888 ) 8010780: f7f4 ff3e bl 8005600 8010784: f8c7 0098 str.w r0, [r7, #152] @ 0x98 /* Get link state */ if(PHYLinkState <= DP83848_STATUS_LINK_DOWN) 8010788: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 801078c: 2b01 cmp r3, #1 801078e: dc06 bgt.n 801079e { netif_set_link_down(netif); 8010790: 6878 ldr r0, [r7, #4] 8010792: f00a f9e1 bl 801ab58 netif_set_down(netif); 8010796: 6878 ldr r0, [r7, #4] 8010798: f00a f970 bl 801aa7c #endif /* LWIP_ARP || LWIP_ETHERNET */ /* USER CODE BEGIN LOW_LEVEL_INIT */ /* USER CODE END LOW_LEVEL_INIT */ } 801079c: e05a b.n 8010854 switch (PHYLinkState) 801079e: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 80107a2: 3b02 subs r3, #2 80107a4: 2b03 cmp r3, #3 80107a6: d82b bhi.n 8010800 80107a8: a201 add r2, pc, #4 @ (adr r2, 80107b0 ) 80107aa: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80107ae: bf00 nop 80107b0: 080107c1 .word 0x080107c1 80107b4: 080107d3 .word 0x080107d3 80107b8: 080107e3 .word 0x080107e3 80107bc: 080107f3 .word 0x080107f3 duplex = ETH_FULLDUPLEX_MODE; 80107c0: f44f 5300 mov.w r3, #8192 @ 0x2000 80107c4: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 80107c8: f44f 4380 mov.w r3, #16384 @ 0x4000 80107cc: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 80107d0: e01f b.n 8010812 duplex = ETH_HALFDUPLEX_MODE; 80107d2: 2300 movs r3, #0 80107d4: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 80107d8: f44f 4380 mov.w r3, #16384 @ 0x4000 80107dc: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 80107e0: e017 b.n 8010812 duplex = ETH_FULLDUPLEX_MODE; 80107e2: f44f 5300 mov.w r3, #8192 @ 0x2000 80107e6: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 80107ea: 2300 movs r3, #0 80107ec: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 80107f0: e00f b.n 8010812 duplex = ETH_HALFDUPLEX_MODE; 80107f2: 2300 movs r3, #0 80107f4: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 80107f8: 2300 movs r3, #0 80107fa: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 80107fe: e008 b.n 8010812 duplex = ETH_FULLDUPLEX_MODE; 8010800: f44f 5300 mov.w r3, #8192 @ 0x2000 8010804: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 8010808: f44f 4380 mov.w r3, #16384 @ 0x4000 801080c: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 8010810: bf00 nop HAL_ETH_GetMACConfig(&heth, &MACConf); 8010812: f107 0310 add.w r3, r7, #16 8010816: 4619 mov r1, r3 8010818: 4810 ldr r0, [pc, #64] @ (801085c ) 801081a: f7f8 fb2b bl 8008e74 MACConf.DuplexMode = duplex; 801081e: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 8010822: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 8010824: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 8010828: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 801082a: f107 0310 add.w r3, r7, #16 801082e: 4619 mov r1, r3 8010830: 480a ldr r0, [pc, #40] @ (801085c ) 8010832: f7f8 fcf3 bl 800921c HAL_ETH_Start_IT(&heth); 8010836: 4809 ldr r0, [pc, #36] @ (801085c ) 8010838: f7f7 fe8c bl 8008554 netif_set_up(netif); 801083c: 6878 ldr r0, [r7, #4] 801083e: f00a f8af bl 801a9a0 netif_set_link_up(netif); 8010842: 6878 ldr r0, [r7, #4] 8010844: f00a f94e bl 801aae4 ethernetif_notify_conn_changed(netif); 8010848: 6878 ldr r0, [r7, #4] 801084a: f000 fb1b bl 8010e84 } 801084e: e001 b.n 8010854 Error_Handler(); 8010850: f7f1 ff38 bl 80026c4 } 8010854: bf00 nop 8010856: 37a8 adds r7, #168 @ 0xa8 8010858: 46bd mov sp, r7 801085a: bd80 pop {r7, pc} 801085c: 240022cc .word 0x240022cc 8010860: 40028000 .word 0x40028000 8010864: 24040100 .word 0x24040100 8010868: 24040000 .word 0x24040000 801086c: 2400237c .word 0x2400237c 8010870: 08031acc .word 0x08031acc 8010874: 240022c4 .word 0x240022c4 8010878: 240022c8 .word 0x240022c8 801087c: 0802d9f8 .word 0x0802d9f8 8010880: 080109f5 .word 0x080109f5 8010884: 24000034 .word 0x24000034 8010888: 240023b4 .word 0x240023b4 0801088c : * to become available 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) { 801088c: b580 push {r7, lr} 801088e: b092 sub sp, #72 @ 0x48 8010890: af00 add r7, sp, #0 8010892: 6078 str r0, [r7, #4] 8010894: 6039 str r1, [r7, #0] uint32_t i = 0U; 8010896: 2300 movs r3, #0 8010898: 647b str r3, [r7, #68] @ 0x44 struct pbuf *q = NULL; 801089a: 2300 movs r3, #0 801089c: 643b str r3, [r7, #64] @ 0x40 err_t errval = ERR_OK; 801089e: 2300 movs r3, #0 80108a0: f887 303f strb.w r3, [r7, #63] @ 0x3f ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0}; 80108a4: f107 030c add.w r3, r7, #12 80108a8: 2230 movs r2, #48 @ 0x30 80108aa: 2100 movs r1, #0 80108ac: 4618 mov r0, r3 80108ae: f01a f96f bl 802ab90 memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); 80108b2: f107 030c add.w r3, r7, #12 80108b6: 2230 movs r2, #48 @ 0x30 80108b8: 2100 movs r1, #0 80108ba: 4618 mov r0, r3 80108bc: f01a f968 bl 802ab90 for(q = p; q != NULL; q = q->next) 80108c0: 683b ldr r3, [r7, #0] 80108c2: 643b str r3, [r7, #64] @ 0x40 80108c4: e045 b.n 8010952 { if(i >= ETH_TX_DESC_CNT) 80108c6: 6c7b ldr r3, [r7, #68] @ 0x44 80108c8: 2b03 cmp r3, #3 80108ca: d902 bls.n 80108d2 return ERR_IF; 80108cc: f06f 030b mvn.w r3, #11 80108d0: e06c b.n 80109ac Txbuffer[i].buffer = q->payload; 80108d2: 6c3b ldr r3, [r7, #64] @ 0x40 80108d4: 6859 ldr r1, [r3, #4] 80108d6: 6c7a ldr r2, [r7, #68] @ 0x44 80108d8: 4613 mov r3, r2 80108da: 005b lsls r3, r3, #1 80108dc: 4413 add r3, r2 80108de: 009b lsls r3, r3, #2 80108e0: 3348 adds r3, #72 @ 0x48 80108e2: 443b add r3, r7 80108e4: 3b3c subs r3, #60 @ 0x3c 80108e6: 6019 str r1, [r3, #0] Txbuffer[i].len = q->len; 80108e8: 6c3b ldr r3, [r7, #64] @ 0x40 80108ea: 895b ldrh r3, [r3, #10] 80108ec: 4619 mov r1, r3 80108ee: 6c7a ldr r2, [r7, #68] @ 0x44 80108f0: 4613 mov r3, r2 80108f2: 005b lsls r3, r3, #1 80108f4: 4413 add r3, r2 80108f6: 009b lsls r3, r3, #2 80108f8: 3348 adds r3, #72 @ 0x48 80108fa: 443b add r3, r7 80108fc: 3b38 subs r3, #56 @ 0x38 80108fe: 6019 str r1, [r3, #0] if(i>0) 8010900: 6c7b ldr r3, [r7, #68] @ 0x44 8010902: 2b00 cmp r3, #0 8010904: d011 beq.n 801092a { Txbuffer[i-1].next = &Txbuffer[i]; 8010906: 6c7b ldr r3, [r7, #68] @ 0x44 8010908: 1e5a subs r2, r3, #1 801090a: f107 000c add.w r0, r7, #12 801090e: 6c79 ldr r1, [r7, #68] @ 0x44 8010910: 460b mov r3, r1 8010912: 005b lsls r3, r3, #1 8010914: 440b add r3, r1 8010916: 009b lsls r3, r3, #2 8010918: 18c1 adds r1, r0, r3 801091a: 4613 mov r3, r2 801091c: 005b lsls r3, r3, #1 801091e: 4413 add r3, r2 8010920: 009b lsls r3, r3, #2 8010922: 3348 adds r3, #72 @ 0x48 8010924: 443b add r3, r7 8010926: 3b34 subs r3, #52 @ 0x34 8010928: 6019 str r1, [r3, #0] } if(q->next == NULL) 801092a: 6c3b ldr r3, [r7, #64] @ 0x40 801092c: 681b ldr r3, [r3, #0] 801092e: 2b00 cmp r3, #0 8010930: d109 bne.n 8010946 { Txbuffer[i].next = NULL; 8010932: 6c7a ldr r2, [r7, #68] @ 0x44 8010934: 4613 mov r3, r2 8010936: 005b lsls r3, r3, #1 8010938: 4413 add r3, r2 801093a: 009b lsls r3, r3, #2 801093c: 3348 adds r3, #72 @ 0x48 801093e: 443b add r3, r7 8010940: 3b34 subs r3, #52 @ 0x34 8010942: 2200 movs r2, #0 8010944: 601a str r2, [r3, #0] } i++; 8010946: 6c7b ldr r3, [r7, #68] @ 0x44 8010948: 3301 adds r3, #1 801094a: 647b str r3, [r7, #68] @ 0x44 for(q = p; q != NULL; q = q->next) 801094c: 6c3b ldr r3, [r7, #64] @ 0x40 801094e: 681b ldr r3, [r3, #0] 8010950: 643b str r3, [r7, #64] @ 0x40 8010952: 6c3b ldr r3, [r7, #64] @ 0x40 8010954: 2b00 cmp r3, #0 8010956: d1b6 bne.n 80108c6 } TxConfig.Length = p->tot_len; 8010958: 683b ldr r3, [r7, #0] 801095a: 891b ldrh r3, [r3, #8] 801095c: 461a mov r2, r3 801095e: 4b15 ldr r3, [pc, #84] @ (80109b4 ) 8010960: 605a str r2, [r3, #4] TxConfig.TxBuffer = Txbuffer; 8010962: 4a14 ldr r2, [pc, #80] @ (80109b4 ) 8010964: f107 030c add.w r3, r7, #12 8010968: 6093 str r3, [r2, #8] TxConfig.pData = p; 801096a: 4a12 ldr r2, [pc, #72] @ (80109b4 ) 801096c: 683b ldr r3, [r7, #0] 801096e: 6353 str r3, [r2, #52] @ 0x34 pbuf_ref(p); 8010970: 6838 ldr r0, [r7, #0] 8010972: f00a fda9 bl 801b4c8 #if 1 if (HAL_ETH_Transmit_IT(&heth, &TxConfig) == HAL_OK) { 8010976: 490f ldr r1, [pc, #60] @ (80109b4 ) 8010978: 480f ldr r0, [pc, #60] @ (80109b8 ) 801097a: f7f7 fed7 bl 800872c 801097e: 4603 mov r3, r0 8010980: 2b00 cmp r3, #0 8010982: d10e bne.n 80109a2 while(osSemaphoreAcquire(TxPktSemaphore, TIME_WAITING_FOR_INPUT)!=osOK) 8010984: bf00 nop 8010986: 4b0d ldr r3, [pc, #52] @ (80109bc ) 8010988: 681b ldr r3, [r3, #0] 801098a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 801098e: 4618 mov r0, r3 8010990: f001 f816 bl 80119c0 8010994: 4603 mov r3, r0 8010996: 2b00 cmp r3, #0 8010998: d1f5 bne.n 8010986 { } // osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000)); HAL_ETH_ReleaseTxPacket(&heth); 801099a: 4807 ldr r0, [pc, #28] @ (80109b8 ) 801099c: f7f8 f84d bl 8008a3a 80109a0: e002 b.n 80109a8 } else { pbuf_free(p); 80109a2: 6838 ldr r0, [r7, #0] 80109a4: f00a fcea bl 801b37c HAL_ETH_Transmit_IT(&heth, &TxConfig); osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(100)); HAL_ETH_ReleaseTxPacket(&heth); #endif return errval; 80109a8: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 80109ac: 4618 mov r0, r3 80109ae: 3748 adds r7, #72 @ 0x48 80109b0: 46bd mov sp, r7 80109b2: bd80 pop {r7, pc} 80109b4: 2400237c .word 0x2400237c 80109b8: 240022cc .word 0x240022cc 80109bc: 240022c8 .word 0x240022c8 080109c0 : * @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) { 80109c0: b580 push {r7, lr} 80109c2: b084 sub sp, #16 80109c4: af00 add r7, sp, #0 80109c6: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 80109c8: 2300 movs r3, #0 80109ca: 60fb str r3, [r7, #12] if(RxAllocStatus == RX_ALLOC_OK) 80109cc: 4b07 ldr r3, [pc, #28] @ (80109ec ) 80109ce: 781b ldrb r3, [r3, #0] 80109d0: 2b00 cmp r3, #0 80109d2: d105 bne.n 80109e0 { HAL_ETH_ReadData(&heth, (void **)&p); 80109d4: f107 030c add.w r3, r7, #12 80109d8: 4619 mov r1, r3 80109da: 4805 ldr r0, [pc, #20] @ (80109f0 ) 80109dc: f7f7 fef7 bl 80087ce } return p; 80109e0: 68fb ldr r3, [r7, #12] } 80109e2: 4618 mov r0, r3 80109e4: 3710 adds r7, #16 80109e6: 46bd mov sp, r7 80109e8: bd80 pop {r7, pc} 80109ea: bf00 nop 80109ec: 240022c0 .word 0x240022c0 80109f0: 240022cc .word 0x240022cc 080109f4 : * the appropriate input function is called. * * @param netif the lwip network interface structure for this ethernetif */ void ethernetif_input(void* argument) { 80109f4: b580 push {r7, lr} 80109f6: b084 sub sp, #16 80109f8: af00 add r7, sp, #0 80109fa: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 80109fc: 2300 movs r3, #0 80109fe: 60fb str r3, [r7, #12] struct netif *netif = (struct netif *) argument; 8010a00: 687b ldr r3, [r7, #4] 8010a02: 60bb str r3, [r7, #8] for( ;; ) { if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 8010a04: 4b0f ldr r3, [pc, #60] @ (8010a44 ) 8010a06: 681b ldr r3, [r3, #0] 8010a08: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8010a0c: 4618 mov r0, r3 8010a0e: f000 ffd7 bl 80119c0 8010a12: 4603 mov r3, r0 8010a14: 2b00 cmp r3, #0 8010a16: d1f5 bne.n 8010a04 { do { p = low_level_input( netif ); 8010a18: 68b8 ldr r0, [r7, #8] 8010a1a: f7ff ffd1 bl 80109c0 8010a1e: 60f8 str r0, [r7, #12] if (p != NULL) 8010a20: 68fb ldr r3, [r7, #12] 8010a22: 2b00 cmp r3, #0 8010a24: d00a beq.n 8010a3c { if (netif->input( p, netif) != ERR_OK ) 8010a26: 68bb ldr r3, [r7, #8] 8010a28: 691b ldr r3, [r3, #16] 8010a2a: 68b9 ldr r1, [r7, #8] 8010a2c: 68f8 ldr r0, [r7, #12] 8010a2e: 4798 blx r3 8010a30: 4603 mov r3, r0 8010a32: 2b00 cmp r3, #0 8010a34: d002 beq.n 8010a3c { pbuf_free(p); 8010a36: 68f8 ldr r0, [r7, #12] 8010a38: f00a fca0 bl 801b37c } } } while(p!=NULL); 8010a3c: 68fb ldr r3, [r7, #12] 8010a3e: 2b00 cmp r3, #0 8010a40: d1ea bne.n 8010a18 if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 8010a42: e7df b.n 8010a04 8010a44: 240022c4 .word 0x240022c4 08010a48 : * @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) { 8010a48: b580 push {r7, lr} 8010a4a: b082 sub sp, #8 8010a4c: af00 add r7, sp, #0 8010a4e: 6078 str r0, [r7, #4] LWIP_ASSERT("netif != NULL", (netif != NULL)); 8010a50: 687b ldr r3, [r7, #4] 8010a52: 2b00 cmp r3, #0 8010a54: d106 bne.n 8010a64 8010a56: 4b0e ldr r3, [pc, #56] @ (8010a90 ) 8010a58: f240 2235 movw r2, #565 @ 0x235 8010a5c: 490d ldr r1, [pc, #52] @ (8010a94 ) 8010a5e: 480e ldr r0, [pc, #56] @ (8010a98 ) 8010a60: f019 ff04 bl 802a86c * The last argument should be replaced with your link speed, in units * of bits per second. */ // MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, LINK_SPEED_OF_YOUR_NETIF_IN_BPS); netif->name[0] = IFNAME0; 8010a64: 687b ldr r3, [r7, #4] 8010a66: 2273 movs r2, #115 @ 0x73 8010a68: f883 2032 strb.w r2, [r3, #50] @ 0x32 netif->name[1] = IFNAME1; 8010a6c: 687b ldr r3, [r7, #4] 8010a6e: 2274 movs r2, #116 @ 0x74 8010a70: 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; 8010a74: 687b ldr r3, [r7, #4] 8010a76: 4a09 ldr r2, [pc, #36] @ (8010a9c ) 8010a78: 615a str r2, [r3, #20] #if LWIP_IPV6 netif->output_ip6 = ethip6_output; #endif /* LWIP_IPV6 */ netif->linkoutput = low_level_output; 8010a7a: 687b ldr r3, [r7, #4] 8010a7c: 4a08 ldr r2, [pc, #32] @ (8010aa0 ) 8010a7e: 619a str r2, [r3, #24] /* initialize the hardware */ low_level_init(netif); 8010a80: 6878 ldr r0, [r7, #4] 8010a82: f7ff fdc9 bl 8010618 return ERR_OK; 8010a86: 2300 movs r3, #0 } 8010a88: 4618 mov r0, r3 8010a8a: 3708 adds r7, #8 8010a8c: 46bd mov sp, r7 8010a8e: bd80 pop {r7, pc} 8010a90: 0802da00 .word 0x0802da00 8010a94: 0802da1c .word 0x0802da1c 8010a98: 0802da2c .word 0x0802da2c 8010a9c: 08024edd .word 0x08024edd 8010aa0: 0801088d .word 0x0801088d 08010aa4 : * @brief Custom Rx pbuf free callback * @param pbuf: pbuf to be freed * @retval None */ void pbuf_free_custom(struct pbuf *p) { 8010aa4: b580 push {r7, lr} 8010aa6: b084 sub sp, #16 8010aa8: af00 add r7, sp, #0 8010aaa: 6078 str r0, [r7, #4] struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p; 8010aac: 687b ldr r3, [r7, #4] 8010aae: 60fb str r3, [r7, #12] LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); 8010ab0: 68f9 ldr r1, [r7, #12] 8010ab2: 4809 ldr r0, [pc, #36] @ (8010ad8 ) 8010ab4: f009 fd50 bl 801a558 /* If the Rx Buffer Pool was exhausted, signal the ethernetif_input task to * call HAL_ETH_GetRxDataBuffer to rebuild the Rx descriptors. */ if (RxAllocStatus == RX_ALLOC_ERROR) 8010ab8: 4b08 ldr r3, [pc, #32] @ (8010adc ) 8010aba: 781b ldrb r3, [r3, #0] 8010abc: 2b01 cmp r3, #1 8010abe: d107 bne.n 8010ad0 { RxAllocStatus = RX_ALLOC_OK; 8010ac0: 4b06 ldr r3, [pc, #24] @ (8010adc ) 8010ac2: 2200 movs r2, #0 8010ac4: 701a strb r2, [r3, #0] osSemaphoreRelease(RxPktSemaphore); 8010ac6: 4b06 ldr r3, [pc, #24] @ (8010ae0 ) 8010ac8: 681b ldr r3, [r3, #0] 8010aca: 4618 mov r0, r3 8010acc: f000 ffca bl 8011a64 } } 8010ad0: bf00 nop 8010ad2: 3710 adds r7, #16 8010ad4: 46bd mov sp, r7 8010ad6: bd80 pop {r7, pc} 8010ad8: 08031acc .word 0x08031acc 8010adc: 240022c0 .word 0x240022c0 8010ae0: 240022c4 .word 0x240022c4 08010ae4 : * when LWIP_TIMERS == 1 and NO_SYS == 1 * @param None * @retval Current Time value */ u32_t sys_now(void) { 8010ae4: b580 push {r7, lr} 8010ae6: af00 add r7, sp, #0 return HAL_GetTick(); 8010ae8: f7f4 fe62 bl 80057b0 8010aec: 4603 mov r3, r0 } 8010aee: 4618 mov r0, r3 8010af0: bd80 pop {r7, pc} ... 08010af4 : * @param ethHandle: ETH handle * @retval None */ void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { 8010af4: b580 push {r7, lr} 8010af6: b08e sub sp, #56 @ 0x38 8010af8: af00 add r7, sp, #0 8010afa: 6078 str r0, [r7, #4] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8010afc: f107 0324 add.w r3, r7, #36 @ 0x24 8010b00: 2200 movs r2, #0 8010b02: 601a str r2, [r3, #0] 8010b04: 605a str r2, [r3, #4] 8010b06: 609a str r2, [r3, #8] 8010b08: 60da str r2, [r3, #12] 8010b0a: 611a str r2, [r3, #16] if(ethHandle->Instance==ETH) 8010b0c: 687b ldr r3, [r7, #4] 8010b0e: 681b ldr r3, [r3, #0] 8010b10: 4a55 ldr r2, [pc, #340] @ (8010c68 ) 8010b12: 4293 cmp r3, r2 8010b14: f040 80a4 bne.w 8010c60 { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* Enable Peripheral clock */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); 8010b18: 4b54 ldr r3, [pc, #336] @ (8010c6c ) 8010b1a: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b1e: 4a53 ldr r2, [pc, #332] @ (8010c6c ) 8010b20: f443 4300 orr.w r3, r3, #32768 @ 0x8000 8010b24: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b28: 4b50 ldr r3, [pc, #320] @ (8010c6c ) 8010b2a: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b2e: f403 4300 and.w r3, r3, #32768 @ 0x8000 8010b32: 623b str r3, [r7, #32] 8010b34: 6a3b ldr r3, [r7, #32] __HAL_RCC_ETH1TX_CLK_ENABLE(); 8010b36: 4b4d ldr r3, [pc, #308] @ (8010c6c ) 8010b38: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b3c: 4a4b ldr r2, [pc, #300] @ (8010c6c ) 8010b3e: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8010b42: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b46: 4b49 ldr r3, [pc, #292] @ (8010c6c ) 8010b48: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b4c: f403 3380 and.w r3, r3, #65536 @ 0x10000 8010b50: 61fb str r3, [r7, #28] 8010b52: 69fb ldr r3, [r7, #28] __HAL_RCC_ETH1RX_CLK_ENABLE(); 8010b54: 4b45 ldr r3, [pc, #276] @ (8010c6c ) 8010b56: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b5a: 4a44 ldr r2, [pc, #272] @ (8010c6c ) 8010b5c: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8010b60: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b64: 4b41 ldr r3, [pc, #260] @ (8010c6c ) 8010b66: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b6a: f403 3300 and.w r3, r3, #131072 @ 0x20000 8010b6e: 61bb str r3, [r7, #24] 8010b70: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOC_CLK_ENABLE(); 8010b72: 4b3e ldr r3, [pc, #248] @ (8010c6c ) 8010b74: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010b78: 4a3c ldr r2, [pc, #240] @ (8010c6c ) 8010b7a: f043 0304 orr.w r3, r3, #4 8010b7e: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010b82: 4b3a ldr r3, [pc, #232] @ (8010c6c ) 8010b84: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010b88: f003 0304 and.w r3, r3, #4 8010b8c: 617b str r3, [r7, #20] 8010b8e: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOA_CLK_ENABLE(); 8010b90: 4b36 ldr r3, [pc, #216] @ (8010c6c ) 8010b92: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010b96: 4a35 ldr r2, [pc, #212] @ (8010c6c ) 8010b98: f043 0301 orr.w r3, r3, #1 8010b9c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010ba0: 4b32 ldr r3, [pc, #200] @ (8010c6c ) 8010ba2: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010ba6: f003 0301 and.w r3, r3, #1 8010baa: 613b str r3, [r7, #16] 8010bac: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 8010bae: 4b2f ldr r3, [pc, #188] @ (8010c6c ) 8010bb0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bb4: 4a2d ldr r2, [pc, #180] @ (8010c6c ) 8010bb6: f043 0302 orr.w r3, r3, #2 8010bba: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010bbe: 4b2b ldr r3, [pc, #172] @ (8010c6c ) 8010bc0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bc4: f003 0302 and.w r3, r3, #2 8010bc8: 60fb str r3, [r7, #12] 8010bca: 68fb ldr r3, [r7, #12] PB11 ------> ETH_TX_EN PB12 ------> ETH_TXD0 PB13 ------> ETH_TXD1 PB8 ------> ETH_TXD3 */ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4 8010bcc: 233e movs r3, #62 @ 0x3e 8010bce: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010bd0: 2302 movs r3, #2 8010bd2: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010bd4: 2300 movs r3, #0 8010bd6: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010bd8: 2303 movs r3, #3 8010bda: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010bdc: 230b movs r3, #11 8010bde: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 8010be0: f107 0324 add.w r3, r7, #36 @ 0x24 8010be4: 4619 mov r1, r3 8010be6: 4822 ldr r0, [pc, #136] @ (8010c70 ) 8010be8: f7f9 f912 bl 8009e10 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 8010bec: 238f movs r3, #143 @ 0x8f 8010bee: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010bf0: 2302 movs r3, #2 8010bf2: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010bf4: 2300 movs r3, #0 8010bf6: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010bf8: 2303 movs r3, #3 8010bfa: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010bfc: 230b movs r3, #11 8010bfe: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 8010c00: f107 0324 add.w r3, r7, #36 @ 0x24 8010c04: 4619 mov r1, r3 8010c06: 481b ldr r0, [pc, #108] @ (8010c74 ) 8010c08: f7f9 f902 bl 8009e10 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_11|GPIO_PIN_12 8010c0c: f643 1303 movw r3, #14595 @ 0x3903 8010c10: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_13|GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010c12: 2302 movs r3, #2 8010c14: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c16: 2300 movs r3, #0 8010c18: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c1a: 2303 movs r3, #3 8010c1c: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c1e: 230b movs r3, #11 8010c20: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010c22: f107 0324 add.w r3, r7, #36 @ 0x24 8010c26: 4619 mov r1, r3 8010c28: 4813 ldr r0, [pc, #76] @ (8010c78 ) 8010c2a: f7f9 f8f1 bl 8009e10 GPIO_InitStruct.Pin = GPIO_PIN_10; 8010c2e: f44f 6380 mov.w r3, #1024 @ 0x400 8010c32: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010c34: 2302 movs r3, #2 8010c36: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c38: 2300 movs r3, #0 8010c3a: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c3c: 2303 movs r3, #3 8010c3e: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c40: 230b movs r3, #11 8010c42: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010c44: f107 0324 add.w r3, r7, #36 @ 0x24 8010c48: 4619 mov r1, r3 8010c4a: 480b ldr r0, [pc, #44] @ (8010c78 ) 8010c4c: f7f9 f8e0 bl 8009e10 /* Peripheral interrupt init */ HAL_NVIC_SetPriority(ETH_IRQn, 5, 0); 8010c50: 2200 movs r2, #0 8010c52: 2105 movs r1, #5 8010c54: 203d movs r0, #61 @ 0x3d 8010c56: f7f4 feb3 bl 80059c0 HAL_NVIC_EnableIRQ(ETH_IRQn); 8010c5a: 203d movs r0, #61 @ 0x3d 8010c5c: f7f4 feca bl 80059f4 /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } 8010c60: bf00 nop 8010c62: 3738 adds r7, #56 @ 0x38 8010c64: 46bd mov sp, r7 8010c66: bd80 pop {r7, pc} 8010c68: 40028000 .word 0x40028000 8010c6c: 58024400 .word 0x58024400 8010c70: 58020800 .word 0x58020800 8010c74: 58020000 .word 0x58020000 8010c78: 58020400 .word 0x58020400 08010c7c : * @brief Initializes the MDIO interface GPIO and clocks. * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_Init(void) { 8010c7c: b580 push {r7, lr} 8010c7e: af00 add r7, sp, #0 /* We assume that MDIO GPIO configuration is already done in the ETH_MspInit() else it should be done here */ /* Configure the MDIO Clock */ HAL_ETH_SetMDIOClockRange(&heth); 8010c80: 4802 ldr r0, [pc, #8] @ (8010c8c ) 8010c82: f7f8 fae5 bl 8009250 return 0; 8010c86: 2300 movs r3, #0 } 8010c88: 4618 mov r0, r3 8010c8a: bd80 pop {r7, pc} 8010c8c: 240022cc .word 0x240022cc 08010c90 : * @brief De-Initializes the MDIO interface . * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_DeInit (void) { 8010c90: b480 push {r7} 8010c92: af00 add r7, sp, #0 return 0; 8010c94: 2300 movs r3, #0 } 8010c96: 4618 mov r0, r3 8010c98: 46bd mov sp, r7 8010c9a: f85d 7b04 ldr.w r7, [sp], #4 8010c9e: 4770 bx lr 08010ca0 : * @param RegAddr: PHY register address * @param pRegVal: pointer to hold the register value * @retval 0 if OK -1 if Error */ int32_t ETH_PHY_IO_ReadReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t *pRegVal) { 8010ca0: b580 push {r7, lr} 8010ca2: b084 sub sp, #16 8010ca4: af00 add r7, sp, #0 8010ca6: 60f8 str r0, [r7, #12] 8010ca8: 60b9 str r1, [r7, #8] 8010caa: 607a str r2, [r7, #4] if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK) 8010cac: 687b ldr r3, [r7, #4] 8010cae: 68ba ldr r2, [r7, #8] 8010cb0: 68f9 ldr r1, [r7, #12] 8010cb2: 4807 ldr r0, [pc, #28] @ (8010cd0 ) 8010cb4: f7f8 f836 bl 8008d24 8010cb8: 4603 mov r3, r0 8010cba: 2b00 cmp r3, #0 8010cbc: d002 beq.n 8010cc4 { return -1; 8010cbe: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010cc2: e000 b.n 8010cc6 } return 0; 8010cc4: 2300 movs r3, #0 } 8010cc6: 4618 mov r0, r3 8010cc8: 3710 adds r7, #16 8010cca: 46bd mov sp, r7 8010ccc: bd80 pop {r7, pc} 8010cce: bf00 nop 8010cd0: 240022cc .word 0x240022cc 08010cd4 : * @param RegAddr: PHY register address * @param RegVal: Value to be written * @retval 0 if OK -1 if Error */ int32_t ETH_PHY_IO_WriteReg(uint32_t DevAddr, uint32_t RegAddr, uint32_t RegVal) { 8010cd4: b580 push {r7, lr} 8010cd6: b084 sub sp, #16 8010cd8: af00 add r7, sp, #0 8010cda: 60f8 str r0, [r7, #12] 8010cdc: 60b9 str r1, [r7, #8] 8010cde: 607a str r2, [r7, #4] if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK) 8010ce0: 687b ldr r3, [r7, #4] 8010ce2: 68ba ldr r2, [r7, #8] 8010ce4: 68f9 ldr r1, [r7, #12] 8010ce6: 4807 ldr r0, [pc, #28] @ (8010d04 ) 8010ce8: f7f8 f870 bl 8008dcc 8010cec: 4603 mov r3, r0 8010cee: 2b00 cmp r3, #0 8010cf0: d002 beq.n 8010cf8 { return -1; 8010cf2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010cf6: e000 b.n 8010cfa } return 0; 8010cf8: 2300 movs r3, #0 } 8010cfa: 4618 mov r0, r3 8010cfc: 3710 adds r7, #16 8010cfe: 46bd mov sp, r7 8010d00: bd80 pop {r7, pc} 8010d02: bf00 nop 8010d04: 240022cc .word 0x240022cc 08010d08 : /** * @brief Get the time in millisecons used for internal PHY driver process. * @retval Time value */ int32_t ETH_PHY_IO_GetTick(void) { 8010d08: b580 push {r7, lr} 8010d0a: af00 add r7, sp, #0 return HAL_GetTick(); 8010d0c: f7f4 fd50 bl 80057b0 8010d10: 4603 mov r3, r0 } 8010d12: 4618 mov r0, r3 8010d14: bd80 pop {r7, pc} ... 08010d18 : /** * @brief Check the ETH link state then update ETH driver and netif link accordingly. * @retval None */ void ethernet_link_thread(void* argument) { 8010d18: b580 push {r7, lr} 8010d1a: b0a2 sub sp, #136 @ 0x88 8010d1c: af00 add r7, sp, #0 8010d1e: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef MACConf = {0}; 8010d20: f107 0310 add.w r3, r7, #16 8010d24: 2264 movs r2, #100 @ 0x64 8010d26: 2100 movs r1, #0 8010d28: 4618 mov r0, r3 8010d2a: f019 ff31 bl 802ab90 int32_t PHYLinkState = 0; 8010d2e: 2300 movs r3, #0 8010d30: 67bb str r3, [r7, #120] @ 0x78 uint32_t linkchanged = 0U, speed = 0U, duplex = 0U; 8010d32: 2300 movs r3, #0 8010d34: f8c7 3084 str.w r3, [r7, #132] @ 0x84 8010d38: 2300 movs r3, #0 8010d3a: f8c7 3080 str.w r3, [r7, #128] @ 0x80 8010d3e: 2300 movs r3, #0 8010d40: 67fb str r3, [r7, #124] @ 0x7c struct netif *netif = (struct netif *) argument; 8010d42: 687b ldr r3, [r7, #4] 8010d44: 677b str r3, [r7, #116] @ 0x74 /* USER CODE BEGIN ETH link init */ #if USE_DHCP enum dhcp_states DHCP_state = DHCP_START; 8010d46: 2301 movs r3, #1 8010d48: 73fb strb r3, [r7, #15] // LOCK_TCPIP_CORE(); /* USER CODE END ETH link init */ for(;;) { PHYLinkState = DP83848_GetLinkState(&DP83848); 8010d4a: 484a ldr r0, [pc, #296] @ (8010e74 ) 8010d4c: f7f4 fc58 bl 8005600 8010d50: 67b8 str r0, [r7, #120] @ 0x78 if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN)) 8010d52: 6f7b ldr r3, [r7, #116] @ 0x74 8010d54: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8010d58: 089b lsrs r3, r3, #2 8010d5a: f003 0301 and.w r3, r3, #1 8010d5e: b2db uxtb r3, r3 8010d60: 2b00 cmp r3, #0 8010d62: d013 beq.n 8010d8c 8010d64: 6fbb ldr r3, [r7, #120] @ 0x78 8010d66: 2b01 cmp r3, #1 8010d68: dc10 bgt.n 8010d8c { HAL_ETH_Stop_IT(&heth); 8010d6a: 4843 ldr r0, [pc, #268] @ (8010e78 ) 8010d6c: f7f7 fc66 bl 800863c LOCK_TCPIP_CORE(); 8010d70: f000 f936 bl 8010fe0 netif_set_down(netif); 8010d74: 6f78 ldr r0, [r7, #116] @ 0x74 8010d76: f009 fe81 bl 801aa7c netif_set_link_down(netif); 8010d7a: 6f78 ldr r0, [r7, #116] @ 0x74 8010d7c: f009 feec bl 801ab58 UNLOCK_TCPIP_CORE(); 8010d80: f000 f93e bl 8011000 printf("Link down...\r\n"); 8010d84: 483d ldr r0, [pc, #244] @ (8010e7c ) 8010d86: f019 fdd9 bl 802a93c 8010d8a: e067 b.n 8010e5c } else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN)) 8010d8c: 6f7b ldr r3, [r7, #116] @ 0x74 8010d8e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8010d92: f003 0304 and.w r3, r3, #4 8010d96: 2b00 cmp r3, #0 8010d98: d160 bne.n 8010e5c 8010d9a: 6fbb ldr r3, [r7, #120] @ 0x78 8010d9c: 2b01 cmp r3, #1 8010d9e: dd5d ble.n 8010e5c { switch (PHYLinkState) 8010da0: 6fbb ldr r3, [r7, #120] @ 0x78 8010da2: 3b02 subs r3, #2 8010da4: 2b03 cmp r3, #3 8010da6: d833 bhi.n 8010e10 8010da8: a201 add r2, pc, #4 @ (adr r2, 8010db0 ) 8010daa: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8010dae: bf00 nop 8010db0: 08010dc1 .word 0x08010dc1 8010db4: 08010dd7 .word 0x08010dd7 8010db8: 08010deb .word 0x08010deb 8010dbc: 08010dff .word 0x08010dff { case DP83848_STATUS_100MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 8010dc0: f44f 5300 mov.w r3, #8192 @ 0x2000 8010dc4: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 8010dc6: f44f 4380 mov.w r3, #16384 @ 0x4000 8010dca: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010dce: 2301 movs r3, #1 8010dd0: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010dd4: e01d b.n 8010e12 case DP83848_STATUS_100MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 8010dd6: 2300 movs r3, #0 8010dd8: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 8010dda: f44f 4380 mov.w r3, #16384 @ 0x4000 8010dde: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010de2: 2301 movs r3, #1 8010de4: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010de8: e013 b.n 8010e12 case DP83848_STATUS_10MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 8010dea: f44f 5300 mov.w r3, #8192 @ 0x2000 8010dee: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010df0: 2300 movs r3, #0 8010df2: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010df6: 2301 movs r3, #1 8010df8: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010dfc: e009 b.n 8010e12 case DP83848_STATUS_10MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 8010dfe: 2300 movs r3, #0 8010e00: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010e02: 2300 movs r3, #0 8010e04: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010e08: 2301 movs r3, #1 8010e0a: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010e0e: e000 b.n 8010e12 default: break; 8010e10: bf00 nop } if(linkchanged) 8010e12: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 8010e16: 2b00 cmp r3, #0 8010e18: d020 beq.n 8010e5c { /* Get MAC Config MAC */ HAL_ETH_GetMACConfig(&heth, &MACConf); 8010e1a: f107 0310 add.w r3, r7, #16 8010e1e: 4619 mov r1, r3 8010e20: 4815 ldr r0, [pc, #84] @ (8010e78 ) 8010e22: f7f8 f827 bl 8008e74 MACConf.DuplexMode = duplex; 8010e26: 6ffb ldr r3, [r7, #124] @ 0x7c 8010e28: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 8010e2a: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 8010e2e: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 8010e30: f107 0310 add.w r3, r7, #16 8010e34: 4619 mov r1, r3 8010e36: 4810 ldr r0, [pc, #64] @ (8010e78 ) 8010e38: f7f8 f9f0 bl 800921c HAL_ETH_Start_IT(&heth); 8010e3c: 480e ldr r0, [pc, #56] @ (8010e78 ) 8010e3e: f7f7 fb89 bl 8008554 LOCK_TCPIP_CORE(); 8010e42: f000 f8cd bl 8010fe0 netif_set_up(netif); 8010e46: 6f78 ldr r0, [r7, #116] @ 0x74 8010e48: f009 fdaa bl 801a9a0 netif_set_link_up(netif); 8010e4c: 6f78 ldr r0, [r7, #116] @ 0x74 8010e4e: f009 fe49 bl 801aae4 UNLOCK_TCPIP_CORE(); 8010e52: f000 f8d5 bl 8011000 printf("Link up...\r\n"); 8010e56: 480a ldr r0, [pc, #40] @ (8010e80 ) 8010e58: f019 fd70 bl 802a93c } } /* USER CODE BEGIN ETH link Thread core code for User BSP */ #if USE_DHCP dhcp_sm(netif, &DHCP_state); 8010e5c: f107 030f add.w r3, r7, #15 8010e60: 4619 mov r1, r3 8010e62: 6f78 ldr r0, [r7, #116] @ 0x74 8010e64: f000 f922 bl 80110ac #endif /* ETH_CODE: workaround to call LOCK_TCPIP_CORE when accessing netif link functions*/ // UNLOCK_TCPIP_CORE(); osDelay(pdMS_TO_TICKS(500)); 8010e68: f44f 70fa mov.w r0, #500 @ 0x1f4 8010e6c: f000 faff bl 801146e // LOCK_TCPIP_CORE(); continue; /* skip next osDelay */ 8010e70: bf00 nop PHYLinkState = DP83848_GetLinkState(&DP83848); 8010e72: e76a b.n 8010d4a 8010e74: 240023b4 .word 0x240023b4 8010e78: 240022cc .word 0x240022cc 8010e7c: 0802da54 .word 0x0802da54 8010e80: 0802da64 .word 0x0802da64 08010e84 : * @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) { 8010e84: b480 push {r7} 8010e86: b083 sub sp, #12 8010e88: af00 add r7, sp, #0 8010e8a: 6078 str r0, [r7, #4] /* NOTE : This is function could be implemented in user file when the callback is needed, */ } 8010e8c: bf00 nop 8010e8e: 370c adds r7, #12 8010e90: 46bd mov sp, r7 8010e92: f85d 7b04 ldr.w r7, [sp], #4 8010e96: 4770 bx lr 08010e98 : void HAL_ETH_RxAllocateCallback(uint8_t **buff) { 8010e98: b580 push {r7, lr} 8010e9a: b086 sub sp, #24 8010e9c: af02 add r7, sp, #8 8010e9e: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH RxAllocateCallback */ struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL); 8010ea0: 4812 ldr r0, [pc, #72] @ (8010eec ) 8010ea2: f009 fae5 bl 801a470 8010ea6: 60f8 str r0, [r7, #12] if (p) 8010ea8: 68fb ldr r3, [r7, #12] 8010eaa: 2b00 cmp r3, #0 8010eac: d014 beq.n 8010ed8 { /* Get the buff from the struct pbuf address. */ *buff = (uint8_t *)p + offsetof(RxBuff_t, buff); 8010eae: 68fb ldr r3, [r7, #12] 8010eb0: f103 0220 add.w r2, r3, #32 8010eb4: 687b ldr r3, [r7, #4] 8010eb6: 601a str r2, [r3, #0] p->custom_free_function = pbuf_free_custom; 8010eb8: 68fb ldr r3, [r7, #12] 8010eba: 4a0d ldr r2, [pc, #52] @ (8010ef0 ) 8010ebc: 611a str r2, [r3, #16] /* Initialize the struct pbuf. * This must be performed whenever a buffer's allocated because it may be * changed by lwIP or the app, e.g., pbuf_free decrements ref. */ pbuf_alloced_custom(PBUF_RAW, 0, PBUF_REF, p, *buff, ETH_RX_BUFFER_SIZE); 8010ebe: 687b ldr r3, [r7, #4] 8010ec0: 681b ldr r3, [r3, #0] 8010ec2: f44f 62c0 mov.w r2, #1536 @ 0x600 8010ec6: 9201 str r2, [sp, #4] 8010ec8: 9300 str r3, [sp, #0] 8010eca: 68fb ldr r3, [r7, #12] 8010ecc: 2241 movs r2, #65 @ 0x41 8010ece: 2100 movs r1, #0 8010ed0: 2000 movs r0, #0 8010ed2: f00a f869 bl 801afa8 { RxAllocStatus = RX_ALLOC_ERROR; *buff = NULL; } /* USER CODE END HAL ETH RxAllocateCallback */ } 8010ed6: e005 b.n 8010ee4 RxAllocStatus = RX_ALLOC_ERROR; 8010ed8: 4b06 ldr r3, [pc, #24] @ (8010ef4 ) 8010eda: 2201 movs r2, #1 8010edc: 701a strb r2, [r3, #0] *buff = NULL; 8010ede: 687b ldr r3, [r7, #4] 8010ee0: 2200 movs r2, #0 8010ee2: 601a str r2, [r3, #0] } 8010ee4: bf00 nop 8010ee6: 3710 adds r7, #16 8010ee8: 46bd mov sp, r7 8010eea: bd80 pop {r7, pc} 8010eec: 08031acc .word 0x08031acc 8010ef0: 08010aa5 .word 0x08010aa5 8010ef4: 240022c0 .word 0x240022c0 08010ef8 : void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length) { 8010ef8: b480 push {r7} 8010efa: b08d sub sp, #52 @ 0x34 8010efc: af00 add r7, sp, #0 8010efe: 60f8 str r0, [r7, #12] 8010f00: 60b9 str r1, [r7, #8] 8010f02: 607a str r2, [r7, #4] 8010f04: 807b strh r3, [r7, #2] /* USER CODE BEGIN HAL ETH RxLinkCallback */ struct pbuf **ppStart = (struct pbuf **)pStart; 8010f06: 68fb ldr r3, [r7, #12] 8010f08: 62bb str r3, [r7, #40] @ 0x28 struct pbuf **ppEnd = (struct pbuf **)pEnd; 8010f0a: 68bb ldr r3, [r7, #8] 8010f0c: 627b str r3, [r7, #36] @ 0x24 struct pbuf *p = NULL; 8010f0e: 2300 movs r3, #0 8010f10: 62fb str r3, [r7, #44] @ 0x2c /* Get the struct pbuf from the buff address. */ p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff)); 8010f12: 687b ldr r3, [r7, #4] 8010f14: 3b20 subs r3, #32 8010f16: 62fb str r3, [r7, #44] @ 0x2c p->next = NULL; 8010f18: 6afb ldr r3, [r7, #44] @ 0x2c 8010f1a: 2200 movs r2, #0 8010f1c: 601a str r2, [r3, #0] p->tot_len = 0; 8010f1e: 6afb ldr r3, [r7, #44] @ 0x2c 8010f20: 2200 movs r2, #0 8010f22: 811a strh r2, [r3, #8] p->len = Length; 8010f24: 6afb ldr r3, [r7, #44] @ 0x2c 8010f26: 887a ldrh r2, [r7, #2] 8010f28: 815a strh r2, [r3, #10] /* Chain the buffer. */ if (!*ppStart) 8010f2a: 6abb ldr r3, [r7, #40] @ 0x28 8010f2c: 681b ldr r3, [r3, #0] 8010f2e: 2b00 cmp r3, #0 8010f30: d103 bne.n 8010f3a { /* The first buffer of the packet. */ *ppStart = p; 8010f32: 6abb ldr r3, [r7, #40] @ 0x28 8010f34: 6afa ldr r2, [r7, #44] @ 0x2c 8010f36: 601a str r2, [r3, #0] 8010f38: e003 b.n 8010f42 } else { /* Chain the buffer to the end of the packet. */ (*ppEnd)->next = p; 8010f3a: 6a7b ldr r3, [r7, #36] @ 0x24 8010f3c: 681b ldr r3, [r3, #0] 8010f3e: 6afa ldr r2, [r7, #44] @ 0x2c 8010f40: 601a str r2, [r3, #0] } *ppEnd = p; 8010f42: 6a7b ldr r3, [r7, #36] @ 0x24 8010f44: 6afa ldr r2, [r7, #44] @ 0x2c 8010f46: 601a str r2, [r3, #0] /* Update the total length of all the buffers of the chain. Each pbuf in the chain should have its tot_len * set to its own length, plus the length of all the following pbufs in the chain. */ for (p = *ppStart; p != NULL; p = p->next) 8010f48: 6abb ldr r3, [r7, #40] @ 0x28 8010f4a: 681b ldr r3, [r3, #0] 8010f4c: 62fb str r3, [r7, #44] @ 0x2c 8010f4e: e009 b.n 8010f64 { p->tot_len += Length; 8010f50: 6afb ldr r3, [r7, #44] @ 0x2c 8010f52: 891a ldrh r2, [r3, #8] 8010f54: 887b ldrh r3, [r7, #2] 8010f56: 4413 add r3, r2 8010f58: b29a uxth r2, r3 8010f5a: 6afb ldr r3, [r7, #44] @ 0x2c 8010f5c: 811a strh r2, [r3, #8] for (p = *ppStart; p != NULL; p = p->next) 8010f5e: 6afb ldr r3, [r7, #44] @ 0x2c 8010f60: 681b ldr r3, [r3, #0] 8010f62: 62fb str r3, [r7, #44] @ 0x2c 8010f64: 6afb ldr r3, [r7, #44] @ 0x2c 8010f66: 2b00 cmp r3, #0 8010f68: d1f2 bne.n 8010f50 } /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */ SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length); 8010f6a: 887b ldrh r3, [r7, #2] 8010f6c: 687a ldr r2, [r7, #4] 8010f6e: 623a str r2, [r7, #32] 8010f70: 61fb str r3, [r7, #28] \param[in] dsize size of memory block (in number of bytes) */ __STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (void *addr, int32_t dsize) { #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) if ( dsize > 0 ) { 8010f72: 69fb ldr r3, [r7, #28] 8010f74: 2b00 cmp r3, #0 8010f76: dd1d ble.n 8010fb4 int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); 8010f78: 6a3b ldr r3, [r7, #32] 8010f7a: f003 021f and.w r2, r3, #31 8010f7e: 69fb ldr r3, [r7, #28] 8010f80: 4413 add r3, r2 8010f82: 61bb str r3, [r7, #24] uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; 8010f84: 6a3b ldr r3, [r7, #32] 8010f86: 617b str r3, [r7, #20] __ASM volatile ("dsb 0xF":::"memory"); 8010f88: f3bf 8f4f dsb sy } 8010f8c: bf00 nop __DSB(); do { SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ 8010f8e: 4a0d ldr r2, [pc, #52] @ (8010fc4 ) 8010f90: 697b ldr r3, [r7, #20] 8010f92: f8c2 325c str.w r3, [r2, #604] @ 0x25c op_addr += __SCB_DCACHE_LINE_SIZE; 8010f96: 697b ldr r3, [r7, #20] 8010f98: 3320 adds r3, #32 8010f9a: 617b str r3, [r7, #20] op_size -= __SCB_DCACHE_LINE_SIZE; 8010f9c: 69bb ldr r3, [r7, #24] 8010f9e: 3b20 subs r3, #32 8010fa0: 61bb str r3, [r7, #24] } while ( op_size > 0 ); 8010fa2: 69bb ldr r3, [r7, #24] 8010fa4: 2b00 cmp r3, #0 8010fa6: dcf2 bgt.n 8010f8e __ASM volatile ("dsb 0xF":::"memory"); 8010fa8: f3bf 8f4f dsb sy } 8010fac: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8010fae: f3bf 8f6f isb sy } 8010fb2: bf00 nop __DSB(); __ISB(); } #endif } 8010fb4: bf00 nop /* USER CODE END HAL ETH RxLinkCallback */ } 8010fb6: bf00 nop 8010fb8: 3734 adds r7, #52 @ 0x34 8010fba: 46bd mov sp, r7 8010fbc: f85d 7b04 ldr.w r7, [sp], #4 8010fc0: 4770 bx lr 8010fc2: bf00 nop 8010fc4: e000ed00 .word 0xe000ed00 08010fc8 : void HAL_ETH_TxFreeCallback(uint32_t * buff) { 8010fc8: b580 push {r7, lr} 8010fca: b082 sub sp, #8 8010fcc: af00 add r7, sp, #0 8010fce: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH TxFreeCallback */ pbuf_free((struct pbuf *)buff); 8010fd0: 6878 ldr r0, [r7, #4] 8010fd2: f00a f9d3 bl 801b37c /* USER CODE END HAL ETH TxFreeCallback */ } 8010fd6: bf00 nop 8010fd8: 3708 adds r7, #8 8010fda: 46bd mov sp, r7 8010fdc: bd80 pop {r7, pc} ... 08010fe0 : /* ETH_CODE: add functions needed for proper multithreading support and check */ static osThreadId_t lwip_core_lock_holder_thread_id; static osThreadId_t lwip_tcpip_thread_id; void sys_lock_tcpip_core(void){ 8010fe0: b580 push {r7, lr} 8010fe2: af00 add r7, sp, #0 sys_mutex_lock(&lock_tcpip_core); 8010fe4: 4804 ldr r0, [pc, #16] @ (8010ff8 ) 8010fe6: f016 f96f bl 80272c8 lwip_core_lock_holder_thread_id = osThreadGetId(); 8010fea: f000 fa35 bl 8011458 8010fee: 4603 mov r3, r0 8010ff0: 4a02 ldr r2, [pc, #8] @ (8010ffc ) 8010ff2: 6013 str r3, [r2, #0] } 8010ff4: bf00 nop 8010ff6: bd80 pop {r7, pc} 8010ff8: 24024414 .word 0x24024414 8010ffc: 240023d4 .word 0x240023d4 08011000 : void sys_unlock_tcpip_core(void){ 8011000: b580 push {r7, lr} 8011002: af00 add r7, sp, #0 lwip_core_lock_holder_thread_id = 0; 8011004: 4b03 ldr r3, [pc, #12] @ (8011014 ) 8011006: 2200 movs r2, #0 8011008: 601a str r2, [r3, #0] sys_mutex_unlock(&lock_tcpip_core); 801100a: 4803 ldr r0, [pc, #12] @ (8011018 ) 801100c: f016 f96b bl 80272e6 } 8011010: bf00 nop 8011012: bd80 pop {r7, pc} 8011014: 240023d4 .word 0x240023d4 8011018: 24024414 .word 0x24024414 0801101c : void sys_check_core_locking(void){ 801101c: b580 push {r7, lr} 801101e: b082 sub sp, #8 8011020: af00 add r7, sp, #0 /* Embedded systems should check we are NOT in an interrupt context here */ LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0); 8011022: 4b15 ldr r3, [pc, #84] @ (8011078 ) 8011024: 685b ldr r3, [r3, #4] 8011026: f3c3 0308 ubfx r3, r3, #0, #9 801102a: 2b00 cmp r3, #0 801102c: d006 beq.n 801103c 801102e: 4b13 ldr r3, [pc, #76] @ (801107c ) 8011030: f240 4216 movw r2, #1046 @ 0x416 8011034: 4912 ldr r1, [pc, #72] @ (8011080 ) 8011036: 4813 ldr r0, [pc, #76] @ (8011084 ) 8011038: f019 fc18 bl 802a86c if (lwip_tcpip_thread_id != 0) { 801103c: 4b12 ldr r3, [pc, #72] @ (8011088 ) 801103e: 681b ldr r3, [r3, #0] 8011040: 2b00 cmp r3, #0 8011042: d014 beq.n 801106e osThreadId_t current_thread_id = osThreadGetId(); 8011044: f000 fa08 bl 8011458 8011048: 6078 str r0, [r7, #4] #if LWIP_TCPIP_CORE_LOCKING LWIP_ASSERT("Function called without core lock", current_thread_id == lwip_core_lock_holder_thread_id); 801104a: 4b10 ldr r3, [pc, #64] @ (801108c ) 801104c: 681b ldr r3, [r3, #0] 801104e: 687a ldr r2, [r7, #4] 8011050: 429a cmp r2, r3 8011052: d006 beq.n 8011062 8011054: 4b09 ldr r3, [pc, #36] @ (801107c ) 8011056: f240 421c movw r2, #1052 @ 0x41c 801105a: 490d ldr r1, [pc, #52] @ (8011090 ) 801105c: 4809 ldr r0, [pc, #36] @ (8011084 ) 801105e: f019 fc05 bl 802a86c /* ETH_CODE: to easily check that example has correct handling of core lock * This will trigger breakpoint (__BKPT) */ #warning Below check should be removed in production code if(current_thread_id != lwip_core_lock_holder_thread_id) __BKPT(0); 8011062: 4b0a ldr r3, [pc, #40] @ (801108c ) 8011064: 681b ldr r3, [r3, #0] 8011066: 687a ldr r2, [r7, #4] 8011068: 429a cmp r2, r3 801106a: d000 beq.n 801106e 801106c: be00 bkpt 0x0000 #else /* LWIP_TCPIP_CORE_LOCKING */ LWIP_ASSERT("Function called from wrong thread", current_thread_id == lwip_tcpip_thread_id); #endif /* LWIP_TCPIP_CORE_LOCKING */ LWIP_UNUSED_ARG(current_thread_id); /* for LWIP_NOASSERT */ } } 801106e: bf00 nop 8011070: 3708 adds r7, #8 8011072: 46bd mov sp, r7 8011074: bd80 pop {r7, pc} 8011076: bf00 nop 8011078: e000ed00 .word 0xe000ed00 801107c: 0802da00 .word 0x0802da00 8011080: 0802da70 .word 0x0802da70 8011084: 0802da2c .word 0x0802da2c 8011088: 240023d8 .word 0x240023d8 801108c: 240023d4 .word 0x240023d4 8011090: 0802da98 .word 0x0802da98 08011094 : void sys_mark_tcpip_thread(void){ 8011094: b580 push {r7, lr} 8011096: af00 add r7, sp, #0 lwip_tcpip_thread_id = osThreadGetId(); 8011098: f000 f9de bl 8011458 801109c: 4603 mov r3, r0 801109e: 4a02 ldr r2, [pc, #8] @ (80110a8 ) 80110a0: 6013 str r3, [r2, #0] } 80110a2: bf00 nop 80110a4: bd80 pop {r7, pc} 80110a6: bf00 nop 80110a8: 240023d8 .word 0x240023d8 080110ac : #if USE_DHCP void dhcp_sm(struct netif *netif, enum dhcp_states *state) { 80110ac: b580 push {r7, lr} 80110ae: b08c sub sp, #48 @ 0x30 80110b0: af00 add r7, sp, #0 80110b2: 6078 str r0, [r7, #4] 80110b4: 6039 str r1, [r7, #0] ip_addr_t gw; #ifdef DHCP_USER_LOGS uint8_t iptxt[20]; #endif switch(*state) 80110b6: 683b ldr r3, [r7, #0] 80110b8: 781b ldrb r3, [r3, #0] 80110ba: 2b03 cmp r3, #3 80110bc: d072 beq.n 80111a4 80110be: 2b03 cmp r3, #3 80110c0: dc7b bgt.n 80111ba 80110c2: 2b01 cmp r3, #1 80110c4: d002 beq.n 80110cc 80110c6: 2b02 cmp r3, #2 80110c8: d00a beq.n 80110e0 { *state = DHCP_START; } break; default: break; 80110ca: e076 b.n 80111ba *state = DHCP_WAIT_ADDRESS; 80110cc: 683b ldr r3, [r7, #0] 80110ce: 2202 movs r2, #2 80110d0: 701a strb r2, [r3, #0] dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80110d2: 687b ldr r3, [r7, #4] 80110d4: 6a5b ldr r3, [r3, #36] @ 0x24 80110d6: 62fb str r3, [r7, #44] @ 0x2c printf(" State: Looking for DHCP server ...\n"); 80110d8: 483c ldr r0, [pc, #240] @ (80111cc ) 80110da: f019 fc2f bl 802a93c break; 80110de: e071 b.n 80111c4 if (dhcp_supplied_address(netif)) 80110e0: 6878 ldr r0, [r7, #4] 80110e2: f013 fa55 bl 8024590 80110e6: 4603 mov r3, r0 80110e8: 2b00 cmp r3, #0 80110ea: d015 beq.n 8011118 *state = DHCP_ADDRESS_ASSIGNED; 80110ec: 683b ldr r3, [r7, #0] 80110ee: 2203 movs r2, #3 80110f0: 701a strb r2, [r3, #0] sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 80110f2: 687b ldr r3, [r7, #4] 80110f4: 3304 adds r3, #4 80110f6: 4618 mov r0, r3 80110f8: f014 ffe2 bl 80260c0 80110fc: 4602 mov r2, r0 80110fe: f107 030c add.w r3, r7, #12 8011102: 4933 ldr r1, [pc, #204] @ (80111d0 ) 8011104: 4618 mov r0, r3 8011106: f019 fc21 bl 802a94c printf("IP address assigned by a DHCP server: %s\n", iptxt); 801110a: f107 030c add.w r3, r7, #12 801110e: 4619 mov r1, r3 8011110: 4830 ldr r0, [pc, #192] @ (80111d4 ) 8011112: f019 fbab bl 802a86c break; 8011116: e052 b.n 80111be dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 8011118: 687b ldr r3, [r7, #4] 801111a: 6a5b ldr r3, [r3, #36] @ 0x24 801111c: 62fb str r3, [r7, #44] @ 0x2c if (dhcp->tries > MAX_DHCP_TRIES) 801111e: 6afb ldr r3, [r7, #44] @ 0x2c 8011120: 799b ldrb r3, [r3, #6] 8011122: 2b04 cmp r3, #4 8011124: d94b bls.n 80111be *state = DHCP_TIMEOUT; 8011126: 683b ldr r3, [r7, #0] 8011128: 2204 movs r2, #4 801112a: 701a strb r2, [r3, #0] LOCK_TCPIP_CORE(); 801112c: f7ff ff58 bl 8010fe0 dhcp_stop(netif); 8011130: 6878 ldr r0, [r7, #4] 8011132: f012 fc85 bl 8023a40 UNLOCK_TCPIP_CORE(); 8011136: f7ff ff63 bl 8011000 ipaddr_aton(STATIC_IP, &ipaddr); 801113a: f107 0328 add.w r3, r7, #40 @ 0x28 801113e: 4619 mov r1, r3 8011140: 4825 ldr r0, [pc, #148] @ (80111d8 ) 8011142: f014 fe93 bl 8025e6c ipaddr_aton(STATIC_MASK, &netmask); 8011146: f107 0324 add.w r3, r7, #36 @ 0x24 801114a: 4619 mov r1, r3 801114c: 4823 ldr r0, [pc, #140] @ (80111dc ) 801114e: f014 fe8d bl 8025e6c ipaddr_aton(STATIC_GW, &gw); 8011152: f107 0320 add.w r3, r7, #32 8011156: 4619 mov r1, r3 8011158: 4821 ldr r0, [pc, #132] @ (80111e0 ) 801115a: f014 fe87 bl 8025e6c LOCK_TCPIP_CORE(); 801115e: f7ff ff3f bl 8010fe0 netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); 8011162: f107 0320 add.w r3, r7, #32 8011166: f107 0224 add.w r2, r7, #36 @ 0x24 801116a: f107 0128 add.w r1, r7, #40 @ 0x28 801116e: 6878 ldr r0, [r7, #4] 8011170: f009 fbba bl 801a8e8 UNLOCK_TCPIP_CORE(); 8011174: f7ff ff44 bl 8011000 sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 8011178: 687b ldr r3, [r7, #4] 801117a: 3304 adds r3, #4 801117c: 4618 mov r0, r3 801117e: f014 ff9f bl 80260c0 8011182: 4602 mov r2, r0 8011184: f107 030c add.w r3, r7, #12 8011188: 4911 ldr r1, [pc, #68] @ (80111d0 ) 801118a: 4618 mov r0, r3 801118c: f019 fbde bl 802a94c printf("DHCP Timeout !! \n"); 8011190: 4814 ldr r0, [pc, #80] @ (80111e4 ) 8011192: f019 fbd3 bl 802a93c printf("Static IP address: %s\n", iptxt); 8011196: f107 030c add.w r3, r7, #12 801119a: 4619 mov r1, r3 801119c: 4812 ldr r0, [pc, #72] @ (80111e8 ) 801119e: f019 fb65 bl 802a86c break; 80111a2: e00c b.n 80111be dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80111a4: 687b ldr r3, [r7, #4] 80111a6: 6a5b ldr r3, [r3, #36] @ 0x24 80111a8: 62fb str r3, [r7, #44] @ 0x2c if(dhcp->state == 3) 80111aa: 6afb ldr r3, [r7, #44] @ 0x2c 80111ac: 795b ldrb r3, [r3, #5] 80111ae: 2b03 cmp r3, #3 80111b0: d107 bne.n 80111c2 *state = DHCP_START; 80111b2: 683b ldr r3, [r7, #0] 80111b4: 2201 movs r2, #1 80111b6: 701a strb r2, [r3, #0] break; 80111b8: e003 b.n 80111c2 break; 80111ba: bf00 nop 80111bc: e002 b.n 80111c4 break; 80111be: bf00 nop 80111c0: e000 b.n 80111c4 break; 80111c2: bf00 nop } } 80111c4: bf00 nop 80111c6: 3730 adds r7, #48 @ 0x30 80111c8: 46bd mov sp, r7 80111ca: bd80 pop {r7, pc} 80111cc: 0802dabc .word 0x0802dabc 80111d0: 0802dae4 .word 0x0802dae4 80111d4: 0802dae8 .word 0x0802dae8 80111d8: 0802db14 .word 0x0802db14 80111dc: 0802db24 .word 0x0802db24 80111e0: 0802db34 .word 0x0802db34 80111e4: 0802db40 .word 0x0802db40 80111e8: 0802db54 .word 0x0802db54 080111ec <__NVIC_SetPriority>: { 80111ec: b480 push {r7} 80111ee: b083 sub sp, #12 80111f0: af00 add r7, sp, #0 80111f2: 4603 mov r3, r0 80111f4: 6039 str r1, [r7, #0] 80111f6: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 80111f8: f9b7 3006 ldrsh.w r3, [r7, #6] 80111fc: 2b00 cmp r3, #0 80111fe: db0a blt.n 8011216 <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8011200: 683b ldr r3, [r7, #0] 8011202: b2da uxtb r2, r3 8011204: 490c ldr r1, [pc, #48] @ (8011238 <__NVIC_SetPriority+0x4c>) 8011206: f9b7 3006 ldrsh.w r3, [r7, #6] 801120a: 0112 lsls r2, r2, #4 801120c: b2d2 uxtb r2, r2 801120e: 440b add r3, r1 8011210: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 8011214: e00a b.n 801122c <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8011216: 683b ldr r3, [r7, #0] 8011218: b2da uxtb r2, r3 801121a: 4908 ldr r1, [pc, #32] @ (801123c <__NVIC_SetPriority+0x50>) 801121c: 88fb ldrh r3, [r7, #6] 801121e: f003 030f and.w r3, r3, #15 8011222: 3b04 subs r3, #4 8011224: 0112 lsls r2, r2, #4 8011226: b2d2 uxtb r2, r2 8011228: 440b add r3, r1 801122a: 761a strb r2, [r3, #24] } 801122c: bf00 nop 801122e: 370c adds r7, #12 8011230: 46bd mov sp, r7 8011232: f85d 7b04 ldr.w r7, [sp], #4 8011236: 4770 bx lr 8011238: e000e100 .word 0xe000e100 801123c: e000ed00 .word 0xe000ed00 08011240 : /* SysTick handler implementation that also clears overflow flag. */ #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0) void SysTick_Handler (void) { 8011240: b580 push {r7, lr} 8011242: af00 add r7, sp, #0 /* Clear overflow flag */ SysTick->CTRL; 8011244: 4b05 ldr r3, [pc, #20] @ (801125c ) 8011246: 681b ldr r3, [r3, #0] if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { 8011248: f003 fa3c bl 80146c4 801124c: 4603 mov r3, r0 801124e: 2b01 cmp r3, #1 8011250: d001 beq.n 8011256 /* Call tick handler */ xPortSysTickHandler(); 8011252: f004 fc49 bl 8015ae8 } } 8011256: bf00 nop 8011258: bd80 pop {r7, pc} 801125a: bf00 nop 801125c: e000e010 .word 0xe000e010 08011260 : #endif /* SysTick */ /* Setup SVC to reset value. */ __STATIC_INLINE void SVC_Setup (void) { 8011260: b580 push {r7, lr} 8011262: af00 add r7, sp, #0 #if (__ARM_ARCH_7A__ == 0U) /* Service Call interrupt might be configured before kernel start */ /* and when its priority is lower or equal to BASEPRI, svc intruction */ /* causes a Hard Fault. */ NVIC_SetPriority (SVCall_IRQ_NBR, 0U); 8011264: 2100 movs r1, #0 8011266: f06f 0004 mvn.w r0, #4 801126a: f7ff ffbf bl 80111ec <__NVIC_SetPriority> #endif } 801126e: bf00 nop 8011270: bd80 pop {r7, pc} ... 08011274 : static uint32_t OS_Tick_GetOverflow (void); /* Get OS Tick interval */ static uint32_t OS_Tick_GetInterval (void); /*---------------------------------------------------------------------------*/ osStatus_t osKernelInitialize (void) { 8011274: b480 push {r7} 8011276: b083 sub sp, #12 8011278: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801127a: f3ef 8305 mrs r3, IPSR 801127e: 603b str r3, [r7, #0] return(result); 8011280: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 8011282: 2b00 cmp r3, #0 8011284: d003 beq.n 801128e stat = osErrorISR; 8011286: f06f 0305 mvn.w r3, #5 801128a: 607b str r3, [r7, #4] 801128c: e00c b.n 80112a8 } else { if (KernelState == osKernelInactive) { 801128e: 4b0a ldr r3, [pc, #40] @ (80112b8 ) 8011290: 681b ldr r3, [r3, #0] 8011292: 2b00 cmp r3, #0 8011294: d105 bne.n 80112a2 EvrFreeRTOSSetup(0U); #endif #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1) vPortDefineHeapRegions (configHEAP_5_REGIONS); #endif KernelState = osKernelReady; 8011296: 4b08 ldr r3, [pc, #32] @ (80112b8 ) 8011298: 2201 movs r2, #1 801129a: 601a str r2, [r3, #0] stat = osOK; 801129c: 2300 movs r3, #0 801129e: 607b str r3, [r7, #4] 80112a0: e002 b.n 80112a8 } else { stat = osError; 80112a2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80112a6: 607b str r3, [r7, #4] } } return (stat); 80112a8: 687b ldr r3, [r7, #4] } 80112aa: 4618 mov r0, r3 80112ac: 370c adds r7, #12 80112ae: 46bd mov sp, r7 80112b0: f85d 7b04 ldr.w r7, [sp], #4 80112b4: 4770 bx lr 80112b6: bf00 nop 80112b8: 240023dc .word 0x240023dc 080112bc : } return (state); } osStatus_t osKernelStart (void) { 80112bc: b580 push {r7, lr} 80112be: b082 sub sp, #8 80112c0: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80112c2: f3ef 8305 mrs r3, IPSR 80112c6: 603b str r3, [r7, #0] return(result); 80112c8: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 80112ca: 2b00 cmp r3, #0 80112cc: d003 beq.n 80112d6 stat = osErrorISR; 80112ce: f06f 0305 mvn.w r3, #5 80112d2: 607b str r3, [r7, #4] 80112d4: e010 b.n 80112f8 } else { if (KernelState == osKernelReady) { 80112d6: 4b0b ldr r3, [pc, #44] @ (8011304 ) 80112d8: 681b ldr r3, [r3, #0] 80112da: 2b01 cmp r3, #1 80112dc: d109 bne.n 80112f2 /* Ensure SVC priority is at the reset value */ SVC_Setup(); 80112de: f7ff ffbf bl 8011260 /* Change state to enable IRQ masking check */ KernelState = osKernelRunning; 80112e2: 4b08 ldr r3, [pc, #32] @ (8011304 ) 80112e4: 2202 movs r2, #2 80112e6: 601a str r2, [r3, #0] /* Start the kernel scheduler */ vTaskStartScheduler(); 80112e8: f002 fd30 bl 8013d4c stat = osOK; 80112ec: 2300 movs r3, #0 80112ee: 607b str r3, [r7, #4] 80112f0: e002 b.n 80112f8 } else { stat = osError; 80112f2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80112f6: 607b str r3, [r7, #4] } } return (stat); 80112f8: 687b ldr r3, [r7, #4] } 80112fa: 4618 mov r0, r3 80112fc: 3708 adds r7, #8 80112fe: 46bd mov sp, r7 8011300: bd80 pop {r7, pc} 8011302: bf00 nop 8011304: 240023dc .word 0x240023dc 08011308 : } return (lock); } uint32_t osKernelGetTickCount (void) { 8011308: b580 push {r7, lr} 801130a: b082 sub sp, #8 801130c: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801130e: f3ef 8305 mrs r3, IPSR 8011312: 603b str r3, [r7, #0] return(result); 8011314: 683b ldr r3, [r7, #0] TickType_t ticks; if (IS_IRQ()) { 8011316: 2b00 cmp r3, #0 8011318: d003 beq.n 8011322 ticks = xTaskGetTickCountFromISR(); 801131a: f002 fe43 bl 8013fa4 801131e: 6078 str r0, [r7, #4] 8011320: e002 b.n 8011328 } else { ticks = xTaskGetTickCount(); 8011322: f002 fe2f bl 8013f84 8011326: 6078 str r0, [r7, #4] } return (ticks); 8011328: 687b ldr r3, [r7, #4] } 801132a: 4618 mov r0, r3 801132c: 3708 adds r7, #8 801132e: 46bd mov sp, r7 8011330: bd80 pop {r7, pc} 08011332 : return (configCPU_CLOCK_HZ); } /*---------------------------------------------------------------------------*/ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) { 8011332: b580 push {r7, lr} 8011334: b08e sub sp, #56 @ 0x38 8011336: af04 add r7, sp, #16 8011338: 60f8 str r0, [r7, #12] 801133a: 60b9 str r1, [r7, #8] 801133c: 607a str r2, [r7, #4] uint32_t stack; TaskHandle_t hTask; UBaseType_t prio; int32_t mem; hTask = NULL; 801133e: 2300 movs r3, #0 8011340: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011342: f3ef 8305 mrs r3, IPSR 8011346: 617b str r3, [r7, #20] return(result); 8011348: 697b ldr r3, [r7, #20] if (!IS_IRQ() && (func != NULL)) { 801134a: 2b00 cmp r3, #0 801134c: d17f bne.n 801144e 801134e: 68fb ldr r3, [r7, #12] 8011350: 2b00 cmp r3, #0 8011352: d07c beq.n 801144e stack = configMINIMAL_STACK_SIZE; 8011354: f44f 7300 mov.w r3, #512 @ 0x200 8011358: 623b str r3, [r7, #32] prio = (UBaseType_t)osPriorityNormal; 801135a: 2318 movs r3, #24 801135c: 61fb str r3, [r7, #28] name = NULL; 801135e: 2300 movs r3, #0 8011360: 627b str r3, [r7, #36] @ 0x24 mem = -1; 8011362: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011366: 61bb str r3, [r7, #24] if (attr != NULL) { 8011368: 687b ldr r3, [r7, #4] 801136a: 2b00 cmp r3, #0 801136c: d045 beq.n 80113fa if (attr->name != NULL) { 801136e: 687b ldr r3, [r7, #4] 8011370: 681b ldr r3, [r3, #0] 8011372: 2b00 cmp r3, #0 8011374: d002 beq.n 801137c name = attr->name; 8011376: 687b ldr r3, [r7, #4] 8011378: 681b ldr r3, [r3, #0] 801137a: 627b str r3, [r7, #36] @ 0x24 } if (attr->priority != osPriorityNone) { 801137c: 687b ldr r3, [r7, #4] 801137e: 699b ldr r3, [r3, #24] 8011380: 2b00 cmp r3, #0 8011382: d002 beq.n 801138a prio = (UBaseType_t)attr->priority; 8011384: 687b ldr r3, [r7, #4] 8011386: 699b ldr r3, [r3, #24] 8011388: 61fb str r3, [r7, #28] } if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) { 801138a: 69fb ldr r3, [r7, #28] 801138c: 2b00 cmp r3, #0 801138e: d008 beq.n 80113a2 8011390: 69fb ldr r3, [r7, #28] 8011392: 2b38 cmp r3, #56 @ 0x38 8011394: d805 bhi.n 80113a2 8011396: 687b ldr r3, [r7, #4] 8011398: 685b ldr r3, [r3, #4] 801139a: f003 0301 and.w r3, r3, #1 801139e: 2b00 cmp r3, #0 80113a0: d001 beq.n 80113a6 return (NULL); 80113a2: 2300 movs r3, #0 80113a4: e054 b.n 8011450 } if (attr->stack_size > 0U) { 80113a6: 687b ldr r3, [r7, #4] 80113a8: 695b ldr r3, [r3, #20] 80113aa: 2b00 cmp r3, #0 80113ac: d003 beq.n 80113b6 /* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */ /* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */ stack = attr->stack_size / sizeof(StackType_t); 80113ae: 687b ldr r3, [r7, #4] 80113b0: 695b ldr r3, [r3, #20] 80113b2: 089b lsrs r3, r3, #2 80113b4: 623b str r3, [r7, #32] } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80113b6: 687b ldr r3, [r7, #4] 80113b8: 689b ldr r3, [r3, #8] 80113ba: 2b00 cmp r3, #0 80113bc: d00e beq.n 80113dc 80113be: 687b ldr r3, [r7, #4] 80113c0: 68db ldr r3, [r3, #12] 80113c2: 2ba7 cmp r3, #167 @ 0xa7 80113c4: d90a bls.n 80113dc (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80113c6: 687b ldr r3, [r7, #4] 80113c8: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80113ca: 2b00 cmp r3, #0 80113cc: d006 beq.n 80113dc (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80113ce: 687b ldr r3, [r7, #4] 80113d0: 695b ldr r3, [r3, #20] 80113d2: 2b00 cmp r3, #0 80113d4: d002 beq.n 80113dc mem = 1; 80113d6: 2301 movs r3, #1 80113d8: 61bb str r3, [r7, #24] 80113da: e010 b.n 80113fe } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) { 80113dc: 687b ldr r3, [r7, #4] 80113de: 689b ldr r3, [r3, #8] 80113e0: 2b00 cmp r3, #0 80113e2: d10c bne.n 80113fe 80113e4: 687b ldr r3, [r7, #4] 80113e6: 68db ldr r3, [r3, #12] 80113e8: 2b00 cmp r3, #0 80113ea: d108 bne.n 80113fe 80113ec: 687b ldr r3, [r7, #4] 80113ee: 691b ldr r3, [r3, #16] 80113f0: 2b00 cmp r3, #0 80113f2: d104 bne.n 80113fe mem = 0; 80113f4: 2300 movs r3, #0 80113f6: 61bb str r3, [r7, #24] 80113f8: e001 b.n 80113fe } } } else { mem = 0; 80113fa: 2300 movs r3, #0 80113fc: 61bb str r3, [r7, #24] } if (mem == 1) { 80113fe: 69bb ldr r3, [r7, #24] 8011400: 2b01 cmp r3, #1 8011402: d110 bne.n 8011426 #if (configSUPPORT_STATIC_ALLOCATION == 1) hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8011404: 687b ldr r3, [r7, #4] 8011406: 691b ldr r3, [r3, #16] (StaticTask_t *)attr->cb_mem); 8011408: 687a ldr r2, [r7, #4] 801140a: 6892 ldr r2, [r2, #8] hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 801140c: 9202 str r2, [sp, #8] 801140e: 9301 str r3, [sp, #4] 8011410: 69fb ldr r3, [r7, #28] 8011412: 9300 str r3, [sp, #0] 8011414: 68bb ldr r3, [r7, #8] 8011416: 6a3a ldr r2, [r7, #32] 8011418: 6a79 ldr r1, [r7, #36] @ 0x24 801141a: 68f8 ldr r0, [r7, #12] 801141c: f002 faa2 bl 8013964 8011420: 4603 mov r3, r0 8011422: 613b str r3, [r7, #16] 8011424: e013 b.n 801144e #endif } else { if (mem == 0) { 8011426: 69bb ldr r3, [r7, #24] 8011428: 2b00 cmp r3, #0 801142a: d110 bne.n 801144e #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) { 801142c: 6a3b ldr r3, [r7, #32] 801142e: b29a uxth r2, r3 8011430: f107 0310 add.w r3, r7, #16 8011434: 9301 str r3, [sp, #4] 8011436: 69fb ldr r3, [r7, #28] 8011438: 9300 str r3, [sp, #0] 801143a: 68bb ldr r3, [r7, #8] 801143c: 6a79 ldr r1, [r7, #36] @ 0x24 801143e: 68f8 ldr r0, [r7, #12] 8011440: f002 faf0 bl 8013a24 8011444: 4603 mov r3, r0 8011446: 2b01 cmp r3, #1 8011448: d001 beq.n 801144e hTask = NULL; 801144a: 2300 movs r3, #0 801144c: 613b str r3, [r7, #16] #endif } } } return ((osThreadId_t)hTask); 801144e: 693b ldr r3, [r7, #16] } 8011450: 4618 mov r0, r3 8011452: 3728 adds r7, #40 @ 0x28 8011454: 46bd mov sp, r7 8011456: bd80 pop {r7, pc} 08011458 : } return (name); } osThreadId_t osThreadGetId (void) { 8011458: b580 push {r7, lr} 801145a: b082 sub sp, #8 801145c: af00 add r7, sp, #0 osThreadId_t id; id = (osThreadId_t)xTaskGetCurrentTaskHandle(); 801145e: f003 f921 bl 80146a4 8011462: 6078 str r0, [r7, #4] return (id); 8011464: 687b ldr r3, [r7, #4] } 8011466: 4618 mov r0, r3 8011468: 3708 adds r7, #8 801146a: 46bd mov sp, r7 801146c: bd80 pop {r7, pc} 0801146e : /* Return flags before clearing */ return (rflags); } #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */ osStatus_t osDelay (uint32_t ticks) { 801146e: b580 push {r7, lr} 8011470: b084 sub sp, #16 8011472: af00 add r7, sp, #0 8011474: 6078 str r0, [r7, #4] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011476: f3ef 8305 mrs r3, IPSR 801147a: 60bb str r3, [r7, #8] return(result); 801147c: 68bb ldr r3, [r7, #8] osStatus_t stat; if (IS_IRQ()) { 801147e: 2b00 cmp r3, #0 8011480: d003 beq.n 801148a stat = osErrorISR; 8011482: f06f 0305 mvn.w r3, #5 8011486: 60fb str r3, [r7, #12] 8011488: e007 b.n 801149a } else { stat = osOK; 801148a: 2300 movs r3, #0 801148c: 60fb str r3, [r7, #12] if (ticks != 0U) { 801148e: 687b ldr r3, [r7, #4] 8011490: 2b00 cmp r3, #0 8011492: d002 beq.n 801149a vTaskDelay(ticks); 8011494: 6878 ldr r0, [r7, #4] 8011496: f002 fc23 bl 8013ce0 } } return (stat); 801149a: 68fb ldr r3, [r7, #12] } 801149c: 4618 mov r0, r3 801149e: 3710 adds r7, #16 80114a0: 46bd mov sp, r7 80114a2: bd80 pop {r7, pc} 080114a4 : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_TIMER == 1) static void TimerCallback (TimerHandle_t hTimer) { 80114a4: b580 push {r7, lr} 80114a6: b084 sub sp, #16 80114a8: af00 add r7, sp, #0 80114aa: 6078 str r0, [r7, #4] TimerCallback_t *callb; callb = (TimerCallback_t *)pvTimerGetTimerID (hTimer); 80114ac: 6878 ldr r0, [r7, #4] 80114ae: f004 f93b bl 8015728 80114b2: 60f8 str r0, [r7, #12] if (callb != NULL) { 80114b4: 68fb ldr r3, [r7, #12] 80114b6: 2b00 cmp r3, #0 80114b8: d005 beq.n 80114c6 callb->func (callb->arg); 80114ba: 68fb ldr r3, [r7, #12] 80114bc: 681b ldr r3, [r3, #0] 80114be: 68fa ldr r2, [r7, #12] 80114c0: 6852 ldr r2, [r2, #4] 80114c2: 4610 mov r0, r2 80114c4: 4798 blx r3 } } 80114c6: bf00 nop 80114c8: 3710 adds r7, #16 80114ca: 46bd mov sp, r7 80114cc: bd80 pop {r7, pc} ... 080114d0 : osTimerId_t osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr) { 80114d0: b580 push {r7, lr} 80114d2: b08c sub sp, #48 @ 0x30 80114d4: af02 add r7, sp, #8 80114d6: 60f8 str r0, [r7, #12] 80114d8: 607a str r2, [r7, #4] 80114da: 603b str r3, [r7, #0] 80114dc: 460b mov r3, r1 80114de: 72fb strb r3, [r7, #11] TimerHandle_t hTimer; TimerCallback_t *callb; UBaseType_t reload; int32_t mem; hTimer = NULL; 80114e0: 2300 movs r3, #0 80114e2: 623b str r3, [r7, #32] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80114e4: f3ef 8305 mrs r3, IPSR 80114e8: 613b str r3, [r7, #16] return(result); 80114ea: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (func != NULL)) { 80114ec: 2b00 cmp r3, #0 80114ee: d163 bne.n 80115b8 80114f0: 68fb ldr r3, [r7, #12] 80114f2: 2b00 cmp r3, #0 80114f4: d060 beq.n 80115b8 /* Allocate memory to store callback function and argument */ callb = pvPortMalloc (sizeof(TimerCallback_t)); 80114f6: 2008 movs r0, #8 80114f8: f004 fb88 bl 8015c0c 80114fc: 6178 str r0, [r7, #20] if (callb != NULL) { 80114fe: 697b ldr r3, [r7, #20] 8011500: 2b00 cmp r3, #0 8011502: d059 beq.n 80115b8 callb->func = func; 8011504: 697b ldr r3, [r7, #20] 8011506: 68fa ldr r2, [r7, #12] 8011508: 601a str r2, [r3, #0] callb->arg = argument; 801150a: 697b ldr r3, [r7, #20] 801150c: 687a ldr r2, [r7, #4] 801150e: 605a str r2, [r3, #4] if (type == osTimerOnce) { 8011510: 7afb ldrb r3, [r7, #11] 8011512: 2b00 cmp r3, #0 8011514: d102 bne.n 801151c reload = pdFALSE; 8011516: 2300 movs r3, #0 8011518: 61fb str r3, [r7, #28] 801151a: e001 b.n 8011520 } else { reload = pdTRUE; 801151c: 2301 movs r3, #1 801151e: 61fb str r3, [r7, #28] } mem = -1; 8011520: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011524: 61bb str r3, [r7, #24] name = NULL; 8011526: 2300 movs r3, #0 8011528: 627b str r3, [r7, #36] @ 0x24 if (attr != NULL) { 801152a: 683b ldr r3, [r7, #0] 801152c: 2b00 cmp r3, #0 801152e: d01c beq.n 801156a if (attr->name != NULL) { 8011530: 683b ldr r3, [r7, #0] 8011532: 681b ldr r3, [r3, #0] 8011534: 2b00 cmp r3, #0 8011536: d002 beq.n 801153e name = attr->name; 8011538: 683b ldr r3, [r7, #0] 801153a: 681b ldr r3, [r3, #0] 801153c: 627b str r3, [r7, #36] @ 0x24 } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTimer_t))) { 801153e: 683b ldr r3, [r7, #0] 8011540: 689b ldr r3, [r3, #8] 8011542: 2b00 cmp r3, #0 8011544: d006 beq.n 8011554 8011546: 683b ldr r3, [r7, #0] 8011548: 68db ldr r3, [r3, #12] 801154a: 2b2b cmp r3, #43 @ 0x2b 801154c: d902 bls.n 8011554 mem = 1; 801154e: 2301 movs r3, #1 8011550: 61bb str r3, [r7, #24] 8011552: e00c b.n 801156e } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8011554: 683b ldr r3, [r7, #0] 8011556: 689b ldr r3, [r3, #8] 8011558: 2b00 cmp r3, #0 801155a: d108 bne.n 801156e 801155c: 683b ldr r3, [r7, #0] 801155e: 68db ldr r3, [r3, #12] 8011560: 2b00 cmp r3, #0 8011562: d104 bne.n 801156e mem = 0; 8011564: 2300 movs r3, #0 8011566: 61bb str r3, [r7, #24] 8011568: e001 b.n 801156e } } } else { mem = 0; 801156a: 2300 movs r3, #0 801156c: 61bb str r3, [r7, #24] } if (mem == 1) { 801156e: 69bb ldr r3, [r7, #24] 8011570: 2b01 cmp r3, #1 8011572: d10c bne.n 801158e #if (configSUPPORT_STATIC_ALLOCATION == 1) hTimer = xTimerCreateStatic (name, 1, reload, callb, TimerCallback, (StaticTimer_t *)attr->cb_mem); 8011574: 683b ldr r3, [r7, #0] 8011576: 689b ldr r3, [r3, #8] 8011578: 9301 str r3, [sp, #4] 801157a: 4b12 ldr r3, [pc, #72] @ (80115c4 ) 801157c: 9300 str r3, [sp, #0] 801157e: 697b ldr r3, [r7, #20] 8011580: 69fa ldr r2, [r7, #28] 8011582: 2101 movs r1, #1 8011584: 6a78 ldr r0, [r7, #36] @ 0x24 8011586: f003 fd18 bl 8014fba 801158a: 6238 str r0, [r7, #32] 801158c: e00b b.n 80115a6 #endif } else { if (mem == 0) { 801158e: 69bb ldr r3, [r7, #24] 8011590: 2b00 cmp r3, #0 8011592: d108 bne.n 80115a6 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hTimer = xTimerCreate (name, 1, reload, callb, TimerCallback); 8011594: 4b0b ldr r3, [pc, #44] @ (80115c4 ) 8011596: 9300 str r3, [sp, #0] 8011598: 697b ldr r3, [r7, #20] 801159a: 69fa ldr r2, [r7, #28] 801159c: 2101 movs r1, #1 801159e: 6a78 ldr r0, [r7, #36] @ 0x24 80115a0: f003 fcea bl 8014f78 80115a4: 6238 str r0, [r7, #32] #endif } } if ((hTimer == NULL) && (callb != NULL)) { 80115a6: 6a3b ldr r3, [r7, #32] 80115a8: 2b00 cmp r3, #0 80115aa: d105 bne.n 80115b8 80115ac: 697b ldr r3, [r7, #20] 80115ae: 2b00 cmp r3, #0 80115b0: d002 beq.n 80115b8 vPortFree (callb); 80115b2: 6978 ldr r0, [r7, #20] 80115b4: f004 fbf8 bl 8015da8 } } } return ((osTimerId_t)hTimer); 80115b8: 6a3b ldr r3, [r7, #32] } 80115ba: 4618 mov r0, r3 80115bc: 3728 adds r7, #40 @ 0x28 80115be: 46bd mov sp, r7 80115c0: bd80 pop {r7, pc} 80115c2: bf00 nop 80115c4: 080114a5 .word 0x080114a5 080115c8 : } return (p); } osStatus_t osTimerStart (osTimerId_t timer_id, uint32_t ticks) { 80115c8: b580 push {r7, lr} 80115ca: b088 sub sp, #32 80115cc: af02 add r7, sp, #8 80115ce: 6078 str r0, [r7, #4] 80115d0: 6039 str r1, [r7, #0] TimerHandle_t hTimer = (TimerHandle_t)timer_id; 80115d2: 687b ldr r3, [r7, #4] 80115d4: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80115d6: f3ef 8305 mrs r3, IPSR 80115da: 60fb str r3, [r7, #12] return(result); 80115dc: 68fb ldr r3, [r7, #12] osStatus_t stat; if (IS_IRQ()) { 80115de: 2b00 cmp r3, #0 80115e0: d003 beq.n 80115ea stat = osErrorISR; 80115e2: f06f 0305 mvn.w r3, #5 80115e6: 617b str r3, [r7, #20] 80115e8: e017 b.n 801161a } else if (hTimer == NULL) { 80115ea: 693b ldr r3, [r7, #16] 80115ec: 2b00 cmp r3, #0 80115ee: d103 bne.n 80115f8 stat = osErrorParameter; 80115f0: f06f 0303 mvn.w r3, #3 80115f4: 617b str r3, [r7, #20] 80115f6: e010 b.n 801161a } else { if (xTimerChangePeriod (hTimer, ticks, 0) == pdPASS) { 80115f8: 2300 movs r3, #0 80115fa: 9300 str r3, [sp, #0] 80115fc: 2300 movs r3, #0 80115fe: 683a ldr r2, [r7, #0] 8011600: 2104 movs r1, #4 8011602: 6938 ldr r0, [r7, #16] 8011604: f003 fd56 bl 80150b4 8011608: 4603 mov r3, r0 801160a: 2b01 cmp r3, #1 801160c: d102 bne.n 8011614 stat = osOK; 801160e: 2300 movs r3, #0 8011610: 617b str r3, [r7, #20] 8011612: e002 b.n 801161a } else { stat = osErrorResource; 8011614: f06f 0302 mvn.w r3, #2 8011618: 617b str r3, [r7, #20] } } return (stat); 801161a: 697b ldr r3, [r7, #20] } 801161c: 4618 mov r0, r3 801161e: 3718 adds r7, #24 8011620: 46bd mov sp, r7 8011622: bd80 pop {r7, pc} 08011624 : osStatus_t osTimerStop (osTimerId_t timer_id) { 8011624: b580 push {r7, lr} 8011626: b088 sub sp, #32 8011628: af02 add r7, sp, #8 801162a: 6078 str r0, [r7, #4] TimerHandle_t hTimer = (TimerHandle_t)timer_id; 801162c: 687b ldr r3, [r7, #4] 801162e: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011630: f3ef 8305 mrs r3, IPSR 8011634: 60fb str r3, [r7, #12] return(result); 8011636: 68fb ldr r3, [r7, #12] osStatus_t stat; if (IS_IRQ()) { 8011638: 2b00 cmp r3, #0 801163a: d003 beq.n 8011644 stat = osErrorISR; 801163c: f06f 0305 mvn.w r3, #5 8011640: 617b str r3, [r7, #20] 8011642: e021 b.n 8011688 } else if (hTimer == NULL) { 8011644: 693b ldr r3, [r7, #16] 8011646: 2b00 cmp r3, #0 8011648: d103 bne.n 8011652 stat = osErrorParameter; 801164a: f06f 0303 mvn.w r3, #3 801164e: 617b str r3, [r7, #20] 8011650: e01a b.n 8011688 } else { if (xTimerIsTimerActive (hTimer) == pdFALSE) { 8011652: 6938 ldr r0, [r7, #16] 8011654: f004 f83e bl 80156d4 8011658: 4603 mov r3, r0 801165a: 2b00 cmp r3, #0 801165c: d103 bne.n 8011666 stat = osErrorResource; 801165e: f06f 0302 mvn.w r3, #2 8011662: 617b str r3, [r7, #20] 8011664: e010 b.n 8011688 } else { if (xTimerStop (hTimer, 0) == pdPASS) { 8011666: 2300 movs r3, #0 8011668: 9300 str r3, [sp, #0] 801166a: 2300 movs r3, #0 801166c: 2200 movs r2, #0 801166e: 2103 movs r1, #3 8011670: 6938 ldr r0, [r7, #16] 8011672: f003 fd1f bl 80150b4 8011676: 4603 mov r3, r0 8011678: 2b01 cmp r3, #1 801167a: d102 bne.n 8011682 stat = osOK; 801167c: 2300 movs r3, #0 801167e: 617b str r3, [r7, #20] 8011680: e002 b.n 8011688 } else { stat = osError; 8011682: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011686: 617b str r3, [r7, #20] } } } return (stat); 8011688: 697b ldr r3, [r7, #20] } 801168a: 4618 mov r0, r3 801168c: 3718 adds r7, #24 801168e: 46bd mov sp, r7 8011690: bd80 pop {r7, pc} 08011692 : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_MUTEX == 1) osMutexId_t osMutexNew (const osMutexAttr_t *attr) { 8011692: b580 push {r7, lr} 8011694: b088 sub sp, #32 8011696: af00 add r7, sp, #0 8011698: 6078 str r0, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hMutex = NULL; 801169a: 2300 movs r3, #0 801169c: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801169e: f3ef 8305 mrs r3, IPSR 80116a2: 60bb str r3, [r7, #8] return(result); 80116a4: 68bb ldr r3, [r7, #8] if (!IS_IRQ()) { 80116a6: 2b00 cmp r3, #0 80116a8: d174 bne.n 8011794 if (attr != NULL) { 80116aa: 687b ldr r3, [r7, #4] 80116ac: 2b00 cmp r3, #0 80116ae: d003 beq.n 80116b8 type = attr->attr_bits; 80116b0: 687b ldr r3, [r7, #4] 80116b2: 685b ldr r3, [r3, #4] 80116b4: 61bb str r3, [r7, #24] 80116b6: e001 b.n 80116bc } else { type = 0U; 80116b8: 2300 movs r3, #0 80116ba: 61bb str r3, [r7, #24] } if ((type & osMutexRecursive) == osMutexRecursive) { 80116bc: 69bb ldr r3, [r7, #24] 80116be: f003 0301 and.w r3, r3, #1 80116c2: 2b00 cmp r3, #0 80116c4: d002 beq.n 80116cc rmtx = 1U; 80116c6: 2301 movs r3, #1 80116c8: 617b str r3, [r7, #20] 80116ca: e001 b.n 80116d0 } else { rmtx = 0U; 80116cc: 2300 movs r3, #0 80116ce: 617b str r3, [r7, #20] } if ((type & osMutexRobust) != osMutexRobust) { 80116d0: 69bb ldr r3, [r7, #24] 80116d2: f003 0308 and.w r3, r3, #8 80116d6: 2b00 cmp r3, #0 80116d8: d15c bne.n 8011794 mem = -1; 80116da: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80116de: 613b str r3, [r7, #16] if (attr != NULL) { 80116e0: 687b ldr r3, [r7, #4] 80116e2: 2b00 cmp r3, #0 80116e4: d015 beq.n 8011712 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 80116e6: 687b ldr r3, [r7, #4] 80116e8: 689b ldr r3, [r3, #8] 80116ea: 2b00 cmp r3, #0 80116ec: d006 beq.n 80116fc 80116ee: 687b ldr r3, [r7, #4] 80116f0: 68db ldr r3, [r3, #12] 80116f2: 2b4f cmp r3, #79 @ 0x4f 80116f4: d902 bls.n 80116fc mem = 1; 80116f6: 2301 movs r3, #1 80116f8: 613b str r3, [r7, #16] 80116fa: e00c b.n 8011716 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 80116fc: 687b ldr r3, [r7, #4] 80116fe: 689b ldr r3, [r3, #8] 8011700: 2b00 cmp r3, #0 8011702: d108 bne.n 8011716 8011704: 687b ldr r3, [r7, #4] 8011706: 68db ldr r3, [r3, #12] 8011708: 2b00 cmp r3, #0 801170a: d104 bne.n 8011716 mem = 0; 801170c: 2300 movs r3, #0 801170e: 613b str r3, [r7, #16] 8011710: e001 b.n 8011716 } } } else { mem = 0; 8011712: 2300 movs r3, #0 8011714: 613b str r3, [r7, #16] } if (mem == 1) { 8011716: 693b ldr r3, [r7, #16] 8011718: 2b01 cmp r3, #1 801171a: d112 bne.n 8011742 #if (configSUPPORT_STATIC_ALLOCATION == 1) if (rmtx != 0U) { 801171c: 697b ldr r3, [r7, #20] 801171e: 2b00 cmp r3, #0 8011720: d007 beq.n 8011732 #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem); 8011722: 687b ldr r3, [r7, #4] 8011724: 689b ldr r3, [r3, #8] 8011726: 4619 mov r1, r3 8011728: 2004 movs r0, #4 801172a: f000 fdd8 bl 80122de 801172e: 61f8 str r0, [r7, #28] 8011730: e016 b.n 8011760 #endif } else { hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem); 8011732: 687b ldr r3, [r7, #4] 8011734: 689b ldr r3, [r3, #8] 8011736: 4619 mov r1, r3 8011738: 2001 movs r0, #1 801173a: f000 fdd0 bl 80122de 801173e: 61f8 str r0, [r7, #28] 8011740: e00e b.n 8011760 } #endif } else { if (mem == 0) { 8011742: 693b ldr r3, [r7, #16] 8011744: 2b00 cmp r3, #0 8011746: d10b bne.n 8011760 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (rmtx != 0U) { 8011748: 697b ldr r3, [r7, #20] 801174a: 2b00 cmp r3, #0 801174c: d004 beq.n 8011758 #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutex (); 801174e: 2004 movs r0, #4 8011750: f000 fdad bl 80122ae 8011754: 61f8 str r0, [r7, #28] 8011756: e003 b.n 8011760 #endif } else { hMutex = xSemaphoreCreateMutex (); 8011758: 2001 movs r0, #1 801175a: f000 fda8 bl 80122ae 801175e: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hMutex != NULL) { 8011760: 69fb ldr r3, [r7, #28] 8011762: 2b00 cmp r3, #0 8011764: d00c beq.n 8011780 if (attr != NULL) { 8011766: 687b ldr r3, [r7, #4] 8011768: 2b00 cmp r3, #0 801176a: d003 beq.n 8011774 name = attr->name; 801176c: 687b ldr r3, [r7, #4] 801176e: 681b ldr r3, [r3, #0] 8011770: 60fb str r3, [r7, #12] 8011772: e001 b.n 8011778 } else { name = NULL; 8011774: 2300 movs r3, #0 8011776: 60fb str r3, [r7, #12] } vQueueAddToRegistry (hMutex, name); 8011778: 68f9 ldr r1, [r7, #12] 801177a: 69f8 ldr r0, [r7, #28] 801177c: f001 fcd2 bl 8013124 } #endif if ((hMutex != NULL) && (rmtx != 0U)) { 8011780: 69fb ldr r3, [r7, #28] 8011782: 2b00 cmp r3, #0 8011784: d006 beq.n 8011794 8011786: 697b ldr r3, [r7, #20] 8011788: 2b00 cmp r3, #0 801178a: d003 beq.n 8011794 hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U); 801178c: 69fb ldr r3, [r7, #28] 801178e: f043 0301 orr.w r3, r3, #1 8011792: 61fb str r3, [r7, #28] } } } return ((osMutexId_t)hMutex); 8011794: 69fb ldr r3, [r7, #28] } 8011796: 4618 mov r0, r3 8011798: 3720 adds r7, #32 801179a: 46bd mov sp, r7 801179c: bd80 pop {r7, pc} 0801179e : osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) { 801179e: b580 push {r7, lr} 80117a0: b086 sub sp, #24 80117a2: af00 add r7, sp, #0 80117a4: 6078 str r0, [r7, #4] 80117a6: 6039 str r1, [r7, #0] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 80117a8: 687b ldr r3, [r7, #4] 80117aa: f023 0301 bic.w r3, r3, #1 80117ae: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 80117b0: 687b ldr r3, [r7, #4] 80117b2: f003 0301 and.w r3, r3, #1 80117b6: 60fb str r3, [r7, #12] stat = osOK; 80117b8: 2300 movs r3, #0 80117ba: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80117bc: f3ef 8305 mrs r3, IPSR 80117c0: 60bb str r3, [r7, #8] return(result); 80117c2: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 80117c4: 2b00 cmp r3, #0 80117c6: d003 beq.n 80117d0 stat = osErrorISR; 80117c8: f06f 0305 mvn.w r3, #5 80117cc: 617b str r3, [r7, #20] 80117ce: e02c b.n 801182a } else if (hMutex == NULL) { 80117d0: 693b ldr r3, [r7, #16] 80117d2: 2b00 cmp r3, #0 80117d4: d103 bne.n 80117de stat = osErrorParameter; 80117d6: f06f 0303 mvn.w r3, #3 80117da: 617b str r3, [r7, #20] 80117dc: e025 b.n 801182a } else { if (rmtx != 0U) { 80117de: 68fb ldr r3, [r7, #12] 80117e0: 2b00 cmp r3, #0 80117e2: d011 beq.n 8011808 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) { 80117e4: 6839 ldr r1, [r7, #0] 80117e6: 6938 ldr r0, [r7, #16] 80117e8: f000 fdc9 bl 801237e 80117ec: 4603 mov r3, r0 80117ee: 2b01 cmp r3, #1 80117f0: d01b beq.n 801182a if (timeout != 0U) { 80117f2: 683b ldr r3, [r7, #0] 80117f4: 2b00 cmp r3, #0 80117f6: d003 beq.n 8011800 stat = osErrorTimeout; 80117f8: f06f 0301 mvn.w r3, #1 80117fc: 617b str r3, [r7, #20] 80117fe: e014 b.n 801182a } else { stat = osErrorResource; 8011800: f06f 0302 mvn.w r3, #2 8011804: 617b str r3, [r7, #20] 8011806: e010 b.n 801182a } } #endif } else { if (xSemaphoreTake (hMutex, timeout) != pdPASS) { 8011808: 6839 ldr r1, [r7, #0] 801180a: 6938 ldr r0, [r7, #16] 801180c: f001 f96e bl 8012aec 8011810: 4603 mov r3, r0 8011812: 2b01 cmp r3, #1 8011814: d009 beq.n 801182a if (timeout != 0U) { 8011816: 683b ldr r3, [r7, #0] 8011818: 2b00 cmp r3, #0 801181a: d003 beq.n 8011824 stat = osErrorTimeout; 801181c: f06f 0301 mvn.w r3, #1 8011820: 617b str r3, [r7, #20] 8011822: e002 b.n 801182a } else { stat = osErrorResource; 8011824: f06f 0302 mvn.w r3, #2 8011828: 617b str r3, [r7, #20] } } } } return (stat); 801182a: 697b ldr r3, [r7, #20] } 801182c: 4618 mov r0, r3 801182e: 3718 adds r7, #24 8011830: 46bd mov sp, r7 8011832: bd80 pop {r7, pc} 08011834 : osStatus_t osMutexRelease (osMutexId_t mutex_id) { 8011834: b580 push {r7, lr} 8011836: b086 sub sp, #24 8011838: af00 add r7, sp, #0 801183a: 6078 str r0, [r7, #4] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 801183c: 687b ldr r3, [r7, #4] 801183e: f023 0301 bic.w r3, r3, #1 8011842: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 8011844: 687b ldr r3, [r7, #4] 8011846: f003 0301 and.w r3, r3, #1 801184a: 60fb str r3, [r7, #12] stat = osOK; 801184c: 2300 movs r3, #0 801184e: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011850: f3ef 8305 mrs r3, IPSR 8011854: 60bb str r3, [r7, #8] return(result); 8011856: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 8011858: 2b00 cmp r3, #0 801185a: d003 beq.n 8011864 stat = osErrorISR; 801185c: f06f 0305 mvn.w r3, #5 8011860: 617b str r3, [r7, #20] 8011862: e01f b.n 80118a4 } else if (hMutex == NULL) { 8011864: 693b ldr r3, [r7, #16] 8011866: 2b00 cmp r3, #0 8011868: d103 bne.n 8011872 stat = osErrorParameter; 801186a: f06f 0303 mvn.w r3, #3 801186e: 617b str r3, [r7, #20] 8011870: e018 b.n 80118a4 } else { if (rmtx != 0U) { 8011872: 68fb ldr r3, [r7, #12] 8011874: 2b00 cmp r3, #0 8011876: d009 beq.n 801188c #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreGiveRecursive (hMutex) != pdPASS) { 8011878: 6938 ldr r0, [r7, #16] 801187a: f000 fd4b bl 8012314 801187e: 4603 mov r3, r0 8011880: 2b01 cmp r3, #1 8011882: d00f beq.n 80118a4 stat = osErrorResource; 8011884: f06f 0302 mvn.w r3, #2 8011888: 617b str r3, [r7, #20] 801188a: e00b b.n 80118a4 } #endif } else { if (xSemaphoreGive (hMutex) != pdPASS) { 801188c: 2300 movs r3, #0 801188e: 2200 movs r2, #0 8011890: 2100 movs r1, #0 8011892: 6938 ldr r0, [r7, #16] 8011894: f000 fe18 bl 80124c8 8011898: 4603 mov r3, r0 801189a: 2b01 cmp r3, #1 801189c: d002 beq.n 80118a4 stat = osErrorResource; 801189e: f06f 0302 mvn.w r3, #2 80118a2: 617b str r3, [r7, #20] } } } return (stat); 80118a4: 697b ldr r3, [r7, #20] } 80118a6: 4618 mov r0, r3 80118a8: 3718 adds r7, #24 80118aa: 46bd mov sp, r7 80118ac: bd80 pop {r7, pc} 080118ae : } #endif /* (configUSE_OS2_MUTEX == 1) */ /*---------------------------------------------------------------------------*/ osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) { 80118ae: b580 push {r7, lr} 80118b0: b08a sub sp, #40 @ 0x28 80118b2: af02 add r7, sp, #8 80118b4: 60f8 str r0, [r7, #12] 80118b6: 60b9 str r1, [r7, #8] 80118b8: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hSemaphore = NULL; 80118ba: 2300 movs r3, #0 80118bc: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80118be: f3ef 8305 mrs r3, IPSR 80118c2: 613b str r3, [r7, #16] return(result); 80118c4: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) { 80118c6: 2b00 cmp r3, #0 80118c8: d175 bne.n 80119b6 80118ca: 68fb ldr r3, [r7, #12] 80118cc: 2b00 cmp r3, #0 80118ce: d072 beq.n 80119b6 80118d0: 68ba ldr r2, [r7, #8] 80118d2: 68fb ldr r3, [r7, #12] 80118d4: 429a cmp r2, r3 80118d6: d86e bhi.n 80119b6 mem = -1; 80118d8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80118dc: 61bb str r3, [r7, #24] if (attr != NULL) { 80118de: 687b ldr r3, [r7, #4] 80118e0: 2b00 cmp r3, #0 80118e2: d015 beq.n 8011910 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 80118e4: 687b ldr r3, [r7, #4] 80118e6: 689b ldr r3, [r3, #8] 80118e8: 2b00 cmp r3, #0 80118ea: d006 beq.n 80118fa 80118ec: 687b ldr r3, [r7, #4] 80118ee: 68db ldr r3, [r3, #12] 80118f0: 2b4f cmp r3, #79 @ 0x4f 80118f2: d902 bls.n 80118fa mem = 1; 80118f4: 2301 movs r3, #1 80118f6: 61bb str r3, [r7, #24] 80118f8: e00c b.n 8011914 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 80118fa: 687b ldr r3, [r7, #4] 80118fc: 689b ldr r3, [r3, #8] 80118fe: 2b00 cmp r3, #0 8011900: d108 bne.n 8011914 8011902: 687b ldr r3, [r7, #4] 8011904: 68db ldr r3, [r3, #12] 8011906: 2b00 cmp r3, #0 8011908: d104 bne.n 8011914 mem = 0; 801190a: 2300 movs r3, #0 801190c: 61bb str r3, [r7, #24] 801190e: e001 b.n 8011914 } } } else { mem = 0; 8011910: 2300 movs r3, #0 8011912: 61bb str r3, [r7, #24] } if (mem != -1) { 8011914: 69bb ldr r3, [r7, #24] 8011916: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801191a: d04c beq.n 80119b6 if (max_count == 1U) { 801191c: 68fb ldr r3, [r7, #12] 801191e: 2b01 cmp r3, #1 8011920: d128 bne.n 8011974 if (mem == 1) { 8011922: 69bb ldr r3, [r7, #24] 8011924: 2b01 cmp r3, #1 8011926: d10a bne.n 801193e #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem); 8011928: 687b ldr r3, [r7, #4] 801192a: 689b ldr r3, [r3, #8] 801192c: 2203 movs r2, #3 801192e: 9200 str r2, [sp, #0] 8011930: 2200 movs r2, #0 8011932: 2100 movs r1, #0 8011934: 2001 movs r0, #1 8011936: f000 fbc5 bl 80120c4 801193a: 61f8 str r0, [r7, #28] 801193c: e005 b.n 801194a #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinary(); 801193e: 2203 movs r2, #3 8011940: 2100 movs r1, #0 8011942: 2001 movs r0, #1 8011944: f000 fc3b bl 80121be 8011948: 61f8 str r0, [r7, #28] #endif } if ((hSemaphore != NULL) && (initial_count != 0U)) { 801194a: 69fb ldr r3, [r7, #28] 801194c: 2b00 cmp r3, #0 801194e: d022 beq.n 8011996 8011950: 68bb ldr r3, [r7, #8] 8011952: 2b00 cmp r3, #0 8011954: d01f beq.n 8011996 if (xSemaphoreGive (hSemaphore) != pdPASS) { 8011956: 2300 movs r3, #0 8011958: 2200 movs r2, #0 801195a: 2100 movs r1, #0 801195c: 69f8 ldr r0, [r7, #28] 801195e: f000 fdb3 bl 80124c8 8011962: 4603 mov r3, r0 8011964: 2b01 cmp r3, #1 8011966: d016 beq.n 8011996 vSemaphoreDelete (hSemaphore); 8011968: 69f8 ldr r0, [r7, #28] 801196a: f001 fa8f bl 8012e8c hSemaphore = NULL; 801196e: 2300 movs r3, #0 8011970: 61fb str r3, [r7, #28] 8011972: e010 b.n 8011996 } } } else { if (mem == 1) { 8011974: 69bb ldr r3, [r7, #24] 8011976: 2b01 cmp r3, #1 8011978: d108 bne.n 801198c #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem); 801197a: 687b ldr r3, [r7, #4] 801197c: 689b ldr r3, [r3, #8] 801197e: 461a mov r2, r3 8011980: 68b9 ldr r1, [r7, #8] 8011982: 68f8 ldr r0, [r7, #12] 8011984: f000 fd32 bl 80123ec 8011988: 61f8 str r0, [r7, #28] 801198a: e004 b.n 8011996 #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCounting (max_count, initial_count); 801198c: 68b9 ldr r1, [r7, #8] 801198e: 68f8 ldr r0, [r7, #12] 8011990: f000 fd65 bl 801245e 8011994: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hSemaphore != NULL) { 8011996: 69fb ldr r3, [r7, #28] 8011998: 2b00 cmp r3, #0 801199a: d00c beq.n 80119b6 if (attr != NULL) { 801199c: 687b ldr r3, [r7, #4] 801199e: 2b00 cmp r3, #0 80119a0: d003 beq.n 80119aa name = attr->name; 80119a2: 687b ldr r3, [r7, #4] 80119a4: 681b ldr r3, [r3, #0] 80119a6: 617b str r3, [r7, #20] 80119a8: e001 b.n 80119ae } else { name = NULL; 80119aa: 2300 movs r3, #0 80119ac: 617b str r3, [r7, #20] } vQueueAddToRegistry (hSemaphore, name); 80119ae: 6979 ldr r1, [r7, #20] 80119b0: 69f8 ldr r0, [r7, #28] 80119b2: f001 fbb7 bl 8013124 } #endif } } return ((osSemaphoreId_t)hSemaphore); 80119b6: 69fb ldr r3, [r7, #28] } 80119b8: 4618 mov r0, r3 80119ba: 3720 adds r7, #32 80119bc: 46bd mov sp, r7 80119be: bd80 pop {r7, pc} 080119c0 : osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) { 80119c0: b580 push {r7, lr} 80119c2: b086 sub sp, #24 80119c4: af00 add r7, sp, #0 80119c6: 6078 str r0, [r7, #4] 80119c8: 6039 str r1, [r7, #0] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 80119ca: 687b ldr r3, [r7, #4] 80119cc: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 80119ce: 2300 movs r3, #0 80119d0: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 80119d2: 693b ldr r3, [r7, #16] 80119d4: 2b00 cmp r3, #0 80119d6: d103 bne.n 80119e0 stat = osErrorParameter; 80119d8: f06f 0303 mvn.w r3, #3 80119dc: 617b str r3, [r7, #20] 80119de: e039 b.n 8011a54 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80119e0: f3ef 8305 mrs r3, IPSR 80119e4: 60fb str r3, [r7, #12] return(result); 80119e6: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 80119e8: 2b00 cmp r3, #0 80119ea: d022 beq.n 8011a32 if (timeout != 0U) { 80119ec: 683b ldr r3, [r7, #0] 80119ee: 2b00 cmp r3, #0 80119f0: d003 beq.n 80119fa stat = osErrorParameter; 80119f2: f06f 0303 mvn.w r3, #3 80119f6: 617b str r3, [r7, #20] 80119f8: e02c b.n 8011a54 } else { yield = pdFALSE; 80119fa: 2300 movs r3, #0 80119fc: 60bb str r3, [r7, #8] if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) { 80119fe: f107 0308 add.w r3, r7, #8 8011a02: 461a mov r2, r3 8011a04: 2100 movs r1, #0 8011a06: 6938 ldr r0, [r7, #16] 8011a08: f001 f980 bl 8012d0c 8011a0c: 4603 mov r3, r0 8011a0e: 2b01 cmp r3, #1 8011a10: d003 beq.n 8011a1a stat = osErrorResource; 8011a12: f06f 0302 mvn.w r3, #2 8011a16: 617b str r3, [r7, #20] 8011a18: e01c b.n 8011a54 } else { portYIELD_FROM_ISR (yield); 8011a1a: 68bb ldr r3, [r7, #8] 8011a1c: 2b00 cmp r3, #0 8011a1e: d019 beq.n 8011a54 8011a20: 4b0f ldr r3, [pc, #60] @ (8011a60 ) 8011a22: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011a26: 601a str r2, [r3, #0] 8011a28: f3bf 8f4f dsb sy 8011a2c: f3bf 8f6f isb sy 8011a30: e010 b.n 8011a54 } } } else { if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) { 8011a32: 6839 ldr r1, [r7, #0] 8011a34: 6938 ldr r0, [r7, #16] 8011a36: f001 f859 bl 8012aec 8011a3a: 4603 mov r3, r0 8011a3c: 2b01 cmp r3, #1 8011a3e: d009 beq.n 8011a54 if (timeout != 0U) { 8011a40: 683b ldr r3, [r7, #0] 8011a42: 2b00 cmp r3, #0 8011a44: d003 beq.n 8011a4e stat = osErrorTimeout; 8011a46: f06f 0301 mvn.w r3, #1 8011a4a: 617b str r3, [r7, #20] 8011a4c: e002 b.n 8011a54 } else { stat = osErrorResource; 8011a4e: f06f 0302 mvn.w r3, #2 8011a52: 617b str r3, [r7, #20] } } } return (stat); 8011a54: 697b ldr r3, [r7, #20] } 8011a56: 4618 mov r0, r3 8011a58: 3718 adds r7, #24 8011a5a: 46bd mov sp, r7 8011a5c: bd80 pop {r7, pc} 8011a5e: bf00 nop 8011a60: e000ed04 .word 0xe000ed04 08011a64 : osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) { 8011a64: b580 push {r7, lr} 8011a66: b086 sub sp, #24 8011a68: af00 add r7, sp, #0 8011a6a: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8011a6c: 687b ldr r3, [r7, #4] 8011a6e: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 8011a70: 2300 movs r3, #0 8011a72: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 8011a74: 693b ldr r3, [r7, #16] 8011a76: 2b00 cmp r3, #0 8011a78: d103 bne.n 8011a82 stat = osErrorParameter; 8011a7a: f06f 0303 mvn.w r3, #3 8011a7e: 617b str r3, [r7, #20] 8011a80: e02c b.n 8011adc __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011a82: f3ef 8305 mrs r3, IPSR 8011a86: 60fb str r3, [r7, #12] return(result); 8011a88: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8011a8a: 2b00 cmp r3, #0 8011a8c: d01a beq.n 8011ac4 yield = pdFALSE; 8011a8e: 2300 movs r3, #0 8011a90: 60bb str r3, [r7, #8] if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) { 8011a92: f107 0308 add.w r3, r7, #8 8011a96: 4619 mov r1, r3 8011a98: 6938 ldr r0, [r7, #16] 8011a9a: f000 feb5 bl 8012808 8011a9e: 4603 mov r3, r0 8011aa0: 2b01 cmp r3, #1 8011aa2: d003 beq.n 8011aac stat = osErrorResource; 8011aa4: f06f 0302 mvn.w r3, #2 8011aa8: 617b str r3, [r7, #20] 8011aaa: e017 b.n 8011adc } else { portYIELD_FROM_ISR (yield); 8011aac: 68bb ldr r3, [r7, #8] 8011aae: 2b00 cmp r3, #0 8011ab0: d014 beq.n 8011adc 8011ab2: 4b0d ldr r3, [pc, #52] @ (8011ae8 ) 8011ab4: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011ab8: 601a str r2, [r3, #0] 8011aba: f3bf 8f4f dsb sy 8011abe: f3bf 8f6f isb sy 8011ac2: e00b b.n 8011adc } } else { if (xSemaphoreGive (hSemaphore) != pdPASS) { 8011ac4: 2300 movs r3, #0 8011ac6: 2200 movs r2, #0 8011ac8: 2100 movs r1, #0 8011aca: 6938 ldr r0, [r7, #16] 8011acc: f000 fcfc bl 80124c8 8011ad0: 4603 mov r3, r0 8011ad2: 2b01 cmp r3, #1 8011ad4: d002 beq.n 8011adc stat = osErrorResource; 8011ad6: f06f 0302 mvn.w r3, #2 8011ada: 617b str r3, [r7, #20] } } return (stat); 8011adc: 697b ldr r3, [r7, #20] } 8011ade: 4618 mov r0, r3 8011ae0: 3718 adds r7, #24 8011ae2: 46bd mov sp, r7 8011ae4: bd80 pop {r7, pc} 8011ae6: bf00 nop 8011ae8: e000ed04 .word 0xe000ed04 08011aec : } return (count); } osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) { 8011aec: b580 push {r7, lr} 8011aee: b086 sub sp, #24 8011af0: af00 add r7, sp, #0 8011af2: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8011af4: 687b ldr r3, [r7, #4] 8011af6: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011af8: f3ef 8305 mrs r3, IPSR 8011afc: 60fb str r3, [r7, #12] return(result); 8011afe: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8011b00: 2b00 cmp r3, #0 8011b02: d003 beq.n 8011b0c stat = osErrorISR; 8011b04: f06f 0305 mvn.w r3, #5 8011b08: 617b str r3, [r7, #20] 8011b0a: e00e b.n 8011b2a } else if (hSemaphore == NULL) { 8011b0c: 693b ldr r3, [r7, #16] 8011b0e: 2b00 cmp r3, #0 8011b10: d103 bne.n 8011b1a stat = osErrorParameter; 8011b12: f06f 0303 mvn.w r3, #3 8011b16: 617b str r3, [r7, #20] 8011b18: e007 b.n 8011b2a } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hSemaphore); 8011b1a: 6938 ldr r0, [r7, #16] 8011b1c: f001 fb2c bl 8013178 #endif stat = osOK; 8011b20: 2300 movs r3, #0 8011b22: 617b str r3, [r7, #20] vSemaphoreDelete (hSemaphore); 8011b24: 6938 ldr r0, [r7, #16] 8011b26: f001 f9b1 bl 8012e8c } #else stat = osError; #endif return (stat); 8011b2a: 697b ldr r3, [r7, #20] } 8011b2c: 4618 mov r0, r3 8011b2e: 3718 adds r7, #24 8011b30: 46bd mov sp, r7 8011b32: bd80 pop {r7, pc} 08011b34 : /*---------------------------------------------------------------------------*/ osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) { 8011b34: b580 push {r7, lr} 8011b36: b08a sub sp, #40 @ 0x28 8011b38: af02 add r7, sp, #8 8011b3a: 60f8 str r0, [r7, #12] 8011b3c: 60b9 str r1, [r7, #8] 8011b3e: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hQueue = NULL; 8011b40: 2300 movs r3, #0 8011b42: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011b44: f3ef 8305 mrs r3, IPSR 8011b48: 613b str r3, [r7, #16] return(result); 8011b4a: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) { 8011b4c: 2b00 cmp r3, #0 8011b4e: d15f bne.n 8011c10 8011b50: 68fb ldr r3, [r7, #12] 8011b52: 2b00 cmp r3, #0 8011b54: d05c beq.n 8011c10 8011b56: 68bb ldr r3, [r7, #8] 8011b58: 2b00 cmp r3, #0 8011b5a: d059 beq.n 8011c10 mem = -1; 8011b5c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011b60: 61bb str r3, [r7, #24] if (attr != NULL) { 8011b62: 687b ldr r3, [r7, #4] 8011b64: 2b00 cmp r3, #0 8011b66: d029 beq.n 8011bbc if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8011b68: 687b ldr r3, [r7, #4] 8011b6a: 689b ldr r3, [r3, #8] 8011b6c: 2b00 cmp r3, #0 8011b6e: d012 beq.n 8011b96 8011b70: 687b ldr r3, [r7, #4] 8011b72: 68db ldr r3, [r3, #12] 8011b74: 2b4f cmp r3, #79 @ 0x4f 8011b76: d90e bls.n 8011b96 (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8011b78: 687b ldr r3, [r7, #4] 8011b7a: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8011b7c: 2b00 cmp r3, #0 8011b7e: d00a beq.n 8011b96 (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8011b80: 687b ldr r3, [r7, #4] 8011b82: 695a ldr r2, [r3, #20] 8011b84: 68fb ldr r3, [r7, #12] 8011b86: 68b9 ldr r1, [r7, #8] 8011b88: fb01 f303 mul.w r3, r1, r3 8011b8c: 429a cmp r2, r3 8011b8e: d302 bcc.n 8011b96 mem = 1; 8011b90: 2301 movs r3, #1 8011b92: 61bb str r3, [r7, #24] 8011b94: e014 b.n 8011bc0 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8011b96: 687b ldr r3, [r7, #4] 8011b98: 689b ldr r3, [r3, #8] 8011b9a: 2b00 cmp r3, #0 8011b9c: d110 bne.n 8011bc0 8011b9e: 687b ldr r3, [r7, #4] 8011ba0: 68db ldr r3, [r3, #12] 8011ba2: 2b00 cmp r3, #0 8011ba4: d10c bne.n 8011bc0 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8011ba6: 687b ldr r3, [r7, #4] 8011ba8: 691b ldr r3, [r3, #16] if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8011baa: 2b00 cmp r3, #0 8011bac: d108 bne.n 8011bc0 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8011bae: 687b ldr r3, [r7, #4] 8011bb0: 695b ldr r3, [r3, #20] 8011bb2: 2b00 cmp r3, #0 8011bb4: d104 bne.n 8011bc0 mem = 0; 8011bb6: 2300 movs r3, #0 8011bb8: 61bb str r3, [r7, #24] 8011bba: e001 b.n 8011bc0 } } } else { mem = 0; 8011bbc: 2300 movs r3, #0 8011bbe: 61bb str r3, [r7, #24] } if (mem == 1) { 8011bc0: 69bb ldr r3, [r7, #24] 8011bc2: 2b01 cmp r3, #1 8011bc4: d10b bne.n 8011bde #if (configSUPPORT_STATIC_ALLOCATION == 1) hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem); 8011bc6: 687b ldr r3, [r7, #4] 8011bc8: 691a ldr r2, [r3, #16] 8011bca: 687b ldr r3, [r7, #4] 8011bcc: 689b ldr r3, [r3, #8] 8011bce: 2100 movs r1, #0 8011bd0: 9100 str r1, [sp, #0] 8011bd2: 68b9 ldr r1, [r7, #8] 8011bd4: 68f8 ldr r0, [r7, #12] 8011bd6: f000 fa75 bl 80120c4 8011bda: 61f8 str r0, [r7, #28] 8011bdc: e008 b.n 8011bf0 #endif } else { if (mem == 0) { 8011bde: 69bb ldr r3, [r7, #24] 8011be0: 2b00 cmp r3, #0 8011be2: d105 bne.n 8011bf0 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hQueue = xQueueCreate (msg_count, msg_size); 8011be4: 2200 movs r2, #0 8011be6: 68b9 ldr r1, [r7, #8] 8011be8: 68f8 ldr r0, [r7, #12] 8011bea: f000 fae8 bl 80121be 8011bee: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hQueue != NULL) { 8011bf0: 69fb ldr r3, [r7, #28] 8011bf2: 2b00 cmp r3, #0 8011bf4: d00c beq.n 8011c10 if (attr != NULL) { 8011bf6: 687b ldr r3, [r7, #4] 8011bf8: 2b00 cmp r3, #0 8011bfa: d003 beq.n 8011c04 name = attr->name; 8011bfc: 687b ldr r3, [r7, #4] 8011bfe: 681b ldr r3, [r3, #0] 8011c00: 617b str r3, [r7, #20] 8011c02: e001 b.n 8011c08 } else { name = NULL; 8011c04: 2300 movs r3, #0 8011c06: 617b str r3, [r7, #20] } vQueueAddToRegistry (hQueue, name); 8011c08: 6979 ldr r1, [r7, #20] 8011c0a: 69f8 ldr r0, [r7, #28] 8011c0c: f001 fa8a bl 8013124 } #endif } return ((osMessageQueueId_t)hQueue); 8011c10: 69fb ldr r3, [r7, #28] } 8011c12: 4618 mov r0, r3 8011c14: 3720 adds r7, #32 8011c16: 46bd mov sp, r7 8011c18: bd80 pop {r7, pc} ... 08011c1c : osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) { 8011c1c: b580 push {r7, lr} 8011c1e: b088 sub sp, #32 8011c20: af00 add r7, sp, #0 8011c22: 60f8 str r0, [r7, #12] 8011c24: 60b9 str r1, [r7, #8] 8011c26: 603b str r3, [r7, #0] 8011c28: 4613 mov r3, r2 8011c2a: 71fb strb r3, [r7, #7] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011c2c: 68fb ldr r3, [r7, #12] 8011c2e: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8011c30: 2300 movs r3, #0 8011c32: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011c34: f3ef 8305 mrs r3, IPSR 8011c38: 617b str r3, [r7, #20] return(result); 8011c3a: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8011c3c: 2b00 cmp r3, #0 8011c3e: d028 beq.n 8011c92 if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8011c40: 69bb ldr r3, [r7, #24] 8011c42: 2b00 cmp r3, #0 8011c44: d005 beq.n 8011c52 8011c46: 68bb ldr r3, [r7, #8] 8011c48: 2b00 cmp r3, #0 8011c4a: d002 beq.n 8011c52 8011c4c: 683b ldr r3, [r7, #0] 8011c4e: 2b00 cmp r3, #0 8011c50: d003 beq.n 8011c5a stat = osErrorParameter; 8011c52: f06f 0303 mvn.w r3, #3 8011c56: 61fb str r3, [r7, #28] 8011c58: e038 b.n 8011ccc } else { yield = pdFALSE; 8011c5a: 2300 movs r3, #0 8011c5c: 613b str r3, [r7, #16] if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) { 8011c5e: f107 0210 add.w r2, r7, #16 8011c62: 2300 movs r3, #0 8011c64: 68b9 ldr r1, [r7, #8] 8011c66: 69b8 ldr r0, [r7, #24] 8011c68: f000 fd30 bl 80126cc 8011c6c: 4603 mov r3, r0 8011c6e: 2b01 cmp r3, #1 8011c70: d003 beq.n 8011c7a stat = osErrorResource; 8011c72: f06f 0302 mvn.w r3, #2 8011c76: 61fb str r3, [r7, #28] 8011c78: e028 b.n 8011ccc } else { portYIELD_FROM_ISR (yield); 8011c7a: 693b ldr r3, [r7, #16] 8011c7c: 2b00 cmp r3, #0 8011c7e: d025 beq.n 8011ccc 8011c80: 4b15 ldr r3, [pc, #84] @ (8011cd8 ) 8011c82: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011c86: 601a str r2, [r3, #0] 8011c88: f3bf 8f4f dsb sy 8011c8c: f3bf 8f6f isb sy 8011c90: e01c b.n 8011ccc } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8011c92: 69bb ldr r3, [r7, #24] 8011c94: 2b00 cmp r3, #0 8011c96: d002 beq.n 8011c9e 8011c98: 68bb ldr r3, [r7, #8] 8011c9a: 2b00 cmp r3, #0 8011c9c: d103 bne.n 8011ca6 stat = osErrorParameter; 8011c9e: f06f 0303 mvn.w r3, #3 8011ca2: 61fb str r3, [r7, #28] 8011ca4: e012 b.n 8011ccc } else { if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8011ca6: 2300 movs r3, #0 8011ca8: 683a ldr r2, [r7, #0] 8011caa: 68b9 ldr r1, [r7, #8] 8011cac: 69b8 ldr r0, [r7, #24] 8011cae: f000 fc0b bl 80124c8 8011cb2: 4603 mov r3, r0 8011cb4: 2b01 cmp r3, #1 8011cb6: d009 beq.n 8011ccc if (timeout != 0U) { 8011cb8: 683b ldr r3, [r7, #0] 8011cba: 2b00 cmp r3, #0 8011cbc: d003 beq.n 8011cc6 stat = osErrorTimeout; 8011cbe: f06f 0301 mvn.w r3, #1 8011cc2: 61fb str r3, [r7, #28] 8011cc4: e002 b.n 8011ccc } else { stat = osErrorResource; 8011cc6: f06f 0302 mvn.w r3, #2 8011cca: 61fb str r3, [r7, #28] } } } } return (stat); 8011ccc: 69fb ldr r3, [r7, #28] } 8011cce: 4618 mov r0, r3 8011cd0: 3720 adds r7, #32 8011cd2: 46bd mov sp, r7 8011cd4: bd80 pop {r7, pc} 8011cd6: bf00 nop 8011cd8: e000ed04 .word 0xe000ed04 08011cdc : osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) { 8011cdc: b580 push {r7, lr} 8011cde: b088 sub sp, #32 8011ce0: af00 add r7, sp, #0 8011ce2: 60f8 str r0, [r7, #12] 8011ce4: 60b9 str r1, [r7, #8] 8011ce6: 607a str r2, [r7, #4] 8011ce8: 603b str r3, [r7, #0] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011cea: 68fb ldr r3, [r7, #12] 8011cec: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8011cee: 2300 movs r3, #0 8011cf0: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011cf2: f3ef 8305 mrs r3, IPSR 8011cf6: 617b str r3, [r7, #20] return(result); 8011cf8: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8011cfa: 2b00 cmp r3, #0 8011cfc: d028 beq.n 8011d50 if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8011cfe: 69bb ldr r3, [r7, #24] 8011d00: 2b00 cmp r3, #0 8011d02: d005 beq.n 8011d10 8011d04: 68bb ldr r3, [r7, #8] 8011d06: 2b00 cmp r3, #0 8011d08: d002 beq.n 8011d10 8011d0a: 683b ldr r3, [r7, #0] 8011d0c: 2b00 cmp r3, #0 8011d0e: d003 beq.n 8011d18 stat = osErrorParameter; 8011d10: f06f 0303 mvn.w r3, #3 8011d14: 61fb str r3, [r7, #28] 8011d16: e037 b.n 8011d88 } else { yield = pdFALSE; 8011d18: 2300 movs r3, #0 8011d1a: 613b str r3, [r7, #16] if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) { 8011d1c: f107 0310 add.w r3, r7, #16 8011d20: 461a mov r2, r3 8011d22: 68b9 ldr r1, [r7, #8] 8011d24: 69b8 ldr r0, [r7, #24] 8011d26: f000 fff1 bl 8012d0c 8011d2a: 4603 mov r3, r0 8011d2c: 2b01 cmp r3, #1 8011d2e: d003 beq.n 8011d38 stat = osErrorResource; 8011d30: f06f 0302 mvn.w r3, #2 8011d34: 61fb str r3, [r7, #28] 8011d36: e027 b.n 8011d88 } else { portYIELD_FROM_ISR (yield); 8011d38: 693b ldr r3, [r7, #16] 8011d3a: 2b00 cmp r3, #0 8011d3c: d024 beq.n 8011d88 8011d3e: 4b15 ldr r3, [pc, #84] @ (8011d94 ) 8011d40: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011d44: 601a str r2, [r3, #0] 8011d46: f3bf 8f4f dsb sy 8011d4a: f3bf 8f6f isb sy 8011d4e: e01b b.n 8011d88 } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8011d50: 69bb ldr r3, [r7, #24] 8011d52: 2b00 cmp r3, #0 8011d54: d002 beq.n 8011d5c 8011d56: 68bb ldr r3, [r7, #8] 8011d58: 2b00 cmp r3, #0 8011d5a: d103 bne.n 8011d64 stat = osErrorParameter; 8011d5c: f06f 0303 mvn.w r3, #3 8011d60: 61fb str r3, [r7, #28] 8011d62: e011 b.n 8011d88 } else { if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8011d64: 683a ldr r2, [r7, #0] 8011d66: 68b9 ldr r1, [r7, #8] 8011d68: 69b8 ldr r0, [r7, #24] 8011d6a: f000 fddd bl 8012928 8011d6e: 4603 mov r3, r0 8011d70: 2b01 cmp r3, #1 8011d72: d009 beq.n 8011d88 if (timeout != 0U) { 8011d74: 683b ldr r3, [r7, #0] 8011d76: 2b00 cmp r3, #0 8011d78: d003 beq.n 8011d82 stat = osErrorTimeout; 8011d7a: f06f 0301 mvn.w r3, #1 8011d7e: 61fb str r3, [r7, #28] 8011d80: e002 b.n 8011d88 } else { stat = osErrorResource; 8011d82: f06f 0302 mvn.w r3, #2 8011d86: 61fb str r3, [r7, #28] } } } } return (stat); 8011d88: 69fb ldr r3, [r7, #28] } 8011d8a: 4618 mov r0, r3 8011d8c: 3720 adds r7, #32 8011d8e: 46bd mov sp, r7 8011d90: bd80 pop {r7, pc} 8011d92: bf00 nop 8011d94: e000ed04 .word 0xe000ed04 08011d98 : } return (size); } uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) { 8011d98: b580 push {r7, lr} 8011d9a: b086 sub sp, #24 8011d9c: af00 add r7, sp, #0 8011d9e: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011da0: 687b ldr r3, [r7, #4] 8011da2: 613b str r3, [r7, #16] UBaseType_t count; if (hQueue == NULL) { 8011da4: 693b ldr r3, [r7, #16] 8011da6: 2b00 cmp r3, #0 8011da8: d102 bne.n 8011db0 count = 0U; 8011daa: 2300 movs r3, #0 8011dac: 617b str r3, [r7, #20] 8011dae: e00e b.n 8011dce __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011db0: f3ef 8305 mrs r3, IPSR 8011db4: 60fb str r3, [r7, #12] return(result); 8011db6: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8011db8: 2b00 cmp r3, #0 8011dba: d004 beq.n 8011dc6 count = uxQueueMessagesWaitingFromISR (hQueue); 8011dbc: 6938 ldr r0, [r7, #16] 8011dbe: f001 f846 bl 8012e4e 8011dc2: 6178 str r0, [r7, #20] 8011dc4: e003 b.n 8011dce } else { count = uxQueueMessagesWaiting (hQueue); 8011dc6: 6938 ldr r0, [r7, #16] 8011dc8: f001 f822 bl 8012e10 8011dcc: 6178 str r0, [r7, #20] } return ((uint32_t)count); 8011dce: 697b ldr r3, [r7, #20] } 8011dd0: 4618 mov r0, r3 8011dd2: 3718 adds r7, #24 8011dd4: 46bd mov sp, r7 8011dd6: bd80 pop {r7, pc} 08011dd8 : } return (stat); } osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) { 8011dd8: b580 push {r7, lr} 8011dda: b086 sub sp, #24 8011ddc: af00 add r7, sp, #0 8011dde: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011de0: 687b ldr r3, [r7, #4] 8011de2: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011de4: f3ef 8305 mrs r3, IPSR 8011de8: 60fb str r3, [r7, #12] return(result); 8011dea: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8011dec: 2b00 cmp r3, #0 8011dee: d003 beq.n 8011df8 stat = osErrorISR; 8011df0: f06f 0305 mvn.w r3, #5 8011df4: 617b str r3, [r7, #20] 8011df6: e00e b.n 8011e16 } else if (hQueue == NULL) { 8011df8: 693b ldr r3, [r7, #16] 8011dfa: 2b00 cmp r3, #0 8011dfc: d103 bne.n 8011e06 stat = osErrorParameter; 8011dfe: f06f 0303 mvn.w r3, #3 8011e02: 617b str r3, [r7, #20] 8011e04: e007 b.n 8011e16 } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hQueue); 8011e06: 6938 ldr r0, [r7, #16] 8011e08: f001 f9b6 bl 8013178 #endif stat = osOK; 8011e0c: 2300 movs r3, #0 8011e0e: 617b str r3, [r7, #20] vQueueDelete (hQueue); 8011e10: 6938 ldr r0, [r7, #16] 8011e12: f001 f83b bl 8012e8c } #else stat = osError; #endif return (stat); 8011e16: 697b ldr r3, [r7, #20] } 8011e18: 4618 mov r0, r3 8011e1a: 3718 adds r7, #24 8011e1c: 46bd mov sp, r7 8011e1e: bd80 pop {r7, pc} 08011e20 : /* vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION equals to 1 and is required for static memory allocation support. */ __WEAK void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) { 8011e20: b480 push {r7} 8011e22: b085 sub sp, #20 8011e24: af00 add r7, sp, #0 8011e26: 60f8 str r0, [r7, #12] 8011e28: 60b9 str r1, [r7, #8] 8011e2a: 607a str r2, [r7, #4] /* Idle task control block and stack */ static StaticTask_t Idle_TCB; static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE]; *ppxIdleTaskTCBBuffer = &Idle_TCB; 8011e2c: 68fb ldr r3, [r7, #12] 8011e2e: 4a07 ldr r2, [pc, #28] @ (8011e4c ) 8011e30: 601a str r2, [r3, #0] *ppxIdleTaskStackBuffer = &Idle_Stack[0]; 8011e32: 68bb ldr r3, [r7, #8] 8011e34: 4a06 ldr r2, [pc, #24] @ (8011e50 ) 8011e36: 601a str r2, [r3, #0] *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; 8011e38: 687b ldr r3, [r7, #4] 8011e3a: f44f 7200 mov.w r2, #512 @ 0x200 8011e3e: 601a str r2, [r3, #0] } 8011e40: bf00 nop 8011e42: 3714 adds r7, #20 8011e44: 46bd mov sp, r7 8011e46: f85d 7b04 ldr.w r7, [sp], #4 8011e4a: 4770 bx lr 8011e4c: 240023e0 .word 0x240023e0 8011e50: 24002488 .word 0x24002488 08011e54 : /* vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION equals to 1 and is required for static memory allocation support. */ __WEAK void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) { 8011e54: b480 push {r7} 8011e56: b085 sub sp, #20 8011e58: af00 add r7, sp, #0 8011e5a: 60f8 str r0, [r7, #12] 8011e5c: 60b9 str r1, [r7, #8] 8011e5e: 607a str r2, [r7, #4] /* Timer task control block and stack */ static StaticTask_t Timer_TCB; static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH]; *ppxTimerTaskTCBBuffer = &Timer_TCB; 8011e60: 68fb ldr r3, [r7, #12] 8011e62: 4a07 ldr r2, [pc, #28] @ (8011e80 ) 8011e64: 601a str r2, [r3, #0] *ppxTimerTaskStackBuffer = &Timer_Stack[0]; 8011e66: 68bb ldr r3, [r7, #8] 8011e68: 4a06 ldr r2, [pc, #24] @ (8011e84 ) 8011e6a: 601a str r2, [r3, #0] *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; 8011e6c: 687b ldr r3, [r7, #4] 8011e6e: f44f 6280 mov.w r2, #1024 @ 0x400 8011e72: 601a str r2, [r3, #0] } 8011e74: bf00 nop 8011e76: 3714 adds r7, #20 8011e78: 46bd mov sp, r7 8011e7a: f85d 7b04 ldr.w r7, [sp], #4 8011e7e: 4770 bx lr 8011e80: 24002c88 .word 0x24002c88 8011e84: 24002d30 .word 0x24002d30 08011e88 : /*----------------------------------------------------------- * PUBLIC LIST API documented in list.h *----------------------------------------------------------*/ void vListInitialise( List_t * const pxList ) { 8011e88: b480 push {r7} 8011e8a: b083 sub sp, #12 8011e8c: af00 add r7, sp, #0 8011e8e: 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. */ 8011e90: 687b ldr r3, [r7, #4] 8011e92: f103 0208 add.w r2, r3, #8 8011e96: 687b ldr r3, [r7, #4] 8011e98: 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; 8011e9a: 687b ldr r3, [r7, #4] 8011e9c: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8011ea0: 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. */ 8011ea2: 687b ldr r3, [r7, #4] 8011ea4: f103 0208 add.w r2, r3, #8 8011ea8: 687b ldr r3, [r7, #4] 8011eaa: 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. */ 8011eac: 687b ldr r3, [r7, #4] 8011eae: f103 0208 add.w r2, r3, #8 8011eb2: 687b ldr r3, [r7, #4] 8011eb4: 611a str r2, [r3, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 8011eb6: 687b ldr r3, [r7, #4] 8011eb8: 2200 movs r2, #0 8011eba: 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 ); } 8011ebc: bf00 nop 8011ebe: 370c adds r7, #12 8011ec0: 46bd mov sp, r7 8011ec2: f85d 7b04 ldr.w r7, [sp], #4 8011ec6: 4770 bx lr 08011ec8 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { 8011ec8: b480 push {r7} 8011eca: b083 sub sp, #12 8011ecc: af00 add r7, sp, #0 8011ece: 6078 str r0, [r7, #4] /* Make sure the list item is not recorded as being on a list. */ pxItem->pxContainer = NULL; 8011ed0: 687b ldr r3, [r7, #4] 8011ed2: 2200 movs r2, #0 8011ed4: 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 ); } 8011ed6: bf00 nop 8011ed8: 370c adds r7, #12 8011eda: 46bd mov sp, r7 8011edc: f85d 7b04 ldr.w r7, [sp], #4 8011ee0: 4770 bx lr 08011ee2 : /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8011ee2: b480 push {r7} 8011ee4: b085 sub sp, #20 8011ee6: af00 add r7, sp, #0 8011ee8: 6078 str r0, [r7, #4] 8011eea: 6039 str r1, [r7, #0] ListItem_t * const pxIndex = pxList->pxIndex; 8011eec: 687b ldr r3, [r7, #4] 8011eee: 685b ldr r3, [r3, #4] 8011ef0: 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; 8011ef2: 683b ldr r3, [r7, #0] 8011ef4: 68fa ldr r2, [r7, #12] 8011ef6: 605a str r2, [r3, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8011ef8: 68fb ldr r3, [r7, #12] 8011efa: 689a ldr r2, [r3, #8] 8011efc: 683b ldr r3, [r7, #0] 8011efe: 609a str r2, [r3, #8] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); pxIndex->pxPrevious->pxNext = pxNewListItem; 8011f00: 68fb ldr r3, [r7, #12] 8011f02: 689b ldr r3, [r3, #8] 8011f04: 683a ldr r2, [r7, #0] 8011f06: 605a str r2, [r3, #4] pxIndex->pxPrevious = pxNewListItem; 8011f08: 68fb ldr r3, [r7, #12] 8011f0a: 683a ldr r2, [r7, #0] 8011f0c: 609a str r2, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; 8011f0e: 683b ldr r3, [r7, #0] 8011f10: 687a ldr r2, [r7, #4] 8011f12: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 8011f14: 687b ldr r3, [r7, #4] 8011f16: 681b ldr r3, [r3, #0] 8011f18: 1c5a adds r2, r3, #1 8011f1a: 687b ldr r3, [r7, #4] 8011f1c: 601a str r2, [r3, #0] } 8011f1e: bf00 nop 8011f20: 3714 adds r7, #20 8011f22: 46bd mov sp, r7 8011f24: f85d 7b04 ldr.w r7, [sp], #4 8011f28: 4770 bx lr 08011f2a : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8011f2a: b480 push {r7} 8011f2c: b085 sub sp, #20 8011f2e: af00 add r7, sp, #0 8011f30: 6078 str r0, [r7, #4] 8011f32: 6039 str r1, [r7, #0] ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 8011f34: 683b ldr r3, [r7, #0] 8011f36: 681b ldr r3, [r3, #0] 8011f38: 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 ) 8011f3a: 68bb ldr r3, [r7, #8] 8011f3c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011f40: d103 bne.n 8011f4a { pxIterator = pxList->xListEnd.pxPrevious; 8011f42: 687b ldr r3, [r7, #4] 8011f44: 691b ldr r3, [r3, #16] 8011f46: 60fb str r3, [r7, #12] 8011f48: e00c b.n 8011f64 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. */ 8011f4a: 687b ldr r3, [r7, #4] 8011f4c: 3308 adds r3, #8 8011f4e: 60fb str r3, [r7, #12] 8011f50: e002 b.n 8011f58 8011f52: 68fb ldr r3, [r7, #12] 8011f54: 685b ldr r3, [r3, #4] 8011f56: 60fb str r3, [r7, #12] 8011f58: 68fb ldr r3, [r7, #12] 8011f5a: 685b ldr r3, [r3, #4] 8011f5c: 681b ldr r3, [r3, #0] 8011f5e: 68ba ldr r2, [r7, #8] 8011f60: 429a cmp r2, r3 8011f62: d2f6 bcs.n 8011f52 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 8011f64: 68fb ldr r3, [r7, #12] 8011f66: 685a ldr r2, [r3, #4] 8011f68: 683b ldr r3, [r7, #0] 8011f6a: 605a str r2, [r3, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 8011f6c: 683b ldr r3, [r7, #0] 8011f6e: 685b ldr r3, [r3, #4] 8011f70: 683a ldr r2, [r7, #0] 8011f72: 609a str r2, [r3, #8] pxNewListItem->pxPrevious = pxIterator; 8011f74: 683b ldr r3, [r7, #0] 8011f76: 68fa ldr r2, [r7, #12] 8011f78: 609a str r2, [r3, #8] pxIterator->pxNext = pxNewListItem; 8011f7a: 68fb ldr r3, [r7, #12] 8011f7c: 683a ldr r2, [r7, #0] 8011f7e: 605a str r2, [r3, #4] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pxContainer = pxList; 8011f80: 683b ldr r3, [r7, #0] 8011f82: 687a ldr r2, [r7, #4] 8011f84: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 8011f86: 687b ldr r3, [r7, #4] 8011f88: 681b ldr r3, [r3, #0] 8011f8a: 1c5a adds r2, r3, #1 8011f8c: 687b ldr r3, [r7, #4] 8011f8e: 601a str r2, [r3, #0] } 8011f90: bf00 nop 8011f92: 3714 adds r7, #20 8011f94: 46bd mov sp, r7 8011f96: f85d 7b04 ldr.w r7, [sp], #4 8011f9a: 4770 bx lr 08011f9c : /*-----------------------------------------------------------*/ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { 8011f9c: b480 push {r7} 8011f9e: b085 sub sp, #20 8011fa0: af00 add r7, sp, #0 8011fa2: 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; 8011fa4: 687b ldr r3, [r7, #4] 8011fa6: 691b ldr r3, [r3, #16] 8011fa8: 60fb str r3, [r7, #12] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 8011faa: 687b ldr r3, [r7, #4] 8011fac: 685b ldr r3, [r3, #4] 8011fae: 687a ldr r2, [r7, #4] 8011fb0: 6892 ldr r2, [r2, #8] 8011fb2: 609a str r2, [r3, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 8011fb4: 687b ldr r3, [r7, #4] 8011fb6: 689b ldr r3, [r3, #8] 8011fb8: 687a ldr r2, [r7, #4] 8011fba: 6852 ldr r2, [r2, #4] 8011fbc: 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 ) 8011fbe: 68fb ldr r3, [r7, #12] 8011fc0: 685b ldr r3, [r3, #4] 8011fc2: 687a ldr r2, [r7, #4] 8011fc4: 429a cmp r2, r3 8011fc6: d103 bne.n 8011fd0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 8011fc8: 687b ldr r3, [r7, #4] 8011fca: 689a ldr r2, [r3, #8] 8011fcc: 68fb ldr r3, [r7, #12] 8011fce: 605a str r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pxContainer = NULL; 8011fd0: 687b ldr r3, [r7, #4] 8011fd2: 2200 movs r2, #0 8011fd4: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )--; 8011fd6: 68fb ldr r3, [r7, #12] 8011fd8: 681b ldr r3, [r3, #0] 8011fda: 1e5a subs r2, r3, #1 8011fdc: 68fb ldr r3, [r7, #12] 8011fde: 601a str r2, [r3, #0] return pxList->uxNumberOfItems; 8011fe0: 68fb ldr r3, [r7, #12] 8011fe2: 681b ldr r3, [r3, #0] } 8011fe4: 4618 mov r0, r3 8011fe6: 3714 adds r7, #20 8011fe8: 46bd mov sp, r7 8011fea: f85d 7b04 ldr.w r7, [sp], #4 8011fee: 4770 bx lr 08011ff0 : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 8011ff0: b580 push {r7, lr} 8011ff2: b084 sub sp, #16 8011ff4: af00 add r7, sp, #0 8011ff6: 6078 str r0, [r7, #4] 8011ff8: 6039 str r1, [r7, #0] Queue_t * const pxQueue = xQueue; 8011ffa: 687b ldr r3, [r7, #4] 8011ffc: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 8011ffe: 68fb ldr r3, [r7, #12] 8012000: 2b00 cmp r3, #0 8012002: d10b bne.n 801201c portFORCE_INLINE static void vPortRaiseBASEPRI( void ) { uint32_t ulNewBASEPRI; __asm volatile 8012004: f04f 0350 mov.w r3, #80 @ 0x50 8012008: f383 8811 msr BASEPRI, r3 801200c: f3bf 8f6f isb sy 8012010: f3bf 8f4f dsb sy 8012014: 60bb str r3, [r7, #8] " msr basepri, %0 \n" \ " isb \n" \ " dsb \n" \ :"=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory" ); } 8012016: bf00 nop 8012018: bf00 nop 801201a: e7fd b.n 8012018 taskENTER_CRITICAL(); 801201c: f003 fcd4 bl 80159c8 { pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8012020: 68fb ldr r3, [r7, #12] 8012022: 681a ldr r2, [r3, #0] 8012024: 68fb ldr r3, [r7, #12] 8012026: 6bdb ldr r3, [r3, #60] @ 0x3c 8012028: 68f9 ldr r1, [r7, #12] 801202a: 6c09 ldr r1, [r1, #64] @ 0x40 801202c: fb01 f303 mul.w r3, r1, r3 8012030: 441a add r2, r3 8012032: 68fb ldr r3, [r7, #12] 8012034: 609a str r2, [r3, #8] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8012036: 68fb ldr r3, [r7, #12] 8012038: 2200 movs r2, #0 801203a: 639a str r2, [r3, #56] @ 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; 801203c: 68fb ldr r3, [r7, #12] 801203e: 681a ldr r2, [r3, #0] 8012040: 68fb ldr r3, [r7, #12] 8012042: 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. */ 8012044: 68fb ldr r3, [r7, #12] 8012046: 681a ldr r2, [r3, #0] 8012048: 68fb ldr r3, [r7, #12] 801204a: 6bdb ldr r3, [r3, #60] @ 0x3c 801204c: 3b01 subs r3, #1 801204e: 68f9 ldr r1, [r7, #12] 8012050: 6c09 ldr r1, [r1, #64] @ 0x40 8012052: fb01 f303 mul.w r3, r1, r3 8012056: 441a add r2, r3 8012058: 68fb ldr r3, [r7, #12] 801205a: 60da str r2, [r3, #12] pxQueue->cRxLock = queueUNLOCKED; 801205c: 68fb ldr r3, [r7, #12] 801205e: 22ff movs r2, #255 @ 0xff 8012060: f883 2044 strb.w r2, [r3, #68] @ 0x44 pxQueue->cTxLock = queueUNLOCKED; 8012064: 68fb ldr r3, [r7, #12] 8012066: 22ff movs r2, #255 @ 0xff 8012068: f883 2045 strb.w r2, [r3, #69] @ 0x45 if( xNewQueue == pdFALSE ) 801206c: 683b ldr r3, [r7, #0] 801206e: 2b00 cmp r3, #0 8012070: d114 bne.n 801209c /* 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 ) 8012072: 68fb ldr r3, [r7, #12] 8012074: 691b ldr r3, [r3, #16] 8012076: 2b00 cmp r3, #0 8012078: d01a beq.n 80120b0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 801207a: 68fb ldr r3, [r7, #12] 801207c: 3310 adds r3, #16 801207e: 4618 mov r0, r3 8012080: f002 f922 bl 80142c8 8012084: 4603 mov r3, r0 8012086: 2b00 cmp r3, #0 8012088: d012 beq.n 80120b0 { queueYIELD_IF_USING_PREEMPTION(); 801208a: 4b0d ldr r3, [pc, #52] @ (80120c0 ) 801208c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012090: 601a str r2, [r3, #0] 8012092: f3bf 8f4f dsb sy 8012096: f3bf 8f6f isb sy 801209a: e009 b.n 80120b0 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 801209c: 68fb ldr r3, [r7, #12] 801209e: 3310 adds r3, #16 80120a0: 4618 mov r0, r3 80120a2: f7ff fef1 bl 8011e88 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 80120a6: 68fb ldr r3, [r7, #12] 80120a8: 3324 adds r3, #36 @ 0x24 80120aa: 4618 mov r0, r3 80120ac: f7ff feec bl 8011e88 } } taskEXIT_CRITICAL(); 80120b0: f003 fcbc bl 8015a2c /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; 80120b4: 2301 movs r3, #1 } 80120b6: 4618 mov r0, r3 80120b8: 3710 adds r7, #16 80120ba: 46bd mov sp, r7 80120bc: bd80 pop {r7, pc} 80120be: bf00 nop 80120c0: e000ed04 .word 0xe000ed04 080120c4 : /*-----------------------------------------------------------*/ #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 ) { 80120c4: b580 push {r7, lr} 80120c6: b08e sub sp, #56 @ 0x38 80120c8: af02 add r7, sp, #8 80120ca: 60f8 str r0, [r7, #12] 80120cc: 60b9 str r1, [r7, #8] 80120ce: 607a str r2, [r7, #4] 80120d0: 603b str r3, [r7, #0] Queue_t *pxNewQueue; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80120d2: 68fb ldr r3, [r7, #12] 80120d4: 2b00 cmp r3, #0 80120d6: d10b bne.n 80120f0 __asm volatile 80120d8: f04f 0350 mov.w r3, #80 @ 0x50 80120dc: f383 8811 msr BASEPRI, r3 80120e0: f3bf 8f6f isb sy 80120e4: f3bf 8f4f dsb sy 80120e8: 62bb str r3, [r7, #40] @ 0x28 } 80120ea: bf00 nop 80120ec: bf00 nop 80120ee: e7fd b.n 80120ec /* The StaticQueue_t structure and the queue storage area must be supplied. */ configASSERT( pxStaticQueue != NULL ); 80120f0: 683b ldr r3, [r7, #0] 80120f2: 2b00 cmp r3, #0 80120f4: d10b bne.n 801210e __asm volatile 80120f6: f04f 0350 mov.w r3, #80 @ 0x50 80120fa: f383 8811 msr BASEPRI, r3 80120fe: f3bf 8f6f isb sy 8012102: f3bf 8f4f dsb sy 8012106: 627b str r3, [r7, #36] @ 0x24 } 8012108: bf00 nop 801210a: bf00 nop 801210c: e7fd b.n 801210a /* 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 ) ) ); 801210e: 687b ldr r3, [r7, #4] 8012110: 2b00 cmp r3, #0 8012112: d002 beq.n 801211a 8012114: 68bb ldr r3, [r7, #8] 8012116: 2b00 cmp r3, #0 8012118: d001 beq.n 801211e 801211a: 2301 movs r3, #1 801211c: e000 b.n 8012120 801211e: 2300 movs r3, #0 8012120: 2b00 cmp r3, #0 8012122: d10b bne.n 801213c __asm volatile 8012124: f04f 0350 mov.w r3, #80 @ 0x50 8012128: f383 8811 msr BASEPRI, r3 801212c: f3bf 8f6f isb sy 8012130: f3bf 8f4f dsb sy 8012134: 623b str r3, [r7, #32] } 8012136: bf00 nop 8012138: bf00 nop 801213a: e7fd b.n 8012138 configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) ); 801213c: 687b ldr r3, [r7, #4] 801213e: 2b00 cmp r3, #0 8012140: d102 bne.n 8012148 8012142: 68bb ldr r3, [r7, #8] 8012144: 2b00 cmp r3, #0 8012146: d101 bne.n 801214c 8012148: 2301 movs r3, #1 801214a: e000 b.n 801214e 801214c: 2300 movs r3, #0 801214e: 2b00 cmp r3, #0 8012150: d10b bne.n 801216a __asm volatile 8012152: f04f 0350 mov.w r3, #80 @ 0x50 8012156: f383 8811 msr BASEPRI, r3 801215a: f3bf 8f6f isb sy 801215e: f3bf 8f4f dsb sy 8012162: 61fb str r3, [r7, #28] } 8012164: bf00 nop 8012166: bf00 nop 8012168: e7fd b.n 8012166 #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 ); 801216a: 2350 movs r3, #80 @ 0x50 801216c: 617b str r3, [r7, #20] configASSERT( xSize == sizeof( Queue_t ) ); 801216e: 697b ldr r3, [r7, #20] 8012170: 2b50 cmp r3, #80 @ 0x50 8012172: d00b beq.n 801218c __asm volatile 8012174: f04f 0350 mov.w r3, #80 @ 0x50 8012178: f383 8811 msr BASEPRI, r3 801217c: f3bf 8f6f isb sy 8012180: f3bf 8f4f dsb sy 8012184: 61bb str r3, [r7, #24] } 8012186: bf00 nop 8012188: bf00 nop 801218a: e7fd b.n 8012188 ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 801218c: 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. */ 801218e: 683b ldr r3, [r7, #0] 8012190: 62fb str r3, [r7, #44] @ 0x2c if( pxNewQueue != NULL ) 8012192: 6afb ldr r3, [r7, #44] @ 0x2c 8012194: 2b00 cmp r3, #0 8012196: d00d beq.n 80121b4 #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; 8012198: 6afb ldr r3, [r7, #44] @ 0x2c 801219a: 2201 movs r2, #1 801219c: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 80121a0: f897 2038 ldrb.w r2, [r7, #56] @ 0x38 80121a4: 6afb ldr r3, [r7, #44] @ 0x2c 80121a6: 9300 str r3, [sp, #0] 80121a8: 4613 mov r3, r2 80121aa: 687a ldr r2, [r7, #4] 80121ac: 68b9 ldr r1, [r7, #8] 80121ae: 68f8 ldr r0, [r7, #12] 80121b0: f000 f840 bl 8012234 { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 80121b4: 6afb ldr r3, [r7, #44] @ 0x2c } 80121b6: 4618 mov r0, r3 80121b8: 3730 adds r7, #48 @ 0x30 80121ba: 46bd mov sp, r7 80121bc: bd80 pop {r7, pc} 080121be : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 80121be: b580 push {r7, lr} 80121c0: b08a sub sp, #40 @ 0x28 80121c2: af02 add r7, sp, #8 80121c4: 60f8 str r0, [r7, #12] 80121c6: 60b9 str r1, [r7, #8] 80121c8: 4613 mov r3, r2 80121ca: 71fb strb r3, [r7, #7] Queue_t *pxNewQueue; size_t xQueueSizeInBytes; uint8_t *pucQueueStorage; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80121cc: 68fb ldr r3, [r7, #12] 80121ce: 2b00 cmp r3, #0 80121d0: d10b bne.n 80121ea __asm volatile 80121d2: f04f 0350 mov.w r3, #80 @ 0x50 80121d6: f383 8811 msr BASEPRI, r3 80121da: f3bf 8f6f isb sy 80121de: f3bf 8f4f dsb sy 80121e2: 613b str r3, [r7, #16] } 80121e4: bf00 nop 80121e6: bf00 nop 80121e8: e7fd b.n 80121e6 /* Allocate enough space to hold the maximum number of items that can be in the queue at any time. It is valid for uxItemSize to be zero in the case the queue is used as a semaphore. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 80121ea: 68fb ldr r3, [r7, #12] 80121ec: 68ba ldr r2, [r7, #8] 80121ee: fb02 f303 mul.w r3, r2, r3 80121f2: 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. */ 80121f4: 69fb ldr r3, [r7, #28] 80121f6: 3350 adds r3, #80 @ 0x50 80121f8: 4618 mov r0, r3 80121fa: f003 fd07 bl 8015c0c 80121fe: 61b8 str r0, [r7, #24] if( pxNewQueue != NULL ) 8012200: 69bb ldr r3, [r7, #24] 8012202: 2b00 cmp r3, #0 8012204: d011 beq.n 801222a { /* Jump past the queue structure to find the location of the queue storage area. */ pucQueueStorage = ( uint8_t * ) pxNewQueue; 8012206: 69bb ldr r3, [r7, #24] 8012208: 617b str r3, [r7, #20] pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 801220a: 697b ldr r3, [r7, #20] 801220c: 3350 adds r3, #80 @ 0x50 801220e: 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; 8012210: 69bb ldr r3, [r7, #24] 8012212: 2200 movs r2, #0 8012214: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_STATIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 8012218: 79fa ldrb r2, [r7, #7] 801221a: 69bb ldr r3, [r7, #24] 801221c: 9300 str r3, [sp, #0] 801221e: 4613 mov r3, r2 8012220: 697a ldr r2, [r7, #20] 8012222: 68b9 ldr r1, [r7, #8] 8012224: 68f8 ldr r0, [r7, #12] 8012226: f000 f805 bl 8012234 { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 801222a: 69bb ldr r3, [r7, #24] } 801222c: 4618 mov r0, r3 801222e: 3720 adds r7, #32 8012230: 46bd mov sp, r7 8012232: bd80 pop {r7, pc} 08012234 : #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 ) { 8012234: b580 push {r7, lr} 8012236: b084 sub sp, #16 8012238: af00 add r7, sp, #0 801223a: 60f8 str r0, [r7, #12] 801223c: 60b9 str r1, [r7, #8] 801223e: 607a str r2, [r7, #4] 8012240: 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 ) 8012242: 68bb ldr r3, [r7, #8] 8012244: 2b00 cmp r3, #0 8012246: d103 bne.n 8012250 { /* 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; 8012248: 69bb ldr r3, [r7, #24] 801224a: 69ba ldr r2, [r7, #24] 801224c: 601a str r2, [r3, #0] 801224e: e002 b.n 8012256 } else { /* Set the head to the start of the queue storage area. */ pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage; 8012250: 69bb ldr r3, [r7, #24] 8012252: 687a ldr r2, [r7, #4] 8012254: 601a str r2, [r3, #0] } /* Initialise the queue members as described where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 8012256: 69bb ldr r3, [r7, #24] 8012258: 68fa ldr r2, [r7, #12] 801225a: 63da str r2, [r3, #60] @ 0x3c pxNewQueue->uxItemSize = uxItemSize; 801225c: 69bb ldr r3, [r7, #24] 801225e: 68ba ldr r2, [r7, #8] 8012260: 641a str r2, [r3, #64] @ 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 8012262: 2101 movs r1, #1 8012264: 69b8 ldr r0, [r7, #24] 8012266: f7ff fec3 bl 8011ff0 #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 801226a: 69bb ldr r3, [r7, #24] 801226c: 78fa ldrb r2, [r7, #3] 801226e: f883 204c strb.w r2, [r3, #76] @ 0x4c pxNewQueue->pxQueueSetContainer = NULL; } #endif /* configUSE_QUEUE_SETS */ traceQUEUE_CREATE( pxNewQueue ); } 8012272: bf00 nop 8012274: 3710 adds r7, #16 8012276: 46bd mov sp, r7 8012278: bd80 pop {r7, pc} 0801227a : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static void prvInitialiseMutex( Queue_t *pxNewQueue ) { 801227a: b580 push {r7, lr} 801227c: b082 sub sp, #8 801227e: af00 add r7, sp, #0 8012280: 6078 str r0, [r7, #4] if( pxNewQueue != NULL ) 8012282: 687b ldr r3, [r7, #4] 8012284: 2b00 cmp r3, #0 8012286: d00e beq.n 80122a6 { /* 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; 8012288: 687b ldr r3, [r7, #4] 801228a: 2200 movs r2, #0 801228c: 609a str r2, [r3, #8] pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 801228e: 687b ldr r3, [r7, #4] 8012290: 2200 movs r2, #0 8012292: 601a str r2, [r3, #0] /* In case this is a recursive mutex. */ pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0; 8012294: 687b ldr r3, [r7, #4] 8012296: 2200 movs r2, #0 8012298: 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 ); 801229a: 2300 movs r3, #0 801229c: 2200 movs r2, #0 801229e: 2100 movs r1, #0 80122a0: 6878 ldr r0, [r7, #4] 80122a2: f000 f911 bl 80124c8 } else { traceCREATE_MUTEX_FAILED(); } } 80122a6: bf00 nop 80122a8: 3708 adds r7, #8 80122aa: 46bd mov sp, r7 80122ac: bd80 pop {r7, pc} 080122ae : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 80122ae: b580 push {r7, lr} 80122b0: b086 sub sp, #24 80122b2: af00 add r7, sp, #0 80122b4: 4603 mov r3, r0 80122b6: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 80122b8: 2301 movs r3, #1 80122ba: 617b str r3, [r7, #20] 80122bc: 2300 movs r3, #0 80122be: 613b str r3, [r7, #16] xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType ); 80122c0: 79fb ldrb r3, [r7, #7] 80122c2: 461a mov r2, r3 80122c4: 6939 ldr r1, [r7, #16] 80122c6: 6978 ldr r0, [r7, #20] 80122c8: f7ff ff79 bl 80121be 80122cc: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 80122ce: 68f8 ldr r0, [r7, #12] 80122d0: f7ff ffd3 bl 801227a return xNewQueue; 80122d4: 68fb ldr r3, [r7, #12] } 80122d6: 4618 mov r0, r3 80122d8: 3718 adds r7, #24 80122da: 46bd mov sp, r7 80122dc: bd80 pop {r7, pc} 080122de : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) { 80122de: b580 push {r7, lr} 80122e0: b088 sub sp, #32 80122e2: af02 add r7, sp, #8 80122e4: 4603 mov r3, r0 80122e6: 6039 str r1, [r7, #0] 80122e8: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 80122ea: 2301 movs r3, #1 80122ec: 617b str r3, [r7, #20] 80122ee: 2300 movs r3, #0 80122f0: 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 ); 80122f2: 79fb ldrb r3, [r7, #7] 80122f4: 9300 str r3, [sp, #0] 80122f6: 683b ldr r3, [r7, #0] 80122f8: 2200 movs r2, #0 80122fa: 6939 ldr r1, [r7, #16] 80122fc: 6978 ldr r0, [r7, #20] 80122fe: f7ff fee1 bl 80120c4 8012302: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 8012304: 68f8 ldr r0, [r7, #12] 8012306: f7ff ffb8 bl 801227a return xNewQueue; 801230a: 68fb ldr r3, [r7, #12] } 801230c: 4618 mov r0, r3 801230e: 3718 adds r7, #24 8012310: 46bd mov sp, r7 8012312: bd80 pop {r7, pc} 08012314 : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) { 8012314: b590 push {r4, r7, lr} 8012316: b087 sub sp, #28 8012318: af00 add r7, sp, #0 801231a: 6078 str r0, [r7, #4] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 801231c: 687b ldr r3, [r7, #4] 801231e: 613b str r3, [r7, #16] configASSERT( pxMutex ); 8012320: 693b ldr r3, [r7, #16] 8012322: 2b00 cmp r3, #0 8012324: d10b bne.n 801233e __asm volatile 8012326: f04f 0350 mov.w r3, #80 @ 0x50 801232a: f383 8811 msr BASEPRI, r3 801232e: f3bf 8f6f isb sy 8012332: f3bf 8f4f dsb sy 8012336: 60fb str r3, [r7, #12] } 8012338: bf00 nop 801233a: bf00 nop 801233c: e7fd b.n 801233a change outside of this task. If this task does not hold the mutex then pxMutexHolder can never coincidentally equal the tasks handle, and as this is the only condition we are interested in it does not matter if pxMutexHolder is accessed simultaneously by another task. Therefore no mutual exclusion is required to test the pxMutexHolder variable. */ if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 801233e: 693b ldr r3, [r7, #16] 8012340: 689c ldr r4, [r3, #8] 8012342: f002 f9af bl 80146a4 8012346: 4603 mov r3, r0 8012348: 429c cmp r4, r3 801234a: d111 bne.n 8012370 /* uxRecursiveCallCount cannot be zero if xMutexHolder is equal to the task handle, therefore no underflow check is required. Also, uxRecursiveCallCount is only modified by the mutex holder, and as there can only be one, no mutual exclusion is required to modify the uxRecursiveCallCount member. */ ( pxMutex->u.xSemaphore.uxRecursiveCallCount )--; 801234c: 693b ldr r3, [r7, #16] 801234e: 68db ldr r3, [r3, #12] 8012350: 1e5a subs r2, r3, #1 8012352: 693b ldr r3, [r7, #16] 8012354: 60da str r2, [r3, #12] /* Has the recursive call count unwound to 0? */ if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 ) 8012356: 693b ldr r3, [r7, #16] 8012358: 68db ldr r3, [r3, #12] 801235a: 2b00 cmp r3, #0 801235c: d105 bne.n 801236a { /* Return the mutex. This will automatically unblock any other task that might be waiting to access the mutex. */ ( void ) xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK ); 801235e: 2300 movs r3, #0 8012360: 2200 movs r2, #0 8012362: 2100 movs r1, #0 8012364: 6938 ldr r0, [r7, #16] 8012366: f000 f8af bl 80124c8 else { mtCOVERAGE_TEST_MARKER(); } xReturn = pdPASS; 801236a: 2301 movs r3, #1 801236c: 617b str r3, [r7, #20] 801236e: e001 b.n 8012374 } else { /* The mutex cannot be given because the calling task is not the holder. */ xReturn = pdFAIL; 8012370: 2300 movs r3, #0 8012372: 617b str r3, [r7, #20] traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex ); } return xReturn; 8012374: 697b ldr r3, [r7, #20] } 8012376: 4618 mov r0, r3 8012378: 371c adds r7, #28 801237a: 46bd mov sp, r7 801237c: bd90 pop {r4, r7, pc} 0801237e : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) { 801237e: b590 push {r4, r7, lr} 8012380: b087 sub sp, #28 8012382: af00 add r7, sp, #0 8012384: 6078 str r0, [r7, #4] 8012386: 6039 str r1, [r7, #0] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 8012388: 687b ldr r3, [r7, #4] 801238a: 613b str r3, [r7, #16] configASSERT( pxMutex ); 801238c: 693b ldr r3, [r7, #16] 801238e: 2b00 cmp r3, #0 8012390: d10b bne.n 80123aa __asm volatile 8012392: f04f 0350 mov.w r3, #80 @ 0x50 8012396: f383 8811 msr BASEPRI, r3 801239a: f3bf 8f6f isb sy 801239e: f3bf 8f4f dsb sy 80123a2: 60fb str r3, [r7, #12] } 80123a4: bf00 nop 80123a6: bf00 nop 80123a8: e7fd b.n 80123a6 /* Comments regarding mutual exclusion as per those within xQueueGiveMutexRecursive(). */ traceTAKE_MUTEX_RECURSIVE( pxMutex ); if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 80123aa: 693b ldr r3, [r7, #16] 80123ac: 689c ldr r4, [r3, #8] 80123ae: f002 f979 bl 80146a4 80123b2: 4603 mov r3, r0 80123b4: 429c cmp r4, r3 80123b6: d107 bne.n 80123c8 { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 80123b8: 693b ldr r3, [r7, #16] 80123ba: 68db ldr r3, [r3, #12] 80123bc: 1c5a adds r2, r3, #1 80123be: 693b ldr r3, [r7, #16] 80123c0: 60da str r2, [r3, #12] xReturn = pdPASS; 80123c2: 2301 movs r3, #1 80123c4: 617b str r3, [r7, #20] 80123c6: e00c b.n 80123e2 } else { xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait ); 80123c8: 6839 ldr r1, [r7, #0] 80123ca: 6938 ldr r0, [r7, #16] 80123cc: f000 fb8e bl 8012aec 80123d0: 6178 str r0, [r7, #20] /* pdPASS will only be returned if the mutex was successfully obtained. The calling task may have entered the Blocked state before reaching here. */ if( xReturn != pdFAIL ) 80123d2: 697b ldr r3, [r7, #20] 80123d4: 2b00 cmp r3, #0 80123d6: d004 beq.n 80123e2 { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 80123d8: 693b ldr r3, [r7, #16] 80123da: 68db ldr r3, [r3, #12] 80123dc: 1c5a adds r2, r3, #1 80123de: 693b ldr r3, [r7, #16] 80123e0: 60da str r2, [r3, #12] { traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex ); } } return xReturn; 80123e2: 697b ldr r3, [r7, #20] } 80123e4: 4618 mov r0, r3 80123e6: 371c adds r7, #28 80123e8: 46bd mov sp, r7 80123ea: bd90 pop {r4, r7, pc} 080123ec : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) { 80123ec: b580 push {r7, lr} 80123ee: b08a sub sp, #40 @ 0x28 80123f0: af02 add r7, sp, #8 80123f2: 60f8 str r0, [r7, #12] 80123f4: 60b9 str r1, [r7, #8] 80123f6: 607a str r2, [r7, #4] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 80123f8: 68fb ldr r3, [r7, #12] 80123fa: 2b00 cmp r3, #0 80123fc: d10b bne.n 8012416 __asm volatile 80123fe: f04f 0350 mov.w r3, #80 @ 0x50 8012402: f383 8811 msr BASEPRI, r3 8012406: f3bf 8f6f isb sy 801240a: f3bf 8f4f dsb sy 801240e: 61bb str r3, [r7, #24] } 8012410: bf00 nop 8012412: bf00 nop 8012414: e7fd b.n 8012412 configASSERT( uxInitialCount <= uxMaxCount ); 8012416: 68ba ldr r2, [r7, #8] 8012418: 68fb ldr r3, [r7, #12] 801241a: 429a cmp r2, r3 801241c: d90b bls.n 8012436 __asm volatile 801241e: f04f 0350 mov.w r3, #80 @ 0x50 8012422: f383 8811 msr BASEPRI, r3 8012426: f3bf 8f6f isb sy 801242a: f3bf 8f4f dsb sy 801242e: 617b str r3, [r7, #20] } 8012430: bf00 nop 8012432: bf00 nop 8012434: e7fd b.n 8012432 xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 8012436: 2302 movs r3, #2 8012438: 9300 str r3, [sp, #0] 801243a: 687b ldr r3, [r7, #4] 801243c: 2200 movs r2, #0 801243e: 2100 movs r1, #0 8012440: 68f8 ldr r0, [r7, #12] 8012442: f7ff fe3f bl 80120c4 8012446: 61f8 str r0, [r7, #28] if( xHandle != NULL ) 8012448: 69fb ldr r3, [r7, #28] 801244a: 2b00 cmp r3, #0 801244c: d002 beq.n 8012454 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 801244e: 69fb ldr r3, [r7, #28] 8012450: 68ba ldr r2, [r7, #8] 8012452: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 8012454: 69fb ldr r3, [r7, #28] } 8012456: 4618 mov r0, r3 8012458: 3720 adds r7, #32 801245a: 46bd mov sp, r7 801245c: bd80 pop {r7, pc} 0801245e : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 801245e: b580 push {r7, lr} 8012460: b086 sub sp, #24 8012462: af00 add r7, sp, #0 8012464: 6078 str r0, [r7, #4] 8012466: 6039 str r1, [r7, #0] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8012468: 687b ldr r3, [r7, #4] 801246a: 2b00 cmp r3, #0 801246c: d10b bne.n 8012486 __asm volatile 801246e: f04f 0350 mov.w r3, #80 @ 0x50 8012472: f383 8811 msr BASEPRI, r3 8012476: f3bf 8f6f isb sy 801247a: f3bf 8f4f dsb sy 801247e: 613b str r3, [r7, #16] } 8012480: bf00 nop 8012482: bf00 nop 8012484: e7fd b.n 8012482 configASSERT( uxInitialCount <= uxMaxCount ); 8012486: 683a ldr r2, [r7, #0] 8012488: 687b ldr r3, [r7, #4] 801248a: 429a cmp r2, r3 801248c: d90b bls.n 80124a6 __asm volatile 801248e: f04f 0350 mov.w r3, #80 @ 0x50 8012492: f383 8811 msr BASEPRI, r3 8012496: f3bf 8f6f isb sy 801249a: f3bf 8f4f dsb sy 801249e: 60fb str r3, [r7, #12] } 80124a0: bf00 nop 80124a2: bf00 nop 80124a4: e7fd b.n 80124a2 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 80124a6: 2202 movs r2, #2 80124a8: 2100 movs r1, #0 80124aa: 6878 ldr r0, [r7, #4] 80124ac: f7ff fe87 bl 80121be 80124b0: 6178 str r0, [r7, #20] if( xHandle != NULL ) 80124b2: 697b ldr r3, [r7, #20] 80124b4: 2b00 cmp r3, #0 80124b6: d002 beq.n 80124be { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 80124b8: 697b ldr r3, [r7, #20] 80124ba: 683a ldr r2, [r7, #0] 80124bc: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 80124be: 697b ldr r3, [r7, #20] } 80124c0: 4618 mov r0, r3 80124c2: 3718 adds r7, #24 80124c4: 46bd mov sp, r7 80124c6: bd80 pop {r7, pc} 080124c8 : #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 ) { 80124c8: b580 push {r7, lr} 80124ca: b08e sub sp, #56 @ 0x38 80124cc: af00 add r7, sp, #0 80124ce: 60f8 str r0, [r7, #12] 80124d0: 60b9 str r1, [r7, #8] 80124d2: 607a str r2, [r7, #4] 80124d4: 603b str r3, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; 80124d6: 2300 movs r3, #0 80124d8: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 80124da: 68fb ldr r3, [r7, #12] 80124dc: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 80124de: 6b3b ldr r3, [r7, #48] @ 0x30 80124e0: 2b00 cmp r3, #0 80124e2: d10b bne.n 80124fc __asm volatile 80124e4: f04f 0350 mov.w r3, #80 @ 0x50 80124e8: f383 8811 msr BASEPRI, r3 80124ec: f3bf 8f6f isb sy 80124f0: f3bf 8f4f dsb sy 80124f4: 62bb str r3, [r7, #40] @ 0x28 } 80124f6: bf00 nop 80124f8: bf00 nop 80124fa: e7fd b.n 80124f8 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 80124fc: 68bb ldr r3, [r7, #8] 80124fe: 2b00 cmp r3, #0 8012500: d103 bne.n 801250a 8012502: 6b3b ldr r3, [r7, #48] @ 0x30 8012504: 6c1b ldr r3, [r3, #64] @ 0x40 8012506: 2b00 cmp r3, #0 8012508: d101 bne.n 801250e 801250a: 2301 movs r3, #1 801250c: e000 b.n 8012510 801250e: 2300 movs r3, #0 8012510: 2b00 cmp r3, #0 8012512: d10b bne.n 801252c __asm volatile 8012514: f04f 0350 mov.w r3, #80 @ 0x50 8012518: f383 8811 msr BASEPRI, r3 801251c: f3bf 8f6f isb sy 8012520: f3bf 8f4f dsb sy 8012524: 627b str r3, [r7, #36] @ 0x24 } 8012526: bf00 nop 8012528: bf00 nop 801252a: e7fd b.n 8012528 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 801252c: 683b ldr r3, [r7, #0] 801252e: 2b02 cmp r3, #2 8012530: d103 bne.n 801253a 8012532: 6b3b ldr r3, [r7, #48] @ 0x30 8012534: 6bdb ldr r3, [r3, #60] @ 0x3c 8012536: 2b01 cmp r3, #1 8012538: d101 bne.n 801253e 801253a: 2301 movs r3, #1 801253c: e000 b.n 8012540 801253e: 2300 movs r3, #0 8012540: 2b00 cmp r3, #0 8012542: d10b bne.n 801255c __asm volatile 8012544: f04f 0350 mov.w r3, #80 @ 0x50 8012548: f383 8811 msr BASEPRI, r3 801254c: f3bf 8f6f isb sy 8012550: f3bf 8f4f dsb sy 8012554: 623b str r3, [r7, #32] } 8012556: bf00 nop 8012558: bf00 nop 801255a: e7fd b.n 8012558 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 801255c: f002 f8b2 bl 80146c4 8012560: 4603 mov r3, r0 8012562: 2b00 cmp r3, #0 8012564: d102 bne.n 801256c 8012566: 687b ldr r3, [r7, #4] 8012568: 2b00 cmp r3, #0 801256a: d101 bne.n 8012570 801256c: 2301 movs r3, #1 801256e: e000 b.n 8012572 8012570: 2300 movs r3, #0 8012572: 2b00 cmp r3, #0 8012574: d10b bne.n 801258e __asm volatile 8012576: f04f 0350 mov.w r3, #80 @ 0x50 801257a: f383 8811 msr BASEPRI, r3 801257e: f3bf 8f6f isb sy 8012582: f3bf 8f4f dsb sy 8012586: 61fb str r3, [r7, #28] } 8012588: bf00 nop 801258a: bf00 nop 801258c: e7fd b.n 801258a /*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(); 801258e: f003 fa1b bl 80159c8 { /* 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 ) ) 8012592: 6b3b ldr r3, [r7, #48] @ 0x30 8012594: 6b9a ldr r2, [r3, #56] @ 0x38 8012596: 6b3b ldr r3, [r7, #48] @ 0x30 8012598: 6bdb ldr r3, [r3, #60] @ 0x3c 801259a: 429a cmp r2, r3 801259c: d302 bcc.n 80125a4 801259e: 683b ldr r3, [r7, #0] 80125a0: 2b02 cmp r3, #2 80125a2: d129 bne.n 80125f8 } } } #else /* configUSE_QUEUE_SETS */ { xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 80125a4: 683a ldr r2, [r7, #0] 80125a6: 68b9 ldr r1, [r7, #8] 80125a8: 6b38 ldr r0, [r7, #48] @ 0x30 80125aa: f000 fcab bl 8012f04 80125ae: 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 ) 80125b0: 6b3b ldr r3, [r7, #48] @ 0x30 80125b2: 6a5b ldr r3, [r3, #36] @ 0x24 80125b4: 2b00 cmp r3, #0 80125b6: d010 beq.n 80125da { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80125b8: 6b3b ldr r3, [r7, #48] @ 0x30 80125ba: 3324 adds r3, #36 @ 0x24 80125bc: 4618 mov r0, r3 80125be: f001 fe83 bl 80142c8 80125c2: 4603 mov r3, r0 80125c4: 2b00 cmp r3, #0 80125c6: d013 beq.n 80125f0 { /* 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(); 80125c8: 4b3f ldr r3, [pc, #252] @ (80126c8 ) 80125ca: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80125ce: 601a str r2, [r3, #0] 80125d0: f3bf 8f4f dsb sy 80125d4: f3bf 8f6f isb sy 80125d8: e00a b.n 80125f0 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 80125da: 6afb ldr r3, [r7, #44] @ 0x2c 80125dc: 2b00 cmp r3, #0 80125de: d007 beq.n 80125f0 { /* 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(); 80125e0: 4b39 ldr r3, [pc, #228] @ (80126c8 ) 80125e2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80125e6: 601a str r2, [r3, #0] 80125e8: f3bf 8f4f dsb sy 80125ec: f3bf 8f6f isb sy mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 80125f0: f003 fa1c bl 8015a2c return pdPASS; 80125f4: 2301 movs r3, #1 80125f6: e063 b.n 80126c0 } else { if( xTicksToWait == ( TickType_t ) 0 ) 80125f8: 687b ldr r3, [r7, #4] 80125fa: 2b00 cmp r3, #0 80125fc: d103 bne.n 8012606 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 80125fe: f003 fa15 bl 8015a2c /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 8012602: 2300 movs r3, #0 8012604: e05c b.n 80126c0 } else if( xEntryTimeSet == pdFALSE ) 8012606: 6b7b ldr r3, [r7, #52] @ 0x34 8012608: 2b00 cmp r3, #0 801260a: d106 bne.n 801261a { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 801260c: f107 0314 add.w r3, r7, #20 8012610: 4618 mov r0, r3 8012612: f001 fee5 bl 80143e0 xEntryTimeSet = pdTRUE; 8012616: 2301 movs r3, #1 8012618: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 801261a: f003 fa07 bl 8015a2c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 801261e: f001 fc05 bl 8013e2c prvLockQueue( pxQueue ); 8012622: f003 f9d1 bl 80159c8 8012626: 6b3b ldr r3, [r7, #48] @ 0x30 8012628: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 801262c: b25b sxtb r3, r3 801262e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012632: d103 bne.n 801263c 8012634: 6b3b ldr r3, [r7, #48] @ 0x30 8012636: 2200 movs r2, #0 8012638: f883 2044 strb.w r2, [r3, #68] @ 0x44 801263c: 6b3b ldr r3, [r7, #48] @ 0x30 801263e: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012642: b25b sxtb r3, r3 8012644: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012648: d103 bne.n 8012652 801264a: 6b3b ldr r3, [r7, #48] @ 0x30 801264c: 2200 movs r2, #0 801264e: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012652: f003 f9eb bl 8015a2c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012656: 1d3a adds r2, r7, #4 8012658: f107 0314 add.w r3, r7, #20 801265c: 4611 mov r1, r2 801265e: 4618 mov r0, r3 8012660: f001 fed4 bl 801440c 8012664: 4603 mov r3, r0 8012666: 2b00 cmp r3, #0 8012668: d124 bne.n 80126b4 { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 801266a: 6b38 ldr r0, [r7, #48] @ 0x30 801266c: f000 fd42 bl 80130f4 8012670: 4603 mov r3, r0 8012672: 2b00 cmp r3, #0 8012674: d018 beq.n 80126a8 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 8012676: 6b3b ldr r3, [r7, #48] @ 0x30 8012678: 3310 adds r3, #16 801267a: 687a ldr r2, [r7, #4] 801267c: 4611 mov r1, r2 801267e: 4618 mov r0, r3 8012680: f001 fdd0 bl 8014224 /* 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 ); 8012684: 6b38 ldr r0, [r7, #48] @ 0x30 8012686: f000 fccd bl 8013024 /* 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 ) 801268a: f001 fbdd bl 8013e48 801268e: 4603 mov r3, r0 8012690: 2b00 cmp r3, #0 8012692: f47f af7c bne.w 801258e { portYIELD_WITHIN_API(); 8012696: 4b0c ldr r3, [pc, #48] @ (80126c8 ) 8012698: f04f 5280 mov.w r2, #268435456 @ 0x10000000 801269c: 601a str r2, [r3, #0] 801269e: f3bf 8f4f dsb sy 80126a2: f3bf 8f6f isb sy 80126a6: e772 b.n 801258e } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 80126a8: 6b38 ldr r0, [r7, #48] @ 0x30 80126aa: f000 fcbb bl 8013024 ( void ) xTaskResumeAll(); 80126ae: f001 fbcb bl 8013e48 80126b2: e76c b.n 801258e } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 80126b4: 6b38 ldr r0, [r7, #48] @ 0x30 80126b6: f000 fcb5 bl 8013024 ( void ) xTaskResumeAll(); 80126ba: f001 fbc5 bl 8013e48 traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 80126be: 2300 movs r3, #0 } } /*lint -restore */ } 80126c0: 4618 mov r0, r3 80126c2: 3738 adds r7, #56 @ 0x38 80126c4: 46bd mov sp, r7 80126c6: bd80 pop {r7, pc} 80126c8: e000ed04 .word 0xe000ed04 080126cc : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 80126cc: b580 push {r7, lr} 80126ce: b090 sub sp, #64 @ 0x40 80126d0: af00 add r7, sp, #0 80126d2: 60f8 str r0, [r7, #12] 80126d4: 60b9 str r1, [r7, #8] 80126d6: 607a str r2, [r7, #4] 80126d8: 603b str r3, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 80126da: 68fb ldr r3, [r7, #12] 80126dc: 63bb str r3, [r7, #56] @ 0x38 configASSERT( pxQueue ); 80126de: 6bbb ldr r3, [r7, #56] @ 0x38 80126e0: 2b00 cmp r3, #0 80126e2: d10b bne.n 80126fc __asm volatile 80126e4: f04f 0350 mov.w r3, #80 @ 0x50 80126e8: f383 8811 msr BASEPRI, r3 80126ec: f3bf 8f6f isb sy 80126f0: f3bf 8f4f dsb sy 80126f4: 62bb str r3, [r7, #40] @ 0x28 } 80126f6: bf00 nop 80126f8: bf00 nop 80126fa: e7fd b.n 80126f8 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 80126fc: 68bb ldr r3, [r7, #8] 80126fe: 2b00 cmp r3, #0 8012700: d103 bne.n 801270a 8012702: 6bbb ldr r3, [r7, #56] @ 0x38 8012704: 6c1b ldr r3, [r3, #64] @ 0x40 8012706: 2b00 cmp r3, #0 8012708: d101 bne.n 801270e 801270a: 2301 movs r3, #1 801270c: e000 b.n 8012710 801270e: 2300 movs r3, #0 8012710: 2b00 cmp r3, #0 8012712: d10b bne.n 801272c __asm volatile 8012714: f04f 0350 mov.w r3, #80 @ 0x50 8012718: f383 8811 msr BASEPRI, r3 801271c: f3bf 8f6f isb sy 8012720: f3bf 8f4f dsb sy 8012724: 627b str r3, [r7, #36] @ 0x24 } 8012726: bf00 nop 8012728: bf00 nop 801272a: e7fd b.n 8012728 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 801272c: 683b ldr r3, [r7, #0] 801272e: 2b02 cmp r3, #2 8012730: d103 bne.n 801273a 8012732: 6bbb ldr r3, [r7, #56] @ 0x38 8012734: 6bdb ldr r3, [r3, #60] @ 0x3c 8012736: 2b01 cmp r3, #1 8012738: d101 bne.n 801273e 801273a: 2301 movs r3, #1 801273c: e000 b.n 8012740 801273e: 2300 movs r3, #0 8012740: 2b00 cmp r3, #0 8012742: d10b bne.n 801275c __asm volatile 8012744: f04f 0350 mov.w r3, #80 @ 0x50 8012748: f383 8811 msr BASEPRI, r3 801274c: f3bf 8f6f isb sy 8012750: f3bf 8f4f dsb sy 8012754: 623b str r3, [r7, #32] } 8012756: bf00 nop 8012758: bf00 nop 801275a: e7fd b.n 8012758 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(); 801275c: f003 fa14 bl 8015b88 portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void ) { uint32_t ulOriginalBASEPRI, ulNewBASEPRI; __asm volatile 8012760: f3ef 8211 mrs r2, BASEPRI 8012764: f04f 0350 mov.w r3, #80 @ 0x50 8012768: f383 8811 msr BASEPRI, r3 801276c: f3bf 8f6f isb sy 8012770: f3bf 8f4f dsb sy 8012774: 61fa str r2, [r7, #28] 8012776: 61bb str r3, [r7, #24] :"=r" (ulOriginalBASEPRI), "=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory" ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return ulOriginalBASEPRI; 8012778: 69fb ldr r3, [r7, #28] /* Similar to xQueueGenericSend, except without blocking if there is no room in the queue. Also don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 801277a: 637b str r3, [r7, #52] @ 0x34 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 801277c: 6bbb ldr r3, [r7, #56] @ 0x38 801277e: 6b9a ldr r2, [r3, #56] @ 0x38 8012780: 6bbb ldr r3, [r7, #56] @ 0x38 8012782: 6bdb ldr r3, [r3, #60] @ 0x3c 8012784: 429a cmp r2, r3 8012786: d302 bcc.n 801278e 8012788: 683b ldr r3, [r7, #0] 801278a: 2b02 cmp r3, #2 801278c: d12f bne.n 80127ee { const int8_t cTxLock = pxQueue->cTxLock; 801278e: 6bbb ldr r3, [r7, #56] @ 0x38 8012790: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012794: f887 3033 strb.w r3, [r7, #51] @ 0x33 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; 8012798: 6bbb ldr r3, [r7, #56] @ 0x38 801279a: 6b9b ldr r3, [r3, #56] @ 0x38 801279c: 62fb str r3, [r7, #44] @ 0x2c /* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a semaphore or mutex. That means prvCopyDataToQueue() cannot result in a task disinheriting a priority and prvCopyDataToQueue() can be called here even though the disinherit function does not check if the scheduler is suspended before accessing the ready lists. */ ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 801279e: 683a ldr r2, [r7, #0] 80127a0: 68b9 ldr r1, [r7, #8] 80127a2: 6bb8 ldr r0, [r7, #56] @ 0x38 80127a4: f000 fbae bl 8012f04 /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( cTxLock == queueUNLOCKED ) 80127a8: f997 3033 ldrsb.w r3, [r7, #51] @ 0x33 80127ac: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80127b0: d112 bne.n 80127d8 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80127b2: 6bbb ldr r3, [r7, #56] @ 0x38 80127b4: 6a5b ldr r3, [r3, #36] @ 0x24 80127b6: 2b00 cmp r3, #0 80127b8: d016 beq.n 80127e8 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80127ba: 6bbb ldr r3, [r7, #56] @ 0x38 80127bc: 3324 adds r3, #36 @ 0x24 80127be: 4618 mov r0, r3 80127c0: f001 fd82 bl 80142c8 80127c4: 4603 mov r3, r0 80127c6: 2b00 cmp r3, #0 80127c8: d00e beq.n 80127e8 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80127ca: 687b ldr r3, [r7, #4] 80127cc: 2b00 cmp r3, #0 80127ce: d00b beq.n 80127e8 { *pxHigherPriorityTaskWoken = pdTRUE; 80127d0: 687b ldr r3, [r7, #4] 80127d2: 2201 movs r2, #1 80127d4: 601a str r2, [r3, #0] 80127d6: e007 b.n 80127e8 } 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 ); 80127d8: f897 3033 ldrb.w r3, [r7, #51] @ 0x33 80127dc: 3301 adds r3, #1 80127de: b2db uxtb r3, r3 80127e0: b25a sxtb r2, r3 80127e2: 6bbb ldr r3, [r7, #56] @ 0x38 80127e4: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 80127e8: 2301 movs r3, #1 80127ea: 63fb str r3, [r7, #60] @ 0x3c { 80127ec: e001 b.n 80127f2 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 80127ee: 2300 movs r3, #0 80127f0: 63fb str r3, [r7, #60] @ 0x3c 80127f2: 6b7b ldr r3, [r7, #52] @ 0x34 80127f4: 617b str r3, [r7, #20] } /*-----------------------------------------------------------*/ portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue ) { __asm volatile 80127f6: 697b ldr r3, [r7, #20] 80127f8: f383 8811 msr BASEPRI, r3 ( " msr basepri, %0 " :: "r" ( ulNewMaskValue ) : "memory" ); } 80127fc: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 80127fe: 6bfb ldr r3, [r7, #60] @ 0x3c } 8012800: 4618 mov r0, r3 8012802: 3740 adds r7, #64 @ 0x40 8012804: 46bd mov sp, r7 8012806: bd80 pop {r7, pc} 08012808 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 8012808: b580 push {r7, lr} 801280a: b08e sub sp, #56 @ 0x38 801280c: af00 add r7, sp, #0 801280e: 6078 str r0, [r7, #4] 8012810: 6039 str r1, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8012812: 687b ldr r3, [r7, #4] 8012814: 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 ); 8012816: 6b3b ldr r3, [r7, #48] @ 0x30 8012818: 2b00 cmp r3, #0 801281a: d10b bne.n 8012834 __asm volatile 801281c: f04f 0350 mov.w r3, #80 @ 0x50 8012820: f383 8811 msr BASEPRI, r3 8012824: f3bf 8f6f isb sy 8012828: f3bf 8f4f dsb sy 801282c: 623b str r3, [r7, #32] } 801282e: bf00 nop 8012830: bf00 nop 8012832: e7fd b.n 8012830 /* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR() if the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8012834: 6b3b ldr r3, [r7, #48] @ 0x30 8012836: 6c1b ldr r3, [r3, #64] @ 0x40 8012838: 2b00 cmp r3, #0 801283a: d00b beq.n 8012854 __asm volatile 801283c: f04f 0350 mov.w r3, #80 @ 0x50 8012840: f383 8811 msr BASEPRI, r3 8012844: f3bf 8f6f isb sy 8012848: f3bf 8f4f dsb sy 801284c: 61fb str r3, [r7, #28] } 801284e: bf00 nop 8012850: bf00 nop 8012852: e7fd b.n 8012850 /* 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 ) ) ); 8012854: 6b3b ldr r3, [r7, #48] @ 0x30 8012856: 681b ldr r3, [r3, #0] 8012858: 2b00 cmp r3, #0 801285a: d103 bne.n 8012864 801285c: 6b3b ldr r3, [r7, #48] @ 0x30 801285e: 689b ldr r3, [r3, #8] 8012860: 2b00 cmp r3, #0 8012862: d101 bne.n 8012868 8012864: 2301 movs r3, #1 8012866: e000 b.n 801286a 8012868: 2300 movs r3, #0 801286a: 2b00 cmp r3, #0 801286c: d10b bne.n 8012886 __asm volatile 801286e: f04f 0350 mov.w r3, #80 @ 0x50 8012872: f383 8811 msr BASEPRI, r3 8012876: f3bf 8f6f isb sy 801287a: f3bf 8f4f dsb sy 801287e: 61bb str r3, [r7, #24] } 8012880: bf00 nop 8012882: bf00 nop 8012884: e7fd b.n 8012882 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(); 8012886: f003 f97f bl 8015b88 __asm volatile 801288a: f3ef 8211 mrs r2, BASEPRI 801288e: f04f 0350 mov.w r3, #80 @ 0x50 8012892: f383 8811 msr BASEPRI, r3 8012896: f3bf 8f6f isb sy 801289a: f3bf 8f4f dsb sy 801289e: 617a str r2, [r7, #20] 80128a0: 613b str r3, [r7, #16] return ulOriginalBASEPRI; 80128a2: 697b ldr r3, [r7, #20] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 80128a4: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80128a6: 6b3b ldr r3, [r7, #48] @ 0x30 80128a8: 6b9b ldr r3, [r3, #56] @ 0x38 80128aa: 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 ) 80128ac: 6b3b ldr r3, [r7, #48] @ 0x30 80128ae: 6bdb ldr r3, [r3, #60] @ 0x3c 80128b0: 6aba ldr r2, [r7, #40] @ 0x28 80128b2: 429a cmp r2, r3 80128b4: d22b bcs.n 801290e { const int8_t cTxLock = pxQueue->cTxLock; 80128b6: 6b3b ldr r3, [r7, #48] @ 0x30 80128b8: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 80128bc: 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; 80128c0: 6abb ldr r3, [r7, #40] @ 0x28 80128c2: 1c5a adds r2, r3, #1 80128c4: 6b3b ldr r3, [r7, #48] @ 0x30 80128c6: 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 ) 80128c8: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 80128cc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80128d0: d112 bne.n 80128f8 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80128d2: 6b3b ldr r3, [r7, #48] @ 0x30 80128d4: 6a5b ldr r3, [r3, #36] @ 0x24 80128d6: 2b00 cmp r3, #0 80128d8: d016 beq.n 8012908 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80128da: 6b3b ldr r3, [r7, #48] @ 0x30 80128dc: 3324 adds r3, #36 @ 0x24 80128de: 4618 mov r0, r3 80128e0: f001 fcf2 bl 80142c8 80128e4: 4603 mov r3, r0 80128e6: 2b00 cmp r3, #0 80128e8: d00e beq.n 8012908 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80128ea: 683b ldr r3, [r7, #0] 80128ec: 2b00 cmp r3, #0 80128ee: d00b beq.n 8012908 { *pxHigherPriorityTaskWoken = pdTRUE; 80128f0: 683b ldr r3, [r7, #0] 80128f2: 2201 movs r2, #1 80128f4: 601a str r2, [r3, #0] 80128f6: e007 b.n 8012908 } 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 ); 80128f8: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80128fc: 3301 adds r3, #1 80128fe: b2db uxtb r3, r3 8012900: b25a sxtb r2, r3 8012902: 6b3b ldr r3, [r7, #48] @ 0x30 8012904: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 8012908: 2301 movs r3, #1 801290a: 637b str r3, [r7, #52] @ 0x34 801290c: e001 b.n 8012912 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 801290e: 2300 movs r3, #0 8012910: 637b str r3, [r7, #52] @ 0x34 8012912: 6afb ldr r3, [r7, #44] @ 0x2c 8012914: 60fb str r3, [r7, #12] __asm volatile 8012916: 68fb ldr r3, [r7, #12] 8012918: f383 8811 msr BASEPRI, r3 } 801291c: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 801291e: 6b7b ldr r3, [r7, #52] @ 0x34 } 8012920: 4618 mov r0, r3 8012922: 3738 adds r7, #56 @ 0x38 8012924: 46bd mov sp, r7 8012926: bd80 pop {r7, pc} 08012928 : /*-----------------------------------------------------------*/ BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) { 8012928: b580 push {r7, lr} 801292a: b08c sub sp, #48 @ 0x30 801292c: af00 add r7, sp, #0 801292e: 60f8 str r0, [r7, #12] 8012930: 60b9 str r1, [r7, #8] 8012932: 607a str r2, [r7, #4] BaseType_t xEntryTimeSet = pdFALSE; 8012934: 2300 movs r3, #0 8012936: 62fb str r3, [r7, #44] @ 0x2c TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8012938: 68fb ldr r3, [r7, #12] 801293a: 62bb str r3, [r7, #40] @ 0x28 /* Check the pointer is not NULL. */ configASSERT( ( pxQueue ) ); 801293c: 6abb ldr r3, [r7, #40] @ 0x28 801293e: 2b00 cmp r3, #0 8012940: d10b bne.n 801295a __asm volatile 8012942: f04f 0350 mov.w r3, #80 @ 0x50 8012946: f383 8811 msr BASEPRI, r3 801294a: f3bf 8f6f isb sy 801294e: f3bf 8f4f dsb sy 8012952: 623b str r3, [r7, #32] } 8012954: bf00 nop 8012956: bf00 nop 8012958: e7fd b.n 8012956 /* 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 ) ) ); 801295a: 68bb ldr r3, [r7, #8] 801295c: 2b00 cmp r3, #0 801295e: d103 bne.n 8012968 8012960: 6abb ldr r3, [r7, #40] @ 0x28 8012962: 6c1b ldr r3, [r3, #64] @ 0x40 8012964: 2b00 cmp r3, #0 8012966: d101 bne.n 801296c 8012968: 2301 movs r3, #1 801296a: e000 b.n 801296e 801296c: 2300 movs r3, #0 801296e: 2b00 cmp r3, #0 8012970: d10b bne.n 801298a __asm volatile 8012972: f04f 0350 mov.w r3, #80 @ 0x50 8012976: f383 8811 msr BASEPRI, r3 801297a: f3bf 8f6f isb sy 801297e: f3bf 8f4f dsb sy 8012982: 61fb str r3, [r7, #28] } 8012984: bf00 nop 8012986: bf00 nop 8012988: e7fd b.n 8012986 /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 801298a: f001 fe9b bl 80146c4 801298e: 4603 mov r3, r0 8012990: 2b00 cmp r3, #0 8012992: d102 bne.n 801299a 8012994: 687b ldr r3, [r7, #4] 8012996: 2b00 cmp r3, #0 8012998: d101 bne.n 801299e 801299a: 2301 movs r3, #1 801299c: e000 b.n 80129a0 801299e: 2300 movs r3, #0 80129a0: 2b00 cmp r3, #0 80129a2: d10b bne.n 80129bc __asm volatile 80129a4: f04f 0350 mov.w r3, #80 @ 0x50 80129a8: f383 8811 msr BASEPRI, r3 80129ac: f3bf 8f6f isb sy 80129b0: f3bf 8f4f dsb sy 80129b4: 61bb str r3, [r7, #24] } 80129b6: bf00 nop 80129b8: bf00 nop 80129ba: e7fd b.n 80129b8 /*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(); 80129bc: f003 f804 bl 80159c8 { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80129c0: 6abb ldr r3, [r7, #40] @ 0x28 80129c2: 6b9b ldr r3, [r3, #56] @ 0x38 80129c4: 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 ) 80129c6: 6a7b ldr r3, [r7, #36] @ 0x24 80129c8: 2b00 cmp r3, #0 80129ca: d01f beq.n 8012a0c { /* Data available, remove one item. */ prvCopyDataFromQueue( pxQueue, pvBuffer ); 80129cc: 68b9 ldr r1, [r7, #8] 80129ce: 6ab8 ldr r0, [r7, #40] @ 0x28 80129d0: f000 fb02 bl 8012fd8 traceQUEUE_RECEIVE( pxQueue ); pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 80129d4: 6a7b ldr r3, [r7, #36] @ 0x24 80129d6: 1e5a subs r2, r3, #1 80129d8: 6abb ldr r3, [r7, #40] @ 0x28 80129da: 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 ) 80129dc: 6abb ldr r3, [r7, #40] @ 0x28 80129de: 691b ldr r3, [r3, #16] 80129e0: 2b00 cmp r3, #0 80129e2: d00f beq.n 8012a04 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80129e4: 6abb ldr r3, [r7, #40] @ 0x28 80129e6: 3310 adds r3, #16 80129e8: 4618 mov r0, r3 80129ea: f001 fc6d bl 80142c8 80129ee: 4603 mov r3, r0 80129f0: 2b00 cmp r3, #0 80129f2: d007 beq.n 8012a04 { queueYIELD_IF_USING_PREEMPTION(); 80129f4: 4b3c ldr r3, [pc, #240] @ (8012ae8 ) 80129f6: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80129fa: 601a str r2, [r3, #0] 80129fc: f3bf 8f4f dsb sy 8012a00: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8012a04: f003 f812 bl 8015a2c return pdPASS; 8012a08: 2301 movs r3, #1 8012a0a: e069 b.n 8012ae0 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8012a0c: 687b ldr r3, [r7, #4] 8012a0e: 2b00 cmp r3, #0 8012a10: d103 bne.n 8012a1a { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8012a12: f003 f80b bl 8015a2c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012a16: 2300 movs r3, #0 8012a18: e062 b.n 8012ae0 } else if( xEntryTimeSet == pdFALSE ) 8012a1a: 6afb ldr r3, [r7, #44] @ 0x2c 8012a1c: 2b00 cmp r3, #0 8012a1e: d106 bne.n 8012a2e { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8012a20: f107 0310 add.w r3, r7, #16 8012a24: 4618 mov r0, r3 8012a26: f001 fcdb bl 80143e0 xEntryTimeSet = pdTRUE; 8012a2a: 2301 movs r3, #1 8012a2c: 62fb str r3, [r7, #44] @ 0x2c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8012a2e: f002 fffd bl 8015a2c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8012a32: f001 f9fb bl 8013e2c prvLockQueue( pxQueue ); 8012a36: f002 ffc7 bl 80159c8 8012a3a: 6abb ldr r3, [r7, #40] @ 0x28 8012a3c: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012a40: b25b sxtb r3, r3 8012a42: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012a46: d103 bne.n 8012a50 8012a48: 6abb ldr r3, [r7, #40] @ 0x28 8012a4a: 2200 movs r2, #0 8012a4c: f883 2044 strb.w r2, [r3, #68] @ 0x44 8012a50: 6abb ldr r3, [r7, #40] @ 0x28 8012a52: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012a56: b25b sxtb r3, r3 8012a58: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012a5c: d103 bne.n 8012a66 8012a5e: 6abb ldr r3, [r7, #40] @ 0x28 8012a60: 2200 movs r2, #0 8012a62: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012a66: f002 ffe1 bl 8015a2c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012a6a: 1d3a adds r2, r7, #4 8012a6c: f107 0310 add.w r3, r7, #16 8012a70: 4611 mov r1, r2 8012a72: 4618 mov r0, r3 8012a74: f001 fcca bl 801440c 8012a78: 4603 mov r3, r0 8012a7a: 2b00 cmp r3, #0 8012a7c: d123 bne.n 8012ac6 { /* 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 ) 8012a7e: 6ab8 ldr r0, [r7, #40] @ 0x28 8012a80: f000 fb22 bl 80130c8 8012a84: 4603 mov r3, r0 8012a86: 2b00 cmp r3, #0 8012a88: d017 beq.n 8012aba { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8012a8a: 6abb ldr r3, [r7, #40] @ 0x28 8012a8c: 3324 adds r3, #36 @ 0x24 8012a8e: 687a ldr r2, [r7, #4] 8012a90: 4611 mov r1, r2 8012a92: 4618 mov r0, r3 8012a94: f001 fbc6 bl 8014224 prvUnlockQueue( pxQueue ); 8012a98: 6ab8 ldr r0, [r7, #40] @ 0x28 8012a9a: f000 fac3 bl 8013024 if( xTaskResumeAll() == pdFALSE ) 8012a9e: f001 f9d3 bl 8013e48 8012aa2: 4603 mov r3, r0 8012aa4: 2b00 cmp r3, #0 8012aa6: d189 bne.n 80129bc { portYIELD_WITHIN_API(); 8012aa8: 4b0f ldr r3, [pc, #60] @ (8012ae8 ) 8012aaa: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012aae: 601a str r2, [r3, #0] 8012ab0: f3bf 8f4f dsb sy 8012ab4: f3bf 8f6f isb sy 8012ab8: e780 b.n 80129bc } else { /* The queue contains data again. Loop back to try and read the data. */ prvUnlockQueue( pxQueue ); 8012aba: 6ab8 ldr r0, [r7, #40] @ 0x28 8012abc: f000 fab2 bl 8013024 ( void ) xTaskResumeAll(); 8012ac0: f001 f9c2 bl 8013e48 8012ac4: e77a b.n 80129bc } else { /* Timed out. If there is no data in the queue exit, otherwise loop back and attempt to read the data. */ prvUnlockQueue( pxQueue ); 8012ac6: 6ab8 ldr r0, [r7, #40] @ 0x28 8012ac8: f000 faac bl 8013024 ( void ) xTaskResumeAll(); 8012acc: f001 f9bc bl 8013e48 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 8012ad0: 6ab8 ldr r0, [r7, #40] @ 0x28 8012ad2: f000 faf9 bl 80130c8 8012ad6: 4603 mov r3, r0 8012ad8: 2b00 cmp r3, #0 8012ada: f43f af6f beq.w 80129bc { traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012ade: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8012ae0: 4618 mov r0, r3 8012ae2: 3730 adds r7, #48 @ 0x30 8012ae4: 46bd mov sp, r7 8012ae6: bd80 pop {r7, pc} 8012ae8: e000ed04 .word 0xe000ed04 08012aec : /*-----------------------------------------------------------*/ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 8012aec: b580 push {r7, lr} 8012aee: b08e sub sp, #56 @ 0x38 8012af0: af00 add r7, sp, #0 8012af2: 6078 str r0, [r7, #4] 8012af4: 6039 str r1, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE; 8012af6: 2300 movs r3, #0 8012af8: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8012afa: 687b ldr r3, [r7, #4] 8012afc: 62fb str r3, [r7, #44] @ 0x2c #if( configUSE_MUTEXES == 1 ) BaseType_t xInheritanceOccurred = pdFALSE; 8012afe: 2300 movs r3, #0 8012b00: 633b str r3, [r7, #48] @ 0x30 #endif /* Check the queue pointer is not NULL. */ configASSERT( ( pxQueue ) ); 8012b02: 6afb ldr r3, [r7, #44] @ 0x2c 8012b04: 2b00 cmp r3, #0 8012b06: d10b bne.n 8012b20 __asm volatile 8012b08: f04f 0350 mov.w r3, #80 @ 0x50 8012b0c: f383 8811 msr BASEPRI, r3 8012b10: f3bf 8f6f isb sy 8012b14: f3bf 8f4f dsb sy 8012b18: 623b str r3, [r7, #32] } 8012b1a: bf00 nop 8012b1c: bf00 nop 8012b1e: e7fd b.n 8012b1c /* Check this really is a semaphore, in which case the item size will be 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8012b20: 6afb ldr r3, [r7, #44] @ 0x2c 8012b22: 6c1b ldr r3, [r3, #64] @ 0x40 8012b24: 2b00 cmp r3, #0 8012b26: d00b beq.n 8012b40 __asm volatile 8012b28: f04f 0350 mov.w r3, #80 @ 0x50 8012b2c: f383 8811 msr BASEPRI, r3 8012b30: f3bf 8f6f isb sy 8012b34: f3bf 8f4f dsb sy 8012b38: 61fb str r3, [r7, #28] } 8012b3a: bf00 nop 8012b3c: bf00 nop 8012b3e: e7fd b.n 8012b3c /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8012b40: f001 fdc0 bl 80146c4 8012b44: 4603 mov r3, r0 8012b46: 2b00 cmp r3, #0 8012b48: d102 bne.n 8012b50 8012b4a: 683b ldr r3, [r7, #0] 8012b4c: 2b00 cmp r3, #0 8012b4e: d101 bne.n 8012b54 8012b50: 2301 movs r3, #1 8012b52: e000 b.n 8012b56 8012b54: 2300 movs r3, #0 8012b56: 2b00 cmp r3, #0 8012b58: d10b bne.n 8012b72 __asm volatile 8012b5a: f04f 0350 mov.w r3, #80 @ 0x50 8012b5e: f383 8811 msr BASEPRI, r3 8012b62: f3bf 8f6f isb sy 8012b66: f3bf 8f4f dsb sy 8012b6a: 61bb str r3, [r7, #24] } 8012b6c: bf00 nop 8012b6e: bf00 nop 8012b70: e7fd b.n 8012b6e /*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(); 8012b72: f002 ff29 bl 80159c8 { /* 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; 8012b76: 6afb ldr r3, [r7, #44] @ 0x2c 8012b78: 6b9b ldr r3, [r3, #56] @ 0x38 8012b7a: 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 ) 8012b7c: 6abb ldr r3, [r7, #40] @ 0x28 8012b7e: 2b00 cmp r3, #0 8012b80: d024 beq.n 8012bcc { 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; 8012b82: 6abb ldr r3, [r7, #40] @ 0x28 8012b84: 1e5a subs r2, r3, #1 8012b86: 6afb ldr r3, [r7, #44] @ 0x2c 8012b88: 639a str r2, [r3, #56] @ 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012b8a: 6afb ldr r3, [r7, #44] @ 0x2c 8012b8c: 681b ldr r3, [r3, #0] 8012b8e: 2b00 cmp r3, #0 8012b90: d104 bne.n 8012b9c { /* Record the information required to implement priority inheritance should it become necessary. */ pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount(); 8012b92: f001 ff11 bl 80149b8 8012b96: 4602 mov r2, r0 8012b98: 6afb ldr r3, [r7, #44] @ 0x2c 8012b9a: 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 ) 8012b9c: 6afb ldr r3, [r7, #44] @ 0x2c 8012b9e: 691b ldr r3, [r3, #16] 8012ba0: 2b00 cmp r3, #0 8012ba2: d00f beq.n 8012bc4 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8012ba4: 6afb ldr r3, [r7, #44] @ 0x2c 8012ba6: 3310 adds r3, #16 8012ba8: 4618 mov r0, r3 8012baa: f001 fb8d bl 80142c8 8012bae: 4603 mov r3, r0 8012bb0: 2b00 cmp r3, #0 8012bb2: d007 beq.n 8012bc4 { queueYIELD_IF_USING_PREEMPTION(); 8012bb4: 4b54 ldr r3, [pc, #336] @ (8012d08 ) 8012bb6: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012bba: 601a str r2, [r3, #0] 8012bbc: f3bf 8f4f dsb sy 8012bc0: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8012bc4: f002 ff32 bl 8015a2c return pdPASS; 8012bc8: 2301 movs r3, #1 8012bca: e098 b.n 8012cfe } else { if( xTicksToWait == ( TickType_t ) 0 ) 8012bcc: 683b ldr r3, [r7, #0] 8012bce: 2b00 cmp r3, #0 8012bd0: d112 bne.n 8012bf8 /* 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 ); 8012bd2: 6b3b ldr r3, [r7, #48] @ 0x30 8012bd4: 2b00 cmp r3, #0 8012bd6: d00b beq.n 8012bf0 __asm volatile 8012bd8: f04f 0350 mov.w r3, #80 @ 0x50 8012bdc: f383 8811 msr BASEPRI, r3 8012be0: f3bf 8f6f isb sy 8012be4: f3bf 8f4f dsb sy 8012be8: 617b str r3, [r7, #20] } 8012bea: bf00 nop 8012bec: bf00 nop 8012bee: e7fd b.n 8012bec } #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(); 8012bf0: f002 ff1c bl 8015a2c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012bf4: 2300 movs r3, #0 8012bf6: e082 b.n 8012cfe } else if( xEntryTimeSet == pdFALSE ) 8012bf8: 6b7b ldr r3, [r7, #52] @ 0x34 8012bfa: 2b00 cmp r3, #0 8012bfc: d106 bne.n 8012c0c { /* The semaphore count was 0 and a block time was specified so configure the timeout structure ready to block. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8012bfe: f107 030c add.w r3, r7, #12 8012c02: 4618 mov r0, r3 8012c04: f001 fbec bl 80143e0 xEntryTimeSet = pdTRUE; 8012c08: 2301 movs r3, #1 8012c0a: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8012c0c: f002 ff0e bl 8015a2c /* Interrupts and other tasks can give to and take from the semaphore now the critical section has been exited. */ vTaskSuspendAll(); 8012c10: f001 f90c bl 8013e2c prvLockQueue( pxQueue ); 8012c14: f002 fed8 bl 80159c8 8012c18: 6afb ldr r3, [r7, #44] @ 0x2c 8012c1a: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012c1e: b25b sxtb r3, r3 8012c20: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012c24: d103 bne.n 8012c2e 8012c26: 6afb ldr r3, [r7, #44] @ 0x2c 8012c28: 2200 movs r2, #0 8012c2a: f883 2044 strb.w r2, [r3, #68] @ 0x44 8012c2e: 6afb ldr r3, [r7, #44] @ 0x2c 8012c30: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012c34: b25b sxtb r3, r3 8012c36: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012c3a: d103 bne.n 8012c44 8012c3c: 6afb ldr r3, [r7, #44] @ 0x2c 8012c3e: 2200 movs r2, #0 8012c40: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012c44: f002 fef2 bl 8015a2c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012c48: 463a mov r2, r7 8012c4a: f107 030c add.w r3, r7, #12 8012c4e: 4611 mov r1, r2 8012c50: 4618 mov r0, r3 8012c52: f001 fbdb bl 801440c 8012c56: 4603 mov r3, r0 8012c58: 2b00 cmp r3, #0 8012c5a: d132 bne.n 8012cc2 { /* 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 ) 8012c5c: 6af8 ldr r0, [r7, #44] @ 0x2c 8012c5e: f000 fa33 bl 80130c8 8012c62: 4603 mov r3, r0 8012c64: 2b00 cmp r3, #0 8012c66: d026 beq.n 8012cb6 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012c68: 6afb ldr r3, [r7, #44] @ 0x2c 8012c6a: 681b ldr r3, [r3, #0] 8012c6c: 2b00 cmp r3, #0 8012c6e: d109 bne.n 8012c84 { taskENTER_CRITICAL(); 8012c70: f002 feaa bl 80159c8 { xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder ); 8012c74: 6afb ldr r3, [r7, #44] @ 0x2c 8012c76: 689b ldr r3, [r3, #8] 8012c78: 4618 mov r0, r3 8012c7a: f001 fd41 bl 8014700 8012c7e: 6338 str r0, [r7, #48] @ 0x30 } taskEXIT_CRITICAL(); 8012c80: f002 fed4 bl 8015a2c mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8012c84: 6afb ldr r3, [r7, #44] @ 0x2c 8012c86: 3324 adds r3, #36 @ 0x24 8012c88: 683a ldr r2, [r7, #0] 8012c8a: 4611 mov r1, r2 8012c8c: 4618 mov r0, r3 8012c8e: f001 fac9 bl 8014224 prvUnlockQueue( pxQueue ); 8012c92: 6af8 ldr r0, [r7, #44] @ 0x2c 8012c94: f000 f9c6 bl 8013024 if( xTaskResumeAll() == pdFALSE ) 8012c98: f001 f8d6 bl 8013e48 8012c9c: 4603 mov r3, r0 8012c9e: 2b00 cmp r3, #0 8012ca0: f47f af67 bne.w 8012b72 { portYIELD_WITHIN_API(); 8012ca4: 4b18 ldr r3, [pc, #96] @ (8012d08 ) 8012ca6: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012caa: 601a str r2, [r3, #0] 8012cac: f3bf 8f4f dsb sy 8012cb0: f3bf 8f6f isb sy 8012cb4: e75d b.n 8012b72 } else { /* There was no timeout and the semaphore count was not 0, so attempt to take the semaphore again. */ prvUnlockQueue( pxQueue ); 8012cb6: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cb8: f000 f9b4 bl 8013024 ( void ) xTaskResumeAll(); 8012cbc: f001 f8c4 bl 8013e48 8012cc0: e757 b.n 8012b72 } } else { /* Timed out. */ prvUnlockQueue( pxQueue ); 8012cc2: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cc4: f000 f9ae bl 8013024 ( void ) xTaskResumeAll(); 8012cc8: f001 f8be bl 8013e48 /* 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 ) 8012ccc: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cce: f000 f9fb bl 80130c8 8012cd2: 4603 mov r3, r0 8012cd4: 2b00 cmp r3, #0 8012cd6: f43f af4c beq.w 8012b72 #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 ) 8012cda: 6b3b ldr r3, [r7, #48] @ 0x30 8012cdc: 2b00 cmp r3, #0 8012cde: d00d beq.n 8012cfc { taskENTER_CRITICAL(); 8012ce0: f002 fe72 bl 80159c8 /* 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 ); 8012ce4: 6af8 ldr r0, [r7, #44] @ 0x2c 8012ce6: f000 f8f5 bl 8012ed4 8012cea: 6278 str r0, [r7, #36] @ 0x24 vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority ); 8012cec: 6afb ldr r3, [r7, #44] @ 0x2c 8012cee: 689b ldr r3, [r3, #8] 8012cf0: 6a79 ldr r1, [r7, #36] @ 0x24 8012cf2: 4618 mov r0, r3 8012cf4: f001 fddc bl 80148b0 } taskEXIT_CRITICAL(); 8012cf8: f002 fe98 bl 8015a2c } } #endif /* configUSE_MUTEXES */ traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012cfc: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8012cfe: 4618 mov r0, r3 8012d00: 3738 adds r7, #56 @ 0x38 8012d02: 46bd mov sp, r7 8012d04: bd80 pop {r7, pc} 8012d06: bf00 nop 8012d08: e000ed04 .word 0xe000ed04 08012d0c : } /*lint -restore */ } /*-----------------------------------------------------------*/ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) { 8012d0c: b580 push {r7, lr} 8012d0e: b08e sub sp, #56 @ 0x38 8012d10: af00 add r7, sp, #0 8012d12: 60f8 str r0, [r7, #12] 8012d14: 60b9 str r1, [r7, #8] 8012d16: 607a str r2, [r7, #4] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8012d18: 68fb ldr r3, [r7, #12] 8012d1a: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 8012d1c: 6b3b ldr r3, [r7, #48] @ 0x30 8012d1e: 2b00 cmp r3, #0 8012d20: d10b bne.n 8012d3a __asm volatile 8012d22: f04f 0350 mov.w r3, #80 @ 0x50 8012d26: f383 8811 msr BASEPRI, r3 8012d2a: f3bf 8f6f isb sy 8012d2e: f3bf 8f4f dsb sy 8012d32: 623b str r3, [r7, #32] } 8012d34: bf00 nop 8012d36: bf00 nop 8012d38: e7fd b.n 8012d36 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8012d3a: 68bb ldr r3, [r7, #8] 8012d3c: 2b00 cmp r3, #0 8012d3e: d103 bne.n 8012d48 8012d40: 6b3b ldr r3, [r7, #48] @ 0x30 8012d42: 6c1b ldr r3, [r3, #64] @ 0x40 8012d44: 2b00 cmp r3, #0 8012d46: d101 bne.n 8012d4c 8012d48: 2301 movs r3, #1 8012d4a: e000 b.n 8012d4e 8012d4c: 2300 movs r3, #0 8012d4e: 2b00 cmp r3, #0 8012d50: d10b bne.n 8012d6a __asm volatile 8012d52: f04f 0350 mov.w r3, #80 @ 0x50 8012d56: f383 8811 msr BASEPRI, r3 8012d5a: f3bf 8f6f isb sy 8012d5e: f3bf 8f4f dsb sy 8012d62: 61fb str r3, [r7, #28] } 8012d64: bf00 nop 8012d66: bf00 nop 8012d68: e7fd b.n 8012d66 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(); 8012d6a: f002 ff0d bl 8015b88 __asm volatile 8012d6e: f3ef 8211 mrs r2, BASEPRI 8012d72: f04f 0350 mov.w r3, #80 @ 0x50 8012d76: f383 8811 msr BASEPRI, r3 8012d7a: f3bf 8f6f isb sy 8012d7e: f3bf 8f4f dsb sy 8012d82: 61ba str r2, [r7, #24] 8012d84: 617b str r3, [r7, #20] return ulOriginalBASEPRI; 8012d86: 69bb ldr r3, [r7, #24] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8012d88: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8012d8a: 6b3b ldr r3, [r7, #48] @ 0x30 8012d8c: 6b9b ldr r3, [r3, #56] @ 0x38 8012d8e: 62bb str r3, [r7, #40] @ 0x28 /* Cannot block in an ISR, so check there is data available. */ if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8012d90: 6abb ldr r3, [r7, #40] @ 0x28 8012d92: 2b00 cmp r3, #0 8012d94: d02f beq.n 8012df6 { const int8_t cRxLock = pxQueue->cRxLock; 8012d96: 6b3b ldr r3, [r7, #48] @ 0x30 8012d98: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012d9c: f887 3027 strb.w r3, [r7, #39] @ 0x27 traceQUEUE_RECEIVE_FROM_ISR( pxQueue ); prvCopyDataFromQueue( pxQueue, pvBuffer ); 8012da0: 68b9 ldr r1, [r7, #8] 8012da2: 6b38 ldr r0, [r7, #48] @ 0x30 8012da4: f000 f918 bl 8012fd8 pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 8012da8: 6abb ldr r3, [r7, #40] @ 0x28 8012daa: 1e5a subs r2, r3, #1 8012dac: 6b3b ldr r3, [r7, #48] @ 0x30 8012dae: 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 ) 8012db0: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8012db4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012db8: d112 bne.n 8012de0 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8012dba: 6b3b ldr r3, [r7, #48] @ 0x30 8012dbc: 691b ldr r3, [r3, #16] 8012dbe: 2b00 cmp r3, #0 8012dc0: d016 beq.n 8012df0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8012dc2: 6b3b ldr r3, [r7, #48] @ 0x30 8012dc4: 3310 adds r3, #16 8012dc6: 4618 mov r0, r3 8012dc8: f001 fa7e bl 80142c8 8012dcc: 4603 mov r3, r0 8012dce: 2b00 cmp r3, #0 8012dd0: d00e beq.n 8012df0 { /* The task waiting has a higher priority than us so force a context switch. */ if( pxHigherPriorityTaskWoken != NULL ) 8012dd2: 687b ldr r3, [r7, #4] 8012dd4: 2b00 cmp r3, #0 8012dd6: d00b beq.n 8012df0 { *pxHigherPriorityTaskWoken = pdTRUE; 8012dd8: 687b ldr r3, [r7, #4] 8012dda: 2201 movs r2, #1 8012ddc: 601a str r2, [r3, #0] 8012dde: e007 b.n 8012df0 } 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 ); 8012de0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8012de4: 3301 adds r3, #1 8012de6: b2db uxtb r3, r3 8012de8: b25a sxtb r2, r3 8012dea: 6b3b ldr r3, [r7, #48] @ 0x30 8012dec: f883 2044 strb.w r2, [r3, #68] @ 0x44 } xReturn = pdPASS; 8012df0: 2301 movs r3, #1 8012df2: 637b str r3, [r7, #52] @ 0x34 8012df4: e001 b.n 8012dfa } else { xReturn = pdFAIL; 8012df6: 2300 movs r3, #0 8012df8: 637b str r3, [r7, #52] @ 0x34 8012dfa: 6afb ldr r3, [r7, #44] @ 0x2c 8012dfc: 613b str r3, [r7, #16] __asm volatile 8012dfe: 693b ldr r3, [r7, #16] 8012e00: f383 8811 msr BASEPRI, r3 } 8012e04: bf00 nop traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8012e06: 6b7b ldr r3, [r7, #52] @ 0x34 } 8012e08: 4618 mov r0, r3 8012e0a: 3738 adds r7, #56 @ 0x38 8012e0c: 46bd mov sp, r7 8012e0e: bd80 pop {r7, pc} 08012e10 : return xReturn; } /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) { 8012e10: b580 push {r7, lr} 8012e12: b084 sub sp, #16 8012e14: af00 add r7, sp, #0 8012e16: 6078 str r0, [r7, #4] UBaseType_t uxReturn; configASSERT( xQueue ); 8012e18: 687b ldr r3, [r7, #4] 8012e1a: 2b00 cmp r3, #0 8012e1c: d10b bne.n 8012e36 __asm volatile 8012e1e: f04f 0350 mov.w r3, #80 @ 0x50 8012e22: f383 8811 msr BASEPRI, r3 8012e26: f3bf 8f6f isb sy 8012e2a: f3bf 8f4f dsb sy 8012e2e: 60bb str r3, [r7, #8] } 8012e30: bf00 nop 8012e32: bf00 nop 8012e34: e7fd b.n 8012e32 taskENTER_CRITICAL(); 8012e36: f002 fdc7 bl 80159c8 { uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 8012e3a: 687b ldr r3, [r7, #4] 8012e3c: 6b9b ldr r3, [r3, #56] @ 0x38 8012e3e: 60fb str r3, [r7, #12] } taskEXIT_CRITICAL(); 8012e40: f002 fdf4 bl 8015a2c return uxReturn; 8012e44: 68fb ldr r3, [r7, #12] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8012e46: 4618 mov r0, r3 8012e48: 3710 adds r7, #16 8012e4a: 46bd mov sp, r7 8012e4c: bd80 pop {r7, pc} 08012e4e : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) { 8012e4e: b480 push {r7} 8012e50: b087 sub sp, #28 8012e52: af00 add r7, sp, #0 8012e54: 6078 str r0, [r7, #4] UBaseType_t uxReturn; Queue_t * const pxQueue = xQueue; 8012e56: 687b ldr r3, [r7, #4] 8012e58: 617b str r3, [r7, #20] configASSERT( pxQueue ); 8012e5a: 697b ldr r3, [r7, #20] 8012e5c: 2b00 cmp r3, #0 8012e5e: d10b bne.n 8012e78 __asm volatile 8012e60: f04f 0350 mov.w r3, #80 @ 0x50 8012e64: f383 8811 msr BASEPRI, r3 8012e68: f3bf 8f6f isb sy 8012e6c: f3bf 8f4f dsb sy 8012e70: 60fb str r3, [r7, #12] } 8012e72: bf00 nop 8012e74: bf00 nop 8012e76: e7fd b.n 8012e74 uxReturn = pxQueue->uxMessagesWaiting; 8012e78: 697b ldr r3, [r7, #20] 8012e7a: 6b9b ldr r3, [r3, #56] @ 0x38 8012e7c: 613b str r3, [r7, #16] return uxReturn; 8012e7e: 693b ldr r3, [r7, #16] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8012e80: 4618 mov r0, r3 8012e82: 371c adds r7, #28 8012e84: 46bd mov sp, r7 8012e86: f85d 7b04 ldr.w r7, [sp], #4 8012e8a: 4770 bx lr 08012e8c : /*-----------------------------------------------------------*/ void vQueueDelete( QueueHandle_t xQueue ) { 8012e8c: b580 push {r7, lr} 8012e8e: b084 sub sp, #16 8012e90: af00 add r7, sp, #0 8012e92: 6078 str r0, [r7, #4] Queue_t * const pxQueue = xQueue; 8012e94: 687b ldr r3, [r7, #4] 8012e96: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 8012e98: 68fb ldr r3, [r7, #12] 8012e9a: 2b00 cmp r3, #0 8012e9c: d10b bne.n 8012eb6 __asm volatile 8012e9e: f04f 0350 mov.w r3, #80 @ 0x50 8012ea2: f383 8811 msr BASEPRI, r3 8012ea6: f3bf 8f6f isb sy 8012eaa: f3bf 8f4f dsb sy 8012eae: 60bb str r3, [r7, #8] } 8012eb0: bf00 nop 8012eb2: bf00 nop 8012eb4: e7fd b.n 8012eb2 traceQUEUE_DELETE( pxQueue ); #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); 8012eb6: 68f8 ldr r0, [r7, #12] 8012eb8: f000 f95e bl 8013178 } #elif( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) { /* The queue could have been allocated statically or dynamically, so check before attempting to free the memory. */ if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE ) 8012ebc: 68fb ldr r3, [r7, #12] 8012ebe: f893 3046 ldrb.w r3, [r3, #70] @ 0x46 8012ec2: 2b00 cmp r3, #0 8012ec4: d102 bne.n 8012ecc { vPortFree( pxQueue ); 8012ec6: 68f8 ldr r0, [r7, #12] 8012ec8: f002 ff6e bl 8015da8 /* The queue must have been statically allocated, so is not going to be deleted. Avoid compiler warnings about the unused parameter. */ ( void ) pxQueue; } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ } 8012ecc: bf00 nop 8012ece: 3710 adds r7, #16 8012ed0: 46bd mov sp, r7 8012ed2: bd80 pop {r7, pc} 08012ed4 : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) { 8012ed4: b480 push {r7} 8012ed6: b085 sub sp, #20 8012ed8: af00 add r7, sp, #0 8012eda: 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 ) 8012edc: 687b ldr r3, [r7, #4] 8012ede: 6a5b ldr r3, [r3, #36] @ 0x24 8012ee0: 2b00 cmp r3, #0 8012ee2: d006 beq.n 8012ef2 { uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) ); 8012ee4: 687b ldr r3, [r7, #4] 8012ee6: 6b1b ldr r3, [r3, #48] @ 0x30 8012ee8: 681b ldr r3, [r3, #0] 8012eea: f1c3 0338 rsb r3, r3, #56 @ 0x38 8012eee: 60fb str r3, [r7, #12] 8012ef0: e001 b.n 8012ef6 } else { uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY; 8012ef2: 2300 movs r3, #0 8012ef4: 60fb str r3, [r7, #12] } return uxHighestPriorityOfWaitingTasks; 8012ef6: 68fb ldr r3, [r7, #12] } 8012ef8: 4618 mov r0, r3 8012efa: 3714 adds r7, #20 8012efc: 46bd mov sp, r7 8012efe: f85d 7b04 ldr.w r7, [sp], #4 8012f02: 4770 bx lr 08012f04 : #endif /* configUSE_MUTEXES */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 8012f04: b580 push {r7, lr} 8012f06: b086 sub sp, #24 8012f08: af00 add r7, sp, #0 8012f0a: 60f8 str r0, [r7, #12] 8012f0c: 60b9 str r1, [r7, #8] 8012f0e: 607a str r2, [r7, #4] BaseType_t xReturn = pdFALSE; 8012f10: 2300 movs r3, #0 8012f12: 617b str r3, [r7, #20] UBaseType_t uxMessagesWaiting; /* This function is called from a critical section. */ uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8012f14: 68fb ldr r3, [r7, #12] 8012f16: 6b9b ldr r3, [r3, #56] @ 0x38 8012f18: 613b str r3, [r7, #16] if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8012f1a: 68fb ldr r3, [r7, #12] 8012f1c: 6c1b ldr r3, [r3, #64] @ 0x40 8012f1e: 2b00 cmp r3, #0 8012f20: d10d bne.n 8012f3e { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012f22: 68fb ldr r3, [r7, #12] 8012f24: 681b ldr r3, [r3, #0] 8012f26: 2b00 cmp r3, #0 8012f28: d14d bne.n 8012fc6 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); 8012f2a: 68fb ldr r3, [r7, #12] 8012f2c: 689b ldr r3, [r3, #8] 8012f2e: 4618 mov r0, r3 8012f30: f001 fc4e bl 80147d0 8012f34: 6178 str r0, [r7, #20] pxQueue->u.xSemaphore.xMutexHolder = NULL; 8012f36: 68fb ldr r3, [r7, #12] 8012f38: 2200 movs r2, #0 8012f3a: 609a str r2, [r3, #8] 8012f3c: e043 b.n 8012fc6 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 8012f3e: 687b ldr r3, [r7, #4] 8012f40: 2b00 cmp r3, #0 8012f42: d119 bne.n 8012f78 { ( 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. */ 8012f44: 68fb ldr r3, [r7, #12] 8012f46: 6858 ldr r0, [r3, #4] 8012f48: 68fb ldr r3, [r7, #12] 8012f4a: 6c1b ldr r3, [r3, #64] @ 0x40 8012f4c: 461a mov r2, r3 8012f4e: 68b9 ldr r1, [r7, #8] 8012f50: f017 ff15 bl 802ad7e 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. */ 8012f54: 68fb ldr r3, [r7, #12] 8012f56: 685a ldr r2, [r3, #4] 8012f58: 68fb ldr r3, [r7, #12] 8012f5a: 6c1b ldr r3, [r3, #64] @ 0x40 8012f5c: 441a add r2, r3 8012f5e: 68fb ldr r3, [r7, #12] 8012f60: 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. */ 8012f62: 68fb ldr r3, [r7, #12] 8012f64: 685a ldr r2, [r3, #4] 8012f66: 68fb ldr r3, [r7, #12] 8012f68: 689b ldr r3, [r3, #8] 8012f6a: 429a cmp r2, r3 8012f6c: d32b bcc.n 8012fc6 { pxQueue->pcWriteTo = pxQueue->pcHead; 8012f6e: 68fb ldr r3, [r7, #12] 8012f70: 681a ldr r2, [r3, #0] 8012f72: 68fb ldr r3, [r7, #12] 8012f74: 605a str r2, [r3, #4] 8012f76: e026 b.n 8012fc6 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. */ 8012f78: 68fb ldr r3, [r7, #12] 8012f7a: 68d8 ldr r0, [r3, #12] 8012f7c: 68fb ldr r3, [r7, #12] 8012f7e: 6c1b ldr r3, [r3, #64] @ 0x40 8012f80: 461a mov r2, r3 8012f82: 68b9 ldr r1, [r7, #8] 8012f84: f017 fefb bl 802ad7e pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; 8012f88: 68fb ldr r3, [r7, #12] 8012f8a: 68da ldr r2, [r3, #12] 8012f8c: 68fb ldr r3, [r7, #12] 8012f8e: 6c1b ldr r3, [r3, #64] @ 0x40 8012f90: 425b negs r3, r3 8012f92: 441a add r2, r3 8012f94: 68fb ldr r3, [r7, #12] 8012f96: 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. */ 8012f98: 68fb ldr r3, [r7, #12] 8012f9a: 68da ldr r2, [r3, #12] 8012f9c: 68fb ldr r3, [r7, #12] 8012f9e: 681b ldr r3, [r3, #0] 8012fa0: 429a cmp r2, r3 8012fa2: d207 bcs.n 8012fb4 { pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); 8012fa4: 68fb ldr r3, [r7, #12] 8012fa6: 689a ldr r2, [r3, #8] 8012fa8: 68fb ldr r3, [r7, #12] 8012faa: 6c1b ldr r3, [r3, #64] @ 0x40 8012fac: 425b negs r3, r3 8012fae: 441a add r2, r3 8012fb0: 68fb ldr r3, [r7, #12] 8012fb2: 60da str r2, [r3, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 8012fb4: 687b ldr r3, [r7, #4] 8012fb6: 2b02 cmp r3, #2 8012fb8: d105 bne.n 8012fc6 { if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8012fba: 693b ldr r3, [r7, #16] 8012fbc: 2b00 cmp r3, #0 8012fbe: d002 beq.n 8012fc6 { /* 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; 8012fc0: 693b ldr r3, [r7, #16] 8012fc2: 3b01 subs r3, #1 8012fc4: 613b str r3, [r7, #16] { mtCOVERAGE_TEST_MARKER(); } } pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; 8012fc6: 693b ldr r3, [r7, #16] 8012fc8: 1c5a adds r2, r3, #1 8012fca: 68fb ldr r3, [r7, #12] 8012fcc: 639a str r2, [r3, #56] @ 0x38 return xReturn; 8012fce: 697b ldr r3, [r7, #20] } 8012fd0: 4618 mov r0, r3 8012fd2: 3718 adds r7, #24 8012fd4: 46bd mov sp, r7 8012fd6: bd80 pop {r7, pc} 08012fd8 : /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 8012fd8: b580 push {r7, lr} 8012fda: b082 sub sp, #8 8012fdc: af00 add r7, sp, #0 8012fde: 6078 str r0, [r7, #4] 8012fe0: 6039 str r1, [r7, #0] if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 8012fe2: 687b ldr r3, [r7, #4] 8012fe4: 6c1b ldr r3, [r3, #64] @ 0x40 8012fe6: 2b00 cmp r3, #0 8012fe8: d018 beq.n 801301c { 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. */ 8012fea: 687b ldr r3, [r7, #4] 8012fec: 68da ldr r2, [r3, #12] 8012fee: 687b ldr r3, [r7, #4] 8012ff0: 6c1b ldr r3, [r3, #64] @ 0x40 8012ff2: 441a add r2, r3 8012ff4: 687b ldr r3, [r7, #4] 8012ff6: 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. */ 8012ff8: 687b ldr r3, [r7, #4] 8012ffa: 68da ldr r2, [r3, #12] 8012ffc: 687b ldr r3, [r7, #4] 8012ffe: 689b ldr r3, [r3, #8] 8013000: 429a cmp r2, r3 8013002: d303 bcc.n 801300c { pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; 8013004: 687b ldr r3, [r7, #4] 8013006: 681a ldr r2, [r3, #0] 8013008: 687b ldr r3, [r7, #4] 801300a: 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. */ 801300c: 687b ldr r3, [r7, #4] 801300e: 68d9 ldr r1, [r3, #12] 8013010: 687b ldr r3, [r7, #4] 8013012: 6c1b ldr r3, [r3, #64] @ 0x40 8013014: 461a mov r2, r3 8013016: 6838 ldr r0, [r7, #0] 8013018: f017 feb1 bl 802ad7e } } 801301c: bf00 nop 801301e: 3708 adds r7, #8 8013020: 46bd mov sp, r7 8013022: bd80 pop {r7, pc} 08013024 : /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 8013024: b580 push {r7, lr} 8013026: b084 sub sp, #16 8013028: af00 add r7, sp, #0 801302a: 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(); 801302c: f002 fccc bl 80159c8 { int8_t cTxLock = pxQueue->cTxLock; 8013030: 687b ldr r3, [r7, #4] 8013032: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8013036: 73fb strb r3, [r7, #15] /* See if data was added to the queue while it was locked. */ while( cTxLock > queueLOCKED_UNMODIFIED ) 8013038: e011 b.n 801305e } #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 ) 801303a: 687b ldr r3, [r7, #4] 801303c: 6a5b ldr r3, [r3, #36] @ 0x24 801303e: 2b00 cmp r3, #0 8013040: d012 beq.n 8013068 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8013042: 687b ldr r3, [r7, #4] 8013044: 3324 adds r3, #36 @ 0x24 8013046: 4618 mov r0, r3 8013048: f001 f93e bl 80142c8 801304c: 4603 mov r3, r0 801304e: 2b00 cmp r3, #0 8013050: d001 beq.n 8013056 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 8013052: f001 fa3f bl 80144d4 break; } } #endif /* configUSE_QUEUE_SETS */ --cTxLock; 8013056: 7bfb ldrb r3, [r7, #15] 8013058: 3b01 subs r3, #1 801305a: b2db uxtb r3, r3 801305c: 73fb strb r3, [r7, #15] while( cTxLock > queueLOCKED_UNMODIFIED ) 801305e: f997 300f ldrsb.w r3, [r7, #15] 8013062: 2b00 cmp r3, #0 8013064: dce9 bgt.n 801303a 8013066: e000 b.n 801306a break; 8013068: bf00 nop } pxQueue->cTxLock = queueUNLOCKED; 801306a: 687b ldr r3, [r7, #4] 801306c: 22ff movs r2, #255 @ 0xff 801306e: f883 2045 strb.w r2, [r3, #69] @ 0x45 } taskEXIT_CRITICAL(); 8013072: f002 fcdb bl 8015a2c /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 8013076: f002 fca7 bl 80159c8 { int8_t cRxLock = pxQueue->cRxLock; 801307a: 687b ldr r3, [r7, #4] 801307c: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8013080: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 8013082: e011 b.n 80130a8 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8013084: 687b ldr r3, [r7, #4] 8013086: 691b ldr r3, [r3, #16] 8013088: 2b00 cmp r3, #0 801308a: d012 beq.n 80130b2 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 801308c: 687b ldr r3, [r7, #4] 801308e: 3310 adds r3, #16 8013090: 4618 mov r0, r3 8013092: f001 f919 bl 80142c8 8013096: 4603 mov r3, r0 8013098: 2b00 cmp r3, #0 801309a: d001 beq.n 80130a0 { vTaskMissedYield(); 801309c: f001 fa1a bl 80144d4 else { mtCOVERAGE_TEST_MARKER(); } --cRxLock; 80130a0: 7bbb ldrb r3, [r7, #14] 80130a2: 3b01 subs r3, #1 80130a4: b2db uxtb r3, r3 80130a6: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 80130a8: f997 300e ldrsb.w r3, [r7, #14] 80130ac: 2b00 cmp r3, #0 80130ae: dce9 bgt.n 8013084 80130b0: e000 b.n 80130b4 } else { break; 80130b2: bf00 nop } } pxQueue->cRxLock = queueUNLOCKED; 80130b4: 687b ldr r3, [r7, #4] 80130b6: 22ff movs r2, #255 @ 0xff 80130b8: f883 2044 strb.w r2, [r3, #68] @ 0x44 } taskEXIT_CRITICAL(); 80130bc: f002 fcb6 bl 8015a2c } 80130c0: bf00 nop 80130c2: 3710 adds r7, #16 80130c4: 46bd mov sp, r7 80130c6: bd80 pop {r7, pc} 080130c8 : /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { 80130c8: b580 push {r7, lr} 80130ca: b084 sub sp, #16 80130cc: af00 add r7, sp, #0 80130ce: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); 80130d0: f002 fc7a bl 80159c8 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 80130d4: 687b ldr r3, [r7, #4] 80130d6: 6b9b ldr r3, [r3, #56] @ 0x38 80130d8: 2b00 cmp r3, #0 80130da: d102 bne.n 80130e2 { xReturn = pdTRUE; 80130dc: 2301 movs r3, #1 80130de: 60fb str r3, [r7, #12] 80130e0: e001 b.n 80130e6 } else { xReturn = pdFALSE; 80130e2: 2300 movs r3, #0 80130e4: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 80130e6: f002 fca1 bl 8015a2c return xReturn; 80130ea: 68fb ldr r3, [r7, #12] } 80130ec: 4618 mov r0, r3 80130ee: 3710 adds r7, #16 80130f0: 46bd mov sp, r7 80130f2: bd80 pop {r7, pc} 080130f4 : return xReturn; } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { 80130f4: b580 push {r7, lr} 80130f6: b084 sub sp, #16 80130f8: af00 add r7, sp, #0 80130fa: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); 80130fc: f002 fc64 bl 80159c8 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 8013100: 687b ldr r3, [r7, #4] 8013102: 6b9a ldr r2, [r3, #56] @ 0x38 8013104: 687b ldr r3, [r7, #4] 8013106: 6bdb ldr r3, [r3, #60] @ 0x3c 8013108: 429a cmp r2, r3 801310a: d102 bne.n 8013112 { xReturn = pdTRUE; 801310c: 2301 movs r3, #1 801310e: 60fb str r3, [r7, #12] 8013110: e001 b.n 8013116 } else { xReturn = pdFALSE; 8013112: 2300 movs r3, #0 8013114: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8013116: f002 fc89 bl 8015a2c return xReturn; 801311a: 68fb ldr r3, [r7, #12] } 801311c: 4618 mov r0, r3 801311e: 3710 adds r7, #16 8013120: 46bd mov sp, r7 8013122: bd80 pop {r7, pc} 08013124 : /*-----------------------------------------------------------*/ #if ( configQUEUE_REGISTRY_SIZE > 0 ) void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { 8013124: b480 push {r7} 8013126: b085 sub sp, #20 8013128: af00 add r7, sp, #0 801312a: 6078 str r0, [r7, #4] 801312c: 6039 str r1, [r7, #0] UBaseType_t ux; /* See if there is an empty space in the registry. A NULL name denotes a free slot. */ for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 801312e: 2300 movs r3, #0 8013130: 60fb str r3, [r7, #12] 8013132: e014 b.n 801315e { if( xQueueRegistry[ ux ].pcQueueName == NULL ) 8013134: 4a0f ldr r2, [pc, #60] @ (8013174 ) 8013136: 68fb ldr r3, [r7, #12] 8013138: f852 3033 ldr.w r3, [r2, r3, lsl #3] 801313c: 2b00 cmp r3, #0 801313e: d10b bne.n 8013158 { /* Store the information on this queue. */ xQueueRegistry[ ux ].pcQueueName = pcQueueName; 8013140: 490c ldr r1, [pc, #48] @ (8013174 ) 8013142: 68fb ldr r3, [r7, #12] 8013144: 683a ldr r2, [r7, #0] 8013146: f841 2033 str.w r2, [r1, r3, lsl #3] xQueueRegistry[ ux ].xHandle = xQueue; 801314a: 4a0a ldr r2, [pc, #40] @ (8013174 ) 801314c: 68fb ldr r3, [r7, #12] 801314e: 00db lsls r3, r3, #3 8013150: 4413 add r3, r2 8013152: 687a ldr r2, [r7, #4] 8013154: 605a str r2, [r3, #4] traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ); break; 8013156: e006 b.n 8013166 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8013158: 68fb ldr r3, [r7, #12] 801315a: 3301 adds r3, #1 801315c: 60fb str r3, [r7, #12] 801315e: 68fb ldr r3, [r7, #12] 8013160: 2b07 cmp r3, #7 8013162: d9e7 bls.n 8013134 else { mtCOVERAGE_TEST_MARKER(); } } } 8013164: bf00 nop 8013166: bf00 nop 8013168: 3714 adds r7, #20 801316a: 46bd mov sp, r7 801316c: f85d 7b04 ldr.w r7, [sp], #4 8013170: 4770 bx lr 8013172: bf00 nop 8013174: 24003d30 .word 0x24003d30 08013178 : /*-----------------------------------------------------------*/ #if ( configQUEUE_REGISTRY_SIZE > 0 ) void vQueueUnregisterQueue( QueueHandle_t xQueue ) { 8013178: b480 push {r7} 801317a: b085 sub sp, #20 801317c: af00 add r7, sp, #0 801317e: 6078 str r0, [r7, #4] UBaseType_t ux; /* See if the handle of the queue being unregistered in actually in the registry. */ for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8013180: 2300 movs r3, #0 8013182: 60fb str r3, [r7, #12] 8013184: e016 b.n 80131b4 { if( xQueueRegistry[ ux ].xHandle == xQueue ) 8013186: 4a10 ldr r2, [pc, #64] @ (80131c8 ) 8013188: 68fb ldr r3, [r7, #12] 801318a: 00db lsls r3, r3, #3 801318c: 4413 add r3, r2 801318e: 685b ldr r3, [r3, #4] 8013190: 687a ldr r2, [r7, #4] 8013192: 429a cmp r2, r3 8013194: d10b bne.n 80131ae { /* Set the name to NULL to show that this slot if free again. */ xQueueRegistry[ ux ].pcQueueName = NULL; 8013196: 4a0c ldr r2, [pc, #48] @ (80131c8 ) 8013198: 68fb ldr r3, [r7, #12] 801319a: 2100 movs r1, #0 801319c: f842 1033 str.w r1, [r2, r3, lsl #3] /* Set the handle to NULL to ensure the same queue handle cannot appear in the registry twice if it is added, removed, then added again. */ xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0; 80131a0: 4a09 ldr r2, [pc, #36] @ (80131c8 ) 80131a2: 68fb ldr r3, [r7, #12] 80131a4: 00db lsls r3, r3, #3 80131a6: 4413 add r3, r2 80131a8: 2200 movs r2, #0 80131aa: 605a str r2, [r3, #4] break; 80131ac: e006 b.n 80131bc for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 80131ae: 68fb ldr r3, [r7, #12] 80131b0: 3301 adds r3, #1 80131b2: 60fb str r3, [r7, #12] 80131b4: 68fb ldr r3, [r7, #12] 80131b6: 2b07 cmp r3, #7 80131b8: d9e5 bls.n 8013186 { mtCOVERAGE_TEST_MARKER(); } } } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ 80131ba: bf00 nop 80131bc: bf00 nop 80131be: 3714 adds r7, #20 80131c0: 46bd mov sp, r7 80131c2: f85d 7b04 ldr.w r7, [sp], #4 80131c6: 4770 bx lr 80131c8: 24003d30 .word 0x24003d30 080131cc : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 80131cc: b580 push {r7, lr} 80131ce: b086 sub sp, #24 80131d0: af00 add r7, sp, #0 80131d2: 60f8 str r0, [r7, #12] 80131d4: 60b9 str r1, [r7, #8] 80131d6: 607a str r2, [r7, #4] Queue_t * const pxQueue = xQueue; 80131d8: 68fb ldr r3, [r7, #12] 80131da: 617b str r3, [r7, #20] will not actually cause the task to block, just place it on a blocked list. It will not block until the scheduler is unlocked - at which time a yield will be performed. If an item is added to the queue while the queue is locked, and the calling task blocks on the queue, then the calling task will be immediately unblocked when the queue is unlocked. */ prvLockQueue( pxQueue ); 80131dc: f002 fbf4 bl 80159c8 80131e0: 697b ldr r3, [r7, #20] 80131e2: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 80131e6: b25b sxtb r3, r3 80131e8: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80131ec: d103 bne.n 80131f6 80131ee: 697b ldr r3, [r7, #20] 80131f0: 2200 movs r2, #0 80131f2: f883 2044 strb.w r2, [r3, #68] @ 0x44 80131f6: 697b ldr r3, [r7, #20] 80131f8: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 80131fc: b25b sxtb r3, r3 80131fe: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013202: d103 bne.n 801320c 8013204: 697b ldr r3, [r7, #20] 8013206: 2200 movs r2, #0 8013208: f883 2045 strb.w r2, [r3, #69] @ 0x45 801320c: f002 fc0e bl 8015a2c if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 8013210: 697b ldr r3, [r7, #20] 8013212: 6b9b ldr r3, [r3, #56] @ 0x38 8013214: 2b00 cmp r3, #0 8013216: d106 bne.n 8013226 { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely ); 8013218: 697b ldr r3, [r7, #20] 801321a: 3324 adds r3, #36 @ 0x24 801321c: 687a ldr r2, [r7, #4] 801321e: 68b9 ldr r1, [r7, #8] 8013220: 4618 mov r0, r3 8013222: f001 f825 bl 8014270 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 8013226: 6978 ldr r0, [r7, #20] 8013228: f7ff fefc bl 8013024 } 801322c: bf00 nop 801322e: 3718 adds r7, #24 8013230: 46bd mov sp, r7 8013232: bd80 pop {r7, pc} 08013234 : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer ) { 8013234: b580 push {r7, lr} 8013236: b08c sub sp, #48 @ 0x30 8013238: af02 add r7, sp, #8 801323a: 60f8 str r0, [r7, #12] 801323c: 60b9 str r1, [r7, #8] 801323e: 607a str r2, [r7, #4] /* In case the stream buffer is going to be used as a message buffer (that is, it will hold discrete messages with a little meta data that says how big the next message is) check the buffer will be large enough to hold at least one message. */ if( xIsMessageBuffer == pdTRUE ) 8013240: 687b ldr r3, [r7, #4] 8013242: 2b01 cmp r3, #1 8013244: d111 bne.n 801326a { /* Is a message buffer but not statically allocated. */ ucFlags = sbFLAGS_IS_MESSAGE_BUFFER; 8013246: 2301 movs r3, #1 8013248: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > sbBYTES_TO_STORE_MESSAGE_LENGTH ); 801324c: 68fb ldr r3, [r7, #12] 801324e: 2b04 cmp r3, #4 8013250: d81d bhi.n 801328e __asm volatile 8013252: f04f 0350 mov.w r3, #80 @ 0x50 8013256: f383 8811 msr BASEPRI, r3 801325a: f3bf 8f6f isb sy 801325e: f3bf 8f4f dsb sy 8013262: 61fb str r3, [r7, #28] } 8013264: bf00 nop 8013266: bf00 nop 8013268: e7fd b.n 8013266 } else { /* Not a message buffer and not statically allocated. */ ucFlags = 0; 801326a: 2300 movs r3, #0 801326c: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > 0 ); 8013270: 68fb ldr r3, [r7, #12] 8013272: 2b00 cmp r3, #0 8013274: d10b bne.n 801328e __asm volatile 8013276: f04f 0350 mov.w r3, #80 @ 0x50 801327a: f383 8811 msr BASEPRI, r3 801327e: f3bf 8f6f isb sy 8013282: f3bf 8f4f dsb sy 8013286: 61bb str r3, [r7, #24] } 8013288: bf00 nop 801328a: bf00 nop 801328c: e7fd b.n 801328a } configASSERT( xTriggerLevelBytes <= xBufferSizeBytes ); 801328e: 68ba ldr r2, [r7, #8] 8013290: 68fb ldr r3, [r7, #12] 8013292: 429a cmp r2, r3 8013294: d90b bls.n 80132ae __asm volatile 8013296: f04f 0350 mov.w r3, #80 @ 0x50 801329a: f383 8811 msr BASEPRI, r3 801329e: f3bf 8f6f isb sy 80132a2: f3bf 8f4f dsb sy 80132a6: 617b str r3, [r7, #20] } 80132a8: bf00 nop 80132aa: bf00 nop 80132ac: e7fd b.n 80132aa /* A trigger level of 0 would cause a waiting task to unblock even when the buffer was empty. */ if( xTriggerLevelBytes == ( size_t ) 0 ) 80132ae: 68bb ldr r3, [r7, #8] 80132b0: 2b00 cmp r3, #0 80132b2: d101 bne.n 80132b8 { xTriggerLevelBytes = ( size_t ) 1; 80132b4: 2301 movs r3, #1 80132b6: 60bb str r3, [r7, #8] and the buffer follows immediately after. The requested size is incremented so the free space is returned as the user would expect - this is a quirk of the implementation that means otherwise the free space would be reported as one byte smaller than would be logically expected. */ xBufferSizeBytes++; 80132b8: 68fb ldr r3, [r7, #12] 80132ba: 3301 adds r3, #1 80132bc: 60fb str r3, [r7, #12] pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) ); /*lint !e9079 malloc() only returns void*. */ 80132be: 68fb ldr r3, [r7, #12] 80132c0: 3324 adds r3, #36 @ 0x24 80132c2: 4618 mov r0, r3 80132c4: f002 fca2 bl 8015c0c 80132c8: 6238 str r0, [r7, #32] if( pucAllocatedMemory != NULL ) 80132ca: 6a3b ldr r3, [r7, #32] 80132cc: 2b00 cmp r3, #0 80132ce: d00a beq.n 80132e6 { prvInitialiseNewStreamBuffer( ( StreamBuffer_t * ) pucAllocatedMemory, /* Structure at the start of the allocated memory. */ /*lint !e9087 Safe cast as allocated memory is aligned. */ /*lint !e826 Area is not too small and alignment is guaranteed provided malloc() behaves as expected and returns aligned buffer. */ 80132d0: 6a3b ldr r3, [r7, #32] 80132d2: f103 0124 add.w r1, r3, #36 @ 0x24 80132d6: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80132da: 9300 str r3, [sp, #0] 80132dc: 68bb ldr r3, [r7, #8] 80132de: 68fa ldr r2, [r7, #12] 80132e0: 6a38 ldr r0, [r7, #32] 80132e2: f000 fb0b bl 80138fc else { traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ); } return ( StreamBufferHandle_t ) pucAllocatedMemory; /*lint !e9087 !e826 Safe cast as allocated memory is aligned. */ 80132e6: 6a3b ldr r3, [r7, #32] } 80132e8: 4618 mov r0, r3 80132ea: 3728 adds r7, #40 @ 0x28 80132ec: 46bd mov sp, r7 80132ee: bd80 pop {r7, pc} 080132f0 : return xReturn; } /*-----------------------------------------------------------*/ size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) { 80132f0: b480 push {r7} 80132f2: b087 sub sp, #28 80132f4: af00 add r7, sp, #0 80132f6: 6078 str r0, [r7, #4] const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 80132f8: 687b ldr r3, [r7, #4] 80132fa: 613b str r3, [r7, #16] size_t xSpace; configASSERT( pxStreamBuffer ); 80132fc: 693b ldr r3, [r7, #16] 80132fe: 2b00 cmp r3, #0 8013300: d10b bne.n 801331a __asm volatile 8013302: f04f 0350 mov.w r3, #80 @ 0x50 8013306: f383 8811 msr BASEPRI, r3 801330a: f3bf 8f6f isb sy 801330e: f3bf 8f4f dsb sy 8013312: 60fb str r3, [r7, #12] } 8013314: bf00 nop 8013316: bf00 nop 8013318: e7fd b.n 8013316 xSpace = pxStreamBuffer->xLength + pxStreamBuffer->xTail; 801331a: 693b ldr r3, [r7, #16] 801331c: 689a ldr r2, [r3, #8] 801331e: 693b ldr r3, [r7, #16] 8013320: 681b ldr r3, [r3, #0] 8013322: 4413 add r3, r2 8013324: 617b str r3, [r7, #20] xSpace -= pxStreamBuffer->xHead; 8013326: 693b ldr r3, [r7, #16] 8013328: 685b ldr r3, [r3, #4] 801332a: 697a ldr r2, [r7, #20] 801332c: 1ad3 subs r3, r2, r3 801332e: 617b str r3, [r7, #20] xSpace -= ( size_t ) 1; 8013330: 697b ldr r3, [r7, #20] 8013332: 3b01 subs r3, #1 8013334: 617b str r3, [r7, #20] if( xSpace >= pxStreamBuffer->xLength ) 8013336: 693b ldr r3, [r7, #16] 8013338: 689b ldr r3, [r3, #8] 801333a: 697a ldr r2, [r7, #20] 801333c: 429a cmp r2, r3 801333e: d304 bcc.n 801334a { xSpace -= pxStreamBuffer->xLength; 8013340: 693b ldr r3, [r7, #16] 8013342: 689b ldr r3, [r3, #8] 8013344: 697a ldr r2, [r7, #20] 8013346: 1ad3 subs r3, r2, r3 8013348: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xSpace; 801334a: 697b ldr r3, [r7, #20] } 801334c: 4618 mov r0, r3 801334e: 371c adds r7, #28 8013350: 46bd mov sp, r7 8013352: f85d 7b04 ldr.w r7, [sp], #4 8013356: 4770 bx lr 08013358 : size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait ) { 8013358: b580 push {r7, lr} 801335a: b090 sub sp, #64 @ 0x40 801335c: af02 add r7, sp, #8 801335e: 60f8 str r0, [r7, #12] 8013360: 60b9 str r1, [r7, #8] 8013362: 607a str r2, [r7, #4] 8013364: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 8013366: 68fb ldr r3, [r7, #12] 8013368: 62fb str r3, [r7, #44] @ 0x2c size_t xReturn, xSpace = 0; 801336a: 2300 movs r3, #0 801336c: 637b str r3, [r7, #52] @ 0x34 size_t xRequiredSpace = xDataLengthBytes; 801336e: 687b ldr r3, [r7, #4] 8013370: 633b str r3, [r7, #48] @ 0x30 TimeOut_t xTimeOut; configASSERT( pvTxData ); 8013372: 68bb ldr r3, [r7, #8] 8013374: 2b00 cmp r3, #0 8013376: d10b bne.n 8013390 __asm volatile 8013378: f04f 0350 mov.w r3, #80 @ 0x50 801337c: f383 8811 msr BASEPRI, r3 8013380: f3bf 8f6f isb sy 8013384: f3bf 8f4f dsb sy 8013388: 627b str r3, [r7, #36] @ 0x24 } 801338a: bf00 nop 801338c: bf00 nop 801338e: e7fd b.n 801338c configASSERT( pxStreamBuffer ); 8013390: 6afb ldr r3, [r7, #44] @ 0x2c 8013392: 2b00 cmp r3, #0 8013394: d10b bne.n 80133ae __asm volatile 8013396: f04f 0350 mov.w r3, #80 @ 0x50 801339a: f383 8811 msr BASEPRI, r3 801339e: f3bf 8f6f isb sy 80133a2: f3bf 8f4f dsb sy 80133a6: 623b str r3, [r7, #32] } 80133a8: bf00 nop 80133aa: bf00 nop 80133ac: e7fd b.n 80133aa /* This send function is used to write to both message buffers and stream buffers. If this is a message buffer then the space needed must be increased by the amount of bytes needed to store the length of the message. */ if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 ) 80133ae: 6afb ldr r3, [r7, #44] @ 0x2c 80133b0: 7f1b ldrb r3, [r3, #28] 80133b2: f003 0301 and.w r3, r3, #1 80133b6: 2b00 cmp r3, #0 80133b8: d012 beq.n 80133e0 { xRequiredSpace += sbBYTES_TO_STORE_MESSAGE_LENGTH; 80133ba: 6b3b ldr r3, [r7, #48] @ 0x30 80133bc: 3304 adds r3, #4 80133be: 633b str r3, [r7, #48] @ 0x30 /* Overflow? */ configASSERT( xRequiredSpace > xDataLengthBytes ); 80133c0: 6b3a ldr r2, [r7, #48] @ 0x30 80133c2: 687b ldr r3, [r7, #4] 80133c4: 429a cmp r2, r3 80133c6: d80b bhi.n 80133e0 __asm volatile 80133c8: f04f 0350 mov.w r3, #80 @ 0x50 80133cc: f383 8811 msr BASEPRI, r3 80133d0: f3bf 8f6f isb sy 80133d4: f3bf 8f4f dsb sy 80133d8: 61fb str r3, [r7, #28] } 80133da: bf00 nop 80133dc: bf00 nop 80133de: e7fd b.n 80133dc else { mtCOVERAGE_TEST_MARKER(); } if( xTicksToWait != ( TickType_t ) 0 ) 80133e0: 683b ldr r3, [r7, #0] 80133e2: 2b00 cmp r3, #0 80133e4: d03f beq.n 8013466 { vTaskSetTimeOutState( &xTimeOut ); 80133e6: f107 0310 add.w r3, r7, #16 80133ea: 4618 mov r0, r3 80133ec: f000 ffd0 bl 8014390 do { /* Wait until the required number of bytes are free in the message buffer. */ taskENTER_CRITICAL(); 80133f0: f002 faea bl 80159c8 { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 80133f4: 6af8 ldr r0, [r7, #44] @ 0x2c 80133f6: f7ff ff7b bl 80132f0 80133fa: 6378 str r0, [r7, #52] @ 0x34 if( xSpace < xRequiredSpace ) 80133fc: 6b7a ldr r2, [r7, #52] @ 0x34 80133fe: 6b3b ldr r3, [r7, #48] @ 0x30 8013400: 429a cmp r2, r3 8013402: d218 bcs.n 8013436 { /* Clear notification state as going to wait for space. */ ( void ) xTaskNotifyStateClear( NULL ); 8013404: 2000 movs r0, #0 8013406: f001 fcf3 bl 8014df0 /* Should only be one writer. */ configASSERT( pxStreamBuffer->xTaskWaitingToSend == NULL ); 801340a: 6afb ldr r3, [r7, #44] @ 0x2c 801340c: 695b ldr r3, [r3, #20] 801340e: 2b00 cmp r3, #0 8013410: d00b beq.n 801342a __asm volatile 8013412: f04f 0350 mov.w r3, #80 @ 0x50 8013416: f383 8811 msr BASEPRI, r3 801341a: f3bf 8f6f isb sy 801341e: f3bf 8f4f dsb sy 8013422: 61bb str r3, [r7, #24] } 8013424: bf00 nop 8013426: bf00 nop 8013428: e7fd b.n 8013426 pxStreamBuffer->xTaskWaitingToSend = xTaskGetCurrentTaskHandle(); 801342a: f001 f93b bl 80146a4 801342e: 4602 mov r2, r0 8013430: 6afb ldr r3, [r7, #44] @ 0x2c 8013432: 615a str r2, [r3, #20] 8013434: e002 b.n 801343c } else { taskEXIT_CRITICAL(); 8013436: f002 faf9 bl 8015a2c break; 801343a: e014 b.n 8013466 } } taskEXIT_CRITICAL(); 801343c: f002 faf6 bl 8015a2c traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 8013440: 683b ldr r3, [r7, #0] 8013442: 2200 movs r2, #0 8013444: 2100 movs r1, #0 8013446: 2000 movs r0, #0 8013448: f001 faca bl 80149e0 pxStreamBuffer->xTaskWaitingToSend = NULL; 801344c: 6afb ldr r3, [r7, #44] @ 0x2c 801344e: 2200 movs r2, #0 8013450: 615a str r2, [r3, #20] } while( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ); 8013452: 463a mov r2, r7 8013454: f107 0310 add.w r3, r7, #16 8013458: 4611 mov r1, r2 801345a: 4618 mov r0, r3 801345c: f000 ffd6 bl 801440c 8013460: 4603 mov r3, r0 8013462: 2b00 cmp r3, #0 8013464: d0c4 beq.n 80133f0 else { mtCOVERAGE_TEST_MARKER(); } if( xSpace == ( size_t ) 0 ) 8013466: 6b7b ldr r3, [r7, #52] @ 0x34 8013468: 2b00 cmp r3, #0 801346a: d103 bne.n 8013474 { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 801346c: 6af8 ldr r0, [r7, #44] @ 0x2c 801346e: f7ff ff3f bl 80132f0 8013472: 6378 str r0, [r7, #52] @ 0x34 else { mtCOVERAGE_TEST_MARKER(); } xReturn = prvWriteMessageToBuffer( pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace ); 8013474: 6b3b ldr r3, [r7, #48] @ 0x30 8013476: 9300 str r3, [sp, #0] 8013478: 6b7b ldr r3, [r7, #52] @ 0x34 801347a: 687a ldr r2, [r7, #4] 801347c: 68b9 ldr r1, [r7, #8] 801347e: 6af8 ldr r0, [r7, #44] @ 0x2c 8013480: f000 f823 bl 80134ca 8013484: 62b8 str r0, [r7, #40] @ 0x28 if( xReturn > ( size_t ) 0 ) 8013486: 6abb ldr r3, [r7, #40] @ 0x28 8013488: 2b00 cmp r3, #0 801348a: d019 beq.n 80134c0 { traceSTREAM_BUFFER_SEND( xStreamBuffer, xReturn ); /* Was a task waiting for the data? */ if( prvBytesInBuffer( pxStreamBuffer ) >= pxStreamBuffer->xTriggerLevelBytes ) 801348c: 6af8 ldr r0, [r7, #44] @ 0x2c 801348e: f000 fa15 bl 80138bc 8013492: 4602 mov r2, r0 8013494: 6afb ldr r3, [r7, #44] @ 0x2c 8013496: 68db ldr r3, [r3, #12] 8013498: 429a cmp r2, r3 801349a: d311 bcc.n 80134c0 { sbSEND_COMPLETED( pxStreamBuffer ); 801349c: f000 fcc6 bl 8013e2c 80134a0: 6afb ldr r3, [r7, #44] @ 0x2c 80134a2: 691b ldr r3, [r3, #16] 80134a4: 2b00 cmp r3, #0 80134a6: d009 beq.n 80134bc 80134a8: 6afb ldr r3, [r7, #44] @ 0x2c 80134aa: 6918 ldr r0, [r3, #16] 80134ac: 2300 movs r3, #0 80134ae: 2200 movs r2, #0 80134b0: 2100 movs r1, #0 80134b2: f001 faf5 bl 8014aa0 80134b6: 6afb ldr r3, [r7, #44] @ 0x2c 80134b8: 2200 movs r2, #0 80134ba: 611a str r2, [r3, #16] 80134bc: f000 fcc4 bl 8013e48 { mtCOVERAGE_TEST_MARKER(); traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ); } return xReturn; 80134c0: 6abb ldr r3, [r7, #40] @ 0x28 } 80134c2: 4618 mov r0, r3 80134c4: 3738 adds r7, #56 @ 0x38 80134c6: 46bd mov sp, r7 80134c8: bd80 pop {r7, pc} 080134ca : static size_t prvWriteMessageToBuffer( StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace ) { 80134ca: b580 push {r7, lr} 80134cc: b086 sub sp, #24 80134ce: af00 add r7, sp, #0 80134d0: 60f8 str r0, [r7, #12] 80134d2: 60b9 str r1, [r7, #8] 80134d4: 607a str r2, [r7, #4] 80134d6: 603b str r3, [r7, #0] BaseType_t xShouldWrite; size_t xReturn; if( xSpace == ( size_t ) 0 ) 80134d8: 683b ldr r3, [r7, #0] 80134da: 2b00 cmp r3, #0 80134dc: d102 bne.n 80134e4 { /* Doesn't matter if this is a stream buffer or a message buffer, there is no space to write. */ xShouldWrite = pdFALSE; 80134de: 2300 movs r3, #0 80134e0: 617b str r3, [r7, #20] 80134e2: e01d b.n 8013520 } else if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) == ( uint8_t ) 0 ) 80134e4: 68fb ldr r3, [r7, #12] 80134e6: 7f1b ldrb r3, [r3, #28] 80134e8: f003 0301 and.w r3, r3, #1 80134ec: 2b00 cmp r3, #0 80134ee: d108 bne.n 8013502 { /* This is a stream buffer, as opposed to a message buffer, so writing a stream of bytes rather than discrete messages. Write as many bytes as possible. */ xShouldWrite = pdTRUE; 80134f0: 2301 movs r3, #1 80134f2: 617b str r3, [r7, #20] xDataLengthBytes = configMIN( xDataLengthBytes, xSpace ); 80134f4: 687a ldr r2, [r7, #4] 80134f6: 683b ldr r3, [r7, #0] 80134f8: 4293 cmp r3, r2 80134fa: bf28 it cs 80134fc: 4613 movcs r3, r2 80134fe: 607b str r3, [r7, #4] 8013500: e00e b.n 8013520 } else if( xSpace >= xRequiredSpace ) 8013502: 683a ldr r2, [r7, #0] 8013504: 6a3b ldr r3, [r7, #32] 8013506: 429a cmp r2, r3 8013508: d308 bcc.n 801351c { /* This is a message buffer, as opposed to a stream buffer, and there is enough space to write both the message length and the message itself into the buffer. Start by writing the length of the data, the data itself will be written later in this function. */ xShouldWrite = pdTRUE; 801350a: 2301 movs r3, #1 801350c: 617b str r3, [r7, #20] ( void ) prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) &( xDataLengthBytes ), sbBYTES_TO_STORE_MESSAGE_LENGTH ); 801350e: 1d3b adds r3, r7, #4 8013510: 2204 movs r2, #4 8013512: 4619 mov r1, r3 8013514: 68f8 ldr r0, [r7, #12] 8013516: f000 f8df bl 80136d8 801351a: e001 b.n 8013520 } else { /* There is space available, but not enough space. */ xShouldWrite = pdFALSE; 801351c: 2300 movs r3, #0 801351e: 617b str r3, [r7, #20] } if( xShouldWrite != pdFALSE ) 8013520: 697b ldr r3, [r7, #20] 8013522: 2b00 cmp r3, #0 8013524: d007 beq.n 8013536 { /* Writes the data itself. */ xReturn = prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) pvTxData, xDataLengthBytes ); /*lint !e9079 Storage buffer is implemented as uint8_t for ease of sizing, alighment and access. */ 8013526: 687b ldr r3, [r7, #4] 8013528: 461a mov r2, r3 801352a: 68b9 ldr r1, [r7, #8] 801352c: 68f8 ldr r0, [r7, #12] 801352e: f000 f8d3 bl 80136d8 8013532: 6138 str r0, [r7, #16] 8013534: e001 b.n 801353a } else { xReturn = 0; 8013536: 2300 movs r3, #0 8013538: 613b str r3, [r7, #16] } return xReturn; 801353a: 693b ldr r3, [r7, #16] } 801353c: 4618 mov r0, r3 801353e: 3718 adds r7, #24 8013540: 46bd mov sp, r7 8013542: bd80 pop {r7, pc} 08013544 : size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait ) { 8013544: b580 push {r7, lr} 8013546: b08e sub sp, #56 @ 0x38 8013548: af02 add r7, sp, #8 801354a: 60f8 str r0, [r7, #12] 801354c: 60b9 str r1, [r7, #8] 801354e: 607a str r2, [r7, #4] 8013550: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 8013552: 68fb ldr r3, [r7, #12] 8013554: 623b str r3, [r7, #32] size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength; 8013556: 2300 movs r3, #0 8013558: 62fb str r3, [r7, #44] @ 0x2c configASSERT( pvRxData ); 801355a: 68bb ldr r3, [r7, #8] 801355c: 2b00 cmp r3, #0 801355e: d10b bne.n 8013578 __asm volatile 8013560: f04f 0350 mov.w r3, #80 @ 0x50 8013564: f383 8811 msr BASEPRI, r3 8013568: f3bf 8f6f isb sy 801356c: f3bf 8f4f dsb sy 8013570: 61fb str r3, [r7, #28] } 8013572: bf00 nop 8013574: bf00 nop 8013576: e7fd b.n 8013574 configASSERT( pxStreamBuffer ); 8013578: 6a3b ldr r3, [r7, #32] 801357a: 2b00 cmp r3, #0 801357c: d10b bne.n 8013596 __asm volatile 801357e: f04f 0350 mov.w r3, #80 @ 0x50 8013582: f383 8811 msr BASEPRI, r3 8013586: f3bf 8f6f isb sy 801358a: f3bf 8f4f dsb sy 801358e: 61bb str r3, [r7, #24] } 8013590: bf00 nop 8013592: bf00 nop 8013594: e7fd b.n 8013592 /* This receive function is used by both message buffers, which store discrete messages, and stream buffers, which store a continuous stream of bytes. Discrete messages include an additional sbBYTES_TO_STORE_MESSAGE_LENGTH bytes that hold the length of the message. */ if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 ) 8013596: 6a3b ldr r3, [r7, #32] 8013598: 7f1b ldrb r3, [r3, #28] 801359a: f003 0301 and.w r3, r3, #1 801359e: 2b00 cmp r3, #0 80135a0: d002 beq.n 80135a8 { xBytesToStoreMessageLength = sbBYTES_TO_STORE_MESSAGE_LENGTH; 80135a2: 2304 movs r3, #4 80135a4: 627b str r3, [r7, #36] @ 0x24 80135a6: e001 b.n 80135ac } else { xBytesToStoreMessageLength = 0; 80135a8: 2300 movs r3, #0 80135aa: 627b str r3, [r7, #36] @ 0x24 } if( xTicksToWait != ( TickType_t ) 0 ) 80135ac: 683b ldr r3, [r7, #0] 80135ae: 2b00 cmp r3, #0 80135b0: d035 beq.n 801361e { /* Checking if there is data and clearing the notification state must be performed atomically. */ taskENTER_CRITICAL(); 80135b2: f002 fa09 bl 80159c8 { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 80135b6: 6a38 ldr r0, [r7, #32] 80135b8: f000 f980 bl 80138bc 80135bc: 62b8 str r0, [r7, #40] @ 0x28 /* If this function was invoked by a message buffer read then xBytesToStoreMessageLength holds the number of bytes used to hold the length of the next discrete message. If this function was invoked by a stream buffer read then xBytesToStoreMessageLength will be 0. */ if( xBytesAvailable <= xBytesToStoreMessageLength ) 80135be: 6aba ldr r2, [r7, #40] @ 0x28 80135c0: 6a7b ldr r3, [r7, #36] @ 0x24 80135c2: 429a cmp r2, r3 80135c4: d817 bhi.n 80135f6 { /* Clear notification state as going to wait for data. */ ( void ) xTaskNotifyStateClear( NULL ); 80135c6: 2000 movs r0, #0 80135c8: f001 fc12 bl 8014df0 /* Should only be one reader. */ configASSERT( pxStreamBuffer->xTaskWaitingToReceive == NULL ); 80135cc: 6a3b ldr r3, [r7, #32] 80135ce: 691b ldr r3, [r3, #16] 80135d0: 2b00 cmp r3, #0 80135d2: d00b beq.n 80135ec __asm volatile 80135d4: f04f 0350 mov.w r3, #80 @ 0x50 80135d8: f383 8811 msr BASEPRI, r3 80135dc: f3bf 8f6f isb sy 80135e0: f3bf 8f4f dsb sy 80135e4: 617b str r3, [r7, #20] } 80135e6: bf00 nop 80135e8: bf00 nop 80135ea: e7fd b.n 80135e8 pxStreamBuffer->xTaskWaitingToReceive = xTaskGetCurrentTaskHandle(); 80135ec: f001 f85a bl 80146a4 80135f0: 4602 mov r2, r0 80135f2: 6a3b ldr r3, [r7, #32] 80135f4: 611a str r2, [r3, #16] else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 80135f6: f002 fa19 bl 8015a2c if( xBytesAvailable <= xBytesToStoreMessageLength ) 80135fa: 6aba ldr r2, [r7, #40] @ 0x28 80135fc: 6a7b ldr r3, [r7, #36] @ 0x24 80135fe: 429a cmp r2, r3 8013600: d811 bhi.n 8013626 { /* Wait for data to be available. */ traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 8013602: 683b ldr r3, [r7, #0] 8013604: 2200 movs r2, #0 8013606: 2100 movs r1, #0 8013608: 2000 movs r0, #0 801360a: f001 f9e9 bl 80149e0 pxStreamBuffer->xTaskWaitingToReceive = NULL; 801360e: 6a3b ldr r3, [r7, #32] 8013610: 2200 movs r2, #0 8013612: 611a str r2, [r3, #16] /* Recheck the data available after blocking. */ xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 8013614: 6a38 ldr r0, [r7, #32] 8013616: f000 f951 bl 80138bc 801361a: 62b8 str r0, [r7, #40] @ 0x28 801361c: e003 b.n 8013626 mtCOVERAGE_TEST_MARKER(); } } else { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 801361e: 6a38 ldr r0, [r7, #32] 8013620: f000 f94c bl 80138bc 8013624: 62b8 str r0, [r7, #40] @ 0x28 /* Whether receiving a discrete message (where xBytesToStoreMessageLength holds the number of bytes used to store the message length) or a stream of bytes (where xBytesToStoreMessageLength is zero), the number of bytes available must be greater than xBytesToStoreMessageLength to be able to read bytes from the buffer. */ if( xBytesAvailable > xBytesToStoreMessageLength ) 8013626: 6aba ldr r2, [r7, #40] @ 0x28 8013628: 6a7b ldr r3, [r7, #36] @ 0x24 801362a: 429a cmp r2, r3 801362c: d91d bls.n 801366a { xReceivedLength = prvReadMessageFromBuffer( pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable, xBytesToStoreMessageLength ); 801362e: 6a7b ldr r3, [r7, #36] @ 0x24 8013630: 9300 str r3, [sp, #0] 8013632: 6abb ldr r3, [r7, #40] @ 0x28 8013634: 687a ldr r2, [r7, #4] 8013636: 68b9 ldr r1, [r7, #8] 8013638: 6a38 ldr r0, [r7, #32] 801363a: f000 f81b bl 8013674 801363e: 62f8 str r0, [r7, #44] @ 0x2c /* Was a task waiting for space in the buffer? */ if( xReceivedLength != ( size_t ) 0 ) 8013640: 6afb ldr r3, [r7, #44] @ 0x2c 8013642: 2b00 cmp r3, #0 8013644: d011 beq.n 801366a { traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ); sbRECEIVE_COMPLETED( pxStreamBuffer ); 8013646: f000 fbf1 bl 8013e2c 801364a: 6a3b ldr r3, [r7, #32] 801364c: 695b ldr r3, [r3, #20] 801364e: 2b00 cmp r3, #0 8013650: d009 beq.n 8013666 8013652: 6a3b ldr r3, [r7, #32] 8013654: 6958 ldr r0, [r3, #20] 8013656: 2300 movs r3, #0 8013658: 2200 movs r2, #0 801365a: 2100 movs r1, #0 801365c: f001 fa20 bl 8014aa0 8013660: 6a3b ldr r3, [r7, #32] 8013662: 2200 movs r2, #0 8013664: 615a str r2, [r3, #20] 8013666: f000 fbef bl 8013e48 { traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ); mtCOVERAGE_TEST_MARKER(); } return xReceivedLength; 801366a: 6afb ldr r3, [r7, #44] @ 0x2c } 801366c: 4618 mov r0, r3 801366e: 3730 adds r7, #48 @ 0x30 8013670: 46bd mov sp, r7 8013672: bd80 pop {r7, pc} 08013674 : static size_t prvReadMessageFromBuffer( StreamBuffer_t *pxStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable, size_t xBytesToStoreMessageLength ) { 8013674: b580 push {r7, lr} 8013676: b088 sub sp, #32 8013678: af00 add r7, sp, #0 801367a: 60f8 str r0, [r7, #12] 801367c: 60b9 str r1, [r7, #8] 801367e: 607a str r2, [r7, #4] 8013680: 603b str r3, [r7, #0] size_t xOriginalTail, xReceivedLength, xNextMessageLength; configMESSAGE_BUFFER_LENGTH_TYPE xTempNextMessageLength; if( xBytesToStoreMessageLength != ( size_t ) 0 ) 8013682: 6abb ldr r3, [r7, #40] @ 0x28 8013684: 2b00 cmp r3, #0 8013686: d019 beq.n 80136bc { /* A discrete message is being received. First receive the length of the message. A copy of the tail is stored so the buffer can be returned to its prior state if the length of the message is too large for the provided buffer. */ xOriginalTail = pxStreamBuffer->xTail; 8013688: 68fb ldr r3, [r7, #12] 801368a: 681b ldr r3, [r3, #0] 801368c: 61bb str r3, [r7, #24] ( void ) prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) &xTempNextMessageLength, xBytesToStoreMessageLength, xBytesAvailable ); 801368e: f107 0110 add.w r1, r7, #16 8013692: 683b ldr r3, [r7, #0] 8013694: 6aba ldr r2, [r7, #40] @ 0x28 8013696: 68f8 ldr r0, [r7, #12] 8013698: f000 f893 bl 80137c2 xNextMessageLength = ( size_t ) xTempNextMessageLength; 801369c: 693b ldr r3, [r7, #16] 801369e: 61fb str r3, [r7, #28] /* Reduce the number of bytes available by the number of bytes just read out. */ xBytesAvailable -= xBytesToStoreMessageLength; 80136a0: 683a ldr r2, [r7, #0] 80136a2: 6abb ldr r3, [r7, #40] @ 0x28 80136a4: 1ad3 subs r3, r2, r3 80136a6: 603b str r3, [r7, #0] /* Check there is enough space in the buffer provided by the user. */ if( xNextMessageLength > xBufferLengthBytes ) 80136a8: 69fa ldr r2, [r7, #28] 80136aa: 687b ldr r3, [r7, #4] 80136ac: 429a cmp r2, r3 80136ae: d907 bls.n 80136c0 { /* The user has provided insufficient space to read the message so return the buffer to its previous state (so the length of the message is in the buffer again). */ pxStreamBuffer->xTail = xOriginalTail; 80136b0: 68fb ldr r3, [r7, #12] 80136b2: 69ba ldr r2, [r7, #24] 80136b4: 601a str r2, [r3, #0] xNextMessageLength = 0; 80136b6: 2300 movs r3, #0 80136b8: 61fb str r3, [r7, #28] 80136ba: e001 b.n 80136c0 } else { /* A stream of bytes is being received (as opposed to a discrete message), so read as many bytes as possible. */ xNextMessageLength = xBufferLengthBytes; 80136bc: 687b ldr r3, [r7, #4] 80136be: 61fb str r3, [r7, #28] } /* Read the actual data. */ xReceivedLength = prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) pvRxData, xNextMessageLength, xBytesAvailable ); /*lint !e9079 Data storage area is implemented as uint8_t array for ease of sizing, indexing and alignment. */ 80136c0: 683b ldr r3, [r7, #0] 80136c2: 69fa ldr r2, [r7, #28] 80136c4: 68b9 ldr r1, [r7, #8] 80136c6: 68f8 ldr r0, [r7, #12] 80136c8: f000 f87b bl 80137c2 80136cc: 6178 str r0, [r7, #20] return xReceivedLength; 80136ce: 697b ldr r3, [r7, #20] } 80136d0: 4618 mov r0, r3 80136d2: 3720 adds r7, #32 80136d4: 46bd mov sp, r7 80136d6: bd80 pop {r7, pc} 080136d8 : return xReturn; } /*-----------------------------------------------------------*/ static size_t prvWriteBytesToBuffer( StreamBuffer_t * const pxStreamBuffer, const uint8_t *pucData, size_t xCount ) { 80136d8: b580 push {r7, lr} 80136da: b08a sub sp, #40 @ 0x28 80136dc: af00 add r7, sp, #0 80136de: 60f8 str r0, [r7, #12] 80136e0: 60b9 str r1, [r7, #8] 80136e2: 607a str r2, [r7, #4] size_t xNextHead, xFirstLength; configASSERT( xCount > ( size_t ) 0 ); 80136e4: 687b ldr r3, [r7, #4] 80136e6: 2b00 cmp r3, #0 80136e8: d10b bne.n 8013702 __asm volatile 80136ea: f04f 0350 mov.w r3, #80 @ 0x50 80136ee: f383 8811 msr BASEPRI, r3 80136f2: f3bf 8f6f isb sy 80136f6: f3bf 8f4f dsb sy 80136fa: 61fb str r3, [r7, #28] } 80136fc: bf00 nop 80136fe: bf00 nop 8013700: e7fd b.n 80136fe xNextHead = pxStreamBuffer->xHead; 8013702: 68fb ldr r3, [r7, #12] 8013704: 685b ldr r3, [r3, #4] 8013706: 627b str r3, [r7, #36] @ 0x24 /* Calculate the number of bytes that can be added in the first write - which may be less than the total number of bytes that need to be added if the buffer will wrap back to the beginning. */ xFirstLength = configMIN( pxStreamBuffer->xLength - xNextHead, xCount ); 8013708: 68fb ldr r3, [r7, #12] 801370a: 689a ldr r2, [r3, #8] 801370c: 6a7b ldr r3, [r7, #36] @ 0x24 801370e: 1ad3 subs r3, r2, r3 8013710: 687a ldr r2, [r7, #4] 8013712: 4293 cmp r3, r2 8013714: bf28 it cs 8013716: 4613 movcs r3, r2 8013718: 623b str r3, [r7, #32] /* Write as many bytes as can be written in the first write. */ configASSERT( ( xNextHead + xFirstLength ) <= pxStreamBuffer->xLength ); 801371a: 6a7a ldr r2, [r7, #36] @ 0x24 801371c: 6a3b ldr r3, [r7, #32] 801371e: 441a add r2, r3 8013720: 68fb ldr r3, [r7, #12] 8013722: 689b ldr r3, [r3, #8] 8013724: 429a cmp r2, r3 8013726: d90b bls.n 8013740 __asm volatile 8013728: f04f 0350 mov.w r3, #80 @ 0x50 801372c: f383 8811 msr BASEPRI, r3 8013730: f3bf 8f6f isb sy 8013734: f3bf 8f4f dsb sy 8013738: 61bb str r3, [r7, #24] } 801373a: bf00 nop 801373c: bf00 nop 801373e: e7fd b.n 801373c ( void ) memcpy( ( void* ) ( &( pxStreamBuffer->pucBuffer[ xNextHead ] ) ), ( const void * ) pucData, xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8013740: 68fb ldr r3, [r7, #12] 8013742: 699a ldr r2, [r3, #24] 8013744: 6a7b ldr r3, [r7, #36] @ 0x24 8013746: 4413 add r3, r2 8013748: 6a3a ldr r2, [r7, #32] 801374a: 68b9 ldr r1, [r7, #8] 801374c: 4618 mov r0, r3 801374e: f017 fb16 bl 802ad7e /* If the number of bytes written was less than the number that could be written in the first write... */ if( xCount > xFirstLength ) 8013752: 687a ldr r2, [r7, #4] 8013754: 6a3b ldr r3, [r7, #32] 8013756: 429a cmp r2, r3 8013758: d91d bls.n 8013796 { /* ...then write the remaining bytes to the start of the buffer. */ configASSERT( ( xCount - xFirstLength ) <= pxStreamBuffer->xLength ); 801375a: 687a ldr r2, [r7, #4] 801375c: 6a3b ldr r3, [r7, #32] 801375e: 1ad2 subs r2, r2, r3 8013760: 68fb ldr r3, [r7, #12] 8013762: 689b ldr r3, [r3, #8] 8013764: 429a cmp r2, r3 8013766: d90b bls.n 8013780 __asm volatile 8013768: f04f 0350 mov.w r3, #80 @ 0x50 801376c: f383 8811 msr BASEPRI, r3 8013770: f3bf 8f6f isb sy 8013774: f3bf 8f4f dsb sy 8013778: 617b str r3, [r7, #20] } 801377a: bf00 nop 801377c: bf00 nop 801377e: e7fd b.n 801377c ( void ) memcpy( ( void * ) pxStreamBuffer->pucBuffer, ( const void * ) &( pucData[ xFirstLength ] ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8013780: 68fb ldr r3, [r7, #12] 8013782: 6998 ldr r0, [r3, #24] 8013784: 68ba ldr r2, [r7, #8] 8013786: 6a3b ldr r3, [r7, #32] 8013788: 18d1 adds r1, r2, r3 801378a: 687a ldr r2, [r7, #4] 801378c: 6a3b ldr r3, [r7, #32] 801378e: 1ad3 subs r3, r2, r3 8013790: 461a mov r2, r3 8013792: f017 faf4 bl 802ad7e else { mtCOVERAGE_TEST_MARKER(); } xNextHead += xCount; 8013796: 6a7a ldr r2, [r7, #36] @ 0x24 8013798: 687b ldr r3, [r7, #4] 801379a: 4413 add r3, r2 801379c: 627b str r3, [r7, #36] @ 0x24 if( xNextHead >= pxStreamBuffer->xLength ) 801379e: 68fb ldr r3, [r7, #12] 80137a0: 689b ldr r3, [r3, #8] 80137a2: 6a7a ldr r2, [r7, #36] @ 0x24 80137a4: 429a cmp r2, r3 80137a6: d304 bcc.n 80137b2 { xNextHead -= pxStreamBuffer->xLength; 80137a8: 68fb ldr r3, [r7, #12] 80137aa: 689b ldr r3, [r3, #8] 80137ac: 6a7a ldr r2, [r7, #36] @ 0x24 80137ae: 1ad3 subs r3, r2, r3 80137b0: 627b str r3, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } pxStreamBuffer->xHead = xNextHead; 80137b2: 68fb ldr r3, [r7, #12] 80137b4: 6a7a ldr r2, [r7, #36] @ 0x24 80137b6: 605a str r2, [r3, #4] return xCount; 80137b8: 687b ldr r3, [r7, #4] } 80137ba: 4618 mov r0, r3 80137bc: 3728 adds r7, #40 @ 0x28 80137be: 46bd mov sp, r7 80137c0: bd80 pop {r7, pc} 080137c2 : /*-----------------------------------------------------------*/ static size_t prvReadBytesFromBuffer( StreamBuffer_t *pxStreamBuffer, uint8_t *pucData, size_t xMaxCount, size_t xBytesAvailable ) { 80137c2: b580 push {r7, lr} 80137c4: b08a sub sp, #40 @ 0x28 80137c6: af00 add r7, sp, #0 80137c8: 60f8 str r0, [r7, #12] 80137ca: 60b9 str r1, [r7, #8] 80137cc: 607a str r2, [r7, #4] 80137ce: 603b str r3, [r7, #0] size_t xCount, xFirstLength, xNextTail; /* Use the minimum of the wanted bytes and the available bytes. */ xCount = configMIN( xBytesAvailable, xMaxCount ); 80137d0: 687a ldr r2, [r7, #4] 80137d2: 683b ldr r3, [r7, #0] 80137d4: 4293 cmp r3, r2 80137d6: bf28 it cs 80137d8: 4613 movcs r3, r2 80137da: 623b str r3, [r7, #32] if( xCount > ( size_t ) 0 ) 80137dc: 6a3b ldr r3, [r7, #32] 80137de: 2b00 cmp r3, #0 80137e0: d067 beq.n 80138b2 { xNextTail = pxStreamBuffer->xTail; 80137e2: 68fb ldr r3, [r7, #12] 80137e4: 681b ldr r3, [r3, #0] 80137e6: 627b str r3, [r7, #36] @ 0x24 /* Calculate the number of bytes that can be read - which may be less than the number wanted if the data wraps around to the start of the buffer. */ xFirstLength = configMIN( pxStreamBuffer->xLength - xNextTail, xCount ); 80137e8: 68fb ldr r3, [r7, #12] 80137ea: 689a ldr r2, [r3, #8] 80137ec: 6a7b ldr r3, [r7, #36] @ 0x24 80137ee: 1ad3 subs r3, r2, r3 80137f0: 6a3a ldr r2, [r7, #32] 80137f2: 4293 cmp r3, r2 80137f4: bf28 it cs 80137f6: 4613 movcs r3, r2 80137f8: 61fb str r3, [r7, #28] /* Obtain the number of bytes it is possible to obtain in the first read. Asserts check bounds of read and write. */ configASSERT( xFirstLength <= xMaxCount ); 80137fa: 69fa ldr r2, [r7, #28] 80137fc: 687b ldr r3, [r7, #4] 80137fe: 429a cmp r2, r3 8013800: d90b bls.n 801381a __asm volatile 8013802: f04f 0350 mov.w r3, #80 @ 0x50 8013806: f383 8811 msr BASEPRI, r3 801380a: f3bf 8f6f isb sy 801380e: f3bf 8f4f dsb sy 8013812: 61bb str r3, [r7, #24] } 8013814: bf00 nop 8013816: bf00 nop 8013818: e7fd b.n 8013816 configASSERT( ( xNextTail + xFirstLength ) <= pxStreamBuffer->xLength ); 801381a: 6a7a ldr r2, [r7, #36] @ 0x24 801381c: 69fb ldr r3, [r7, #28] 801381e: 441a add r2, r3 8013820: 68fb ldr r3, [r7, #12] 8013822: 689b ldr r3, [r3, #8] 8013824: 429a cmp r2, r3 8013826: d90b bls.n 8013840 __asm volatile 8013828: f04f 0350 mov.w r3, #80 @ 0x50 801382c: f383 8811 msr BASEPRI, r3 8013830: f3bf 8f6f isb sy 8013834: f3bf 8f4f dsb sy 8013838: 617b str r3, [r7, #20] } 801383a: bf00 nop 801383c: bf00 nop 801383e: e7fd b.n 801383c ( void ) memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xNextTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 8013840: 68fb ldr r3, [r7, #12] 8013842: 699a ldr r2, [r3, #24] 8013844: 6a7b ldr r3, [r7, #36] @ 0x24 8013846: 4413 add r3, r2 8013848: 69fa ldr r2, [r7, #28] 801384a: 4619 mov r1, r3 801384c: 68b8 ldr r0, [r7, #8] 801384e: f017 fa96 bl 802ad7e /* If the total number of wanted bytes is greater than the number that could be read in the first read... */ if( xCount > xFirstLength ) 8013852: 6a3a ldr r2, [r7, #32] 8013854: 69fb ldr r3, [r7, #28] 8013856: 429a cmp r2, r3 8013858: d91a bls.n 8013890 { /*...then read the remaining bytes from the start of the buffer. */ configASSERT( xCount <= xMaxCount ); 801385a: 6a3a ldr r2, [r7, #32] 801385c: 687b ldr r3, [r7, #4] 801385e: 429a cmp r2, r3 8013860: d90b bls.n 801387a __asm volatile 8013862: f04f 0350 mov.w r3, #80 @ 0x50 8013866: f383 8811 msr BASEPRI, r3 801386a: f3bf 8f6f isb sy 801386e: f3bf 8f4f dsb sy 8013872: 613b str r3, [r7, #16] } 8013874: bf00 nop 8013876: bf00 nop 8013878: e7fd b.n 8013876 ( void ) memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 801387a: 68ba ldr r2, [r7, #8] 801387c: 69fb ldr r3, [r7, #28] 801387e: 18d0 adds r0, r2, r3 8013880: 68fb ldr r3, [r7, #12] 8013882: 6999 ldr r1, [r3, #24] 8013884: 6a3a ldr r2, [r7, #32] 8013886: 69fb ldr r3, [r7, #28] 8013888: 1ad3 subs r3, r2, r3 801388a: 461a mov r2, r3 801388c: f017 fa77 bl 802ad7e mtCOVERAGE_TEST_MARKER(); } /* Move the tail pointer to effectively remove the data read from the buffer. */ xNextTail += xCount; 8013890: 6a7a ldr r2, [r7, #36] @ 0x24 8013892: 6a3b ldr r3, [r7, #32] 8013894: 4413 add r3, r2 8013896: 627b str r3, [r7, #36] @ 0x24 if( xNextTail >= pxStreamBuffer->xLength ) 8013898: 68fb ldr r3, [r7, #12] 801389a: 689b ldr r3, [r3, #8] 801389c: 6a7a ldr r2, [r7, #36] @ 0x24 801389e: 429a cmp r2, r3 80138a0: d304 bcc.n 80138ac { xNextTail -= pxStreamBuffer->xLength; 80138a2: 68fb ldr r3, [r7, #12] 80138a4: 689b ldr r3, [r3, #8] 80138a6: 6a7a ldr r2, [r7, #36] @ 0x24 80138a8: 1ad3 subs r3, r2, r3 80138aa: 627b str r3, [r7, #36] @ 0x24 } pxStreamBuffer->xTail = xNextTail; 80138ac: 68fb ldr r3, [r7, #12] 80138ae: 6a7a ldr r2, [r7, #36] @ 0x24 80138b0: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 80138b2: 6a3b ldr r3, [r7, #32] } 80138b4: 4618 mov r0, r3 80138b6: 3728 adds r7, #40 @ 0x28 80138b8: 46bd mov sp, r7 80138ba: bd80 pop {r7, pc} 080138bc : /*-----------------------------------------------------------*/ static size_t prvBytesInBuffer( const StreamBuffer_t * const pxStreamBuffer ) { 80138bc: b480 push {r7} 80138be: b085 sub sp, #20 80138c0: af00 add r7, sp, #0 80138c2: 6078 str r0, [r7, #4] /* Returns the distance between xTail and xHead. */ size_t xCount; xCount = pxStreamBuffer->xLength + pxStreamBuffer->xHead; 80138c4: 687b ldr r3, [r7, #4] 80138c6: 689a ldr r2, [r3, #8] 80138c8: 687b ldr r3, [r7, #4] 80138ca: 685b ldr r3, [r3, #4] 80138cc: 4413 add r3, r2 80138ce: 60fb str r3, [r7, #12] xCount -= pxStreamBuffer->xTail; 80138d0: 687b ldr r3, [r7, #4] 80138d2: 681b ldr r3, [r3, #0] 80138d4: 68fa ldr r2, [r7, #12] 80138d6: 1ad3 subs r3, r2, r3 80138d8: 60fb str r3, [r7, #12] if ( xCount >= pxStreamBuffer->xLength ) 80138da: 687b ldr r3, [r7, #4] 80138dc: 689b ldr r3, [r3, #8] 80138de: 68fa ldr r2, [r7, #12] 80138e0: 429a cmp r2, r3 80138e2: d304 bcc.n 80138ee { xCount -= pxStreamBuffer->xLength; 80138e4: 687b ldr r3, [r7, #4] 80138e6: 689b ldr r3, [r3, #8] 80138e8: 68fa ldr r2, [r7, #12] 80138ea: 1ad3 subs r3, r2, r3 80138ec: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 80138ee: 68fb ldr r3, [r7, #12] } 80138f0: 4618 mov r0, r3 80138f2: 3714 adds r7, #20 80138f4: 46bd mov sp, r7 80138f6: f85d 7b04 ldr.w r7, [sp], #4 80138fa: 4770 bx lr 080138fc : static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags ) { 80138fc: b580 push {r7, lr} 80138fe: b086 sub sp, #24 8013900: af00 add r7, sp, #0 8013902: 60f8 str r0, [r7, #12] 8013904: 60b9 str r1, [r7, #8] 8013906: 607a str r2, [r7, #4] 8013908: 603b str r3, [r7, #0] #if( configASSERT_DEFINED == 1 ) { /* The value written just has to be identifiable when looking at the memory. Don't use 0xA5 as that is the stack fill value and could result in confusion as to what is actually being observed. */ const BaseType_t xWriteValue = 0x55; 801390a: 2355 movs r3, #85 @ 0x55 801390c: 617b str r3, [r7, #20] configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer ); 801390e: 687a ldr r2, [r7, #4] 8013910: 6979 ldr r1, [r7, #20] 8013912: 68b8 ldr r0, [r7, #8] 8013914: f017 f93c bl 802ab90 8013918: 4602 mov r2, r0 801391a: 68bb ldr r3, [r7, #8] 801391c: 4293 cmp r3, r2 801391e: d00b beq.n 8013938 __asm volatile 8013920: f04f 0350 mov.w r3, #80 @ 0x50 8013924: f383 8811 msr BASEPRI, r3 8013928: f3bf 8f6f isb sy 801392c: f3bf 8f4f dsb sy 8013930: 613b str r3, [r7, #16] } 8013932: bf00 nop 8013934: bf00 nop 8013936: e7fd b.n 8013934 } /*lint !e529 !e438 xWriteValue is only used if configASSERT() is defined. */ #endif ( void ) memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) ); /*lint !e9087 memset() requires void *. */ 8013938: 2224 movs r2, #36 @ 0x24 801393a: 2100 movs r1, #0 801393c: 68f8 ldr r0, [r7, #12] 801393e: f017 f927 bl 802ab90 pxStreamBuffer->pucBuffer = pucBuffer; 8013942: 68fb ldr r3, [r7, #12] 8013944: 68ba ldr r2, [r7, #8] 8013946: 619a str r2, [r3, #24] pxStreamBuffer->xLength = xBufferSizeBytes; 8013948: 68fb ldr r3, [r7, #12] 801394a: 687a ldr r2, [r7, #4] 801394c: 609a str r2, [r3, #8] pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes; 801394e: 68fb ldr r3, [r7, #12] 8013950: 683a ldr r2, [r7, #0] 8013952: 60da str r2, [r3, #12] pxStreamBuffer->ucFlags = ucFlags; 8013954: 68fb ldr r3, [r7, #12] 8013956: f897 2020 ldrb.w r2, [r7, #32] 801395a: 771a strb r2, [r3, #28] } 801395c: bf00 nop 801395e: 3718 adds r7, #24 8013960: 46bd mov sp, r7 8013962: bd80 pop {r7, pc} 08013964 : const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer ) { 8013964: b580 push {r7, lr} 8013966: b08e sub sp, #56 @ 0x38 8013968: af04 add r7, sp, #16 801396a: 60f8 str r0, [r7, #12] 801396c: 60b9 str r1, [r7, #8] 801396e: 607a str r2, [r7, #4] 8013970: 603b str r3, [r7, #0] TCB_t *pxNewTCB; TaskHandle_t xReturn; configASSERT( puxStackBuffer != NULL ); 8013972: 6b7b ldr r3, [r7, #52] @ 0x34 8013974: 2b00 cmp r3, #0 8013976: d10b bne.n 8013990 __asm volatile 8013978: f04f 0350 mov.w r3, #80 @ 0x50 801397c: f383 8811 msr BASEPRI, r3 8013980: f3bf 8f6f isb sy 8013984: f3bf 8f4f dsb sy 8013988: 623b str r3, [r7, #32] } 801398a: bf00 nop 801398c: bf00 nop 801398e: e7fd b.n 801398c configASSERT( pxTaskBuffer != NULL ); 8013990: 6bbb ldr r3, [r7, #56] @ 0x38 8013992: 2b00 cmp r3, #0 8013994: d10b bne.n 80139ae __asm volatile 8013996: f04f 0350 mov.w r3, #80 @ 0x50 801399a: f383 8811 msr BASEPRI, r3 801399e: f3bf 8f6f isb sy 80139a2: f3bf 8f4f dsb sy 80139a6: 61fb str r3, [r7, #28] } 80139a8: bf00 nop 80139aa: bf00 nop 80139ac: e7fd b.n 80139aa #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 ); 80139ae: 23a8 movs r3, #168 @ 0xa8 80139b0: 613b str r3, [r7, #16] configASSERT( xSize == sizeof( TCB_t ) ); 80139b2: 693b ldr r3, [r7, #16] 80139b4: 2ba8 cmp r3, #168 @ 0xa8 80139b6: d00b beq.n 80139d0 __asm volatile 80139b8: f04f 0350 mov.w r3, #80 @ 0x50 80139bc: f383 8811 msr BASEPRI, r3 80139c0: f3bf 8f6f isb sy 80139c4: f3bf 8f4f dsb sy 80139c8: 61bb str r3, [r7, #24] } 80139ca: bf00 nop 80139cc: bf00 nop 80139ce: e7fd b.n 80139cc ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */ 80139d0: 693b ldr r3, [r7, #16] } #endif /* configASSERT_DEFINED */ if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) ) 80139d2: 6bbb ldr r3, [r7, #56] @ 0x38 80139d4: 2b00 cmp r3, #0 80139d6: d01e beq.n 8013a16 80139d8: 6b7b ldr r3, [r7, #52] @ 0x34 80139da: 2b00 cmp r3, #0 80139dc: d01b beq.n 8013a16 { /* 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. */ 80139de: 6bbb ldr r3, [r7, #56] @ 0x38 80139e0: 627b str r3, [r7, #36] @ 0x24 pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer; 80139e2: 6a7b ldr r3, [r7, #36] @ 0x24 80139e4: 6b7a ldr r2, [r7, #52] @ 0x34 80139e6: 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; 80139e8: 6a7b ldr r3, [r7, #36] @ 0x24 80139ea: 2202 movs r2, #2 80139ec: f883 20a5 strb.w r2, [r3, #165] @ 0xa5 } #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */ prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL ); 80139f0: 2300 movs r3, #0 80139f2: 9303 str r3, [sp, #12] 80139f4: 6a7b ldr r3, [r7, #36] @ 0x24 80139f6: 9302 str r3, [sp, #8] 80139f8: f107 0314 add.w r3, r7, #20 80139fc: 9301 str r3, [sp, #4] 80139fe: 6b3b ldr r3, [r7, #48] @ 0x30 8013a00: 9300 str r3, [sp, #0] 8013a02: 683b ldr r3, [r7, #0] 8013a04: 687a ldr r2, [r7, #4] 8013a06: 68b9 ldr r1, [r7, #8] 8013a08: 68f8 ldr r0, [r7, #12] 8013a0a: f000 f851 bl 8013ab0 prvAddNewTaskToReadyList( pxNewTCB ); 8013a0e: 6a78 ldr r0, [r7, #36] @ 0x24 8013a10: f000 f8f6 bl 8013c00 8013a14: e001 b.n 8013a1a } else { xReturn = NULL; 8013a16: 2300 movs r3, #0 8013a18: 617b str r3, [r7, #20] } return xReturn; 8013a1a: 697b ldr r3, [r7, #20] } 8013a1c: 4618 mov r0, r3 8013a1e: 3728 adds r7, #40 @ 0x28 8013a20: 46bd mov sp, r7 8013a22: bd80 pop {r7, pc} 08013a24 : 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 ) { 8013a24: b580 push {r7, lr} 8013a26: b08c sub sp, #48 @ 0x30 8013a28: af04 add r7, sp, #16 8013a2a: 60f8 str r0, [r7, #12] 8013a2c: 60b9 str r1, [r7, #8] 8013a2e: 603b str r3, [r7, #0] 8013a30: 4613 mov r3, r2 8013a32: 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. */ 8013a34: 88fb ldrh r3, [r7, #6] 8013a36: 009b lsls r3, r3, #2 8013a38: 4618 mov r0, r3 8013a3a: f002 f8e7 bl 8015c0c 8013a3e: 6178 str r0, [r7, #20] if( pxStack != NULL ) 8013a40: 697b ldr r3, [r7, #20] 8013a42: 2b00 cmp r3, #0 8013a44: d00e beq.n 8013a64 { /* 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. */ 8013a46: 20a8 movs r0, #168 @ 0xa8 8013a48: f002 f8e0 bl 8015c0c 8013a4c: 61f8 str r0, [r7, #28] if( pxNewTCB != NULL ) 8013a4e: 69fb ldr r3, [r7, #28] 8013a50: 2b00 cmp r3, #0 8013a52: d003 beq.n 8013a5c { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 8013a54: 69fb ldr r3, [r7, #28] 8013a56: 697a ldr r2, [r7, #20] 8013a58: 631a str r2, [r3, #48] @ 0x30 8013a5a: e005 b.n 8013a68 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 8013a5c: 6978 ldr r0, [r7, #20] 8013a5e: f002 f9a3 bl 8015da8 8013a62: e001 b.n 8013a68 } } else { pxNewTCB = NULL; 8013a64: 2300 movs r3, #0 8013a66: 61fb str r3, [r7, #28] } } #endif /* portSTACK_GROWTH */ if( pxNewTCB != NULL ) 8013a68: 69fb ldr r3, [r7, #28] 8013a6a: 2b00 cmp r3, #0 8013a6c: d017 beq.n 8013a9e { #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; 8013a6e: 69fb ldr r3, [r7, #28] 8013a70: 2200 movs r2, #0 8013a72: f883 20a5 strb.w r2, [r3, #165] @ 0xa5 } #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */ prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL ); 8013a76: 88fa ldrh r2, [r7, #6] 8013a78: 2300 movs r3, #0 8013a7a: 9303 str r3, [sp, #12] 8013a7c: 69fb ldr r3, [r7, #28] 8013a7e: 9302 str r3, [sp, #8] 8013a80: 6afb ldr r3, [r7, #44] @ 0x2c 8013a82: 9301 str r3, [sp, #4] 8013a84: 6abb ldr r3, [r7, #40] @ 0x28 8013a86: 9300 str r3, [sp, #0] 8013a88: 683b ldr r3, [r7, #0] 8013a8a: 68b9 ldr r1, [r7, #8] 8013a8c: 68f8 ldr r0, [r7, #12] 8013a8e: f000 f80f bl 8013ab0 prvAddNewTaskToReadyList( pxNewTCB ); 8013a92: 69f8 ldr r0, [r7, #28] 8013a94: f000 f8b4 bl 8013c00 xReturn = pdPASS; 8013a98: 2301 movs r3, #1 8013a9a: 61bb str r3, [r7, #24] 8013a9c: e002 b.n 8013aa4 } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8013a9e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8013aa2: 61bb str r3, [r7, #24] } return xReturn; 8013aa4: 69bb ldr r3, [r7, #24] } 8013aa6: 4618 mov r0, r3 8013aa8: 3720 adds r7, #32 8013aaa: 46bd mov sp, r7 8013aac: bd80 pop {r7, pc} ... 08013ab0 : void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, TCB_t *pxNewTCB, const MemoryRegion_t * const xRegions ) { 8013ab0: b580 push {r7, lr} 8013ab2: b088 sub sp, #32 8013ab4: af00 add r7, sp, #0 8013ab6: 60f8 str r0, [r7, #12] 8013ab8: 60b9 str r1, [r7, #8] 8013aba: 607a str r2, [r7, #4] 8013abc: 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 ) ); 8013abe: 6b3b ldr r3, [r7, #48] @ 0x30 8013ac0: 6b18 ldr r0, [r3, #48] @ 0x30 8013ac2: 687b ldr r3, [r7, #4] 8013ac4: 009b lsls r3, r3, #2 8013ac6: 461a mov r2, r3 8013ac8: 21a5 movs r1, #165 @ 0xa5 8013aca: f017 f861 bl 802ab90 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 ] ); 8013ace: 6b3b ldr r3, [r7, #48] @ 0x30 8013ad0: 6b1a ldr r2, [r3, #48] @ 0x30 8013ad2: 6879 ldr r1, [r7, #4] 8013ad4: f06f 4340 mvn.w r3, #3221225472 @ 0xc0000000 8013ad8: 440b add r3, r1 8013ada: 009b lsls r3, r3, #2 8013adc: 4413 add r3, r2 8013ade: 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(). */ 8013ae0: 69bb ldr r3, [r7, #24] 8013ae2: f023 0307 bic.w r3, r3, #7 8013ae6: 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 ) ); 8013ae8: 69bb ldr r3, [r7, #24] 8013aea: f003 0307 and.w r3, r3, #7 8013aee: 2b00 cmp r3, #0 8013af0: d00b beq.n 8013b0a __asm volatile 8013af2: f04f 0350 mov.w r3, #80 @ 0x50 8013af6: f383 8811 msr BASEPRI, r3 8013afa: f3bf 8f6f isb sy 8013afe: f3bf 8f4f dsb sy 8013b02: 617b str r3, [r7, #20] } 8013b04: bf00 nop 8013b06: bf00 nop 8013b08: e7fd b.n 8013b06 pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 ); } #endif /* portSTACK_GROWTH */ /* Store the task name in the TCB. */ if( pcName != NULL ) 8013b0a: 68bb ldr r3, [r7, #8] 8013b0c: 2b00 cmp r3, #0 8013b0e: d01f beq.n 8013b50 { for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8013b10: 2300 movs r3, #0 8013b12: 61fb str r3, [r7, #28] 8013b14: e012 b.n 8013b3c { pxNewTCB->pcTaskName[ x ] = pcName[ x ]; 8013b16: 68ba ldr r2, [r7, #8] 8013b18: 69fb ldr r3, [r7, #28] 8013b1a: 4413 add r3, r2 8013b1c: 7819 ldrb r1, [r3, #0] 8013b1e: 6b3a ldr r2, [r7, #48] @ 0x30 8013b20: 69fb ldr r3, [r7, #28] 8013b22: 4413 add r3, r2 8013b24: 3334 adds r3, #52 @ 0x34 8013b26: 460a mov r2, r1 8013b28: 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 ) 8013b2a: 68ba ldr r2, [r7, #8] 8013b2c: 69fb ldr r3, [r7, #28] 8013b2e: 4413 add r3, r2 8013b30: 781b ldrb r3, [r3, #0] 8013b32: 2b00 cmp r3, #0 8013b34: d006 beq.n 8013b44 for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8013b36: 69fb ldr r3, [r7, #28] 8013b38: 3301 adds r3, #1 8013b3a: 61fb str r3, [r7, #28] 8013b3c: 69fb ldr r3, [r7, #28] 8013b3e: 2b0f cmp r3, #15 8013b40: d9e9 bls.n 8013b16 8013b42: e000 b.n 8013b46 { break; 8013b44: 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'; 8013b46: 6b3b ldr r3, [r7, #48] @ 0x30 8013b48: 2200 movs r2, #0 8013b4a: f883 2043 strb.w r2, [r3, #67] @ 0x43 8013b4e: e003 b.n 8013b58 } 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; 8013b50: 6b3b ldr r3, [r7, #48] @ 0x30 8013b52: 2200 movs r2, #0 8013b54: 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 ) 8013b58: 6abb ldr r3, [r7, #40] @ 0x28 8013b5a: 2b37 cmp r3, #55 @ 0x37 8013b5c: d901 bls.n 8013b62 { uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U; 8013b5e: 2337 movs r3, #55 @ 0x37 8013b60: 62bb str r3, [r7, #40] @ 0x28 else { mtCOVERAGE_TEST_MARKER(); } pxNewTCB->uxPriority = uxPriority; 8013b62: 6b3b ldr r3, [r7, #48] @ 0x30 8013b64: 6aba ldr r2, [r7, #40] @ 0x28 8013b66: 62da str r2, [r3, #44] @ 0x2c #if ( configUSE_MUTEXES == 1 ) { pxNewTCB->uxBasePriority = uxPriority; 8013b68: 6b3b ldr r3, [r7, #48] @ 0x30 8013b6a: 6aba ldr r2, [r7, #40] @ 0x28 8013b6c: 64da str r2, [r3, #76] @ 0x4c pxNewTCB->uxMutexesHeld = 0; 8013b6e: 6b3b ldr r3, [r7, #48] @ 0x30 8013b70: 2200 movs r2, #0 8013b72: 651a str r2, [r3, #80] @ 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxNewTCB->xStateListItem ) ); 8013b74: 6b3b ldr r3, [r7, #48] @ 0x30 8013b76: 3304 adds r3, #4 8013b78: 4618 mov r0, r3 8013b7a: f7fe f9a5 bl 8011ec8 vListInitialiseItem( &( pxNewTCB->xEventListItem ) ); 8013b7e: 6b3b ldr r3, [r7, #48] @ 0x30 8013b80: 3318 adds r3, #24 8013b82: 4618 mov r0, r3 8013b84: f7fe f9a0 bl 8011ec8 /* 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 ); 8013b88: 6b3b ldr r3, [r7, #48] @ 0x30 8013b8a: 6b3a ldr r2, [r7, #48] @ 0x30 8013b8c: 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. */ 8013b8e: 6abb ldr r3, [r7, #40] @ 0x28 8013b90: f1c3 0238 rsb r2, r3, #56 @ 0x38 8013b94: 6b3b ldr r3, [r7, #48] @ 0x30 8013b96: 619a str r2, [r3, #24] listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB ); 8013b98: 6b3b ldr r3, [r7, #48] @ 0x30 8013b9a: 6b3a ldr r2, [r7, #48] @ 0x30 8013b9c: 625a str r2, [r3, #36] @ 0x24 } #endif #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxNewTCB->ulNotifiedValue = 0; 8013b9e: 6b3b ldr r3, [r7, #48] @ 0x30 8013ba0: 2200 movs r2, #0 8013ba2: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8013ba6: 6b3b ldr r3, [r7, #48] @ 0x30 8013ba8: 2200 movs r2, #0 8013baa: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 #if ( configUSE_NEWLIB_REENTRANT == 1 ) { /* Initialise this task's Newlib reent structure. See the third party link http://www.nadler.com/embedded/newlibAndFreeRTOS.html for additional information. */ _REENT_INIT_PTR( ( &( pxNewTCB->xNewLib_reent ) ) ); 8013bae: 6b3b ldr r3, [r7, #48] @ 0x30 8013bb0: 3354 adds r3, #84 @ 0x54 8013bb2: 224c movs r2, #76 @ 0x4c 8013bb4: 2100 movs r1, #0 8013bb6: 4618 mov r0, r3 8013bb8: f016 ffea bl 802ab90 8013bbc: 6b3b ldr r3, [r7, #48] @ 0x30 8013bbe: 4a0d ldr r2, [pc, #52] @ (8013bf4 ) 8013bc0: 659a str r2, [r3, #88] @ 0x58 8013bc2: 6b3b ldr r3, [r7, #48] @ 0x30 8013bc4: 4a0c ldr r2, [pc, #48] @ (8013bf8 ) 8013bc6: 65da str r2, [r3, #92] @ 0x5c 8013bc8: 6b3b ldr r3, [r7, #48] @ 0x30 8013bca: 4a0c ldr r2, [pc, #48] @ (8013bfc ) 8013bcc: 661a str r2, [r3, #96] @ 0x60 } #endif /* portSTACK_GROWTH */ } #else /* portHAS_STACK_OVERFLOW_CHECKING */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 8013bce: 683a ldr r2, [r7, #0] 8013bd0: 68f9 ldr r1, [r7, #12] 8013bd2: 69b8 ldr r0, [r7, #24] 8013bd4: f001 fdca bl 801576c 8013bd8: 4602 mov r2, r0 8013bda: 6b3b ldr r3, [r7, #48] @ 0x30 8013bdc: 601a str r2, [r3, #0] } #endif /* portHAS_STACK_OVERFLOW_CHECKING */ } #endif /* portUSING_MPU_WRAPPERS */ if( pxCreatedTask != NULL ) 8013bde: 6afb ldr r3, [r7, #44] @ 0x2c 8013be0: 2b00 cmp r3, #0 8013be2: d002 beq.n 8013bea { /* 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; 8013be4: 6afb ldr r3, [r7, #44] @ 0x2c 8013be6: 6b3a ldr r2, [r7, #48] @ 0x30 8013be8: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8013bea: bf00 nop 8013bec: 3720 adds r7, #32 8013bee: 46bd mov sp, r7 8013bf0: bd80 pop {r7, pc} 8013bf2: bf00 nop 8013bf4: 2402b124 .word 0x2402b124 8013bf8: 2402b18c .word 0x2402b18c 8013bfc: 2402b1f4 .word 0x2402b1f4 08013c00 : /*-----------------------------------------------------------*/ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) { 8013c00: b580 push {r7, lr} 8013c02: b082 sub sp, #8 8013c04: af00 add r7, sp, #0 8013c06: 6078 str r0, [r7, #4] /* Ensure interrupts don't access the task lists while the lists are being updated. */ taskENTER_CRITICAL(); 8013c08: f001 fede bl 80159c8 { uxCurrentNumberOfTasks++; 8013c0c: 4b2d ldr r3, [pc, #180] @ (8013cc4 ) 8013c0e: 681b ldr r3, [r3, #0] 8013c10: 3301 adds r3, #1 8013c12: 4a2c ldr r2, [pc, #176] @ (8013cc4 ) 8013c14: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8013c16: 4b2c ldr r3, [pc, #176] @ (8013cc8 ) 8013c18: 681b ldr r3, [r3, #0] 8013c1a: 2b00 cmp r3, #0 8013c1c: d109 bne.n 8013c32 { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 8013c1e: 4a2a ldr r2, [pc, #168] @ (8013cc8 ) 8013c20: 687b ldr r3, [r7, #4] 8013c22: 6013 str r3, [r2, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8013c24: 4b27 ldr r3, [pc, #156] @ (8013cc4 ) 8013c26: 681b ldr r3, [r3, #0] 8013c28: 2b01 cmp r3, #1 8013c2a: d110 bne.n 8013c4e { /* 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(); 8013c2c: f000 fc76 bl 801451c 8013c30: e00d b.n 8013c4e 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 ) 8013c32: 4b26 ldr r3, [pc, #152] @ (8013ccc ) 8013c34: 681b ldr r3, [r3, #0] 8013c36: 2b00 cmp r3, #0 8013c38: d109 bne.n 8013c4e { if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) 8013c3a: 4b23 ldr r3, [pc, #140] @ (8013cc8 ) 8013c3c: 681b ldr r3, [r3, #0] 8013c3e: 6ada ldr r2, [r3, #44] @ 0x2c 8013c40: 687b ldr r3, [r7, #4] 8013c42: 6adb ldr r3, [r3, #44] @ 0x2c 8013c44: 429a cmp r2, r3 8013c46: d802 bhi.n 8013c4e { pxCurrentTCB = pxNewTCB; 8013c48: 4a1f ldr r2, [pc, #124] @ (8013cc8 ) 8013c4a: 687b ldr r3, [r7, #4] 8013c4c: 6013 str r3, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 8013c4e: 4b20 ldr r3, [pc, #128] @ (8013cd0 ) 8013c50: 681b ldr r3, [r3, #0] 8013c52: 3301 adds r3, #1 8013c54: 4a1e ldr r2, [pc, #120] @ (8013cd0 ) 8013c56: 6013 str r3, [r2, #0] #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 8013c58: 4b1d ldr r3, [pc, #116] @ (8013cd0 ) 8013c5a: 681a ldr r2, [r3, #0] 8013c5c: 687b ldr r3, [r7, #4] 8013c5e: 645a str r2, [r3, #68] @ 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 8013c60: 687b ldr r3, [r7, #4] 8013c62: 6ada ldr r2, [r3, #44] @ 0x2c 8013c64: 4b1b ldr r3, [pc, #108] @ (8013cd4 ) 8013c66: 681b ldr r3, [r3, #0] 8013c68: 429a cmp r2, r3 8013c6a: d903 bls.n 8013c74 8013c6c: 687b ldr r3, [r7, #4] 8013c6e: 6adb ldr r3, [r3, #44] @ 0x2c 8013c70: 4a18 ldr r2, [pc, #96] @ (8013cd4 ) 8013c72: 6013 str r3, [r2, #0] 8013c74: 687b ldr r3, [r7, #4] 8013c76: 6ada ldr r2, [r3, #44] @ 0x2c 8013c78: 4613 mov r3, r2 8013c7a: 009b lsls r3, r3, #2 8013c7c: 4413 add r3, r2 8013c7e: 009b lsls r3, r3, #2 8013c80: 4a15 ldr r2, [pc, #84] @ (8013cd8 ) 8013c82: 441a add r2, r3 8013c84: 687b ldr r3, [r7, #4] 8013c86: 3304 adds r3, #4 8013c88: 4619 mov r1, r3 8013c8a: 4610 mov r0, r2 8013c8c: f7fe f929 bl 8011ee2 portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 8013c90: f001 fecc bl 8015a2c if( xSchedulerRunning != pdFALSE ) 8013c94: 4b0d ldr r3, [pc, #52] @ (8013ccc ) 8013c96: 681b ldr r3, [r3, #0] 8013c98: 2b00 cmp r3, #0 8013c9a: d00e beq.n 8013cba { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority ) 8013c9c: 4b0a ldr r3, [pc, #40] @ (8013cc8 ) 8013c9e: 681b ldr r3, [r3, #0] 8013ca0: 6ada ldr r2, [r3, #44] @ 0x2c 8013ca2: 687b ldr r3, [r7, #4] 8013ca4: 6adb ldr r3, [r3, #44] @ 0x2c 8013ca6: 429a cmp r2, r3 8013ca8: d207 bcs.n 8013cba { taskYIELD_IF_USING_PREEMPTION(); 8013caa: 4b0c ldr r3, [pc, #48] @ (8013cdc ) 8013cac: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013cb0: 601a str r2, [r3, #0] 8013cb2: f3bf 8f4f dsb sy 8013cb6: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8013cba: bf00 nop 8013cbc: 3708 adds r7, #8 8013cbe: 46bd mov sp, r7 8013cc0: bd80 pop {r7, pc} 8013cc2: bf00 nop 8013cc4: 24004244 .word 0x24004244 8013cc8: 24003d70 .word 0x24003d70 8013ccc: 24004250 .word 0x24004250 8013cd0: 24004260 .word 0x24004260 8013cd4: 2400424c .word 0x2400424c 8013cd8: 24003d74 .word 0x24003d74 8013cdc: e000ed04 .word 0xe000ed04 08013ce0 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 8013ce0: b580 push {r7, lr} 8013ce2: b084 sub sp, #16 8013ce4: af00 add r7, sp, #0 8013ce6: 6078 str r0, [r7, #4] BaseType_t xAlreadyYielded = pdFALSE; 8013ce8: 2300 movs r3, #0 8013cea: 60fb str r3, [r7, #12] /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) 8013cec: 687b ldr r3, [r7, #4] 8013cee: 2b00 cmp r3, #0 8013cf0: d018 beq.n 8013d24 { configASSERT( uxSchedulerSuspended == 0 ); 8013cf2: 4b14 ldr r3, [pc, #80] @ (8013d44 ) 8013cf4: 681b ldr r3, [r3, #0] 8013cf6: 2b00 cmp r3, #0 8013cf8: d00b beq.n 8013d12 __asm volatile 8013cfa: f04f 0350 mov.w r3, #80 @ 0x50 8013cfe: f383 8811 msr BASEPRI, r3 8013d02: f3bf 8f6f isb sy 8013d06: f3bf 8f4f dsb sy 8013d0a: 60bb str r3, [r7, #8] } 8013d0c: bf00 nop 8013d0e: bf00 nop 8013d10: e7fd b.n 8013d0e vTaskSuspendAll(); 8013d12: f000 f88b bl 8013e2c 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 ); 8013d16: 2100 movs r1, #0 8013d18: 6878 ldr r0, [r7, #4] 8013d1a: f001 f88f bl 8014e3c } xAlreadyYielded = xTaskResumeAll(); 8013d1e: f000 f893 bl 8013e48 8013d22: 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 ) 8013d24: 68fb ldr r3, [r7, #12] 8013d26: 2b00 cmp r3, #0 8013d28: d107 bne.n 8013d3a { portYIELD_WITHIN_API(); 8013d2a: 4b07 ldr r3, [pc, #28] @ (8013d48 ) 8013d2c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013d30: 601a str r2, [r3, #0] 8013d32: f3bf 8f4f dsb sy 8013d36: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8013d3a: bf00 nop 8013d3c: 3710 adds r7, #16 8013d3e: 46bd mov sp, r7 8013d40: bd80 pop {r7, pc} 8013d42: bf00 nop 8013d44: 2400426c .word 0x2400426c 8013d48: e000ed04 .word 0xe000ed04 08013d4c : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 8013d4c: b580 push {r7, lr} 8013d4e: b08a sub sp, #40 @ 0x28 8013d50: 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; 8013d52: 2300 movs r3, #0 8013d54: 60bb str r3, [r7, #8] StackType_t *pxIdleTaskStackBuffer = NULL; 8013d56: 2300 movs r3, #0 8013d58: 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 ); 8013d5a: 463a mov r2, r7 8013d5c: 1d39 adds r1, r7, #4 8013d5e: f107 0308 add.w r3, r7, #8 8013d62: 4618 mov r0, r3 8013d64: f7fe f85c bl 8011e20 xIdleTaskHandle = xTaskCreateStatic( prvIdleTask, 8013d68: 6839 ldr r1, [r7, #0] 8013d6a: 687b ldr r3, [r7, #4] 8013d6c: 68ba ldr r2, [r7, #8] 8013d6e: 9202 str r2, [sp, #8] 8013d70: 9301 str r3, [sp, #4] 8013d72: 2300 movs r3, #0 8013d74: 9300 str r3, [sp, #0] 8013d76: 2300 movs r3, #0 8013d78: 460a mov r2, r1 8013d7a: 4924 ldr r1, [pc, #144] @ (8013e0c ) 8013d7c: 4824 ldr r0, [pc, #144] @ (8013e10 ) 8013d7e: f7ff fdf1 bl 8013964 8013d82: 4603 mov r3, r0 8013d84: 4a23 ldr r2, [pc, #140] @ (8013e14 ) 8013d86: 6013 str r3, [r2, #0] ( void * ) NULL, /*lint !e961. The cast is not redundant for all compilers. */ portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */ pxIdleTaskStackBuffer, pxIdleTaskTCBBuffer ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ if( xIdleTaskHandle != NULL ) 8013d88: 4b22 ldr r3, [pc, #136] @ (8013e14 ) 8013d8a: 681b ldr r3, [r3, #0] 8013d8c: 2b00 cmp r3, #0 8013d8e: d002 beq.n 8013d96 { xReturn = pdPASS; 8013d90: 2301 movs r3, #1 8013d92: 617b str r3, [r7, #20] 8013d94: e001 b.n 8013d9a } else { xReturn = pdFAIL; 8013d96: 2300 movs r3, #0 8013d98: 617b str r3, [r7, #20] } #endif /* configSUPPORT_STATIC_ALLOCATION */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 8013d9a: 697b ldr r3, [r7, #20] 8013d9c: 2b01 cmp r3, #1 8013d9e: d102 bne.n 8013da6 { xReturn = xTimerCreateTimerTask(); 8013da0: f001 f8a0 bl 8014ee4 8013da4: 6178 str r0, [r7, #20] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 8013da6: 697b ldr r3, [r7, #20] 8013da8: 2b01 cmp r3, #1 8013daa: d11b bne.n 8013de4 __asm volatile 8013dac: f04f 0350 mov.w r3, #80 @ 0x50 8013db0: f383 8811 msr BASEPRI, r3 8013db4: f3bf 8f6f isb sy 8013db8: f3bf 8f4f dsb sy 8013dbc: 613b str r3, [r7, #16] } 8013dbe: bf00 nop { /* Switch Newlib's _impure_ptr variable to point to the _reent structure specific to the task that will run first. See the third party link http://www.nadler.com/embedded/newlibAndFreeRTOS.html for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 8013dc0: 4b15 ldr r3, [pc, #84] @ (8013e18 ) 8013dc2: 681b ldr r3, [r3, #0] 8013dc4: 3354 adds r3, #84 @ 0x54 8013dc6: 4a15 ldr r2, [pc, #84] @ (8013e1c ) 8013dc8: 6013 str r3, [r2, #0] } #endif /* configUSE_NEWLIB_REENTRANT */ xNextTaskUnblockTime = portMAX_DELAY; 8013dca: 4b15 ldr r3, [pc, #84] @ (8013e20 ) 8013dcc: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8013dd0: 601a str r2, [r3, #0] xSchedulerRunning = pdTRUE; 8013dd2: 4b14 ldr r3, [pc, #80] @ (8013e24 ) 8013dd4: 2201 movs r2, #1 8013dd6: 601a str r2, [r3, #0] xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT; 8013dd8: 4b13 ldr r3, [pc, #76] @ (8013e28 ) 8013dda: 2200 movs r2, #0 8013ddc: 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 ) 8013dde: f001 fd4f bl 8015880 } /* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0, meaning xIdleTaskHandle is not used anywhere else. */ ( void ) xIdleTaskHandle; } 8013de2: e00f b.n 8013e04 configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); 8013de4: 697b ldr r3, [r7, #20] 8013de6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013dea: d10b bne.n 8013e04 __asm volatile 8013dec: f04f 0350 mov.w r3, #80 @ 0x50 8013df0: f383 8811 msr BASEPRI, r3 8013df4: f3bf 8f6f isb sy 8013df8: f3bf 8f4f dsb sy 8013dfc: 60fb str r3, [r7, #12] } 8013dfe: bf00 nop 8013e00: bf00 nop 8013e02: e7fd b.n 8013e00 } 8013e04: bf00 nop 8013e06: 3718 adds r7, #24 8013e08: 46bd mov sp, r7 8013e0a: bd80 pop {r7, pc} 8013e0c: 0802db6c .word 0x0802db6c 8013e10: 080144ed .word 0x080144ed 8013e14: 24004268 .word 0x24004268 8013e18: 24003d70 .word 0x24003d70 8013e1c: 240001d4 .word 0x240001d4 8013e20: 24004264 .word 0x24004264 8013e24: 24004250 .word 0x24004250 8013e28: 24004248 .word 0x24004248 08013e2c : vPortEndScheduler(); } /*----------------------------------------------------------*/ void vTaskSuspendAll( void ) { 8013e2c: b480 push {r7} 8013e2e: af00 add r7, sp, #0 do not otherwise exhibit real time behaviour. */ portSOFTWARE_BARRIER(); /* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment is used to allow calls to vTaskSuspendAll() to nest. */ ++uxSchedulerSuspended; 8013e30: 4b04 ldr r3, [pc, #16] @ (8013e44 ) 8013e32: 681b ldr r3, [r3, #0] 8013e34: 3301 adds r3, #1 8013e36: 4a03 ldr r2, [pc, #12] @ (8013e44 ) 8013e38: 6013 str r3, [r2, #0] /* Enforces ordering for ports and optimised compilers that may otherwise place the above increment elsewhere. */ portMEMORY_BARRIER(); } 8013e3a: bf00 nop 8013e3c: 46bd mov sp, r7 8013e3e: f85d 7b04 ldr.w r7, [sp], #4 8013e42: 4770 bx lr 8013e44: 2400426c .word 0x2400426c 08013e48 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 8013e48: b580 push {r7, lr} 8013e4a: b084 sub sp, #16 8013e4c: af00 add r7, sp, #0 TCB_t *pxTCB = NULL; 8013e4e: 2300 movs r3, #0 8013e50: 60fb str r3, [r7, #12] BaseType_t xAlreadyYielded = pdFALSE; 8013e52: 2300 movs r3, #0 8013e54: 60bb str r3, [r7, #8] /* If uxSchedulerSuspended is zero then this function does not match a previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); 8013e56: 4b42 ldr r3, [pc, #264] @ (8013f60 ) 8013e58: 681b ldr r3, [r3, #0] 8013e5a: 2b00 cmp r3, #0 8013e5c: d10b bne.n 8013e76 __asm volatile 8013e5e: f04f 0350 mov.w r3, #80 @ 0x50 8013e62: f383 8811 msr BASEPRI, r3 8013e66: f3bf 8f6f isb sy 8013e6a: f3bf 8f4f dsb sy 8013e6e: 603b str r3, [r7, #0] } 8013e70: bf00 nop 8013e72: bf00 nop 8013e74: e7fd b.n 8013e72 /* 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(); 8013e76: f001 fda7 bl 80159c8 { --uxSchedulerSuspended; 8013e7a: 4b39 ldr r3, [pc, #228] @ (8013f60 ) 8013e7c: 681b ldr r3, [r3, #0] 8013e7e: 3b01 subs r3, #1 8013e80: 4a37 ldr r2, [pc, #220] @ (8013f60 ) 8013e82: 6013 str r3, [r2, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8013e84: 4b36 ldr r3, [pc, #216] @ (8013f60 ) 8013e86: 681b ldr r3, [r3, #0] 8013e88: 2b00 cmp r3, #0 8013e8a: d162 bne.n 8013f52 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 8013e8c: 4b35 ldr r3, [pc, #212] @ (8013f64 ) 8013e8e: 681b ldr r3, [r3, #0] 8013e90: 2b00 cmp r3, #0 8013e92: d05e beq.n 8013f52 { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8013e94: e02f b.n 8013ef6 { 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. */ 8013e96: 4b34 ldr r3, [pc, #208] @ (8013f68 ) 8013e98: 68db ldr r3, [r3, #12] 8013e9a: 68db ldr r3, [r3, #12] 8013e9c: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8013e9e: 68fb ldr r3, [r7, #12] 8013ea0: 3318 adds r3, #24 8013ea2: 4618 mov r0, r3 8013ea4: f7fe f87a bl 8011f9c ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8013ea8: 68fb ldr r3, [r7, #12] 8013eaa: 3304 adds r3, #4 8013eac: 4618 mov r0, r3 8013eae: f7fe f875 bl 8011f9c prvAddTaskToReadyList( pxTCB ); 8013eb2: 68fb ldr r3, [r7, #12] 8013eb4: 6ada ldr r2, [r3, #44] @ 0x2c 8013eb6: 4b2d ldr r3, [pc, #180] @ (8013f6c ) 8013eb8: 681b ldr r3, [r3, #0] 8013eba: 429a cmp r2, r3 8013ebc: d903 bls.n 8013ec6 8013ebe: 68fb ldr r3, [r7, #12] 8013ec0: 6adb ldr r3, [r3, #44] @ 0x2c 8013ec2: 4a2a ldr r2, [pc, #168] @ (8013f6c ) 8013ec4: 6013 str r3, [r2, #0] 8013ec6: 68fb ldr r3, [r7, #12] 8013ec8: 6ada ldr r2, [r3, #44] @ 0x2c 8013eca: 4613 mov r3, r2 8013ecc: 009b lsls r3, r3, #2 8013ece: 4413 add r3, r2 8013ed0: 009b lsls r3, r3, #2 8013ed2: 4a27 ldr r2, [pc, #156] @ (8013f70 ) 8013ed4: 441a add r2, r3 8013ed6: 68fb ldr r3, [r7, #12] 8013ed8: 3304 adds r3, #4 8013eda: 4619 mov r1, r3 8013edc: 4610 mov r0, r2 8013ede: f7fe f800 bl 8011ee2 /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8013ee2: 68fb ldr r3, [r7, #12] 8013ee4: 6ada ldr r2, [r3, #44] @ 0x2c 8013ee6: 4b23 ldr r3, [pc, #140] @ (8013f74 ) 8013ee8: 681b ldr r3, [r3, #0] 8013eea: 6adb ldr r3, [r3, #44] @ 0x2c 8013eec: 429a cmp r2, r3 8013eee: d302 bcc.n 8013ef6 { xYieldPending = pdTRUE; 8013ef0: 4b21 ldr r3, [pc, #132] @ (8013f78 ) 8013ef2: 2201 movs r2, #1 8013ef4: 601a str r2, [r3, #0] while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8013ef6: 4b1c ldr r3, [pc, #112] @ (8013f68 ) 8013ef8: 681b ldr r3, [r3, #0] 8013efa: 2b00 cmp r3, #0 8013efc: d1cb bne.n 8013e96 { mtCOVERAGE_TEST_MARKER(); } } if( pxTCB != NULL ) 8013efe: 68fb ldr r3, [r7, #12] 8013f00: 2b00 cmp r3, #0 8013f02: d001 beq.n 8013f08 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(); 8013f04: f000 fbae bl 8014664 /* If any ticks occurred while the scheduler was suspended then they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */ { TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */ 8013f08: 4b1c ldr r3, [pc, #112] @ (8013f7c ) 8013f0a: 681b ldr r3, [r3, #0] 8013f0c: 607b str r3, [r7, #4] if( xPendedCounts > ( TickType_t ) 0U ) 8013f0e: 687b ldr r3, [r7, #4] 8013f10: 2b00 cmp r3, #0 8013f12: d010 beq.n 8013f36 { do { if( xTaskIncrementTick() != pdFALSE ) 8013f14: f000 f858 bl 8013fc8 8013f18: 4603 mov r3, r0 8013f1a: 2b00 cmp r3, #0 8013f1c: d002 beq.n 8013f24 { xYieldPending = pdTRUE; 8013f1e: 4b16 ldr r3, [pc, #88] @ (8013f78 ) 8013f20: 2201 movs r2, #1 8013f22: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } --xPendedCounts; 8013f24: 687b ldr r3, [r7, #4] 8013f26: 3b01 subs r3, #1 8013f28: 607b str r3, [r7, #4] } while( xPendedCounts > ( TickType_t ) 0U ); 8013f2a: 687b ldr r3, [r7, #4] 8013f2c: 2b00 cmp r3, #0 8013f2e: d1f1 bne.n 8013f14 xPendedTicks = 0; 8013f30: 4b12 ldr r3, [pc, #72] @ (8013f7c ) 8013f32: 2200 movs r2, #0 8013f34: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } if( xYieldPending != pdFALSE ) 8013f36: 4b10 ldr r3, [pc, #64] @ (8013f78 ) 8013f38: 681b ldr r3, [r3, #0] 8013f3a: 2b00 cmp r3, #0 8013f3c: d009 beq.n 8013f52 { #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; 8013f3e: 2301 movs r3, #1 8013f40: 60bb str r3, [r7, #8] } #endif taskYIELD_IF_USING_PREEMPTION(); 8013f42: 4b0f ldr r3, [pc, #60] @ (8013f80 ) 8013f44: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013f48: 601a str r2, [r3, #0] 8013f4a: f3bf 8f4f dsb sy 8013f4e: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8013f52: f001 fd6b bl 8015a2c return xAlreadyYielded; 8013f56: 68bb ldr r3, [r7, #8] } 8013f58: 4618 mov r0, r3 8013f5a: 3710 adds r7, #16 8013f5c: 46bd mov sp, r7 8013f5e: bd80 pop {r7, pc} 8013f60: 2400426c .word 0x2400426c 8013f64: 24004244 .word 0x24004244 8013f68: 24004204 .word 0x24004204 8013f6c: 2400424c .word 0x2400424c 8013f70: 24003d74 .word 0x24003d74 8013f74: 24003d70 .word 0x24003d70 8013f78: 24004258 .word 0x24004258 8013f7c: 24004254 .word 0x24004254 8013f80: e000ed04 .word 0xe000ed04 08013f84 : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCount( void ) { 8013f84: b480 push {r7} 8013f86: b083 sub sp, #12 8013f88: af00 add r7, sp, #0 TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 8013f8a: 4b05 ldr r3, [pc, #20] @ (8013fa0 ) 8013f8c: 681b ldr r3, [r3, #0] 8013f8e: 607b str r3, [r7, #4] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; 8013f90: 687b ldr r3, [r7, #4] } 8013f92: 4618 mov r0, r3 8013f94: 370c adds r7, #12 8013f96: 46bd mov sp, r7 8013f98: f85d 7b04 ldr.w r7, [sp], #4 8013f9c: 4770 bx lr 8013f9e: bf00 nop 8013fa0: 24004248 .word 0x24004248 08013fa4 : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCountFromISR( void ) { 8013fa4: b580 push {r7, lr} 8013fa6: b082 sub sp, #8 8013fa8: 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(); 8013faa: f001 fded bl 8015b88 uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR(); 8013fae: 2300 movs r3, #0 8013fb0: 607b str r3, [r7, #4] { xReturn = xTickCount; 8013fb2: 4b04 ldr r3, [pc, #16] @ (8013fc4 ) 8013fb4: 681b ldr r3, [r3, #0] 8013fb6: 603b str r3, [r7, #0] } portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8013fb8: 683b ldr r3, [r7, #0] } 8013fba: 4618 mov r0, r3 8013fbc: 3708 adds r7, #8 8013fbe: 46bd mov sp, r7 8013fc0: bd80 pop {r7, pc} 8013fc2: bf00 nop 8013fc4: 24004248 .word 0x24004248 08013fc8 : #endif /* INCLUDE_xTaskAbortDelay */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 8013fc8: b580 push {r7, lr} 8013fca: b086 sub sp, #24 8013fcc: af00 add r7, sp, #0 TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 8013fce: 2300 movs r3, #0 8013fd0: 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 ) 8013fd2: 4b4f ldr r3, [pc, #316] @ (8014110 ) 8013fd4: 681b ldr r3, [r3, #0] 8013fd6: 2b00 cmp r3, #0 8013fd8: f040 8090 bne.w 80140fc { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1; 8013fdc: 4b4d ldr r3, [pc, #308] @ (8014114 ) 8013fde: 681b ldr r3, [r3, #0] 8013fe0: 3301 adds r3, #1 8013fe2: 613b str r3, [r7, #16] /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ xTickCount = xConstTickCount; 8013fe4: 4a4b ldr r2, [pc, #300] @ (8014114 ) 8013fe6: 693b ldr r3, [r7, #16] 8013fe8: 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. */ 8013fea: 693b ldr r3, [r7, #16] 8013fec: 2b00 cmp r3, #0 8013fee: d121 bne.n 8014034 { taskSWITCH_DELAYED_LISTS(); 8013ff0: 4b49 ldr r3, [pc, #292] @ (8014118 ) 8013ff2: 681b ldr r3, [r3, #0] 8013ff4: 681b ldr r3, [r3, #0] 8013ff6: 2b00 cmp r3, #0 8013ff8: d00b beq.n 8014012 __asm volatile 8013ffa: f04f 0350 mov.w r3, #80 @ 0x50 8013ffe: f383 8811 msr BASEPRI, r3 8014002: f3bf 8f6f isb sy 8014006: f3bf 8f4f dsb sy 801400a: 603b str r3, [r7, #0] } 801400c: bf00 nop 801400e: bf00 nop 8014010: e7fd b.n 801400e 8014012: 4b41 ldr r3, [pc, #260] @ (8014118 ) 8014014: 681b ldr r3, [r3, #0] 8014016: 60fb str r3, [r7, #12] 8014018: 4b40 ldr r3, [pc, #256] @ (801411c ) 801401a: 681b ldr r3, [r3, #0] 801401c: 4a3e ldr r2, [pc, #248] @ (8014118 ) 801401e: 6013 str r3, [r2, #0] 8014020: 4a3e ldr r2, [pc, #248] @ (801411c ) 8014022: 68fb ldr r3, [r7, #12] 8014024: 6013 str r3, [r2, #0] 8014026: 4b3e ldr r3, [pc, #248] @ (8014120 ) 8014028: 681b ldr r3, [r3, #0] 801402a: 3301 adds r3, #1 801402c: 4a3c ldr r2, [pc, #240] @ (8014120 ) 801402e: 6013 str r3, [r2, #0] 8014030: f000 fb18 bl 8014664 /* 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 ) 8014034: 4b3b ldr r3, [pc, #236] @ (8014124 ) 8014036: 681b ldr r3, [r3, #0] 8014038: 693a ldr r2, [r7, #16] 801403a: 429a cmp r2, r3 801403c: d349 bcc.n 80140d2 { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 801403e: 4b36 ldr r3, [pc, #216] @ (8014118 ) 8014040: 681b ldr r3, [r3, #0] 8014042: 681b ldr r3, [r3, #0] 8014044: 2b00 cmp r3, #0 8014046: d104 bne.n 8014052 /* 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. */ 8014048: 4b36 ldr r3, [pc, #216] @ (8014124 ) 801404a: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801404e: 601a str r2, [r3, #0] break; 8014050: e03f b.n 80140d2 { /* 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. */ 8014052: 4b31 ldr r3, [pc, #196] @ (8014118 ) 8014054: 681b ldr r3, [r3, #0] 8014056: 68db ldr r3, [r3, #12] 8014058: 68db ldr r3, [r3, #12] 801405a: 60bb str r3, [r7, #8] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) ); 801405c: 68bb ldr r3, [r7, #8] 801405e: 685b ldr r3, [r3, #4] 8014060: 607b str r3, [r7, #4] if( xConstTickCount < xItemValue ) 8014062: 693a ldr r2, [r7, #16] 8014064: 687b ldr r3, [r7, #4] 8014066: 429a cmp r2, r3 8014068: d203 bcs.n 8014072 /* 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; 801406a: 4a2e ldr r2, [pc, #184] @ (8014124 ) 801406c: 687b ldr r3, [r7, #4] 801406e: 6013 str r3, [r2, #0] break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ 8014070: e02f b.n 80140d2 { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014072: 68bb ldr r3, [r7, #8] 8014074: 3304 adds r3, #4 8014076: 4618 mov r0, r3 8014078: f7fd ff90 bl 8011f9c /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 801407c: 68bb ldr r3, [r7, #8] 801407e: 6a9b ldr r3, [r3, #40] @ 0x28 8014080: 2b00 cmp r3, #0 8014082: d004 beq.n 801408e { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8014084: 68bb ldr r3, [r7, #8] 8014086: 3318 adds r3, #24 8014088: 4618 mov r0, r3 801408a: f7fd ff87 bl 8011f9c mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 801408e: 68bb ldr r3, [r7, #8] 8014090: 6ada ldr r2, [r3, #44] @ 0x2c 8014092: 4b25 ldr r3, [pc, #148] @ (8014128 ) 8014094: 681b ldr r3, [r3, #0] 8014096: 429a cmp r2, r3 8014098: d903 bls.n 80140a2 801409a: 68bb ldr r3, [r7, #8] 801409c: 6adb ldr r3, [r3, #44] @ 0x2c 801409e: 4a22 ldr r2, [pc, #136] @ (8014128 ) 80140a0: 6013 str r3, [r2, #0] 80140a2: 68bb ldr r3, [r7, #8] 80140a4: 6ada ldr r2, [r3, #44] @ 0x2c 80140a6: 4613 mov r3, r2 80140a8: 009b lsls r3, r3, #2 80140aa: 4413 add r3, r2 80140ac: 009b lsls r3, r3, #2 80140ae: 4a1f ldr r2, [pc, #124] @ (801412c ) 80140b0: 441a add r2, r3 80140b2: 68bb ldr r3, [r7, #8] 80140b4: 3304 adds r3, #4 80140b6: 4619 mov r1, r3 80140b8: 4610 mov r0, r2 80140ba: f7fd ff12 bl 8011ee2 { /* 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 ) 80140be: 68bb ldr r3, [r7, #8] 80140c0: 6ada ldr r2, [r3, #44] @ 0x2c 80140c2: 4b1b ldr r3, [pc, #108] @ (8014130 ) 80140c4: 681b ldr r3, [r3, #0] 80140c6: 6adb ldr r3, [r3, #44] @ 0x2c 80140c8: 429a cmp r2, r3 80140ca: d3b8 bcc.n 801403e { xSwitchRequired = pdTRUE; 80140cc: 2301 movs r3, #1 80140ce: 617b str r3, [r7, #20] if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80140d0: e7b5 b.n 801403e /* 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 ) 80140d2: 4b17 ldr r3, [pc, #92] @ (8014130 ) 80140d4: 681b ldr r3, [r3, #0] 80140d6: 6ada ldr r2, [r3, #44] @ 0x2c 80140d8: 4914 ldr r1, [pc, #80] @ (801412c ) 80140da: 4613 mov r3, r2 80140dc: 009b lsls r3, r3, #2 80140de: 4413 add r3, r2 80140e0: 009b lsls r3, r3, #2 80140e2: 440b add r3, r1 80140e4: 681b ldr r3, [r3, #0] 80140e6: 2b01 cmp r3, #1 80140e8: d901 bls.n 80140ee { xSwitchRequired = pdTRUE; 80140ea: 2301 movs r3, #1 80140ec: 617b str r3, [r7, #20] } #endif /* configUSE_TICK_HOOK */ #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 80140ee: 4b11 ldr r3, [pc, #68] @ (8014134 ) 80140f0: 681b ldr r3, [r3, #0] 80140f2: 2b00 cmp r3, #0 80140f4: d007 beq.n 8014106 { xSwitchRequired = pdTRUE; 80140f6: 2301 movs r3, #1 80140f8: 617b str r3, [r7, #20] 80140fa: e004 b.n 8014106 } #endif /* configUSE_PREEMPTION */ } else { ++xPendedTicks; 80140fc: 4b0e ldr r3, [pc, #56] @ (8014138 ) 80140fe: 681b ldr r3, [r3, #0] 8014100: 3301 adds r3, #1 8014102: 4a0d ldr r2, [pc, #52] @ (8014138 ) 8014104: 6013 str r3, [r2, #0] vApplicationTickHook(); } #endif } return xSwitchRequired; 8014106: 697b ldr r3, [r7, #20] } 8014108: 4618 mov r0, r3 801410a: 3718 adds r7, #24 801410c: 46bd mov sp, r7 801410e: bd80 pop {r7, pc} 8014110: 2400426c .word 0x2400426c 8014114: 24004248 .word 0x24004248 8014118: 240041fc .word 0x240041fc 801411c: 24004200 .word 0x24004200 8014120: 2400425c .word 0x2400425c 8014124: 24004264 .word 0x24004264 8014128: 2400424c .word 0x2400424c 801412c: 24003d74 .word 0x24003d74 8014130: 24003d70 .word 0x24003d70 8014134: 24004258 .word 0x24004258 8014138: 24004254 .word 0x24004254 0801413c : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 801413c: b580 push {r7, lr} 801413e: b084 sub sp, #16 8014140: af00 add r7, sp, #0 if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 8014142: 4b32 ldr r3, [pc, #200] @ (801420c ) 8014144: 681b ldr r3, [r3, #0] 8014146: 2b00 cmp r3, #0 8014148: d003 beq.n 8014152 { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 801414a: 4b31 ldr r3, [pc, #196] @ (8014210 ) 801414c: 2201 movs r2, #1 801414e: 601a str r2, [r3, #0] for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ } } 8014150: e058 b.n 8014204 xYieldPending = pdFALSE; 8014152: 4b2f ldr r3, [pc, #188] @ (8014210 ) 8014154: 2200 movs r2, #0 8014156: 601a str r2, [r3, #0] taskCHECK_FOR_STACK_OVERFLOW(); 8014158: 4b2e ldr r3, [pc, #184] @ (8014214 ) 801415a: 681b ldr r3, [r3, #0] 801415c: 681a ldr r2, [r3, #0] 801415e: 4b2d ldr r3, [pc, #180] @ (8014214 ) 8014160: 681b ldr r3, [r3, #0] 8014162: 6b1b ldr r3, [r3, #48] @ 0x30 8014164: 429a cmp r2, r3 8014166: d808 bhi.n 801417a 8014168: 4b2a ldr r3, [pc, #168] @ (8014214 ) 801416a: 681a ldr r2, [r3, #0] 801416c: 4b29 ldr r3, [pc, #164] @ (8014214 ) 801416e: 681b ldr r3, [r3, #0] 8014170: 3334 adds r3, #52 @ 0x34 8014172: 4619 mov r1, r3 8014174: 4610 mov r0, r2 8014176: f7ed fd94 bl 8001ca2 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. */ 801417a: 4b27 ldr r3, [pc, #156] @ (8014218 ) 801417c: 681b ldr r3, [r3, #0] 801417e: 60fb str r3, [r7, #12] 8014180: e011 b.n 80141a6 8014182: 68fb ldr r3, [r7, #12] 8014184: 2b00 cmp r3, #0 8014186: d10b bne.n 80141a0 __asm volatile 8014188: f04f 0350 mov.w r3, #80 @ 0x50 801418c: f383 8811 msr BASEPRI, r3 8014190: f3bf 8f6f isb sy 8014194: f3bf 8f4f dsb sy 8014198: 607b str r3, [r7, #4] } 801419a: bf00 nop 801419c: bf00 nop 801419e: e7fd b.n 801419c 80141a0: 68fb ldr r3, [r7, #12] 80141a2: 3b01 subs r3, #1 80141a4: 60fb str r3, [r7, #12] 80141a6: 491d ldr r1, [pc, #116] @ (801421c ) 80141a8: 68fa ldr r2, [r7, #12] 80141aa: 4613 mov r3, r2 80141ac: 009b lsls r3, r3, #2 80141ae: 4413 add r3, r2 80141b0: 009b lsls r3, r3, #2 80141b2: 440b add r3, r1 80141b4: 681b ldr r3, [r3, #0] 80141b6: 2b00 cmp r3, #0 80141b8: d0e3 beq.n 8014182 80141ba: 68fa ldr r2, [r7, #12] 80141bc: 4613 mov r3, r2 80141be: 009b lsls r3, r3, #2 80141c0: 4413 add r3, r2 80141c2: 009b lsls r3, r3, #2 80141c4: 4a15 ldr r2, [pc, #84] @ (801421c ) 80141c6: 4413 add r3, r2 80141c8: 60bb str r3, [r7, #8] 80141ca: 68bb ldr r3, [r7, #8] 80141cc: 685b ldr r3, [r3, #4] 80141ce: 685a ldr r2, [r3, #4] 80141d0: 68bb ldr r3, [r7, #8] 80141d2: 605a str r2, [r3, #4] 80141d4: 68bb ldr r3, [r7, #8] 80141d6: 685a ldr r2, [r3, #4] 80141d8: 68bb ldr r3, [r7, #8] 80141da: 3308 adds r3, #8 80141dc: 429a cmp r2, r3 80141de: d104 bne.n 80141ea 80141e0: 68bb ldr r3, [r7, #8] 80141e2: 685b ldr r3, [r3, #4] 80141e4: 685a ldr r2, [r3, #4] 80141e6: 68bb ldr r3, [r7, #8] 80141e8: 605a str r2, [r3, #4] 80141ea: 68bb ldr r3, [r7, #8] 80141ec: 685b ldr r3, [r3, #4] 80141ee: 68db ldr r3, [r3, #12] 80141f0: 4a08 ldr r2, [pc, #32] @ (8014214 ) 80141f2: 6013 str r3, [r2, #0] 80141f4: 4a08 ldr r2, [pc, #32] @ (8014218 ) 80141f6: 68fb ldr r3, [r7, #12] 80141f8: 6013 str r3, [r2, #0] _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 80141fa: 4b06 ldr r3, [pc, #24] @ (8014214 ) 80141fc: 681b ldr r3, [r3, #0] 80141fe: 3354 adds r3, #84 @ 0x54 8014200: 4a07 ldr r2, [pc, #28] @ (8014220 ) 8014202: 6013 str r3, [r2, #0] } 8014204: bf00 nop 8014206: 3710 adds r7, #16 8014208: 46bd mov sp, r7 801420a: bd80 pop {r7, pc} 801420c: 2400426c .word 0x2400426c 8014210: 24004258 .word 0x24004258 8014214: 24003d70 .word 0x24003d70 8014218: 2400424c .word 0x2400424c 801421c: 24003d74 .word 0x24003d74 8014220: 240001d4 .word 0x240001d4 08014224 : /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 8014224: b580 push {r7, lr} 8014226: b084 sub sp, #16 8014228: af00 add r7, sp, #0 801422a: 6078 str r0, [r7, #4] 801422c: 6039 str r1, [r7, #0] configASSERT( pxEventList ); 801422e: 687b ldr r3, [r7, #4] 8014230: 2b00 cmp r3, #0 8014232: d10b bne.n 801424c __asm volatile 8014234: f04f 0350 mov.w r3, #80 @ 0x50 8014238: f383 8811 msr BASEPRI, r3 801423c: f3bf 8f6f isb sy 8014240: f3bf 8f4f dsb sy 8014244: 60fb str r3, [r7, #12] } 8014246: bf00 nop 8014248: bf00 nop 801424a: e7fd b.n 8014248 /* 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 ) ); 801424c: 4b07 ldr r3, [pc, #28] @ (801426c ) 801424e: 681b ldr r3, [r3, #0] 8014250: 3318 adds r3, #24 8014252: 4619 mov r1, r3 8014254: 6878 ldr r0, [r7, #4] 8014256: f7fd fe68 bl 8011f2a prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 801425a: 2101 movs r1, #1 801425c: 6838 ldr r0, [r7, #0] 801425e: f000 fded bl 8014e3c } 8014262: bf00 nop 8014264: 3710 adds r7, #16 8014266: 46bd mov sp, r7 8014268: bd80 pop {r7, pc} 801426a: bf00 nop 801426c: 24003d70 .word 0x24003d70 08014270 : /*-----------------------------------------------------------*/ #if( configUSE_TIMERS == 1 ) void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 8014270: b580 push {r7, lr} 8014272: b086 sub sp, #24 8014274: af00 add r7, sp, #0 8014276: 60f8 str r0, [r7, #12] 8014278: 60b9 str r1, [r7, #8] 801427a: 607a str r2, [r7, #4] configASSERT( pxEventList ); 801427c: 68fb ldr r3, [r7, #12] 801427e: 2b00 cmp r3, #0 8014280: d10b bne.n 801429a __asm volatile 8014282: f04f 0350 mov.w r3, #80 @ 0x50 8014286: f383 8811 msr BASEPRI, r3 801428a: f3bf 8f6f isb sy 801428e: f3bf 8f4f dsb sy 8014292: 617b str r3, [r7, #20] } 8014294: bf00 nop 8014296: bf00 nop 8014298: e7fd b.n 8014296 /* Place the event list item of the TCB in the appropriate event list. In this case it is assume that this is the only task that is going to be waiting on this event list, so the faster vListInsertEnd() function can be used in place of vListInsert. */ vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 801429a: 4b0a ldr r3, [pc, #40] @ (80142c4 ) 801429c: 681b ldr r3, [r3, #0] 801429e: 3318 adds r3, #24 80142a0: 4619 mov r1, r3 80142a2: 68f8 ldr r0, [r7, #12] 80142a4: f7fd fe1d bl 8011ee2 /* If the task should block indefinitely then set the block time to a value that will be recognised as an indefinite delay inside the prvAddCurrentTaskToDelayedList() function. */ if( xWaitIndefinitely != pdFALSE ) 80142a8: 687b ldr r3, [r7, #4] 80142aa: 2b00 cmp r3, #0 80142ac: d002 beq.n 80142b4 { xTicksToWait = portMAX_DELAY; 80142ae: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80142b2: 60bb str r3, [r7, #8] } traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) ); prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely ); 80142b4: 6879 ldr r1, [r7, #4] 80142b6: 68b8 ldr r0, [r7, #8] 80142b8: f000 fdc0 bl 8014e3c } 80142bc: bf00 nop 80142be: 3718 adds r7, #24 80142c0: 46bd mov sp, r7 80142c2: bd80 pop {r7, pc} 80142c4: 24003d70 .word 0x24003d70 080142c8 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 80142c8: b580 push {r7, lr} 80142ca: b086 sub sp, #24 80142cc: af00 add r7, sp, #0 80142ce: 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. */ 80142d0: 687b ldr r3, [r7, #4] 80142d2: 68db ldr r3, [r3, #12] 80142d4: 68db ldr r3, [r3, #12] 80142d6: 613b str r3, [r7, #16] configASSERT( pxUnblockedTCB ); 80142d8: 693b ldr r3, [r7, #16] 80142da: 2b00 cmp r3, #0 80142dc: d10b bne.n 80142f6 __asm volatile 80142de: f04f 0350 mov.w r3, #80 @ 0x50 80142e2: f383 8811 msr BASEPRI, r3 80142e6: f3bf 8f6f isb sy 80142ea: f3bf 8f4f dsb sy 80142ee: 60fb str r3, [r7, #12] } 80142f0: bf00 nop 80142f2: bf00 nop 80142f4: e7fd b.n 80142f2 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 80142f6: 693b ldr r3, [r7, #16] 80142f8: 3318 adds r3, #24 80142fa: 4618 mov r0, r3 80142fc: f7fd fe4e bl 8011f9c if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8014300: 4b1d ldr r3, [pc, #116] @ (8014378 ) 8014302: 681b ldr r3, [r3, #0] 8014304: 2b00 cmp r3, #0 8014306: d11d bne.n 8014344 { ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) ); 8014308: 693b ldr r3, [r7, #16] 801430a: 3304 adds r3, #4 801430c: 4618 mov r0, r3 801430e: f7fd fe45 bl 8011f9c prvAddTaskToReadyList( pxUnblockedTCB ); 8014312: 693b ldr r3, [r7, #16] 8014314: 6ada ldr r2, [r3, #44] @ 0x2c 8014316: 4b19 ldr r3, [pc, #100] @ (801437c ) 8014318: 681b ldr r3, [r3, #0] 801431a: 429a cmp r2, r3 801431c: d903 bls.n 8014326 801431e: 693b ldr r3, [r7, #16] 8014320: 6adb ldr r3, [r3, #44] @ 0x2c 8014322: 4a16 ldr r2, [pc, #88] @ (801437c ) 8014324: 6013 str r3, [r2, #0] 8014326: 693b ldr r3, [r7, #16] 8014328: 6ada ldr r2, [r3, #44] @ 0x2c 801432a: 4613 mov r3, r2 801432c: 009b lsls r3, r3, #2 801432e: 4413 add r3, r2 8014330: 009b lsls r3, r3, #2 8014332: 4a13 ldr r2, [pc, #76] @ (8014380 ) 8014334: 441a add r2, r3 8014336: 693b ldr r3, [r7, #16] 8014338: 3304 adds r3, #4 801433a: 4619 mov r1, r3 801433c: 4610 mov r0, r2 801433e: f7fd fdd0 bl 8011ee2 8014342: e005 b.n 8014350 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 8014344: 693b ldr r3, [r7, #16] 8014346: 3318 adds r3, #24 8014348: 4619 mov r1, r3 801434a: 480e ldr r0, [pc, #56] @ (8014384 ) 801434c: f7fd fdc9 bl 8011ee2 } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 8014350: 693b ldr r3, [r7, #16] 8014352: 6ada ldr r2, [r3, #44] @ 0x2c 8014354: 4b0c ldr r3, [pc, #48] @ (8014388 ) 8014356: 681b ldr r3, [r3, #0] 8014358: 6adb ldr r3, [r3, #44] @ 0x2c 801435a: 429a cmp r2, r3 801435c: d905 bls.n 801436a { /* 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; 801435e: 2301 movs r3, #1 8014360: 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; 8014362: 4b0a ldr r3, [pc, #40] @ (801438c ) 8014364: 2201 movs r2, #1 8014366: 601a str r2, [r3, #0] 8014368: e001 b.n 801436e } else { xReturn = pdFALSE; 801436a: 2300 movs r3, #0 801436c: 617b str r3, [r7, #20] } return xReturn; 801436e: 697b ldr r3, [r7, #20] } 8014370: 4618 mov r0, r3 8014372: 3718 adds r7, #24 8014374: 46bd mov sp, r7 8014376: bd80 pop {r7, pc} 8014378: 2400426c .word 0x2400426c 801437c: 2400424c .word 0x2400424c 8014380: 24003d74 .word 0x24003d74 8014384: 24004204 .word 0x24004204 8014388: 24003d70 .word 0x24003d70 801438c: 24004258 .word 0x24004258 08014390 : } } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 8014390: b580 push {r7, lr} 8014392: b084 sub sp, #16 8014394: af00 add r7, sp, #0 8014396: 6078 str r0, [r7, #4] configASSERT( pxTimeOut ); 8014398: 687b ldr r3, [r7, #4] 801439a: 2b00 cmp r3, #0 801439c: d10b bne.n 80143b6 __asm volatile 801439e: f04f 0350 mov.w r3, #80 @ 0x50 80143a2: f383 8811 msr BASEPRI, r3 80143a6: f3bf 8f6f isb sy 80143aa: f3bf 8f4f dsb sy 80143ae: 60fb str r3, [r7, #12] } 80143b0: bf00 nop 80143b2: bf00 nop 80143b4: e7fd b.n 80143b2 taskENTER_CRITICAL(); 80143b6: f001 fb07 bl 80159c8 { pxTimeOut->xOverflowCount = xNumOfOverflows; 80143ba: 4b07 ldr r3, [pc, #28] @ (80143d8 ) 80143bc: 681a ldr r2, [r3, #0] 80143be: 687b ldr r3, [r7, #4] 80143c0: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 80143c2: 4b06 ldr r3, [pc, #24] @ (80143dc ) 80143c4: 681a ldr r2, [r3, #0] 80143c6: 687b ldr r3, [r7, #4] 80143c8: 605a str r2, [r3, #4] } taskEXIT_CRITICAL(); 80143ca: f001 fb2f bl 8015a2c } 80143ce: bf00 nop 80143d0: 3710 adds r7, #16 80143d2: 46bd mov sp, r7 80143d4: bd80 pop {r7, pc} 80143d6: bf00 nop 80143d8: 2400425c .word 0x2400425c 80143dc: 24004248 .word 0x24004248 080143e0 : /*-----------------------------------------------------------*/ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) { 80143e0: b480 push {r7} 80143e2: b083 sub sp, #12 80143e4: af00 add r7, sp, #0 80143e6: 6078 str r0, [r7, #4] /* For internal use only as it does not use a critical section. */ pxTimeOut->xOverflowCount = xNumOfOverflows; 80143e8: 4b06 ldr r3, [pc, #24] @ (8014404 ) 80143ea: 681a ldr r2, [r3, #0] 80143ec: 687b ldr r3, [r7, #4] 80143ee: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 80143f0: 4b05 ldr r3, [pc, #20] @ (8014408 ) 80143f2: 681a ldr r2, [r3, #0] 80143f4: 687b ldr r3, [r7, #4] 80143f6: 605a str r2, [r3, #4] } 80143f8: bf00 nop 80143fa: 370c adds r7, #12 80143fc: 46bd mov sp, r7 80143fe: f85d 7b04 ldr.w r7, [sp], #4 8014402: 4770 bx lr 8014404: 2400425c .word 0x2400425c 8014408: 24004248 .word 0x24004248 0801440c : /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 801440c: b580 push {r7, lr} 801440e: b088 sub sp, #32 8014410: af00 add r7, sp, #0 8014412: 6078 str r0, [r7, #4] 8014414: 6039 str r1, [r7, #0] BaseType_t xReturn; configASSERT( pxTimeOut ); 8014416: 687b ldr r3, [r7, #4] 8014418: 2b00 cmp r3, #0 801441a: d10b bne.n 8014434 __asm volatile 801441c: f04f 0350 mov.w r3, #80 @ 0x50 8014420: f383 8811 msr BASEPRI, r3 8014424: f3bf 8f6f isb sy 8014428: f3bf 8f4f dsb sy 801442c: 613b str r3, [r7, #16] } 801442e: bf00 nop 8014430: bf00 nop 8014432: e7fd b.n 8014430 configASSERT( pxTicksToWait ); 8014434: 683b ldr r3, [r7, #0] 8014436: 2b00 cmp r3, #0 8014438: d10b bne.n 8014452 __asm volatile 801443a: f04f 0350 mov.w r3, #80 @ 0x50 801443e: f383 8811 msr BASEPRI, r3 8014442: f3bf 8f6f isb sy 8014446: f3bf 8f4f dsb sy 801444a: 60fb str r3, [r7, #12] } 801444c: bf00 nop 801444e: bf00 nop 8014450: e7fd b.n 801444e taskENTER_CRITICAL(); 8014452: f001 fab9 bl 80159c8 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8014456: 4b1d ldr r3, [pc, #116] @ (80144cc ) 8014458: 681b ldr r3, [r3, #0] 801445a: 61bb str r3, [r7, #24] const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering; 801445c: 687b ldr r3, [r7, #4] 801445e: 685b ldr r3, [r3, #4] 8014460: 69ba ldr r2, [r7, #24] 8014462: 1ad3 subs r3, r2, r3 8014464: 617b str r3, [r7, #20] } else #endif #if ( INCLUDE_vTaskSuspend == 1 ) if( *pxTicksToWait == portMAX_DELAY ) 8014466: 683b ldr r3, [r7, #0] 8014468: 681b ldr r3, [r3, #0] 801446a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801446e: d102 bne.n 8014476 { /* 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; 8014470: 2300 movs r3, #0 8014472: 61fb str r3, [r7, #28] 8014474: e023 b.n 80144be } else #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 8014476: 687b ldr r3, [r7, #4] 8014478: 681a ldr r2, [r3, #0] 801447a: 4b15 ldr r3, [pc, #84] @ (80144d0 ) 801447c: 681b ldr r3, [r3, #0] 801447e: 429a cmp r2, r3 8014480: d007 beq.n 8014492 8014482: 687b ldr r3, [r7, #4] 8014484: 685b ldr r3, [r3, #4] 8014486: 69ba ldr r2, [r7, #24] 8014488: 429a cmp r2, r3 801448a: d302 bcc.n 8014492 /* 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; 801448c: 2301 movs r3, #1 801448e: 61fb str r3, [r7, #28] 8014490: e015 b.n 80144be } else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */ 8014492: 683b ldr r3, [r7, #0] 8014494: 681b ldr r3, [r3, #0] 8014496: 697a ldr r2, [r7, #20] 8014498: 429a cmp r2, r3 801449a: d20b bcs.n 80144b4 { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= xElapsedTime; 801449c: 683b ldr r3, [r7, #0] 801449e: 681a ldr r2, [r3, #0] 80144a0: 697b ldr r3, [r7, #20] 80144a2: 1ad2 subs r2, r2, r3 80144a4: 683b ldr r3, [r7, #0] 80144a6: 601a str r2, [r3, #0] vTaskInternalSetTimeOutState( pxTimeOut ); 80144a8: 6878 ldr r0, [r7, #4] 80144aa: f7ff ff99 bl 80143e0 xReturn = pdFALSE; 80144ae: 2300 movs r3, #0 80144b0: 61fb str r3, [r7, #28] 80144b2: e004 b.n 80144be } else { *pxTicksToWait = 0; 80144b4: 683b ldr r3, [r7, #0] 80144b6: 2200 movs r2, #0 80144b8: 601a str r2, [r3, #0] xReturn = pdTRUE; 80144ba: 2301 movs r3, #1 80144bc: 61fb str r3, [r7, #28] } } taskEXIT_CRITICAL(); 80144be: f001 fab5 bl 8015a2c return xReturn; 80144c2: 69fb ldr r3, [r7, #28] } 80144c4: 4618 mov r0, r3 80144c6: 3720 adds r7, #32 80144c8: 46bd mov sp, r7 80144ca: bd80 pop {r7, pc} 80144cc: 24004248 .word 0x24004248 80144d0: 2400425c .word 0x2400425c 080144d4 : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { 80144d4: b480 push {r7} 80144d6: af00 add r7, sp, #0 xYieldPending = pdTRUE; 80144d8: 4b03 ldr r3, [pc, #12] @ (80144e8 ) 80144da: 2201 movs r2, #1 80144dc: 601a str r2, [r3, #0] } 80144de: bf00 nop 80144e0: 46bd mov sp, r7 80144e2: f85d 7b04 ldr.w r7, [sp], #4 80144e6: 4770 bx lr 80144e8: 24004258 .word 0x24004258 080144ec : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 80144ec: b580 push {r7, lr} 80144ee: b082 sub sp, #8 80144f0: af00 add r7, sp, #0 80144f2: 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(); 80144f4: f000 f852 bl 801459c 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 ) 80144f8: 4b06 ldr r3, [pc, #24] @ (8014514 ) 80144fa: 681b ldr r3, [r3, #0] 80144fc: 2b01 cmp r3, #1 80144fe: d9f9 bls.n 80144f4 { taskYIELD(); 8014500: 4b05 ldr r3, [pc, #20] @ (8014518 ) 8014502: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014506: 601a str r2, [r3, #0] 8014508: f3bf 8f4f dsb sy 801450c: f3bf 8f6f isb sy prvCheckTasksWaitingTermination(); 8014510: e7f0 b.n 80144f4 8014512: bf00 nop 8014514: 24003d74 .word 0x24003d74 8014518: e000ed04 .word 0xe000ed04 0801451c : #endif /* portUSING_MPU_WRAPPERS */ /*-----------------------------------------------------------*/ static void prvInitialiseTaskLists( void ) { 801451c: b580 push {r7, lr} 801451e: b082 sub sp, #8 8014520: af00 add r7, sp, #0 UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8014522: 2300 movs r3, #0 8014524: 607b str r3, [r7, #4] 8014526: e00c b.n 8014542 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8014528: 687a ldr r2, [r7, #4] 801452a: 4613 mov r3, r2 801452c: 009b lsls r3, r3, #2 801452e: 4413 add r3, r2 8014530: 009b lsls r3, r3, #2 8014532: 4a12 ldr r2, [pc, #72] @ (801457c ) 8014534: 4413 add r3, r2 8014536: 4618 mov r0, r3 8014538: f7fd fca6 bl 8011e88 for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 801453c: 687b ldr r3, [r7, #4] 801453e: 3301 adds r3, #1 8014540: 607b str r3, [r7, #4] 8014542: 687b ldr r3, [r7, #4] 8014544: 2b37 cmp r3, #55 @ 0x37 8014546: d9ef bls.n 8014528 } vListInitialise( &xDelayedTaskList1 ); 8014548: 480d ldr r0, [pc, #52] @ (8014580 ) 801454a: f7fd fc9d bl 8011e88 vListInitialise( &xDelayedTaskList2 ); 801454e: 480d ldr r0, [pc, #52] @ (8014584 ) 8014550: f7fd fc9a bl 8011e88 vListInitialise( &xPendingReadyList ); 8014554: 480c ldr r0, [pc, #48] @ (8014588 ) 8014556: f7fd fc97 bl 8011e88 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 801455a: 480c ldr r0, [pc, #48] @ (801458c ) 801455c: f7fd fc94 bl 8011e88 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 8014560: 480b ldr r0, [pc, #44] @ (8014590 ) 8014562: f7fd fc91 bl 8011e88 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 8014566: 4b0b ldr r3, [pc, #44] @ (8014594 ) 8014568: 4a05 ldr r2, [pc, #20] @ (8014580 ) 801456a: 601a str r2, [r3, #0] pxOverflowDelayedTaskList = &xDelayedTaskList2; 801456c: 4b0a ldr r3, [pc, #40] @ (8014598 ) 801456e: 4a05 ldr r2, [pc, #20] @ (8014584 ) 8014570: 601a str r2, [r3, #0] } 8014572: bf00 nop 8014574: 3708 adds r7, #8 8014576: 46bd mov sp, r7 8014578: bd80 pop {r7, pc} 801457a: bf00 nop 801457c: 24003d74 .word 0x24003d74 8014580: 240041d4 .word 0x240041d4 8014584: 240041e8 .word 0x240041e8 8014588: 24004204 .word 0x24004204 801458c: 24004218 .word 0x24004218 8014590: 24004230 .word 0x24004230 8014594: 240041fc .word 0x240041fc 8014598: 24004200 .word 0x24004200 0801459c : /*-----------------------------------------------------------*/ static void prvCheckTasksWaitingTermination( void ) { 801459c: b580 push {r7, lr} 801459e: b082 sub sp, #8 80145a0: 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 ) 80145a2: e019 b.n 80145d8 { taskENTER_CRITICAL(); 80145a4: f001 fa10 bl 80159c8 { 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. */ 80145a8: 4b10 ldr r3, [pc, #64] @ (80145ec ) 80145aa: 68db ldr r3, [r3, #12] 80145ac: 68db ldr r3, [r3, #12] 80145ae: 607b str r3, [r7, #4] ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 80145b0: 687b ldr r3, [r7, #4] 80145b2: 3304 adds r3, #4 80145b4: 4618 mov r0, r3 80145b6: f7fd fcf1 bl 8011f9c --uxCurrentNumberOfTasks; 80145ba: 4b0d ldr r3, [pc, #52] @ (80145f0 ) 80145bc: 681b ldr r3, [r3, #0] 80145be: 3b01 subs r3, #1 80145c0: 4a0b ldr r2, [pc, #44] @ (80145f0 ) 80145c2: 6013 str r3, [r2, #0] --uxDeletedTasksWaitingCleanUp; 80145c4: 4b0b ldr r3, [pc, #44] @ (80145f4 ) 80145c6: 681b ldr r3, [r3, #0] 80145c8: 3b01 subs r3, #1 80145ca: 4a0a ldr r2, [pc, #40] @ (80145f4 ) 80145cc: 6013 str r3, [r2, #0] } taskEXIT_CRITICAL(); 80145ce: f001 fa2d bl 8015a2c prvDeleteTCB( pxTCB ); 80145d2: 6878 ldr r0, [r7, #4] 80145d4: f000 f810 bl 80145f8 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) 80145d8: 4b06 ldr r3, [pc, #24] @ (80145f4 ) 80145da: 681b ldr r3, [r3, #0] 80145dc: 2b00 cmp r3, #0 80145de: d1e1 bne.n 80145a4 } } #endif /* INCLUDE_vTaskDelete */ } 80145e0: bf00 nop 80145e2: bf00 nop 80145e4: 3708 adds r7, #8 80145e6: 46bd mov sp, r7 80145e8: bd80 pop {r7, pc} 80145ea: bf00 nop 80145ec: 24004218 .word 0x24004218 80145f0: 24004244 .word 0x24004244 80145f4: 2400422c .word 0x2400422c 080145f8 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) static void prvDeleteTCB( TCB_t *pxTCB ) { 80145f8: b580 push {r7, lr} 80145fa: b084 sub sp, #16 80145fc: af00 add r7, sp, #0 80145fe: 6078 str r0, [r7, #4] to the task to free any memory allocated at the application level. See the third party link http://www.nadler.com/embedded/newlibAndFreeRTOS.html for additional information. */ #if ( configUSE_NEWLIB_REENTRANT == 1 ) { _reclaim_reent( &( pxTCB->xNewLib_reent ) ); 8014600: 687b ldr r3, [r7, #4] 8014602: 3354 adds r3, #84 @ 0x54 8014604: 4618 mov r0, r3 8014606: f016 faf1 bl 802abec <_reclaim_reent> #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 ) 801460a: 687b ldr r3, [r7, #4] 801460c: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 8014610: 2b00 cmp r3, #0 8014612: d108 bne.n 8014626 { /* Both the stack and TCB were allocated dynamically, so both must be freed. */ vPortFree( pxTCB->pxStack ); 8014614: 687b ldr r3, [r7, #4] 8014616: 6b1b ldr r3, [r3, #48] @ 0x30 8014618: 4618 mov r0, r3 801461a: f001 fbc5 bl 8015da8 vPortFree( pxTCB ); 801461e: 6878 ldr r0, [r7, #4] 8014620: f001 fbc2 bl 8015da8 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); mtCOVERAGE_TEST_MARKER(); } } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ } 8014624: e019 b.n 801465a else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) 8014626: 687b ldr r3, [r7, #4] 8014628: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 801462c: 2b01 cmp r3, #1 801462e: d103 bne.n 8014638 vPortFree( pxTCB ); 8014630: 6878 ldr r0, [r7, #4] 8014632: f001 fbb9 bl 8015da8 } 8014636: e010 b.n 801465a configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); 8014638: 687b ldr r3, [r7, #4] 801463a: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 801463e: 2b02 cmp r3, #2 8014640: d00b beq.n 801465a __asm volatile 8014642: f04f 0350 mov.w r3, #80 @ 0x50 8014646: f383 8811 msr BASEPRI, r3 801464a: f3bf 8f6f isb sy 801464e: f3bf 8f4f dsb sy 8014652: 60fb str r3, [r7, #12] } 8014654: bf00 nop 8014656: bf00 nop 8014658: e7fd b.n 8014656 } 801465a: bf00 nop 801465c: 3710 adds r7, #16 801465e: 46bd mov sp, r7 8014660: bd80 pop {r7, pc} ... 08014664 : #endif /* INCLUDE_vTaskDelete */ /*-----------------------------------------------------------*/ static void prvResetNextTaskUnblockTime( void ) { 8014664: b480 push {r7} 8014666: b083 sub sp, #12 8014668: af00 add r7, sp, #0 TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 801466a: 4b0c ldr r3, [pc, #48] @ (801469c ) 801466c: 681b ldr r3, [r3, #0] 801466e: 681b ldr r3, [r3, #0] 8014670: 2b00 cmp r3, #0 8014672: d104 bne.n 801467e { /* 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; 8014674: 4b0a ldr r3, [pc, #40] @ (80146a0 ) 8014676: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801467a: 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 ) ); } } 801467c: e008 b.n 8014690 ( 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. */ 801467e: 4b07 ldr r3, [pc, #28] @ (801469c ) 8014680: 681b ldr r3, [r3, #0] 8014682: 68db ldr r3, [r3, #12] 8014684: 68db ldr r3, [r3, #12] 8014686: 607b str r3, [r7, #4] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) ); 8014688: 687b ldr r3, [r7, #4] 801468a: 685b ldr r3, [r3, #4] 801468c: 4a04 ldr r2, [pc, #16] @ (80146a0 ) 801468e: 6013 str r3, [r2, #0] } 8014690: bf00 nop 8014692: 370c adds r7, #12 8014694: 46bd mov sp, r7 8014696: f85d 7b04 ldr.w r7, [sp], #4 801469a: 4770 bx lr 801469c: 240041fc .word 0x240041fc 80146a0: 24004264 .word 0x24004264 080146a4 : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) TaskHandle_t xTaskGetCurrentTaskHandle( void ) { 80146a4: b480 push {r7} 80146a6: b083 sub sp, #12 80146a8: af00 add r7, sp, #0 TaskHandle_t xReturn; /* A critical section is not required as this is not called from an interrupt and the current TCB will always be the same for any individual execution thread. */ xReturn = pxCurrentTCB; 80146aa: 4b05 ldr r3, [pc, #20] @ (80146c0 ) 80146ac: 681b ldr r3, [r3, #0] 80146ae: 607b str r3, [r7, #4] return xReturn; 80146b0: 687b ldr r3, [r7, #4] } 80146b2: 4618 mov r0, r3 80146b4: 370c adds r7, #12 80146b6: 46bd mov sp, r7 80146b8: f85d 7b04 ldr.w r7, [sp], #4 80146bc: 4770 bx lr 80146be: bf00 nop 80146c0: 24003d70 .word 0x24003d70 080146c4 : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) BaseType_t xTaskGetSchedulerState( void ) { 80146c4: b480 push {r7} 80146c6: b083 sub sp, #12 80146c8: af00 add r7, sp, #0 BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 80146ca: 4b0b ldr r3, [pc, #44] @ (80146f8 ) 80146cc: 681b ldr r3, [r3, #0] 80146ce: 2b00 cmp r3, #0 80146d0: d102 bne.n 80146d8 { xReturn = taskSCHEDULER_NOT_STARTED; 80146d2: 2301 movs r3, #1 80146d4: 607b str r3, [r7, #4] 80146d6: e008 b.n 80146ea } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 80146d8: 4b08 ldr r3, [pc, #32] @ (80146fc ) 80146da: 681b ldr r3, [r3, #0] 80146dc: 2b00 cmp r3, #0 80146de: d102 bne.n 80146e6 { xReturn = taskSCHEDULER_RUNNING; 80146e0: 2302 movs r3, #2 80146e2: 607b str r3, [r7, #4] 80146e4: e001 b.n 80146ea } else { xReturn = taskSCHEDULER_SUSPENDED; 80146e6: 2300 movs r3, #0 80146e8: 607b str r3, [r7, #4] } } return xReturn; 80146ea: 687b ldr r3, [r7, #4] } 80146ec: 4618 mov r0, r3 80146ee: 370c adds r7, #12 80146f0: 46bd mov sp, r7 80146f2: f85d 7b04 ldr.w r7, [sp], #4 80146f6: 4770 bx lr 80146f8: 24004250 .word 0x24004250 80146fc: 2400426c .word 0x2400426c 08014700 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 8014700: b580 push {r7, lr} 8014702: b084 sub sp, #16 8014704: af00 add r7, sp, #0 8014706: 6078 str r0, [r7, #4] TCB_t * const pxMutexHolderTCB = pxMutexHolder; 8014708: 687b ldr r3, [r7, #4] 801470a: 60bb str r3, [r7, #8] BaseType_t xReturn = pdFALSE; 801470c: 2300 movs r3, #0 801470e: 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 ) 8014710: 687b ldr r3, [r7, #4] 8014712: 2b00 cmp r3, #0 8014714: d051 beq.n 80147ba { /* 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 ) 8014716: 68bb ldr r3, [r7, #8] 8014718: 6ada ldr r2, [r3, #44] @ 0x2c 801471a: 4b2a ldr r3, [pc, #168] @ (80147c4 ) 801471c: 681b ldr r3, [r3, #0] 801471e: 6adb ldr r3, [r3, #44] @ 0x2c 8014720: 429a cmp r2, r3 8014722: d241 bcs.n 80147a8 { /* 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 ) 8014724: 68bb ldr r3, [r7, #8] 8014726: 699b ldr r3, [r3, #24] 8014728: 2b00 cmp r3, #0 801472a: db06 blt.n 801473a { 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. */ 801472c: 4b25 ldr r3, [pc, #148] @ (80147c4 ) 801472e: 681b ldr r3, [r3, #0] 8014730: 6adb ldr r3, [r3, #44] @ 0x2c 8014732: f1c3 0238 rsb r2, r3, #56 @ 0x38 8014736: 68bb ldr r3, [r7, #8] 8014738: 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 ) 801473a: 68bb ldr r3, [r7, #8] 801473c: 6959 ldr r1, [r3, #20] 801473e: 68bb ldr r3, [r7, #8] 8014740: 6ada ldr r2, [r3, #44] @ 0x2c 8014742: 4613 mov r3, r2 8014744: 009b lsls r3, r3, #2 8014746: 4413 add r3, r2 8014748: 009b lsls r3, r3, #2 801474a: 4a1f ldr r2, [pc, #124] @ (80147c8 ) 801474c: 4413 add r3, r2 801474e: 4299 cmp r1, r3 8014750: d122 bne.n 8014798 { if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8014752: 68bb ldr r3, [r7, #8] 8014754: 3304 adds r3, #4 8014756: 4618 mov r0, r3 8014758: f7fd fc20 bl 8011f9c { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 801475c: 4b19 ldr r3, [pc, #100] @ (80147c4 ) 801475e: 681b ldr r3, [r3, #0] 8014760: 6ada ldr r2, [r3, #44] @ 0x2c 8014762: 68bb ldr r3, [r7, #8] 8014764: 62da str r2, [r3, #44] @ 0x2c prvAddTaskToReadyList( pxMutexHolderTCB ); 8014766: 68bb ldr r3, [r7, #8] 8014768: 6ada ldr r2, [r3, #44] @ 0x2c 801476a: 4b18 ldr r3, [pc, #96] @ (80147cc ) 801476c: 681b ldr r3, [r3, #0] 801476e: 429a cmp r2, r3 8014770: d903 bls.n 801477a 8014772: 68bb ldr r3, [r7, #8] 8014774: 6adb ldr r3, [r3, #44] @ 0x2c 8014776: 4a15 ldr r2, [pc, #84] @ (80147cc ) 8014778: 6013 str r3, [r2, #0] 801477a: 68bb ldr r3, [r7, #8] 801477c: 6ada ldr r2, [r3, #44] @ 0x2c 801477e: 4613 mov r3, r2 8014780: 009b lsls r3, r3, #2 8014782: 4413 add r3, r2 8014784: 009b lsls r3, r3, #2 8014786: 4a10 ldr r2, [pc, #64] @ (80147c8 ) 8014788: 441a add r2, r3 801478a: 68bb ldr r3, [r7, #8] 801478c: 3304 adds r3, #4 801478e: 4619 mov r1, r3 8014790: 4610 mov r0, r2 8014792: f7fd fba6 bl 8011ee2 8014796: e004 b.n 80147a2 } else { /* Just inherit the priority. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 8014798: 4b0a ldr r3, [pc, #40] @ (80147c4 ) 801479a: 681b ldr r3, [r3, #0] 801479c: 6ada ldr r2, [r3, #44] @ 0x2c 801479e: 68bb ldr r3, [r7, #8] 80147a0: 62da str r2, [r3, #44] @ 0x2c } traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority ); /* Inheritance occurred. */ xReturn = pdTRUE; 80147a2: 2301 movs r3, #1 80147a4: 60fb str r3, [r7, #12] 80147a6: e008 b.n 80147ba } else { if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority ) 80147a8: 68bb ldr r3, [r7, #8] 80147aa: 6cda ldr r2, [r3, #76] @ 0x4c 80147ac: 4b05 ldr r3, [pc, #20] @ (80147c4 ) 80147ae: 681b ldr r3, [r3, #0] 80147b0: 6adb ldr r3, [r3, #44] @ 0x2c 80147b2: 429a cmp r2, r3 80147b4: d201 bcs.n 80147ba 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; 80147b6: 2301 movs r3, #1 80147b8: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 80147ba: 68fb ldr r3, [r7, #12] } 80147bc: 4618 mov r0, r3 80147be: 3710 adds r7, #16 80147c0: 46bd mov sp, r7 80147c2: bd80 pop {r7, pc} 80147c4: 24003d70 .word 0x24003d70 80147c8: 24003d74 .word 0x24003d74 80147cc: 2400424c .word 0x2400424c 080147d0 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 80147d0: b580 push {r7, lr} 80147d2: b086 sub sp, #24 80147d4: af00 add r7, sp, #0 80147d6: 6078 str r0, [r7, #4] TCB_t * const pxTCB = pxMutexHolder; 80147d8: 687b ldr r3, [r7, #4] 80147da: 613b str r3, [r7, #16] BaseType_t xReturn = pdFALSE; 80147dc: 2300 movs r3, #0 80147de: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 80147e0: 687b ldr r3, [r7, #4] 80147e2: 2b00 cmp r3, #0 80147e4: d058 beq.n 8014898 { /* 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 ); 80147e6: 4b2f ldr r3, [pc, #188] @ (80148a4 ) 80147e8: 681b ldr r3, [r3, #0] 80147ea: 693a ldr r2, [r7, #16] 80147ec: 429a cmp r2, r3 80147ee: d00b beq.n 8014808 __asm volatile 80147f0: f04f 0350 mov.w r3, #80 @ 0x50 80147f4: f383 8811 msr BASEPRI, r3 80147f8: f3bf 8f6f isb sy 80147fc: f3bf 8f4f dsb sy 8014800: 60fb str r3, [r7, #12] } 8014802: bf00 nop 8014804: bf00 nop 8014806: e7fd b.n 8014804 configASSERT( pxTCB->uxMutexesHeld ); 8014808: 693b ldr r3, [r7, #16] 801480a: 6d1b ldr r3, [r3, #80] @ 0x50 801480c: 2b00 cmp r3, #0 801480e: d10b bne.n 8014828 __asm volatile 8014810: f04f 0350 mov.w r3, #80 @ 0x50 8014814: f383 8811 msr BASEPRI, r3 8014818: f3bf 8f6f isb sy 801481c: f3bf 8f4f dsb sy 8014820: 60bb str r3, [r7, #8] } 8014822: bf00 nop 8014824: bf00 nop 8014826: e7fd b.n 8014824 ( pxTCB->uxMutexesHeld )--; 8014828: 693b ldr r3, [r7, #16] 801482a: 6d1b ldr r3, [r3, #80] @ 0x50 801482c: 1e5a subs r2, r3, #1 801482e: 693b ldr r3, [r7, #16] 8014830: 651a str r2, [r3, #80] @ 0x50 /* Has the holder of the mutex inherited the priority of another task? */ if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 8014832: 693b ldr r3, [r7, #16] 8014834: 6ada ldr r2, [r3, #44] @ 0x2c 8014836: 693b ldr r3, [r7, #16] 8014838: 6cdb ldr r3, [r3, #76] @ 0x4c 801483a: 429a cmp r2, r3 801483c: d02c beq.n 8014898 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 801483e: 693b ldr r3, [r7, #16] 8014840: 6d1b ldr r3, [r3, #80] @ 0x50 8014842: 2b00 cmp r3, #0 8014844: d128 bne.n 8014898 /* A task can only have an inherited priority if it holds the mutex. If the mutex is held by a task then it cannot be given from an interrupt, and if a mutex is given by the holding task then it must be the running state task. Remove the holding task from the ready/delayed list. */ if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8014846: 693b ldr r3, [r7, #16] 8014848: 3304 adds r3, #4 801484a: 4618 mov r0, r3 801484c: f7fd fba6 bl 8011f9c } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 8014850: 693b ldr r3, [r7, #16] 8014852: 6cda ldr r2, [r3, #76] @ 0x4c 8014854: 693b ldr r3, [r7, #16] 8014856: 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. */ 8014858: 693b ldr r3, [r7, #16] 801485a: 6adb ldr r3, [r3, #44] @ 0x2c 801485c: f1c3 0238 rsb r2, r3, #56 @ 0x38 8014860: 693b ldr r3, [r7, #16] 8014862: 619a str r2, [r3, #24] prvAddTaskToReadyList( pxTCB ); 8014864: 693b ldr r3, [r7, #16] 8014866: 6ada ldr r2, [r3, #44] @ 0x2c 8014868: 4b0f ldr r3, [pc, #60] @ (80148a8 ) 801486a: 681b ldr r3, [r3, #0] 801486c: 429a cmp r2, r3 801486e: d903 bls.n 8014878 8014870: 693b ldr r3, [r7, #16] 8014872: 6adb ldr r3, [r3, #44] @ 0x2c 8014874: 4a0c ldr r2, [pc, #48] @ (80148a8 ) 8014876: 6013 str r3, [r2, #0] 8014878: 693b ldr r3, [r7, #16] 801487a: 6ada ldr r2, [r3, #44] @ 0x2c 801487c: 4613 mov r3, r2 801487e: 009b lsls r3, r3, #2 8014880: 4413 add r3, r2 8014882: 009b lsls r3, r3, #2 8014884: 4a09 ldr r2, [pc, #36] @ (80148ac ) 8014886: 441a add r2, r3 8014888: 693b ldr r3, [r7, #16] 801488a: 3304 adds r3, #4 801488c: 4619 mov r1, r3 801488e: 4610 mov r0, r2 8014890: f7fd fb27 bl 8011ee2 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; 8014894: 2301 movs r3, #1 8014896: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 8014898: 697b ldr r3, [r7, #20] } 801489a: 4618 mov r0, r3 801489c: 3718 adds r7, #24 801489e: 46bd mov sp, r7 80148a0: bd80 pop {r7, pc} 80148a2: bf00 nop 80148a4: 24003d70 .word 0x24003d70 80148a8: 2400424c .word 0x2400424c 80148ac: 24003d74 .word 0x24003d74 080148b0 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask ) { 80148b0: b580 push {r7, lr} 80148b2: b088 sub sp, #32 80148b4: af00 add r7, sp, #0 80148b6: 6078 str r0, [r7, #4] 80148b8: 6039 str r1, [r7, #0] TCB_t * const pxTCB = pxMutexHolder; 80148ba: 687b ldr r3, [r7, #4] 80148bc: 61bb str r3, [r7, #24] UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse; const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1; 80148be: 2301 movs r3, #1 80148c0: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 80148c2: 687b ldr r3, [r7, #4] 80148c4: 2b00 cmp r3, #0 80148c6: d06c beq.n 80149a2 { /* If pxMutexHolder is not NULL then the holder must hold at least one mutex. */ configASSERT( pxTCB->uxMutexesHeld ); 80148c8: 69bb ldr r3, [r7, #24] 80148ca: 6d1b ldr r3, [r3, #80] @ 0x50 80148cc: 2b00 cmp r3, #0 80148ce: d10b bne.n 80148e8 __asm volatile 80148d0: f04f 0350 mov.w r3, #80 @ 0x50 80148d4: f383 8811 msr BASEPRI, r3 80148d8: f3bf 8f6f isb sy 80148dc: f3bf 8f4f dsb sy 80148e0: 60fb str r3, [r7, #12] } 80148e2: bf00 nop 80148e4: bf00 nop 80148e6: e7fd b.n 80148e4 /* 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 ) 80148e8: 69bb ldr r3, [r7, #24] 80148ea: 6cdb ldr r3, [r3, #76] @ 0x4c 80148ec: 683a ldr r2, [r7, #0] 80148ee: 429a cmp r2, r3 80148f0: d902 bls.n 80148f8 { uxPriorityToUse = uxHighestPriorityWaitingTask; 80148f2: 683b ldr r3, [r7, #0] 80148f4: 61fb str r3, [r7, #28] 80148f6: e002 b.n 80148fe } else { uxPriorityToUse = pxTCB->uxBasePriority; 80148f8: 69bb ldr r3, [r7, #24] 80148fa: 6cdb ldr r3, [r3, #76] @ 0x4c 80148fc: 61fb str r3, [r7, #28] } /* Does the priority need to change? */ if( pxTCB->uxPriority != uxPriorityToUse ) 80148fe: 69bb ldr r3, [r7, #24] 8014900: 6adb ldr r3, [r3, #44] @ 0x2c 8014902: 69fa ldr r2, [r7, #28] 8014904: 429a cmp r2, r3 8014906: d04c beq.n 80149a2 { /* 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 ) 8014908: 69bb ldr r3, [r7, #24] 801490a: 6d1b ldr r3, [r3, #80] @ 0x50 801490c: 697a ldr r2, [r7, #20] 801490e: 429a cmp r2, r3 8014910: d147 bne.n 80149a2 { /* 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 ); 8014912: 4b26 ldr r3, [pc, #152] @ (80149ac ) 8014914: 681b ldr r3, [r3, #0] 8014916: 69ba ldr r2, [r7, #24] 8014918: 429a cmp r2, r3 801491a: d10b bne.n 8014934 __asm volatile 801491c: f04f 0350 mov.w r3, #80 @ 0x50 8014920: f383 8811 msr BASEPRI, r3 8014924: f3bf 8f6f isb sy 8014928: f3bf 8f4f dsb sy 801492c: 60bb str r3, [r7, #8] } 801492e: bf00 nop 8014930: bf00 nop 8014932: e7fd b.n 8014930 /* Disinherit the priority, remembering the previous priority to facilitate determining the subject task's state. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); uxPriorityUsedOnEntry = pxTCB->uxPriority; 8014934: 69bb ldr r3, [r7, #24] 8014936: 6adb ldr r3, [r3, #44] @ 0x2c 8014938: 613b str r3, [r7, #16] pxTCB->uxPriority = uxPriorityToUse; 801493a: 69bb ldr r3, [r7, #24] 801493c: 69fa ldr r2, [r7, #28] 801493e: 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 ) 8014940: 69bb ldr r3, [r7, #24] 8014942: 699b ldr r3, [r3, #24] 8014944: 2b00 cmp r3, #0 8014946: db04 blt.n 8014952 { 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. */ 8014948: 69fb ldr r3, [r7, #28] 801494a: f1c3 0238 rsb r2, r3, #56 @ 0x38 801494e: 69bb ldr r3, [r7, #24] 8014950: 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 ) 8014952: 69bb ldr r3, [r7, #24] 8014954: 6959 ldr r1, [r3, #20] 8014956: 693a ldr r2, [r7, #16] 8014958: 4613 mov r3, r2 801495a: 009b lsls r3, r3, #2 801495c: 4413 add r3, r2 801495e: 009b lsls r3, r3, #2 8014960: 4a13 ldr r2, [pc, #76] @ (80149b0 ) 8014962: 4413 add r3, r2 8014964: 4299 cmp r1, r3 8014966: d11c bne.n 80149a2 { if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8014968: 69bb ldr r3, [r7, #24] 801496a: 3304 adds r3, #4 801496c: 4618 mov r0, r3 801496e: f7fd fb15 bl 8011f9c else { mtCOVERAGE_TEST_MARKER(); } prvAddTaskToReadyList( pxTCB ); 8014972: 69bb ldr r3, [r7, #24] 8014974: 6ada ldr r2, [r3, #44] @ 0x2c 8014976: 4b0f ldr r3, [pc, #60] @ (80149b4 ) 8014978: 681b ldr r3, [r3, #0] 801497a: 429a cmp r2, r3 801497c: d903 bls.n 8014986 801497e: 69bb ldr r3, [r7, #24] 8014980: 6adb ldr r3, [r3, #44] @ 0x2c 8014982: 4a0c ldr r2, [pc, #48] @ (80149b4 ) 8014984: 6013 str r3, [r2, #0] 8014986: 69bb ldr r3, [r7, #24] 8014988: 6ada ldr r2, [r3, #44] @ 0x2c 801498a: 4613 mov r3, r2 801498c: 009b lsls r3, r3, #2 801498e: 4413 add r3, r2 8014990: 009b lsls r3, r3, #2 8014992: 4a07 ldr r2, [pc, #28] @ (80149b0 ) 8014994: 441a add r2, r3 8014996: 69bb ldr r3, [r7, #24] 8014998: 3304 adds r3, #4 801499a: 4619 mov r1, r3 801499c: 4610 mov r0, r2 801499e: f7fd faa0 bl 8011ee2 } else { mtCOVERAGE_TEST_MARKER(); } } 80149a2: bf00 nop 80149a4: 3720 adds r7, #32 80149a6: 46bd mov sp, r7 80149a8: bd80 pop {r7, pc} 80149aa: bf00 nop 80149ac: 24003d70 .word 0x24003d70 80149b0: 24003d74 .word 0x24003d74 80149b4: 2400424c .word 0x2400424c 080149b8 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) TaskHandle_t pvTaskIncrementMutexHeldCount( void ) { 80149b8: b480 push {r7} 80149ba: af00 add r7, sp, #0 /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 80149bc: 4b07 ldr r3, [pc, #28] @ (80149dc ) 80149be: 681b ldr r3, [r3, #0] 80149c0: 2b00 cmp r3, #0 80149c2: d004 beq.n 80149ce { ( pxCurrentTCB->uxMutexesHeld )++; 80149c4: 4b05 ldr r3, [pc, #20] @ (80149dc ) 80149c6: 681b ldr r3, [r3, #0] 80149c8: 6d1a ldr r2, [r3, #80] @ 0x50 80149ca: 3201 adds r2, #1 80149cc: 651a str r2, [r3, #80] @ 0x50 } return pxCurrentTCB; 80149ce: 4b03 ldr r3, [pc, #12] @ (80149dc ) 80149d0: 681b ldr r3, [r3, #0] } 80149d2: 4618 mov r0, r3 80149d4: 46bd mov sp, r7 80149d6: f85d 7b04 ldr.w r7, [sp], #4 80149da: 4770 bx lr 80149dc: 24003d70 .word 0x24003d70 080149e0 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) { 80149e0: b580 push {r7, lr} 80149e2: b086 sub sp, #24 80149e4: af00 add r7, sp, #0 80149e6: 60f8 str r0, [r7, #12] 80149e8: 60b9 str r1, [r7, #8] 80149ea: 607a str r2, [r7, #4] 80149ec: 603b str r3, [r7, #0] BaseType_t xReturn; taskENTER_CRITICAL(); 80149ee: f000 ffeb bl 80159c8 { /* Only block if a notification is not already pending. */ if( pxCurrentTCB->ucNotifyState != taskNOTIFICATION_RECEIVED ) 80149f2: 4b29 ldr r3, [pc, #164] @ (8014a98 ) 80149f4: 681b ldr r3, [r3, #0] 80149f6: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 80149fa: b2db uxtb r3, r3 80149fc: 2b02 cmp r3, #2 80149fe: d01c beq.n 8014a3a { /* Clear bits in the task's notification value as bits may get set by the notifying task or interrupt. This can be used to clear the value to zero. */ pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClearOnEntry; 8014a00: 4b25 ldr r3, [pc, #148] @ (8014a98 ) 8014a02: 681b ldr r3, [r3, #0] 8014a04: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8014a08: 68fa ldr r2, [r7, #12] 8014a0a: 43d2 mvns r2, r2 8014a0c: 400a ands r2, r1 8014a0e: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 /* Mark this task as waiting for a notification. */ pxCurrentTCB->ucNotifyState = taskWAITING_NOTIFICATION; 8014a12: 4b21 ldr r3, [pc, #132] @ (8014a98 ) 8014a14: 681b ldr r3, [r3, #0] 8014a16: 2201 movs r2, #1 8014a18: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 if( xTicksToWait > ( TickType_t ) 0 ) 8014a1c: 683b ldr r3, [r7, #0] 8014a1e: 2b00 cmp r3, #0 8014a20: d00b beq.n 8014a3a { prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8014a22: 2101 movs r1, #1 8014a24: 6838 ldr r0, [r7, #0] 8014a26: f000 fa09 bl 8014e3c /* All ports are written to allow a yield in a critical section (some will yield immediately, others wait until the critical section exits) - but it is not something that application code should ever do. */ portYIELD_WITHIN_API(); 8014a2a: 4b1c ldr r3, [pc, #112] @ (8014a9c ) 8014a2c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014a30: 601a str r2, [r3, #0] 8014a32: f3bf 8f4f dsb sy 8014a36: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8014a3a: f000 fff7 bl 8015a2c taskENTER_CRITICAL(); 8014a3e: f000 ffc3 bl 80159c8 { traceTASK_NOTIFY_WAIT(); if( pulNotificationValue != NULL ) 8014a42: 687b ldr r3, [r7, #4] 8014a44: 2b00 cmp r3, #0 8014a46: d005 beq.n 8014a54 { /* Output the current notification value, which may or may not have changed. */ *pulNotificationValue = pxCurrentTCB->ulNotifiedValue; 8014a48: 4b13 ldr r3, [pc, #76] @ (8014a98 ) 8014a4a: 681b ldr r3, [r3, #0] 8014a4c: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014a50: 687b ldr r3, [r7, #4] 8014a52: 601a str r2, [r3, #0] /* If ucNotifyValue is set then either the task never entered the blocked state (because a notification was already pending) or the task unblocked because of a notification. Otherwise the task unblocked because of a timeout. */ if( pxCurrentTCB->ucNotifyState != taskNOTIFICATION_RECEIVED ) 8014a54: 4b10 ldr r3, [pc, #64] @ (8014a98 ) 8014a56: 681b ldr r3, [r3, #0] 8014a58: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014a5c: b2db uxtb r3, r3 8014a5e: 2b02 cmp r3, #2 8014a60: d002 beq.n 8014a68 { /* A notification was not received. */ xReturn = pdFALSE; 8014a62: 2300 movs r3, #0 8014a64: 617b str r3, [r7, #20] 8014a66: e00a b.n 8014a7e } else { /* A notification was already pending or a notification was received while the task was waiting. */ pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClearOnExit; 8014a68: 4b0b ldr r3, [pc, #44] @ (8014a98 ) 8014a6a: 681b ldr r3, [r3, #0] 8014a6c: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8014a70: 68ba ldr r2, [r7, #8] 8014a72: 43d2 mvns r2, r2 8014a74: 400a ands r2, r1 8014a76: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 xReturn = pdTRUE; 8014a7a: 2301 movs r3, #1 8014a7c: 617b str r3, [r7, #20] } pxCurrentTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8014a7e: 4b06 ldr r3, [pc, #24] @ (8014a98 ) 8014a80: 681b ldr r3, [r3, #0] 8014a82: 2200 movs r2, #0 8014a84: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 } taskEXIT_CRITICAL(); 8014a88: f000 ffd0 bl 8015a2c return xReturn; 8014a8c: 697b ldr r3, [r7, #20] } 8014a8e: 4618 mov r0, r3 8014a90: 3718 adds r7, #24 8014a92: 46bd mov sp, r7 8014a94: bd80 pop {r7, pc} 8014a96: bf00 nop 8014a98: 24003d70 .word 0x24003d70 8014a9c: e000ed04 .word 0xe000ed04 08014aa0 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) { 8014aa0: b580 push {r7, lr} 8014aa2: b08a sub sp, #40 @ 0x28 8014aa4: af00 add r7, sp, #0 8014aa6: 60f8 str r0, [r7, #12] 8014aa8: 60b9 str r1, [r7, #8] 8014aaa: 603b str r3, [r7, #0] 8014aac: 4613 mov r3, r2 8014aae: 71fb strb r3, [r7, #7] TCB_t * pxTCB; BaseType_t xReturn = pdPASS; 8014ab0: 2301 movs r3, #1 8014ab2: 627b str r3, [r7, #36] @ 0x24 uint8_t ucOriginalNotifyState; configASSERT( xTaskToNotify ); 8014ab4: 68fb ldr r3, [r7, #12] 8014ab6: 2b00 cmp r3, #0 8014ab8: d10b bne.n 8014ad2 __asm volatile 8014aba: f04f 0350 mov.w r3, #80 @ 0x50 8014abe: f383 8811 msr BASEPRI, r3 8014ac2: f3bf 8f6f isb sy 8014ac6: f3bf 8f4f dsb sy 8014aca: 61bb str r3, [r7, #24] } 8014acc: bf00 nop 8014ace: bf00 nop 8014ad0: e7fd b.n 8014ace pxTCB = xTaskToNotify; 8014ad2: 68fb ldr r3, [r7, #12] 8014ad4: 623b str r3, [r7, #32] taskENTER_CRITICAL(); 8014ad6: f000 ff77 bl 80159c8 { if( pulPreviousNotificationValue != NULL ) 8014ada: 683b ldr r3, [r7, #0] 8014adc: 2b00 cmp r3, #0 8014ade: d004 beq.n 8014aea { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8014ae0: 6a3b ldr r3, [r7, #32] 8014ae2: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014ae6: 683b ldr r3, [r7, #0] 8014ae8: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8014aea: 6a3b ldr r3, [r7, #32] 8014aec: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014af0: 77fb strb r3, [r7, #31] pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8014af2: 6a3b ldr r3, [r7, #32] 8014af4: 2202 movs r2, #2 8014af6: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8014afa: 79fb ldrb r3, [r7, #7] 8014afc: 2b04 cmp r3, #4 8014afe: d82e bhi.n 8014b5e 8014b00: a201 add r2, pc, #4 @ (adr r2, 8014b08 ) 8014b02: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8014b06: bf00 nop 8014b08: 08014b83 .word 0x08014b83 8014b0c: 08014b1d .word 0x08014b1d 8014b10: 08014b2f .word 0x08014b2f 8014b14: 08014b3f .word 0x08014b3f 8014b18: 08014b49 .word 0x08014b49 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8014b1c: 6a3b ldr r3, [r7, #32] 8014b1e: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014b22: 68bb ldr r3, [r7, #8] 8014b24: 431a orrs r2, r3 8014b26: 6a3b ldr r3, [r7, #32] 8014b28: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b2c: e02c b.n 8014b88 case eIncrement : ( pxTCB->ulNotifiedValue )++; 8014b2e: 6a3b ldr r3, [r7, #32] 8014b30: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014b34: 1c5a adds r2, r3, #1 8014b36: 6a3b ldr r3, [r7, #32] 8014b38: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b3c: e024 b.n 8014b88 case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8014b3e: 6a3b ldr r3, [r7, #32] 8014b40: 68ba ldr r2, [r7, #8] 8014b42: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b46: e01f b.n 8014b88 case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8014b48: 7ffb ldrb r3, [r7, #31] 8014b4a: 2b02 cmp r3, #2 8014b4c: d004 beq.n 8014b58 { pxTCB->ulNotifiedValue = ulValue; 8014b4e: 6a3b ldr r3, [r7, #32] 8014b50: 68ba ldr r2, [r7, #8] 8014b52: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8014b56: e017 b.n 8014b88 xReturn = pdFAIL; 8014b58: 2300 movs r3, #0 8014b5a: 627b str r3, [r7, #36] @ 0x24 break; 8014b5c: e014 b.n 8014b88 default: /* Should not get here if all enums are handled. Artificially force an assert by testing a value the compiler can't assume is const. */ configASSERT( pxTCB->ulNotifiedValue == ~0UL ); 8014b5e: 6a3b ldr r3, [r7, #32] 8014b60: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014b64: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014b68: d00d beq.n 8014b86 __asm volatile 8014b6a: f04f 0350 mov.w r3, #80 @ 0x50 8014b6e: f383 8811 msr BASEPRI, r3 8014b72: f3bf 8f6f isb sy 8014b76: f3bf 8f4f dsb sy 8014b7a: 617b str r3, [r7, #20] } 8014b7c: bf00 nop 8014b7e: bf00 nop 8014b80: e7fd b.n 8014b7e break; 8014b82: bf00 nop 8014b84: e000 b.n 8014b88 break; 8014b86: bf00 nop traceTASK_NOTIFY(); /* If the task is in the blocked state specifically to wait for a notification then unblock it now. */ if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) 8014b88: 7ffb ldrb r3, [r7, #31] 8014b8a: 2b01 cmp r3, #1 8014b8c: d13b bne.n 8014c06 { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014b8e: 6a3b ldr r3, [r7, #32] 8014b90: 3304 adds r3, #4 8014b92: 4618 mov r0, r3 8014b94: f7fd fa02 bl 8011f9c prvAddTaskToReadyList( pxTCB ); 8014b98: 6a3b ldr r3, [r7, #32] 8014b9a: 6ada ldr r2, [r3, #44] @ 0x2c 8014b9c: 4b1d ldr r3, [pc, #116] @ (8014c14 ) 8014b9e: 681b ldr r3, [r3, #0] 8014ba0: 429a cmp r2, r3 8014ba2: d903 bls.n 8014bac 8014ba4: 6a3b ldr r3, [r7, #32] 8014ba6: 6adb ldr r3, [r3, #44] @ 0x2c 8014ba8: 4a1a ldr r2, [pc, #104] @ (8014c14 ) 8014baa: 6013 str r3, [r2, #0] 8014bac: 6a3b ldr r3, [r7, #32] 8014bae: 6ada ldr r2, [r3, #44] @ 0x2c 8014bb0: 4613 mov r3, r2 8014bb2: 009b lsls r3, r3, #2 8014bb4: 4413 add r3, r2 8014bb6: 009b lsls r3, r3, #2 8014bb8: 4a17 ldr r2, [pc, #92] @ (8014c18 ) 8014bba: 441a add r2, r3 8014bbc: 6a3b ldr r3, [r7, #32] 8014bbe: 3304 adds r3, #4 8014bc0: 4619 mov r1, r3 8014bc2: 4610 mov r0, r2 8014bc4: f7fd f98d bl 8011ee2 /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 8014bc8: 6a3b ldr r3, [r7, #32] 8014bca: 6a9b ldr r3, [r3, #40] @ 0x28 8014bcc: 2b00 cmp r3, #0 8014bce: d00b beq.n 8014be8 __asm volatile 8014bd0: f04f 0350 mov.w r3, #80 @ 0x50 8014bd4: f383 8811 msr BASEPRI, r3 8014bd8: f3bf 8f6f isb sy 8014bdc: f3bf 8f4f dsb sy 8014be0: 613b str r3, [r7, #16] } 8014be2: bf00 nop 8014be4: bf00 nop 8014be6: e7fd b.n 8014be4 earliest possible time. */ prvResetNextTaskUnblockTime(); } #endif if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 8014be8: 6a3b ldr r3, [r7, #32] 8014bea: 6ada ldr r2, [r3, #44] @ 0x2c 8014bec: 4b0b ldr r3, [pc, #44] @ (8014c1c ) 8014bee: 681b ldr r3, [r3, #0] 8014bf0: 6adb ldr r3, [r3, #44] @ 0x2c 8014bf2: 429a cmp r2, r3 8014bf4: d907 bls.n 8014c06 { /* The notified task has a priority above the currently executing task so a yield is required. */ taskYIELD_IF_USING_PREEMPTION(); 8014bf6: 4b0a ldr r3, [pc, #40] @ (8014c20 ) 8014bf8: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014bfc: 601a str r2, [r3, #0] 8014bfe: f3bf 8f4f dsb sy 8014c02: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8014c06: f000 ff11 bl 8015a2c return xReturn; 8014c0a: 6a7b ldr r3, [r7, #36] @ 0x24 } 8014c0c: 4618 mov r0, r3 8014c0e: 3728 adds r7, #40 @ 0x28 8014c10: 46bd mov sp, r7 8014c12: bd80 pop {r7, pc} 8014c14: 2400424c .word 0x2400424c 8014c18: 24003d74 .word 0x24003d74 8014c1c: 24003d70 .word 0x24003d70 8014c20: e000ed04 .word 0xe000ed04 08014c24 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) { 8014c24: b580 push {r7, lr} 8014c26: b08e sub sp, #56 @ 0x38 8014c28: af00 add r7, sp, #0 8014c2a: 60f8 str r0, [r7, #12] 8014c2c: 60b9 str r1, [r7, #8] 8014c2e: 603b str r3, [r7, #0] 8014c30: 4613 mov r3, r2 8014c32: 71fb strb r3, [r7, #7] TCB_t * pxTCB; uint8_t ucOriginalNotifyState; BaseType_t xReturn = pdPASS; 8014c34: 2301 movs r3, #1 8014c36: 637b str r3, [r7, #52] @ 0x34 UBaseType_t uxSavedInterruptStatus; configASSERT( xTaskToNotify ); 8014c38: 68fb ldr r3, [r7, #12] 8014c3a: 2b00 cmp r3, #0 8014c3c: d10b bne.n 8014c56 __asm volatile 8014c3e: f04f 0350 mov.w r3, #80 @ 0x50 8014c42: f383 8811 msr BASEPRI, r3 8014c46: f3bf 8f6f isb sy 8014c4a: f3bf 8f4f dsb sy 8014c4e: 627b str r3, [r7, #36] @ 0x24 } 8014c50: bf00 nop 8014c52: bf00 nop 8014c54: e7fd b.n 8014c52 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(); 8014c56: f000 ff97 bl 8015b88 pxTCB = xTaskToNotify; 8014c5a: 68fb ldr r3, [r7, #12] 8014c5c: 633b str r3, [r7, #48] @ 0x30 __asm volatile 8014c5e: f3ef 8211 mrs r2, BASEPRI 8014c62: f04f 0350 mov.w r3, #80 @ 0x50 8014c66: f383 8811 msr BASEPRI, r3 8014c6a: f3bf 8f6f isb sy 8014c6e: f3bf 8f4f dsb sy 8014c72: 623a str r2, [r7, #32] 8014c74: 61fb str r3, [r7, #28] return ulOriginalBASEPRI; 8014c76: 6a3b ldr r3, [r7, #32] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8014c78: 62fb str r3, [r7, #44] @ 0x2c { if( pulPreviousNotificationValue != NULL ) 8014c7a: 683b ldr r3, [r7, #0] 8014c7c: 2b00 cmp r3, #0 8014c7e: d004 beq.n 8014c8a { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8014c80: 6b3b ldr r3, [r7, #48] @ 0x30 8014c82: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014c86: 683b ldr r3, [r7, #0] 8014c88: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8014c8a: 6b3b ldr r3, [r7, #48] @ 0x30 8014c8c: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014c90: f887 302b strb.w r3, [r7, #43] @ 0x2b pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8014c94: 6b3b ldr r3, [r7, #48] @ 0x30 8014c96: 2202 movs r2, #2 8014c98: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8014c9c: 79fb ldrb r3, [r7, #7] 8014c9e: 2b04 cmp r3, #4 8014ca0: d82e bhi.n 8014d00 8014ca2: a201 add r2, pc, #4 @ (adr r2, 8014ca8 ) 8014ca4: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8014ca8: 08014d25 .word 0x08014d25 8014cac: 08014cbd .word 0x08014cbd 8014cb0: 08014ccf .word 0x08014ccf 8014cb4: 08014cdf .word 0x08014cdf 8014cb8: 08014ce9 .word 0x08014ce9 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8014cbc: 6b3b ldr r3, [r7, #48] @ 0x30 8014cbe: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014cc2: 68bb ldr r3, [r7, #8] 8014cc4: 431a orrs r2, r3 8014cc6: 6b3b ldr r3, [r7, #48] @ 0x30 8014cc8: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014ccc: e02d b.n 8014d2a case eIncrement : ( pxTCB->ulNotifiedValue )++; 8014cce: 6b3b ldr r3, [r7, #48] @ 0x30 8014cd0: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014cd4: 1c5a adds r2, r3, #1 8014cd6: 6b3b ldr r3, [r7, #48] @ 0x30 8014cd8: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014cdc: e025 b.n 8014d2a case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8014cde: 6b3b ldr r3, [r7, #48] @ 0x30 8014ce0: 68ba ldr r2, [r7, #8] 8014ce2: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014ce6: e020 b.n 8014d2a case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8014ce8: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014cec: 2b02 cmp r3, #2 8014cee: d004 beq.n 8014cfa { pxTCB->ulNotifiedValue = ulValue; 8014cf0: 6b3b ldr r3, [r7, #48] @ 0x30 8014cf2: 68ba ldr r2, [r7, #8] 8014cf4: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8014cf8: e017 b.n 8014d2a xReturn = pdFAIL; 8014cfa: 2300 movs r3, #0 8014cfc: 637b str r3, [r7, #52] @ 0x34 break; 8014cfe: e014 b.n 8014d2a default: /* Should not get here if all enums are handled. Artificially force an assert by testing a value the compiler can't assume is const. */ configASSERT( pxTCB->ulNotifiedValue == ~0UL ); 8014d00: 6b3b ldr r3, [r7, #48] @ 0x30 8014d02: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014d06: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014d0a: d00d beq.n 8014d28 __asm volatile 8014d0c: f04f 0350 mov.w r3, #80 @ 0x50 8014d10: f383 8811 msr BASEPRI, r3 8014d14: f3bf 8f6f isb sy 8014d18: f3bf 8f4f dsb sy 8014d1c: 61bb str r3, [r7, #24] } 8014d1e: bf00 nop 8014d20: bf00 nop 8014d22: e7fd b.n 8014d20 break; 8014d24: bf00 nop 8014d26: e000 b.n 8014d2a break; 8014d28: bf00 nop traceTASK_NOTIFY_FROM_ISR(); /* If the task is in the blocked state specifically to wait for a notification then unblock it now. */ if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) 8014d2a: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014d2e: 2b01 cmp r3, #1 8014d30: d147 bne.n 8014dc2 { /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 8014d32: 6b3b ldr r3, [r7, #48] @ 0x30 8014d34: 6a9b ldr r3, [r3, #40] @ 0x28 8014d36: 2b00 cmp r3, #0 8014d38: d00b beq.n 8014d52 __asm volatile 8014d3a: f04f 0350 mov.w r3, #80 @ 0x50 8014d3e: f383 8811 msr BASEPRI, r3 8014d42: f3bf 8f6f isb sy 8014d46: f3bf 8f4f dsb sy 8014d4a: 617b str r3, [r7, #20] } 8014d4c: bf00 nop 8014d4e: bf00 nop 8014d50: e7fd b.n 8014d4e if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8014d52: 4b21 ldr r3, [pc, #132] @ (8014dd8 ) 8014d54: 681b ldr r3, [r3, #0] 8014d56: 2b00 cmp r3, #0 8014d58: d11d bne.n 8014d96 { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014d5a: 6b3b ldr r3, [r7, #48] @ 0x30 8014d5c: 3304 adds r3, #4 8014d5e: 4618 mov r0, r3 8014d60: f7fd f91c bl 8011f9c prvAddTaskToReadyList( pxTCB ); 8014d64: 6b3b ldr r3, [r7, #48] @ 0x30 8014d66: 6ada ldr r2, [r3, #44] @ 0x2c 8014d68: 4b1c ldr r3, [pc, #112] @ (8014ddc ) 8014d6a: 681b ldr r3, [r3, #0] 8014d6c: 429a cmp r2, r3 8014d6e: d903 bls.n 8014d78 8014d70: 6b3b ldr r3, [r7, #48] @ 0x30 8014d72: 6adb ldr r3, [r3, #44] @ 0x2c 8014d74: 4a19 ldr r2, [pc, #100] @ (8014ddc ) 8014d76: 6013 str r3, [r2, #0] 8014d78: 6b3b ldr r3, [r7, #48] @ 0x30 8014d7a: 6ada ldr r2, [r3, #44] @ 0x2c 8014d7c: 4613 mov r3, r2 8014d7e: 009b lsls r3, r3, #2 8014d80: 4413 add r3, r2 8014d82: 009b lsls r3, r3, #2 8014d84: 4a16 ldr r2, [pc, #88] @ (8014de0 ) 8014d86: 441a add r2, r3 8014d88: 6b3b ldr r3, [r7, #48] @ 0x30 8014d8a: 3304 adds r3, #4 8014d8c: 4619 mov r1, r3 8014d8e: 4610 mov r0, r2 8014d90: f7fd f8a7 bl 8011ee2 8014d94: e005 b.n 8014da2 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxTCB->xEventListItem ) ); 8014d96: 6b3b ldr r3, [r7, #48] @ 0x30 8014d98: 3318 adds r3, #24 8014d9a: 4619 mov r1, r3 8014d9c: 4811 ldr r0, [pc, #68] @ (8014de4 ) 8014d9e: f7fd f8a0 bl 8011ee2 } if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 8014da2: 6b3b ldr r3, [r7, #48] @ 0x30 8014da4: 6ada ldr r2, [r3, #44] @ 0x2c 8014da6: 4b10 ldr r3, [pc, #64] @ (8014de8 ) 8014da8: 681b ldr r3, [r3, #0] 8014daa: 6adb ldr r3, [r3, #44] @ 0x2c 8014dac: 429a cmp r2, r3 8014dae: d908 bls.n 8014dc2 { /* The notified task has a priority above the currently executing task so a yield is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8014db0: 6c3b ldr r3, [r7, #64] @ 0x40 8014db2: 2b00 cmp r3, #0 8014db4: d002 beq.n 8014dbc { *pxHigherPriorityTaskWoken = pdTRUE; 8014db6: 6c3b ldr r3, [r7, #64] @ 0x40 8014db8: 2201 movs r2, #1 8014dba: 601a str r2, [r3, #0] } /* Mark that a yield is pending in case the user is not using the "xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */ xYieldPending = pdTRUE; 8014dbc: 4b0b ldr r3, [pc, #44] @ (8014dec ) 8014dbe: 2201 movs r2, #1 8014dc0: 601a str r2, [r3, #0] 8014dc2: 6afb ldr r3, [r7, #44] @ 0x2c 8014dc4: 613b str r3, [r7, #16] __asm volatile 8014dc6: 693b ldr r3, [r7, #16] 8014dc8: f383 8811 msr BASEPRI, r3 } 8014dcc: bf00 nop } } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8014dce: 6b7b ldr r3, [r7, #52] @ 0x34 } 8014dd0: 4618 mov r0, r3 8014dd2: 3738 adds r7, #56 @ 0x38 8014dd4: 46bd mov sp, r7 8014dd6: bd80 pop {r7, pc} 8014dd8: 2400426c .word 0x2400426c 8014ddc: 2400424c .word 0x2400424c 8014de0: 24003d74 .word 0x24003d74 8014de4: 24004204 .word 0x24004204 8014de8: 24003d70 .word 0x24003d70 8014dec: 24004258 .word 0x24004258 08014df0 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask ) { 8014df0: b580 push {r7, lr} 8014df2: b084 sub sp, #16 8014df4: af00 add r7, sp, #0 8014df6: 6078 str r0, [r7, #4] TCB_t *pxTCB; BaseType_t xReturn; /* If null is passed in here then it is the calling task that is having its notification state cleared. */ pxTCB = prvGetTCBFromHandle( xTask ); 8014df8: 687b ldr r3, [r7, #4] 8014dfa: 2b00 cmp r3, #0 8014dfc: d102 bne.n 8014e04 8014dfe: 4b0e ldr r3, [pc, #56] @ (8014e38 ) 8014e00: 681b ldr r3, [r3, #0] 8014e02: e000 b.n 8014e06 8014e04: 687b ldr r3, [r7, #4] 8014e06: 60bb str r3, [r7, #8] taskENTER_CRITICAL(); 8014e08: f000 fdde bl 80159c8 { if( pxTCB->ucNotifyState == taskNOTIFICATION_RECEIVED ) 8014e0c: 68bb ldr r3, [r7, #8] 8014e0e: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014e12: b2db uxtb r3, r3 8014e14: 2b02 cmp r3, #2 8014e16: d106 bne.n 8014e26 { pxTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8014e18: 68bb ldr r3, [r7, #8] 8014e1a: 2200 movs r2, #0 8014e1c: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 xReturn = pdPASS; 8014e20: 2301 movs r3, #1 8014e22: 60fb str r3, [r7, #12] 8014e24: e001 b.n 8014e2a } else { xReturn = pdFAIL; 8014e26: 2300 movs r3, #0 8014e28: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8014e2a: f000 fdff bl 8015a2c return xReturn; 8014e2e: 68fb ldr r3, [r7, #12] } 8014e30: 4618 mov r0, r3 8014e32: 3710 adds r7, #16 8014e34: 46bd mov sp, r7 8014e36: bd80 pop {r7, pc} 8014e38: 24003d70 .word 0x24003d70 08014e3c : #endif /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely ) { 8014e3c: b580 push {r7, lr} 8014e3e: b084 sub sp, #16 8014e40: af00 add r7, sp, #0 8014e42: 6078 str r0, [r7, #4] 8014e44: 6039 str r1, [r7, #0] TickType_t xTimeToWake; const TickType_t xConstTickCount = xTickCount; 8014e46: 4b21 ldr r3, [pc, #132] @ (8014ecc ) 8014e48: 681b ldr r3, [r3, #0] 8014e4a: 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 ) 8014e4c: 4b20 ldr r3, [pc, #128] @ (8014ed0 ) 8014e4e: 681b ldr r3, [r3, #0] 8014e50: 3304 adds r3, #4 8014e52: 4618 mov r0, r3 8014e54: f7fd f8a2 bl 8011f9c mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) 8014e58: 687b ldr r3, [r7, #4] 8014e5a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014e5e: d10a bne.n 8014e76 8014e60: 683b ldr r3, [r7, #0] 8014e62: 2b00 cmp r3, #0 8014e64: d007 beq.n 8014e76 { /* 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 ) ); 8014e66: 4b1a ldr r3, [pc, #104] @ (8014ed0 ) 8014e68: 681b ldr r3, [r3, #0] 8014e6a: 3304 adds r3, #4 8014e6c: 4619 mov r1, r3 8014e6e: 4819 ldr r0, [pc, #100] @ (8014ed4 ) 8014e70: f7fd f837 bl 8011ee2 /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */ ( void ) xCanBlockIndefinitely; } #endif /* INCLUDE_vTaskSuspend */ } 8014e74: e026 b.n 8014ec4 xTimeToWake = xConstTickCount + xTicksToWait; 8014e76: 68fa ldr r2, [r7, #12] 8014e78: 687b ldr r3, [r7, #4] 8014e7a: 4413 add r3, r2 8014e7c: 60bb str r3, [r7, #8] listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake ); 8014e7e: 4b14 ldr r3, [pc, #80] @ (8014ed0 ) 8014e80: 681b ldr r3, [r3, #0] 8014e82: 68ba ldr r2, [r7, #8] 8014e84: 605a str r2, [r3, #4] if( xTimeToWake < xConstTickCount ) 8014e86: 68ba ldr r2, [r7, #8] 8014e88: 68fb ldr r3, [r7, #12] 8014e8a: 429a cmp r2, r3 8014e8c: d209 bcs.n 8014ea2 vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 8014e8e: 4b12 ldr r3, [pc, #72] @ (8014ed8 ) 8014e90: 681a ldr r2, [r3, #0] 8014e92: 4b0f ldr r3, [pc, #60] @ (8014ed0 ) 8014e94: 681b ldr r3, [r3, #0] 8014e96: 3304 adds r3, #4 8014e98: 4619 mov r1, r3 8014e9a: 4610 mov r0, r2 8014e9c: f7fd f845 bl 8011f2a } 8014ea0: e010 b.n 8014ec4 vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 8014ea2: 4b0e ldr r3, [pc, #56] @ (8014edc ) 8014ea4: 681a ldr r2, [r3, #0] 8014ea6: 4b0a ldr r3, [pc, #40] @ (8014ed0 ) 8014ea8: 681b ldr r3, [r3, #0] 8014eaa: 3304 adds r3, #4 8014eac: 4619 mov r1, r3 8014eae: 4610 mov r0, r2 8014eb0: f7fd f83b bl 8011f2a if( xTimeToWake < xNextTaskUnblockTime ) 8014eb4: 4b0a ldr r3, [pc, #40] @ (8014ee0 ) 8014eb6: 681b ldr r3, [r3, #0] 8014eb8: 68ba ldr r2, [r7, #8] 8014eba: 429a cmp r2, r3 8014ebc: d202 bcs.n 8014ec4 xNextTaskUnblockTime = xTimeToWake; 8014ebe: 4a08 ldr r2, [pc, #32] @ (8014ee0 ) 8014ec0: 68bb ldr r3, [r7, #8] 8014ec2: 6013 str r3, [r2, #0] } 8014ec4: bf00 nop 8014ec6: 3710 adds r7, #16 8014ec8: 46bd mov sp, r7 8014eca: bd80 pop {r7, pc} 8014ecc: 24004248 .word 0x24004248 8014ed0: 24003d70 .word 0x24003d70 8014ed4: 24004230 .word 0x24004230 8014ed8: 24004200 .word 0x24004200 8014edc: 240041fc .word 0x240041fc 8014ee0: 24004264 .word 0x24004264 08014ee4 : TimerCallbackFunction_t pxCallbackFunction, Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 8014ee4: b580 push {r7, lr} 8014ee6: b08a sub sp, #40 @ 0x28 8014ee8: af04 add r7, sp, #16 BaseType_t xReturn = pdFAIL; 8014eea: 2300 movs r3, #0 8014eec: 617b str r3, [r7, #20] /* This function is called when the scheduler is started if configUSE_TIMERS is set to 1. Check that the infrastructure used by the timer service task has been created/initialised. If timers have already been created then the initialisation will already have been performed. */ prvCheckForValidListAndQueue(); 8014eee: f000 fbb1 bl 8015654 if( xTimerQueue != NULL ) 8014ef2: 4b1d ldr r3, [pc, #116] @ (8014f68 ) 8014ef4: 681b ldr r3, [r3, #0] 8014ef6: 2b00 cmp r3, #0 8014ef8: d021 beq.n 8014f3e { #if( configSUPPORT_STATIC_ALLOCATION == 1 ) { StaticTask_t *pxTimerTaskTCBBuffer = NULL; 8014efa: 2300 movs r3, #0 8014efc: 60fb str r3, [r7, #12] StackType_t *pxTimerTaskStackBuffer = NULL; 8014efe: 2300 movs r3, #0 8014f00: 60bb str r3, [r7, #8] uint32_t ulTimerTaskStackSize; vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize ); 8014f02: 1d3a adds r2, r7, #4 8014f04: f107 0108 add.w r1, r7, #8 8014f08: f107 030c add.w r3, r7, #12 8014f0c: 4618 mov r0, r3 8014f0e: f7fc ffa1 bl 8011e54 xTimerTaskHandle = xTaskCreateStatic( prvTimerTask, 8014f12: 6879 ldr r1, [r7, #4] 8014f14: 68bb ldr r3, [r7, #8] 8014f16: 68fa ldr r2, [r7, #12] 8014f18: 9202 str r2, [sp, #8] 8014f1a: 9301 str r3, [sp, #4] 8014f1c: 2302 movs r3, #2 8014f1e: 9300 str r3, [sp, #0] 8014f20: 2300 movs r3, #0 8014f22: 460a mov r2, r1 8014f24: 4911 ldr r1, [pc, #68] @ (8014f6c ) 8014f26: 4812 ldr r0, [pc, #72] @ (8014f70 ) 8014f28: f7fe fd1c bl 8013964 8014f2c: 4603 mov r3, r0 8014f2e: 4a11 ldr r2, [pc, #68] @ (8014f74 ) 8014f30: 6013 str r3, [r2, #0] NULL, ( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, pxTimerTaskStackBuffer, pxTimerTaskTCBBuffer ); if( xTimerTaskHandle != NULL ) 8014f32: 4b10 ldr r3, [pc, #64] @ (8014f74 ) 8014f34: 681b ldr r3, [r3, #0] 8014f36: 2b00 cmp r3, #0 8014f38: d001 beq.n 8014f3e { xReturn = pdPASS; 8014f3a: 2301 movs r3, #1 8014f3c: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 8014f3e: 697b ldr r3, [r7, #20] 8014f40: 2b00 cmp r3, #0 8014f42: d10b bne.n 8014f5c __asm volatile 8014f44: f04f 0350 mov.w r3, #80 @ 0x50 8014f48: f383 8811 msr BASEPRI, r3 8014f4c: f3bf 8f6f isb sy 8014f50: f3bf 8f4f dsb sy 8014f54: 613b str r3, [r7, #16] } 8014f56: bf00 nop 8014f58: bf00 nop 8014f5a: e7fd b.n 8014f58 return xReturn; 8014f5c: 697b ldr r3, [r7, #20] } 8014f5e: 4618 mov r0, r3 8014f60: 3718 adds r7, #24 8014f62: 46bd mov sp, r7 8014f64: bd80 pop {r7, pc} 8014f66: bf00 nop 8014f68: 240042a0 .word 0x240042a0 8014f6c: 0802db74 .word 0x0802db74 8014f70: 080151ed .word 0x080151ed 8014f74: 240042a4 .word 0x240042a4 08014f78 : TimerHandle_t xTimerCreate( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) { 8014f78: b580 push {r7, lr} 8014f7a: b088 sub sp, #32 8014f7c: af02 add r7, sp, #8 8014f7e: 60f8 str r0, [r7, #12] 8014f80: 60b9 str r1, [r7, #8] 8014f82: 607a str r2, [r7, #4] 8014f84: 603b str r3, [r7, #0] Timer_t *pxNewTimer; pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_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 Timer_t is always a pointer to the timer's mame. */ 8014f86: 202c movs r0, #44 @ 0x2c 8014f88: f000 fe40 bl 8015c0c 8014f8c: 6178 str r0, [r7, #20] if( pxNewTimer != NULL ) 8014f8e: 697b ldr r3, [r7, #20] 8014f90: 2b00 cmp r3, #0 8014f92: d00d beq.n 8014fb0 { /* Status is thus far zero as the timer is not created statically and has not been started. The auto-reload bit may get set in prvInitialiseNewTimer. */ pxNewTimer->ucStatus = 0x00; 8014f94: 697b ldr r3, [r7, #20] 8014f96: 2200 movs r2, #0 8014f98: f883 2028 strb.w r2, [r3, #40] @ 0x28 prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer ); 8014f9c: 697b ldr r3, [r7, #20] 8014f9e: 9301 str r3, [sp, #4] 8014fa0: 6a3b ldr r3, [r7, #32] 8014fa2: 9300 str r3, [sp, #0] 8014fa4: 683b ldr r3, [r7, #0] 8014fa6: 687a ldr r2, [r7, #4] 8014fa8: 68b9 ldr r1, [r7, #8] 8014faa: 68f8 ldr r0, [r7, #12] 8014fac: f000 f845 bl 801503a } return pxNewTimer; 8014fb0: 697b ldr r3, [r7, #20] } 8014fb2: 4618 mov r0, r3 8014fb4: 3718 adds r7, #24 8014fb6: 46bd mov sp, r7 8014fb8: bd80 pop {r7, pc} 08014fba : const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer ) { 8014fba: b580 push {r7, lr} 8014fbc: b08a sub sp, #40 @ 0x28 8014fbe: af02 add r7, sp, #8 8014fc0: 60f8 str r0, [r7, #12] 8014fc2: 60b9 str r1, [r7, #8] 8014fc4: 607a str r2, [r7, #4] 8014fc6: 603b str r3, [r7, #0] #if( configASSERT_DEFINED == 1 ) { /* Sanity check that the size of the structure used to declare a variable of type StaticTimer_t equals the size of the real timer structure. */ volatile size_t xSize = sizeof( StaticTimer_t ); 8014fc8: 232c movs r3, #44 @ 0x2c 8014fca: 613b str r3, [r7, #16] configASSERT( xSize == sizeof( Timer_t ) ); 8014fcc: 693b ldr r3, [r7, #16] 8014fce: 2b2c cmp r3, #44 @ 0x2c 8014fd0: d00b beq.n 8014fea __asm volatile 8014fd2: f04f 0350 mov.w r3, #80 @ 0x50 8014fd6: f383 8811 msr BASEPRI, r3 8014fda: f3bf 8f6f isb sy 8014fde: f3bf 8f4f dsb sy 8014fe2: 61bb str r3, [r7, #24] } 8014fe4: bf00 nop 8014fe6: bf00 nop 8014fe8: e7fd b.n 8014fe6 ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 8014fea: 693b ldr r3, [r7, #16] } #endif /* configASSERT_DEFINED */ /* A pointer to a StaticTimer_t structure MUST be provided, use it. */ configASSERT( pxTimerBuffer ); 8014fec: 6afb ldr r3, [r7, #44] @ 0x2c 8014fee: 2b00 cmp r3, #0 8014ff0: d10b bne.n 801500a __asm volatile 8014ff2: f04f 0350 mov.w r3, #80 @ 0x50 8014ff6: f383 8811 msr BASEPRI, r3 8014ffa: f3bf 8f6f isb sy 8014ffe: f3bf 8f4f dsb sy 8015002: 617b str r3, [r7, #20] } 8015004: bf00 nop 8015006: bf00 nop 8015008: e7fd b.n 8015006 pxNewTimer = ( Timer_t * ) pxTimerBuffer; /*lint !e740 !e9087 StaticTimer_t is a pointer to a Timer_t, so guaranteed to be aligned and sized correctly (checked by an assert()), so this is safe. */ 801500a: 6afb ldr r3, [r7, #44] @ 0x2c 801500c: 61fb str r3, [r7, #28] if( pxNewTimer != NULL ) 801500e: 69fb ldr r3, [r7, #28] 8015010: 2b00 cmp r3, #0 8015012: d00d beq.n 8015030 { /* Timers can be created statically or dynamically so note this timer was created statically in case it is later deleted. The auto-reload bit may get set in prvInitialiseNewTimer(). */ pxNewTimer->ucStatus = tmrSTATUS_IS_STATICALLY_ALLOCATED; 8015014: 69fb ldr r3, [r7, #28] 8015016: 2202 movs r2, #2 8015018: f883 2028 strb.w r2, [r3, #40] @ 0x28 prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer ); 801501c: 69fb ldr r3, [r7, #28] 801501e: 9301 str r3, [sp, #4] 8015020: 6abb ldr r3, [r7, #40] @ 0x28 8015022: 9300 str r3, [sp, #0] 8015024: 683b ldr r3, [r7, #0] 8015026: 687a ldr r2, [r7, #4] 8015028: 68b9 ldr r1, [r7, #8] 801502a: 68f8 ldr r0, [r7, #12] 801502c: f000 f805 bl 801503a } return pxNewTimer; 8015030: 69fb ldr r3, [r7, #28] } 8015032: 4618 mov r0, r3 8015034: 3720 adds r7, #32 8015036: 46bd mov sp, r7 8015038: bd80 pop {r7, pc} 0801503a : const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, Timer_t *pxNewTimer ) { 801503a: b580 push {r7, lr} 801503c: b086 sub sp, #24 801503e: af00 add r7, sp, #0 8015040: 60f8 str r0, [r7, #12] 8015042: 60b9 str r1, [r7, #8] 8015044: 607a str r2, [r7, #4] 8015046: 603b str r3, [r7, #0] /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 8015048: 68bb ldr r3, [r7, #8] 801504a: 2b00 cmp r3, #0 801504c: d10b bne.n 8015066 __asm volatile 801504e: f04f 0350 mov.w r3, #80 @ 0x50 8015052: f383 8811 msr BASEPRI, r3 8015056: f3bf 8f6f isb sy 801505a: f3bf 8f4f dsb sy 801505e: 617b str r3, [r7, #20] } 8015060: bf00 nop 8015062: bf00 nop 8015064: e7fd b.n 8015062 if( pxNewTimer != NULL ) 8015066: 6a7b ldr r3, [r7, #36] @ 0x24 8015068: 2b00 cmp r3, #0 801506a: d01e beq.n 80150aa { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 801506c: f000 faf2 bl 8015654 /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; 8015070: 6a7b ldr r3, [r7, #36] @ 0x24 8015072: 68fa ldr r2, [r7, #12] 8015074: 601a str r2, [r3, #0] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 8015076: 6a7b ldr r3, [r7, #36] @ 0x24 8015078: 68ba ldr r2, [r7, #8] 801507a: 619a str r2, [r3, #24] pxNewTimer->pvTimerID = pvTimerID; 801507c: 6a7b ldr r3, [r7, #36] @ 0x24 801507e: 683a ldr r2, [r7, #0] 8015080: 61da str r2, [r3, #28] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 8015082: 6a7b ldr r3, [r7, #36] @ 0x24 8015084: 6a3a ldr r2, [r7, #32] 8015086: 621a str r2, [r3, #32] vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 8015088: 6a7b ldr r3, [r7, #36] @ 0x24 801508a: 3304 adds r3, #4 801508c: 4618 mov r0, r3 801508e: f7fc ff1b bl 8011ec8 if( uxAutoReload != pdFALSE ) 8015092: 687b ldr r3, [r7, #4] 8015094: 2b00 cmp r3, #0 8015096: d008 beq.n 80150aa { pxNewTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD; 8015098: 6a7b ldr r3, [r7, #36] @ 0x24 801509a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801509e: f043 0304 orr.w r3, r3, #4 80150a2: b2da uxtb r2, r3 80150a4: 6a7b ldr r3, [r7, #36] @ 0x24 80150a6: f883 2028 strb.w r2, [r3, #40] @ 0x28 } traceTIMER_CREATE( pxNewTimer ); } } 80150aa: bf00 nop 80150ac: 3718 adds r7, #24 80150ae: 46bd mov sp, r7 80150b0: bd80 pop {r7, pc} ... 080150b4 : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 80150b4: b580 push {r7, lr} 80150b6: b08a sub sp, #40 @ 0x28 80150b8: af00 add r7, sp, #0 80150ba: 60f8 str r0, [r7, #12] 80150bc: 60b9 str r1, [r7, #8] 80150be: 607a str r2, [r7, #4] 80150c0: 603b str r3, [r7, #0] BaseType_t xReturn = pdFAIL; 80150c2: 2300 movs r3, #0 80150c4: 627b str r3, [r7, #36] @ 0x24 DaemonTaskMessage_t xMessage; configASSERT( xTimer ); 80150c6: 68fb ldr r3, [r7, #12] 80150c8: 2b00 cmp r3, #0 80150ca: d10b bne.n 80150e4 __asm volatile 80150cc: f04f 0350 mov.w r3, #80 @ 0x50 80150d0: f383 8811 msr BASEPRI, r3 80150d4: f3bf 8f6f isb sy 80150d8: f3bf 8f4f dsb sy 80150dc: 623b str r3, [r7, #32] } 80150de: bf00 nop 80150e0: bf00 nop 80150e2: e7fd b.n 80150e0 /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 80150e4: 4b19 ldr r3, [pc, #100] @ (801514c ) 80150e6: 681b ldr r3, [r3, #0] 80150e8: 2b00 cmp r3, #0 80150ea: d02a beq.n 8015142 { /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; 80150ec: 68bb ldr r3, [r7, #8] 80150ee: 613b str r3, [r7, #16] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 80150f0: 687b ldr r3, [r7, #4] 80150f2: 617b str r3, [r7, #20] xMessage.u.xTimerParameters.pxTimer = xTimer; 80150f4: 68fb ldr r3, [r7, #12] 80150f6: 61bb str r3, [r7, #24] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 80150f8: 68bb ldr r3, [r7, #8] 80150fa: 2b05 cmp r3, #5 80150fc: dc18 bgt.n 8015130 { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 80150fe: f7ff fae1 bl 80146c4 8015102: 4603 mov r3, r0 8015104: 2b02 cmp r3, #2 8015106: d109 bne.n 801511c { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 8015108: 4b10 ldr r3, [pc, #64] @ (801514c ) 801510a: 6818 ldr r0, [r3, #0] 801510c: f107 0110 add.w r1, r7, #16 8015110: 2300 movs r3, #0 8015112: 6b3a ldr r2, [r7, #48] @ 0x30 8015114: f7fd f9d8 bl 80124c8 8015118: 6278 str r0, [r7, #36] @ 0x24 801511a: e012 b.n 8015142 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 801511c: 4b0b ldr r3, [pc, #44] @ (801514c ) 801511e: 6818 ldr r0, [r3, #0] 8015120: f107 0110 add.w r1, r7, #16 8015124: 2300 movs r3, #0 8015126: 2200 movs r2, #0 8015128: f7fd f9ce bl 80124c8 801512c: 6278 str r0, [r7, #36] @ 0x24 801512e: e008 b.n 8015142 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 8015130: 4b06 ldr r3, [pc, #24] @ (801514c ) 8015132: 6818 ldr r0, [r3, #0] 8015134: f107 0110 add.w r1, r7, #16 8015138: 2300 movs r3, #0 801513a: 683a ldr r2, [r7, #0] 801513c: f7fd fac6 bl 80126cc 8015140: 6278 str r0, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 8015142: 6a7b ldr r3, [r7, #36] @ 0x24 } 8015144: 4618 mov r0, r3 8015146: 3728 adds r7, #40 @ 0x28 8015148: 46bd mov sp, r7 801514a: bd80 pop {r7, pc} 801514c: 240042a0 .word 0x240042a0 08015150 : return pxTimer->pcTimerName; } /*-----------------------------------------------------------*/ static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow ) { 8015150: b580 push {r7, lr} 8015152: b088 sub sp, #32 8015154: af02 add r7, sp, #8 8015156: 6078 str r0, [r7, #4] 8015158: 6039 str r1, [r7, #0] BaseType_t xResult; Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 801515a: 4b23 ldr r3, [pc, #140] @ (80151e8 ) 801515c: 681b ldr r3, [r3, #0] 801515e: 68db ldr r3, [r3, #12] 8015160: 68db ldr r3, [r3, #12] 8015162: 617b str r3, [r7, #20] /* Remove the timer from the list of active timers. A check has already been performed to ensure the list is not empty. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 8015164: 697b ldr r3, [r7, #20] 8015166: 3304 adds r3, #4 8015168: 4618 mov r0, r3 801516a: f7fc ff17 bl 8011f9c traceTIMER_EXPIRED( pxTimer ); /* If the timer is an auto-reload timer then calculate the next expiry time and re-insert the timer in the list of active timers. */ if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 801516e: 697b ldr r3, [r7, #20] 8015170: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015174: f003 0304 and.w r3, r3, #4 8015178: 2b00 cmp r3, #0 801517a: d023 beq.n 80151c4 { /* The timer is inserted into a list using a time relative to anything other than the current time. It will therefore be inserted into the correct list relative to the time this task thinks it is now. */ if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE ) 801517c: 697b ldr r3, [r7, #20] 801517e: 699a ldr r2, [r3, #24] 8015180: 687b ldr r3, [r7, #4] 8015182: 18d1 adds r1, r2, r3 8015184: 687b ldr r3, [r7, #4] 8015186: 683a ldr r2, [r7, #0] 8015188: 6978 ldr r0, [r7, #20] 801518a: f000 f8d5 bl 8015338 801518e: 4603 mov r3, r0 8015190: 2b00 cmp r3, #0 8015192: d020 beq.n 80151d6 { /* The timer expired before it was added to the active timer list. Reload it now. */ xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 8015194: 2300 movs r3, #0 8015196: 9300 str r3, [sp, #0] 8015198: 2300 movs r3, #0 801519a: 687a ldr r2, [r7, #4] 801519c: 2100 movs r1, #0 801519e: 6978 ldr r0, [r7, #20] 80151a0: f7ff ff88 bl 80150b4 80151a4: 6138 str r0, [r7, #16] configASSERT( xResult ); 80151a6: 693b ldr r3, [r7, #16] 80151a8: 2b00 cmp r3, #0 80151aa: d114 bne.n 80151d6 __asm volatile 80151ac: f04f 0350 mov.w r3, #80 @ 0x50 80151b0: f383 8811 msr BASEPRI, r3 80151b4: f3bf 8f6f isb sy 80151b8: f3bf 8f4f dsb sy 80151bc: 60fb str r3, [r7, #12] } 80151be: bf00 nop 80151c0: bf00 nop 80151c2: e7fd b.n 80151c0 mtCOVERAGE_TEST_MARKER(); } } else { pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80151c4: 697b ldr r3, [r7, #20] 80151c6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80151ca: f023 0301 bic.w r3, r3, #1 80151ce: b2da uxtb r2, r3 80151d0: 697b ldr r3, [r7, #20] 80151d2: f883 2028 strb.w r2, [r3, #40] @ 0x28 mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 80151d6: 697b ldr r3, [r7, #20] 80151d8: 6a1b ldr r3, [r3, #32] 80151da: 6978 ldr r0, [r7, #20] 80151dc: 4798 blx r3 } 80151de: bf00 nop 80151e0: 3718 adds r7, #24 80151e2: 46bd mov sp, r7 80151e4: bd80 pop {r7, pc} 80151e6: bf00 nop 80151e8: 24004298 .word 0x24004298 080151ec : /*-----------------------------------------------------------*/ static portTASK_FUNCTION( prvTimerTask, pvParameters ) { 80151ec: b580 push {r7, lr} 80151ee: b084 sub sp, #16 80151f0: af00 add r7, sp, #0 80151f2: 6078 str r0, [r7, #4] for( ;; ) { /* Query the timers list to see if it contains any timers, and if so, obtain the time at which the next timer will expire. */ xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); 80151f4: f107 0308 add.w r3, r7, #8 80151f8: 4618 mov r0, r3 80151fa: f000 f859 bl 80152b0 80151fe: 60f8 str r0, [r7, #12] /* If a timer has expired, process it. Otherwise, block this task until either a timer does expire, or a command is received. */ prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty ); 8015200: 68bb ldr r3, [r7, #8] 8015202: 4619 mov r1, r3 8015204: 68f8 ldr r0, [r7, #12] 8015206: f000 f805 bl 8015214 /* Empty the command queue. */ prvProcessReceivedCommands(); 801520a: f000 f8d7 bl 80153bc xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); 801520e: bf00 nop 8015210: e7f0 b.n 80151f4 ... 08015214 : } } /*-----------------------------------------------------------*/ static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseType_t xListWasEmpty ) { 8015214: b580 push {r7, lr} 8015216: b084 sub sp, #16 8015218: af00 add r7, sp, #0 801521a: 6078 str r0, [r7, #4] 801521c: 6039 str r1, [r7, #0] TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 801521e: f7fe fe05 bl 8013e2c /* Obtain the time now to make an assessment as to whether the timer has expired or not. If obtaining the time causes the lists to switch then don't process this timer as any timers that remained in the list when the lists were switched will have been processed within the prvSampleTimeNow() function. */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); 8015222: f107 0308 add.w r3, r7, #8 8015226: 4618 mov r0, r3 8015228: f000 f866 bl 80152f8 801522c: 60f8 str r0, [r7, #12] if( xTimerListsWereSwitched == pdFALSE ) 801522e: 68bb ldr r3, [r7, #8] 8015230: 2b00 cmp r3, #0 8015232: d130 bne.n 8015296 { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 8015234: 683b ldr r3, [r7, #0] 8015236: 2b00 cmp r3, #0 8015238: d10a bne.n 8015250 801523a: 687a ldr r2, [r7, #4] 801523c: 68fb ldr r3, [r7, #12] 801523e: 429a cmp r2, r3 8015240: d806 bhi.n 8015250 { ( void ) xTaskResumeAll(); 8015242: f7fe fe01 bl 8013e48 prvProcessExpiredTimer( xNextExpireTime, xTimeNow ); 8015246: 68f9 ldr r1, [r7, #12] 8015248: 6878 ldr r0, [r7, #4] 801524a: f7ff ff81 bl 8015150 else { ( void ) xTaskResumeAll(); } } } 801524e: e024 b.n 801529a if( xListWasEmpty != pdFALSE ) 8015250: 683b ldr r3, [r7, #0] 8015252: 2b00 cmp r3, #0 8015254: d008 beq.n 8015268 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); 8015256: 4b13 ldr r3, [pc, #76] @ (80152a4 ) 8015258: 681b ldr r3, [r3, #0] 801525a: 681b ldr r3, [r3, #0] 801525c: 2b00 cmp r3, #0 801525e: d101 bne.n 8015264 8015260: 2301 movs r3, #1 8015262: e000 b.n 8015266 8015264: 2300 movs r3, #0 8015266: 603b str r3, [r7, #0] vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty ); 8015268: 4b0f ldr r3, [pc, #60] @ (80152a8 ) 801526a: 6818 ldr r0, [r3, #0] 801526c: 687a ldr r2, [r7, #4] 801526e: 68fb ldr r3, [r7, #12] 8015270: 1ad3 subs r3, r2, r3 8015272: 683a ldr r2, [r7, #0] 8015274: 4619 mov r1, r3 8015276: f7fd ffa9 bl 80131cc if( xTaskResumeAll() == pdFALSE ) 801527a: f7fe fde5 bl 8013e48 801527e: 4603 mov r3, r0 8015280: 2b00 cmp r3, #0 8015282: d10a bne.n 801529a portYIELD_WITHIN_API(); 8015284: 4b09 ldr r3, [pc, #36] @ (80152ac ) 8015286: f04f 5280 mov.w r2, #268435456 @ 0x10000000 801528a: 601a str r2, [r3, #0] 801528c: f3bf 8f4f dsb sy 8015290: f3bf 8f6f isb sy } 8015294: e001 b.n 801529a ( void ) xTaskResumeAll(); 8015296: f7fe fdd7 bl 8013e48 } 801529a: bf00 nop 801529c: 3710 adds r7, #16 801529e: 46bd mov sp, r7 80152a0: bd80 pop {r7, pc} 80152a2: bf00 nop 80152a4: 2400429c .word 0x2400429c 80152a8: 240042a0 .word 0x240042a0 80152ac: e000ed04 .word 0xe000ed04 080152b0 : /*-----------------------------------------------------------*/ static TickType_t prvGetNextExpireTime( BaseType_t * const pxListWasEmpty ) { 80152b0: b480 push {r7} 80152b2: b085 sub sp, #20 80152b4: af00 add r7, sp, #0 80152b6: 6078 str r0, [r7, #4] the timer with the nearest expiry time will expire. If there are no active timers then just set the next expire time to 0. That will cause this task to unblock when the tick count overflows, at which point the timer lists will be switched and the next expiry time can be re-assessed. */ *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList ); 80152b8: 4b0e ldr r3, [pc, #56] @ (80152f4 ) 80152ba: 681b ldr r3, [r3, #0] 80152bc: 681b ldr r3, [r3, #0] 80152be: 2b00 cmp r3, #0 80152c0: d101 bne.n 80152c6 80152c2: 2201 movs r2, #1 80152c4: e000 b.n 80152c8 80152c6: 2200 movs r2, #0 80152c8: 687b ldr r3, [r7, #4] 80152ca: 601a str r2, [r3, #0] if( *pxListWasEmpty == pdFALSE ) 80152cc: 687b ldr r3, [r7, #4] 80152ce: 681b ldr r3, [r3, #0] 80152d0: 2b00 cmp r3, #0 80152d2: d105 bne.n 80152e0 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 80152d4: 4b07 ldr r3, [pc, #28] @ (80152f4 ) 80152d6: 681b ldr r3, [r3, #0] 80152d8: 68db ldr r3, [r3, #12] 80152da: 681b ldr r3, [r3, #0] 80152dc: 60fb str r3, [r7, #12] 80152de: e001 b.n 80152e4 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 80152e0: 2300 movs r3, #0 80152e2: 60fb str r3, [r7, #12] } return xNextExpireTime; 80152e4: 68fb ldr r3, [r7, #12] } 80152e6: 4618 mov r0, r3 80152e8: 3714 adds r7, #20 80152ea: 46bd mov sp, r7 80152ec: f85d 7b04 ldr.w r7, [sp], #4 80152f0: 4770 bx lr 80152f2: bf00 nop 80152f4: 24004298 .word 0x24004298 080152f8 : /*-----------------------------------------------------------*/ static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { 80152f8: b580 push {r7, lr} 80152fa: b084 sub sp, #16 80152fc: af00 add r7, sp, #0 80152fe: 6078 str r0, [r7, #4] TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); 8015300: f7fe fe40 bl 8013f84 8015304: 60f8 str r0, [r7, #12] if( xTimeNow < xLastTime ) 8015306: 4b0b ldr r3, [pc, #44] @ (8015334 ) 8015308: 681b ldr r3, [r3, #0] 801530a: 68fa ldr r2, [r7, #12] 801530c: 429a cmp r2, r3 801530e: d205 bcs.n 801531c { prvSwitchTimerLists(); 8015310: f000 f93a bl 8015588 *pxTimerListsWereSwitched = pdTRUE; 8015314: 687b ldr r3, [r7, #4] 8015316: 2201 movs r2, #1 8015318: 601a str r2, [r3, #0] 801531a: e002 b.n 8015322 } else { *pxTimerListsWereSwitched = pdFALSE; 801531c: 687b ldr r3, [r7, #4] 801531e: 2200 movs r2, #0 8015320: 601a str r2, [r3, #0] } xLastTime = xTimeNow; 8015322: 4a04 ldr r2, [pc, #16] @ (8015334 ) 8015324: 68fb ldr r3, [r7, #12] 8015326: 6013 str r3, [r2, #0] return xTimeNow; 8015328: 68fb ldr r3, [r7, #12] } 801532a: 4618 mov r0, r3 801532c: 3710 adds r7, #16 801532e: 46bd mov sp, r7 8015330: bd80 pop {r7, pc} 8015332: bf00 nop 8015334: 240042a8 .word 0x240042a8 08015338 : /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 8015338: b580 push {r7, lr} 801533a: b086 sub sp, #24 801533c: af00 add r7, sp, #0 801533e: 60f8 str r0, [r7, #12] 8015340: 60b9 str r1, [r7, #8] 8015342: 607a str r2, [r7, #4] 8015344: 603b str r3, [r7, #0] BaseType_t xProcessTimerNow = pdFALSE; 8015346: 2300 movs r3, #0 8015348: 617b str r3, [r7, #20] listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); 801534a: 68fb ldr r3, [r7, #12] 801534c: 68ba ldr r2, [r7, #8] 801534e: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 8015350: 68fb ldr r3, [r7, #12] 8015352: 68fa ldr r2, [r7, #12] 8015354: 611a str r2, [r3, #16] if( xNextExpiryTime <= xTimeNow ) 8015356: 68ba ldr r2, [r7, #8] 8015358: 687b ldr r3, [r7, #4] 801535a: 429a cmp r2, r3 801535c: d812 bhi.n 8015384 { /* Has the expiry time elapsed between the command to start/reset a timer was issued, and the time the command was processed? */ if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 801535e: 687a ldr r2, [r7, #4] 8015360: 683b ldr r3, [r7, #0] 8015362: 1ad2 subs r2, r2, r3 8015364: 68fb ldr r3, [r7, #12] 8015366: 699b ldr r3, [r3, #24] 8015368: 429a cmp r2, r3 801536a: d302 bcc.n 8015372 { /* The time between a command being issued and the command being processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; 801536c: 2301 movs r3, #1 801536e: 617b str r3, [r7, #20] 8015370: e01b b.n 80153aa } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 8015372: 4b10 ldr r3, [pc, #64] @ (80153b4 ) 8015374: 681a ldr r2, [r3, #0] 8015376: 68fb ldr r3, [r7, #12] 8015378: 3304 adds r3, #4 801537a: 4619 mov r1, r3 801537c: 4610 mov r0, r2 801537e: f7fc fdd4 bl 8011f2a 8015382: e012 b.n 80153aa } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 8015384: 687a ldr r2, [r7, #4] 8015386: 683b ldr r3, [r7, #0] 8015388: 429a cmp r2, r3 801538a: d206 bcs.n 801539a 801538c: 68ba ldr r2, [r7, #8] 801538e: 683b ldr r3, [r7, #0] 8015390: 429a cmp r2, r3 8015392: d302 bcc.n 801539a { /* If, since the command was issued, the tick count has overflowed but the expiry time has not, then the timer must have already passed its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; 8015394: 2301 movs r3, #1 8015396: 617b str r3, [r7, #20] 8015398: e007 b.n 80153aa } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 801539a: 4b07 ldr r3, [pc, #28] @ (80153b8 ) 801539c: 681a ldr r2, [r3, #0] 801539e: 68fb ldr r3, [r7, #12] 80153a0: 3304 adds r3, #4 80153a2: 4619 mov r1, r3 80153a4: 4610 mov r0, r2 80153a6: f7fc fdc0 bl 8011f2a } } return xProcessTimerNow; 80153aa: 697b ldr r3, [r7, #20] } 80153ac: 4618 mov r0, r3 80153ae: 3718 adds r7, #24 80153b0: 46bd mov sp, r7 80153b2: bd80 pop {r7, pc} 80153b4: 2400429c .word 0x2400429c 80153b8: 24004298 .word 0x24004298 080153bc : /*-----------------------------------------------------------*/ static void prvProcessReceivedCommands( void ) { 80153bc: b580 push {r7, lr} 80153be: b08e sub sp, #56 @ 0x38 80153c0: af02 add r7, sp, #8 DaemonTaskMessage_t xMessage; Timer_t *pxTimer; BaseType_t xTimerListsWereSwitched, xResult; TickType_t xTimeNow; while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ 80153c2: e0ce b.n 8015562 { #if ( INCLUDE_xTimerPendFunctionCall == 1 ) { /* Negative commands are pended function calls rather than timer commands. */ if( xMessage.xMessageID < ( BaseType_t ) 0 ) 80153c4: 687b ldr r3, [r7, #4] 80153c6: 2b00 cmp r3, #0 80153c8: da19 bge.n 80153fe { const CallbackParameters_t * const pxCallback = &( xMessage.u.xCallbackParameters ); 80153ca: 1d3b adds r3, r7, #4 80153cc: 3304 adds r3, #4 80153ce: 62fb str r3, [r7, #44] @ 0x2c /* The timer uses the xCallbackParameters member to request a callback be executed. Check the callback is not NULL. */ configASSERT( pxCallback ); 80153d0: 6afb ldr r3, [r7, #44] @ 0x2c 80153d2: 2b00 cmp r3, #0 80153d4: d10b bne.n 80153ee __asm volatile 80153d6: f04f 0350 mov.w r3, #80 @ 0x50 80153da: f383 8811 msr BASEPRI, r3 80153de: f3bf 8f6f isb sy 80153e2: f3bf 8f4f dsb sy 80153e6: 61fb str r3, [r7, #28] } 80153e8: bf00 nop 80153ea: bf00 nop 80153ec: e7fd b.n 80153ea /* Call the function. */ pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 ); 80153ee: 6afb ldr r3, [r7, #44] @ 0x2c 80153f0: 681b ldr r3, [r3, #0] 80153f2: 6afa ldr r2, [r7, #44] @ 0x2c 80153f4: 6850 ldr r0, [r2, #4] 80153f6: 6afa ldr r2, [r7, #44] @ 0x2c 80153f8: 6892 ldr r2, [r2, #8] 80153fa: 4611 mov r1, r2 80153fc: 4798 blx r3 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 80153fe: 687b ldr r3, [r7, #4] 8015400: 2b00 cmp r3, #0 8015402: f2c0 80ae blt.w 8015562 { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 8015406: 68fb ldr r3, [r7, #12] 8015408: 62bb str r3, [r7, #40] @ 0x28 if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */ 801540a: 6abb ldr r3, [r7, #40] @ 0x28 801540c: 695b ldr r3, [r3, #20] 801540e: 2b00 cmp r3, #0 8015410: d004 beq.n 801541c { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 8015412: 6abb ldr r3, [r7, #40] @ 0x28 8015414: 3304 adds r3, #4 8015416: 4618 mov r0, r3 8015418: f7fc fdc0 bl 8011f9c it must be present in the function call. prvSampleTimeNow() must be called after the message is received from xTimerQueue so there is no possibility of a higher priority task adding a message to the message queue with a time that is ahead of the timer daemon task (because it pre-empted the timer daemon task after the xTimeNow value was set). */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); 801541c: 463b mov r3, r7 801541e: 4618 mov r0, r3 8015420: f7ff ff6a bl 80152f8 8015424: 6278 str r0, [r7, #36] @ 0x24 switch( xMessage.xMessageID ) 8015426: 687b ldr r3, [r7, #4] 8015428: 2b09 cmp r3, #9 801542a: f200 8097 bhi.w 801555c 801542e: a201 add r2, pc, #4 @ (adr r2, 8015434 ) 8015430: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8015434: 0801545d .word 0x0801545d 8015438: 0801545d .word 0x0801545d 801543c: 0801545d .word 0x0801545d 8015440: 080154d3 .word 0x080154d3 8015444: 080154e7 .word 0x080154e7 8015448: 08015533 .word 0x08015533 801544c: 0801545d .word 0x0801545d 8015450: 0801545d .word 0x0801545d 8015454: 080154d3 .word 0x080154d3 8015458: 080154e7 .word 0x080154e7 case tmrCOMMAND_START_FROM_ISR : case tmrCOMMAND_RESET : case tmrCOMMAND_RESET_FROM_ISR : case tmrCOMMAND_START_DONT_TRACE : /* Start or restart a timer. */ pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 801545c: 6abb ldr r3, [r7, #40] @ 0x28 801545e: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015462: f043 0301 orr.w r3, r3, #1 8015466: b2da uxtb r2, r3 8015468: 6abb ldr r3, [r7, #40] @ 0x28 801546a: f883 2028 strb.w r2, [r3, #40] @ 0x28 if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) 801546e: 68ba ldr r2, [r7, #8] 8015470: 6abb ldr r3, [r7, #40] @ 0x28 8015472: 699b ldr r3, [r3, #24] 8015474: 18d1 adds r1, r2, r3 8015476: 68bb ldr r3, [r7, #8] 8015478: 6a7a ldr r2, [r7, #36] @ 0x24 801547a: 6ab8 ldr r0, [r7, #40] @ 0x28 801547c: f7ff ff5c bl 8015338 8015480: 4603 mov r3, r0 8015482: 2b00 cmp r3, #0 8015484: d06c beq.n 8015560 { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 8015486: 6abb ldr r3, [r7, #40] @ 0x28 8015488: 6a1b ldr r3, [r3, #32] 801548a: 6ab8 ldr r0, [r7, #40] @ 0x28 801548c: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 801548e: 6abb ldr r3, [r7, #40] @ 0x28 8015490: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015494: f003 0304 and.w r3, r3, #4 8015498: 2b00 cmp r3, #0 801549a: d061 beq.n 8015560 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 801549c: 68ba ldr r2, [r7, #8] 801549e: 6abb ldr r3, [r7, #40] @ 0x28 80154a0: 699b ldr r3, [r3, #24] 80154a2: 441a add r2, r3 80154a4: 2300 movs r3, #0 80154a6: 9300 str r3, [sp, #0] 80154a8: 2300 movs r3, #0 80154aa: 2100 movs r1, #0 80154ac: 6ab8 ldr r0, [r7, #40] @ 0x28 80154ae: f7ff fe01 bl 80150b4 80154b2: 6238 str r0, [r7, #32] configASSERT( xResult ); 80154b4: 6a3b ldr r3, [r7, #32] 80154b6: 2b00 cmp r3, #0 80154b8: d152 bne.n 8015560 __asm volatile 80154ba: f04f 0350 mov.w r3, #80 @ 0x50 80154be: f383 8811 msr BASEPRI, r3 80154c2: f3bf 8f6f isb sy 80154c6: f3bf 8f4f dsb sy 80154ca: 61bb str r3, [r7, #24] } 80154cc: bf00 nop 80154ce: bf00 nop 80154d0: e7fd b.n 80154ce break; case tmrCOMMAND_STOP : case tmrCOMMAND_STOP_FROM_ISR : /* The timer has already been removed from the active list. */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80154d2: 6abb ldr r3, [r7, #40] @ 0x28 80154d4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80154d8: f023 0301 bic.w r3, r3, #1 80154dc: b2da uxtb r2, r3 80154de: 6abb ldr r3, [r7, #40] @ 0x28 80154e0: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 80154e4: e03d b.n 8015562 case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 80154e6: 6abb ldr r3, [r7, #40] @ 0x28 80154e8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80154ec: f043 0301 orr.w r3, r3, #1 80154f0: b2da uxtb r2, r3 80154f2: 6abb ldr r3, [r7, #40] @ 0x28 80154f4: f883 2028 strb.w r2, [r3, #40] @ 0x28 pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 80154f8: 68ba ldr r2, [r7, #8] 80154fa: 6abb ldr r3, [r7, #40] @ 0x28 80154fc: 619a str r2, [r3, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 80154fe: 6abb ldr r3, [r7, #40] @ 0x28 8015500: 699b ldr r3, [r3, #24] 8015502: 2b00 cmp r3, #0 8015504: d10b bne.n 801551e __asm volatile 8015506: f04f 0350 mov.w r3, #80 @ 0x50 801550a: f383 8811 msr BASEPRI, r3 801550e: f3bf 8f6f isb sy 8015512: f3bf 8f4f dsb sy 8015516: 617b str r3, [r7, #20] } 8015518: bf00 nop 801551a: bf00 nop 801551c: e7fd b.n 801551a be longer or shorter than the old one. The command time is therefore set to the current time, and as the period cannot be zero the next expiry time can only be in the future, meaning (unlike for the xTimerStart() case above) there is no fail case that needs to be handled here. */ ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow ); 801551e: 6abb ldr r3, [r7, #40] @ 0x28 8015520: 699a ldr r2, [r3, #24] 8015522: 6a7b ldr r3, [r7, #36] @ 0x24 8015524: 18d1 adds r1, r2, r3 8015526: 6a7b ldr r3, [r7, #36] @ 0x24 8015528: 6a7a ldr r2, [r7, #36] @ 0x24 801552a: 6ab8 ldr r0, [r7, #40] @ 0x28 801552c: f7ff ff04 bl 8015338 break; 8015530: e017 b.n 8015562 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) { /* The timer has already been removed from the active list, just free up the memory if the memory was dynamically allocated. */ if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 ) 8015532: 6abb ldr r3, [r7, #40] @ 0x28 8015534: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015538: f003 0302 and.w r3, r3, #2 801553c: 2b00 cmp r3, #0 801553e: d103 bne.n 8015548 { vPortFree( pxTimer ); 8015540: 6ab8 ldr r0, [r7, #40] @ 0x28 8015542: f000 fc31 bl 8015da8 no need to free the memory - just mark the timer as "not active". */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ break; 8015546: e00c b.n 8015562 pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 8015548: 6abb ldr r3, [r7, #40] @ 0x28 801554a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801554e: f023 0301 bic.w r3, r3, #1 8015552: b2da uxtb r2, r3 8015554: 6abb ldr r3, [r7, #40] @ 0x28 8015556: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 801555a: e002 b.n 8015562 default : /* Don't expect to get here. */ break; 801555c: bf00 nop 801555e: e000 b.n 8015562 break; 8015560: bf00 nop while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ 8015562: 4b08 ldr r3, [pc, #32] @ (8015584 ) 8015564: 681b ldr r3, [r3, #0] 8015566: 1d39 adds r1, r7, #4 8015568: 2200 movs r2, #0 801556a: 4618 mov r0, r3 801556c: f7fd f9dc bl 8012928 8015570: 4603 mov r3, r0 8015572: 2b00 cmp r3, #0 8015574: f47f af26 bne.w 80153c4 } } } } 8015578: bf00 nop 801557a: bf00 nop 801557c: 3730 adds r7, #48 @ 0x30 801557e: 46bd mov sp, r7 8015580: bd80 pop {r7, pc} 8015582: bf00 nop 8015584: 240042a0 .word 0x240042a0 08015588 : /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 8015588: b580 push {r7, lr} 801558a: b088 sub sp, #32 801558c: af02 add r7, sp, #8 /* The tick count has overflowed. The timer lists must be switched. If there are any timers still referenced from the current timer list then they must have expired and should be processed before the lists are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 801558e: e049 b.n 8015624 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 8015590: 4b2e ldr r3, [pc, #184] @ (801564c ) 8015592: 681b ldr r3, [r3, #0] 8015594: 68db ldr r3, [r3, #12] 8015596: 681b ldr r3, [r3, #0] 8015598: 613b str r3, [r7, #16] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 801559a: 4b2c ldr r3, [pc, #176] @ (801564c ) 801559c: 681b ldr r3, [r3, #0] 801559e: 68db ldr r3, [r3, #12] 80155a0: 68db ldr r3, [r3, #12] 80155a2: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 80155a4: 68fb ldr r3, [r7, #12] 80155a6: 3304 adds r3, #4 80155a8: 4618 mov r0, r3 80155aa: f7fc fcf7 bl 8011f9c traceTIMER_EXPIRED( pxTimer ); /* Execute its callback, then send a command to restart the timer if it is an auto-reload timer. It cannot be restarted here as the lists have not yet been switched. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 80155ae: 68fb ldr r3, [r7, #12] 80155b0: 6a1b ldr r3, [r3, #32] 80155b2: 68f8 ldr r0, [r7, #12] 80155b4: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 80155b6: 68fb ldr r3, [r7, #12] 80155b8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80155bc: f003 0304 and.w r3, r3, #4 80155c0: 2b00 cmp r3, #0 80155c2: d02f beq.n 8015624 the timer going into the same timer list then it has already expired and the timer should be re-inserted into the current list so it is processed again within this loop. Otherwise a command should be sent to restart the timer to ensure it is only inserted into a list after the lists have been swapped. */ xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ); 80155c4: 68fb ldr r3, [r7, #12] 80155c6: 699b ldr r3, [r3, #24] 80155c8: 693a ldr r2, [r7, #16] 80155ca: 4413 add r3, r2 80155cc: 60bb str r3, [r7, #8] if( xReloadTime > xNextExpireTime ) 80155ce: 68ba ldr r2, [r7, #8] 80155d0: 693b ldr r3, [r7, #16] 80155d2: 429a cmp r2, r3 80155d4: d90e bls.n 80155f4 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 80155d6: 68fb ldr r3, [r7, #12] 80155d8: 68ba ldr r2, [r7, #8] 80155da: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 80155dc: 68fb ldr r3, [r7, #12] 80155de: 68fa ldr r2, [r7, #12] 80155e0: 611a str r2, [r3, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 80155e2: 4b1a ldr r3, [pc, #104] @ (801564c ) 80155e4: 681a ldr r2, [r3, #0] 80155e6: 68fb ldr r3, [r7, #12] 80155e8: 3304 adds r3, #4 80155ea: 4619 mov r1, r3 80155ec: 4610 mov r0, r2 80155ee: f7fc fc9c bl 8011f2a 80155f2: e017 b.n 8015624 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 80155f4: 2300 movs r3, #0 80155f6: 9300 str r3, [sp, #0] 80155f8: 2300 movs r3, #0 80155fa: 693a ldr r2, [r7, #16] 80155fc: 2100 movs r1, #0 80155fe: 68f8 ldr r0, [r7, #12] 8015600: f7ff fd58 bl 80150b4 8015604: 6078 str r0, [r7, #4] configASSERT( xResult ); 8015606: 687b ldr r3, [r7, #4] 8015608: 2b00 cmp r3, #0 801560a: d10b bne.n 8015624 __asm volatile 801560c: f04f 0350 mov.w r3, #80 @ 0x50 8015610: f383 8811 msr BASEPRI, r3 8015614: f3bf 8f6f isb sy 8015618: f3bf 8f4f dsb sy 801561c: 603b str r3, [r7, #0] } 801561e: bf00 nop 8015620: bf00 nop 8015622: e7fd b.n 8015620 while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 8015624: 4b09 ldr r3, [pc, #36] @ (801564c ) 8015626: 681b ldr r3, [r3, #0] 8015628: 681b ldr r3, [r3, #0] 801562a: 2b00 cmp r3, #0 801562c: d1b0 bne.n 8015590 { mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; 801562e: 4b07 ldr r3, [pc, #28] @ (801564c ) 8015630: 681b ldr r3, [r3, #0] 8015632: 617b str r3, [r7, #20] pxCurrentTimerList = pxOverflowTimerList; 8015634: 4b06 ldr r3, [pc, #24] @ (8015650 ) 8015636: 681b ldr r3, [r3, #0] 8015638: 4a04 ldr r2, [pc, #16] @ (801564c ) 801563a: 6013 str r3, [r2, #0] pxOverflowTimerList = pxTemp; 801563c: 4a04 ldr r2, [pc, #16] @ (8015650 ) 801563e: 697b ldr r3, [r7, #20] 8015640: 6013 str r3, [r2, #0] } 8015642: bf00 nop 8015644: 3718 adds r7, #24 8015646: 46bd mov sp, r7 8015648: bd80 pop {r7, pc} 801564a: bf00 nop 801564c: 24004298 .word 0x24004298 8015650: 2400429c .word 0x2400429c 08015654 : /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 8015654: b580 push {r7, lr} 8015656: b082 sub sp, #8 8015658: af02 add r7, sp, #8 /* Check that the list from which active timers are referenced, and the queue used to communicate with the timer service, have been initialised. */ taskENTER_CRITICAL(); 801565a: f000 f9b5 bl 80159c8 { if( xTimerQueue == NULL ) 801565e: 4b15 ldr r3, [pc, #84] @ (80156b4 ) 8015660: 681b ldr r3, [r3, #0] 8015662: 2b00 cmp r3, #0 8015664: d120 bne.n 80156a8 { vListInitialise( &xActiveTimerList1 ); 8015666: 4814 ldr r0, [pc, #80] @ (80156b8 ) 8015668: f7fc fc0e bl 8011e88 vListInitialise( &xActiveTimerList2 ); 801566c: 4813 ldr r0, [pc, #76] @ (80156bc ) 801566e: f7fc fc0b bl 8011e88 pxCurrentTimerList = &xActiveTimerList1; 8015672: 4b13 ldr r3, [pc, #76] @ (80156c0 ) 8015674: 4a10 ldr r2, [pc, #64] @ (80156b8 ) 8015676: 601a str r2, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 8015678: 4b12 ldr r3, [pc, #72] @ (80156c4 ) 801567a: 4a10 ldr r2, [pc, #64] @ (80156bc ) 801567c: 601a str r2, [r3, #0] /* The timer queue is allocated statically in case configSUPPORT_DYNAMIC_ALLOCATION is 0. */ static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */ xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue ); 801567e: 2300 movs r3, #0 8015680: 9300 str r3, [sp, #0] 8015682: 4b11 ldr r3, [pc, #68] @ (80156c8 ) 8015684: 4a11 ldr r2, [pc, #68] @ (80156cc ) 8015686: 2110 movs r1, #16 8015688: 200a movs r0, #10 801568a: f7fc fd1b bl 80120c4 801568e: 4603 mov r3, r0 8015690: 4a08 ldr r2, [pc, #32] @ (80156b4 ) 8015692: 6013 str r3, [r2, #0] } #endif #if ( configQUEUE_REGISTRY_SIZE > 0 ) { if( xTimerQueue != NULL ) 8015694: 4b07 ldr r3, [pc, #28] @ (80156b4 ) 8015696: 681b ldr r3, [r3, #0] 8015698: 2b00 cmp r3, #0 801569a: d005 beq.n 80156a8 { vQueueAddToRegistry( xTimerQueue, "TmrQ" ); 801569c: 4b05 ldr r3, [pc, #20] @ (80156b4 ) 801569e: 681b ldr r3, [r3, #0] 80156a0: 490b ldr r1, [pc, #44] @ (80156d0 ) 80156a2: 4618 mov r0, r3 80156a4: f7fd fd3e bl 8013124 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 80156a8: f000 f9c0 bl 8015a2c } 80156ac: bf00 nop 80156ae: 46bd mov sp, r7 80156b0: bd80 pop {r7, pc} 80156b2: bf00 nop 80156b4: 240042a0 .word 0x240042a0 80156b8: 24004270 .word 0x24004270 80156bc: 24004284 .word 0x24004284 80156c0: 24004298 .word 0x24004298 80156c4: 2400429c .word 0x2400429c 80156c8: 2400434c .word 0x2400434c 80156cc: 240042ac .word 0x240042ac 80156d0: 0802db7c .word 0x0802db7c 080156d4 : /*-----------------------------------------------------------*/ BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer ) { 80156d4: b580 push {r7, lr} 80156d6: b086 sub sp, #24 80156d8: af00 add r7, sp, #0 80156da: 6078 str r0, [r7, #4] BaseType_t xReturn; Timer_t *pxTimer = xTimer; 80156dc: 687b ldr r3, [r7, #4] 80156de: 613b str r3, [r7, #16] configASSERT( xTimer ); 80156e0: 687b ldr r3, [r7, #4] 80156e2: 2b00 cmp r3, #0 80156e4: d10b bne.n 80156fe __asm volatile 80156e6: f04f 0350 mov.w r3, #80 @ 0x50 80156ea: f383 8811 msr BASEPRI, r3 80156ee: f3bf 8f6f isb sy 80156f2: f3bf 8f4f dsb sy 80156f6: 60fb str r3, [r7, #12] } 80156f8: bf00 nop 80156fa: bf00 nop 80156fc: e7fd b.n 80156fa /* Is the timer in the list of active timers? */ taskENTER_CRITICAL(); 80156fe: f000 f963 bl 80159c8 { if( ( pxTimer->ucStatus & tmrSTATUS_IS_ACTIVE ) == 0 ) 8015702: 693b ldr r3, [r7, #16] 8015704: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015708: f003 0301 and.w r3, r3, #1 801570c: 2b00 cmp r3, #0 801570e: d102 bne.n 8015716 { xReturn = pdFALSE; 8015710: 2300 movs r3, #0 8015712: 617b str r3, [r7, #20] 8015714: e001 b.n 801571a } else { xReturn = pdTRUE; 8015716: 2301 movs r3, #1 8015718: 617b str r3, [r7, #20] } } taskEXIT_CRITICAL(); 801571a: f000 f987 bl 8015a2c return xReturn; 801571e: 697b ldr r3, [r7, #20] } /*lint !e818 Can't be pointer to const due to the typedef. */ 8015720: 4618 mov r0, r3 8015722: 3718 adds r7, #24 8015724: 46bd mov sp, r7 8015726: bd80 pop {r7, pc} 08015728 : /*-----------------------------------------------------------*/ void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { 8015728: b580 push {r7, lr} 801572a: b086 sub sp, #24 801572c: af00 add r7, sp, #0 801572e: 6078 str r0, [r7, #4] Timer_t * const pxTimer = xTimer; 8015730: 687b ldr r3, [r7, #4] 8015732: 617b str r3, [r7, #20] void *pvReturn; configASSERT( xTimer ); 8015734: 687b ldr r3, [r7, #4] 8015736: 2b00 cmp r3, #0 8015738: d10b bne.n 8015752 __asm volatile 801573a: f04f 0350 mov.w r3, #80 @ 0x50 801573e: f383 8811 msr BASEPRI, r3 8015742: f3bf 8f6f isb sy 8015746: f3bf 8f4f dsb sy 801574a: 60fb str r3, [r7, #12] } 801574c: bf00 nop 801574e: bf00 nop 8015750: e7fd b.n 801574e taskENTER_CRITICAL(); 8015752: f000 f939 bl 80159c8 { pvReturn = pxTimer->pvTimerID; 8015756: 697b ldr r3, [r7, #20] 8015758: 69db ldr r3, [r3, #28] 801575a: 613b str r3, [r7, #16] } taskEXIT_CRITICAL(); 801575c: f000 f966 bl 8015a2c return pvReturn; 8015760: 693b ldr r3, [r7, #16] } 8015762: 4618 mov r0, r3 8015764: 3718 adds r7, #24 8015766: 46bd mov sp, r7 8015768: bd80 pop {r7, pc} ... 0801576c : /* * See header file for description. */ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) { 801576c: b480 push {r7} 801576e: b085 sub sp, #20 8015770: af00 add r7, sp, #0 8015772: 60f8 str r0, [r7, #12] 8015774: 60b9 str r1, [r7, #8] 8015776: 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--; 8015778: 68fb ldr r3, [r7, #12] 801577a: 3b04 subs r3, #4 801577c: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 801577e: 68fb ldr r3, [r7, #12] 8015780: f04f 7280 mov.w r2, #16777216 @ 0x1000000 8015784: 601a str r2, [r3, #0] pxTopOfStack--; 8015786: 68fb ldr r3, [r7, #12] 8015788: 3b04 subs r3, #4 801578a: 60fb str r3, [r7, #12] *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */ 801578c: 68bb ldr r3, [r7, #8] 801578e: f023 0201 bic.w r2, r3, #1 8015792: 68fb ldr r3, [r7, #12] 8015794: 601a str r2, [r3, #0] pxTopOfStack--; 8015796: 68fb ldr r3, [r7, #12] 8015798: 3b04 subs r3, #4 801579a: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 801579c: 4a0c ldr r2, [pc, #48] @ (80157d0 ) 801579e: 68fb ldr r3, [r7, #12] 80157a0: 601a str r2, [r3, #0] /* Save code space by skipping register initialisation. */ pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ 80157a2: 68fb ldr r3, [r7, #12] 80157a4: 3b14 subs r3, #20 80157a6: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 80157a8: 687a ldr r2, [r7, #4] 80157aa: 68fb ldr r3, [r7, #12] 80157ac: 601a str r2, [r3, #0] /* A save method is being used that requires each task to maintain its own exec return value. */ pxTopOfStack--; 80157ae: 68fb ldr r3, [r7, #12] 80157b0: 3b04 subs r3, #4 80157b2: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_EXC_RETURN; 80157b4: 68fb ldr r3, [r7, #12] 80157b6: f06f 0202 mvn.w r2, #2 80157ba: 601a str r2, [r3, #0] pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ 80157bc: 68fb ldr r3, [r7, #12] 80157be: 3b20 subs r3, #32 80157c0: 60fb str r3, [r7, #12] return pxTopOfStack; 80157c2: 68fb ldr r3, [r7, #12] } 80157c4: 4618 mov r0, r3 80157c6: 3714 adds r7, #20 80157c8: 46bd mov sp, r7 80157ca: f85d 7b04 ldr.w r7, [sp], #4 80157ce: 4770 bx lr 80157d0: 080157d5 .word 0x080157d5 080157d4 : /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 80157d4: b480 push {r7} 80157d6: b085 sub sp, #20 80157d8: af00 add r7, sp, #0 volatile uint32_t ulDummy = 0; 80157da: 2300 movs r3, #0 80157dc: 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 ); 80157de: 4b13 ldr r3, [pc, #76] @ (801582c ) 80157e0: 681b ldr r3, [r3, #0] 80157e2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80157e6: d00b beq.n 8015800 __asm volatile 80157e8: f04f 0350 mov.w r3, #80 @ 0x50 80157ec: f383 8811 msr BASEPRI, r3 80157f0: f3bf 8f6f isb sy 80157f4: f3bf 8f4f dsb sy 80157f8: 60fb str r3, [r7, #12] } 80157fa: bf00 nop 80157fc: bf00 nop 80157fe: e7fd b.n 80157fc __asm volatile 8015800: f04f 0350 mov.w r3, #80 @ 0x50 8015804: f383 8811 msr BASEPRI, r3 8015808: f3bf 8f6f isb sy 801580c: f3bf 8f4f dsb sy 8015810: 60bb str r3, [r7, #8] } 8015812: bf00 nop portDISABLE_INTERRUPTS(); while( ulDummy == 0 ) 8015814: bf00 nop 8015816: 687b ldr r3, [r7, #4] 8015818: 2b00 cmp r3, #0 801581a: d0fc beq.n 8015816 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. */ } } 801581c: bf00 nop 801581e: bf00 nop 8015820: 3714 adds r7, #20 8015822: 46bd mov sp, r7 8015824: f85d 7b04 ldr.w r7, [sp], #4 8015828: 4770 bx lr 801582a: bf00 nop 801582c: 24000048 .word 0x24000048 08015830 : /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 8015830: 4b07 ldr r3, [pc, #28] @ (8015850 ) 8015832: 6819 ldr r1, [r3, #0] 8015834: 6808 ldr r0, [r1, #0] 8015836: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 801583a: f380 8809 msr PSP, r0 801583e: f3bf 8f6f isb sy 8015842: f04f 0000 mov.w r0, #0 8015846: f380 8811 msr BASEPRI, r0 801584a: 4770 bx lr 801584c: f3af 8000 nop.w 08015850 : 8015850: 24003d70 .word 0x24003d70 " bx r14 \n" " \n" " .align 4 \n" "pxCurrentTCBConst2: .word pxCurrentTCB \n" ); } 8015854: bf00 nop 8015856: bf00 nop 08015858 : { /* 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( 8015858: 4808 ldr r0, [pc, #32] @ (801587c ) 801585a: 6800 ldr r0, [r0, #0] 801585c: 6800 ldr r0, [r0, #0] 801585e: f380 8808 msr MSP, r0 8015862: f04f 0000 mov.w r0, #0 8015866: f380 8814 msr CONTROL, r0 801586a: b662 cpsie i 801586c: b661 cpsie f 801586e: f3bf 8f4f dsb sy 8015872: f3bf 8f6f isb sy 8015876: df00 svc 0 8015878: bf00 nop " dsb \n" " isb \n" " svc 0 \n" /* System call to start first task. */ " nop \n" ); } 801587a: bf00 nop 801587c: e000ed08 .word 0xe000ed08 08015880 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 8015880: b580 push {r7, lr} 8015882: b086 sub sp, #24 8015884: af00 add r7, sp, #0 configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY ); /* This port can be used on all revisions of the Cortex-M7 core other than the r0p1 parts. r0p1 parts should use the port from the /source/portable/GCC/ARM_CM7/r0p1 directory. */ configASSERT( portCPUID != portCORTEX_M7_r0p1_ID ); 8015886: 4b47 ldr r3, [pc, #284] @ (80159a4 ) 8015888: 681b ldr r3, [r3, #0] 801588a: 4a47 ldr r2, [pc, #284] @ (80159a8 ) 801588c: 4293 cmp r3, r2 801588e: d10b bne.n 80158a8 __asm volatile 8015890: f04f 0350 mov.w r3, #80 @ 0x50 8015894: f383 8811 msr BASEPRI, r3 8015898: f3bf 8f6f isb sy 801589c: f3bf 8f4f dsb sy 80158a0: 613b str r3, [r7, #16] } 80158a2: bf00 nop 80158a4: bf00 nop 80158a6: e7fd b.n 80158a4 configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); 80158a8: 4b3e ldr r3, [pc, #248] @ (80159a4 ) 80158aa: 681b ldr r3, [r3, #0] 80158ac: 4a3f ldr r2, [pc, #252] @ (80159ac ) 80158ae: 4293 cmp r3, r2 80158b0: d10b bne.n 80158ca __asm volatile 80158b2: f04f 0350 mov.w r3, #80 @ 0x50 80158b6: f383 8811 msr BASEPRI, r3 80158ba: f3bf 8f6f isb sy 80158be: f3bf 8f4f dsb sy 80158c2: 60fb str r3, [r7, #12] } 80158c4: bf00 nop 80158c6: bf00 nop 80158c8: e7fd b.n 80158c6 #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 ); 80158ca: 4b39 ldr r3, [pc, #228] @ (80159b0 ) 80158cc: 617b str r3, [r7, #20] functions can be called. ISR safe functions are those that end in "FromISR". FreeRTOS maintains separate thread and ISR API functions to ensure interrupt entry is as fast and simple as possible. Save the interrupt priority value that is about to be clobbered. */ ulOriginalPriority = *pucFirstUserPriorityRegister; 80158ce: 697b ldr r3, [r7, #20] 80158d0: 781b ldrb r3, [r3, #0] 80158d2: b2db uxtb r3, r3 80158d4: 607b str r3, [r7, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 80158d6: 697b ldr r3, [r7, #20] 80158d8: 22ff movs r2, #255 @ 0xff 80158da: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 80158dc: 697b ldr r3, [r7, #20] 80158de: 781b ldrb r3, [r3, #0] 80158e0: b2db uxtb r3, r3 80158e2: 70fb strb r3, [r7, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 80158e4: 78fb ldrb r3, [r7, #3] 80158e6: b2db uxtb r3, r3 80158e8: f003 0350 and.w r3, r3, #80 @ 0x50 80158ec: b2da uxtb r2, r3 80158ee: 4b31 ldr r3, [pc, #196] @ (80159b4 ) 80158f0: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 80158f2: 4b31 ldr r3, [pc, #196] @ (80159b8 ) 80158f4: 2207 movs r2, #7 80158f6: 601a str r2, [r3, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 80158f8: e009 b.n 801590e { ulMaxPRIGROUPValue--; 80158fa: 4b2f ldr r3, [pc, #188] @ (80159b8 ) 80158fc: 681b ldr r3, [r3, #0] 80158fe: 3b01 subs r3, #1 8015900: 4a2d ldr r2, [pc, #180] @ (80159b8 ) 8015902: 6013 str r3, [r2, #0] ucMaxPriorityValue <<= ( uint8_t ) 0x01; 8015904: 78fb ldrb r3, [r7, #3] 8015906: b2db uxtb r3, r3 8015908: 005b lsls r3, r3, #1 801590a: b2db uxtb r3, r3 801590c: 70fb strb r3, [r7, #3] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 801590e: 78fb ldrb r3, [r7, #3] 8015910: b2db uxtb r3, r3 8015912: f003 0380 and.w r3, r3, #128 @ 0x80 8015916: 2b80 cmp r3, #128 @ 0x80 8015918: d0ef beq.n 80158fa #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 ); 801591a: 4b27 ldr r3, [pc, #156] @ (80159b8 ) 801591c: 681b ldr r3, [r3, #0] 801591e: f1c3 0307 rsb r3, r3, #7 8015922: 2b04 cmp r3, #4 8015924: d00b beq.n 801593e __asm volatile 8015926: f04f 0350 mov.w r3, #80 @ 0x50 801592a: f383 8811 msr BASEPRI, r3 801592e: f3bf 8f6f isb sy 8015932: f3bf 8f4f dsb sy 8015936: 60bb str r3, [r7, #8] } 8015938: bf00 nop 801593a: bf00 nop 801593c: e7fd b.n 801593a } #endif /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 801593e: 4b1e ldr r3, [pc, #120] @ (80159b8 ) 8015940: 681b ldr r3, [r3, #0] 8015942: 021b lsls r3, r3, #8 8015944: 4a1c ldr r2, [pc, #112] @ (80159b8 ) 8015946: 6013 str r3, [r2, #0] ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8015948: 4b1b ldr r3, [pc, #108] @ (80159b8 ) 801594a: 681b ldr r3, [r3, #0] 801594c: f403 63e0 and.w r3, r3, #1792 @ 0x700 8015950: 4a19 ldr r2, [pc, #100] @ (80159b8 ) 8015952: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 8015954: 687b ldr r3, [r7, #4] 8015956: b2da uxtb r2, r3 8015958: 697b ldr r3, [r7, #20] 801595a: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 801595c: 4b17 ldr r3, [pc, #92] @ (80159bc ) 801595e: 681b ldr r3, [r3, #0] 8015960: 4a16 ldr r2, [pc, #88] @ (80159bc ) 8015962: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 8015966: 6013 str r3, [r2, #0] portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 8015968: 4b14 ldr r3, [pc, #80] @ (80159bc ) 801596a: 681b ldr r3, [r3, #0] 801596c: 4a13 ldr r2, [pc, #76] @ (80159bc ) 801596e: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000 8015972: 6013 str r3, [r2, #0] /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 8015974: f000 f8da bl 8015b2c /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 8015978: 4b11 ldr r3, [pc, #68] @ (80159c0 ) 801597a: 2200 movs r2, #0 801597c: 601a str r2, [r3, #0] /* Ensure the VFP is enabled - it should be anyway. */ vPortEnableVFP(); 801597e: f000 f8f9 bl 8015b74 /* Lazy save always. */ *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS; 8015982: 4b10 ldr r3, [pc, #64] @ (80159c4 ) 8015984: 681b ldr r3, [r3, #0] 8015986: 4a0f ldr r2, [pc, #60] @ (80159c4 ) 8015988: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000 801598c: 6013 str r3, [r2, #0] /* Start the first task. */ prvPortStartFirstTask(); 801598e: f7ff ff63 bl 8015858 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(); 8015992: f7fe fbd3 bl 801413c prvTaskExitError(); 8015996: f7ff ff1d bl 80157d4 /* Should not get here! */ return 0; 801599a: 2300 movs r3, #0 } 801599c: 4618 mov r0, r3 801599e: 3718 adds r7, #24 80159a0: 46bd mov sp, r7 80159a2: bd80 pop {r7, pc} 80159a4: e000ed00 .word 0xe000ed00 80159a8: 410fc271 .word 0x410fc271 80159ac: 410fc270 .word 0x410fc270 80159b0: e000e400 .word 0xe000e400 80159b4: 2400439c .word 0x2400439c 80159b8: 240043a0 .word 0x240043a0 80159bc: e000ed20 .word 0xe000ed20 80159c0: 24000048 .word 0x24000048 80159c4: e000ef34 .word 0xe000ef34 080159c8 : configASSERT( uxCriticalNesting == 1000UL ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 80159c8: b480 push {r7} 80159ca: b083 sub sp, #12 80159cc: af00 add r7, sp, #0 __asm volatile 80159ce: f04f 0350 mov.w r3, #80 @ 0x50 80159d2: f383 8811 msr BASEPRI, r3 80159d6: f3bf 8f6f isb sy 80159da: f3bf 8f4f dsb sy 80159de: 607b str r3, [r7, #4] } 80159e0: bf00 nop portDISABLE_INTERRUPTS(); uxCriticalNesting++; 80159e2: 4b10 ldr r3, [pc, #64] @ (8015a24 ) 80159e4: 681b ldr r3, [r3, #0] 80159e6: 3301 adds r3, #1 80159e8: 4a0e ldr r2, [pc, #56] @ (8015a24 ) 80159ea: 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 ) 80159ec: 4b0d ldr r3, [pc, #52] @ (8015a24 ) 80159ee: 681b ldr r3, [r3, #0] 80159f0: 2b01 cmp r3, #1 80159f2: d110 bne.n 8015a16 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 80159f4: 4b0c ldr r3, [pc, #48] @ (8015a28 ) 80159f6: 681b ldr r3, [r3, #0] 80159f8: b2db uxtb r3, r3 80159fa: 2b00 cmp r3, #0 80159fc: d00b beq.n 8015a16 __asm volatile 80159fe: f04f 0350 mov.w r3, #80 @ 0x50 8015a02: f383 8811 msr BASEPRI, r3 8015a06: f3bf 8f6f isb sy 8015a0a: f3bf 8f4f dsb sy 8015a0e: 603b str r3, [r7, #0] } 8015a10: bf00 nop 8015a12: bf00 nop 8015a14: e7fd b.n 8015a12 } } 8015a16: bf00 nop 8015a18: 370c adds r7, #12 8015a1a: 46bd mov sp, r7 8015a1c: f85d 7b04 ldr.w r7, [sp], #4 8015a20: 4770 bx lr 8015a22: bf00 nop 8015a24: 24000048 .word 0x24000048 8015a28: e000ed04 .word 0xe000ed04 08015a2c : /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 8015a2c: b480 push {r7} 8015a2e: b083 sub sp, #12 8015a30: af00 add r7, sp, #0 configASSERT( uxCriticalNesting ); 8015a32: 4b12 ldr r3, [pc, #72] @ (8015a7c ) 8015a34: 681b ldr r3, [r3, #0] 8015a36: 2b00 cmp r3, #0 8015a38: d10b bne.n 8015a52 __asm volatile 8015a3a: f04f 0350 mov.w r3, #80 @ 0x50 8015a3e: f383 8811 msr BASEPRI, r3 8015a42: f3bf 8f6f isb sy 8015a46: f3bf 8f4f dsb sy 8015a4a: 607b str r3, [r7, #4] } 8015a4c: bf00 nop 8015a4e: bf00 nop 8015a50: e7fd b.n 8015a4e uxCriticalNesting--; 8015a52: 4b0a ldr r3, [pc, #40] @ (8015a7c ) 8015a54: 681b ldr r3, [r3, #0] 8015a56: 3b01 subs r3, #1 8015a58: 4a08 ldr r2, [pc, #32] @ (8015a7c ) 8015a5a: 6013 str r3, [r2, #0] if( uxCriticalNesting == 0 ) 8015a5c: 4b07 ldr r3, [pc, #28] @ (8015a7c ) 8015a5e: 681b ldr r3, [r3, #0] 8015a60: 2b00 cmp r3, #0 8015a62: d105 bne.n 8015a70 8015a64: 2300 movs r3, #0 8015a66: 603b str r3, [r7, #0] __asm volatile 8015a68: 683b ldr r3, [r7, #0] 8015a6a: f383 8811 msr BASEPRI, r3 } 8015a6e: bf00 nop { portENABLE_INTERRUPTS(); } } 8015a70: bf00 nop 8015a72: 370c adds r7, #12 8015a74: 46bd mov sp, r7 8015a76: f85d 7b04 ldr.w r7, [sp], #4 8015a7a: 4770 bx lr 8015a7c: 24000048 .word 0x24000048 08015a80 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 8015a80: f3ef 8009 mrs r0, PSP 8015a84: f3bf 8f6f isb sy 8015a88: 4b15 ldr r3, [pc, #84] @ (8015ae0 ) 8015a8a: 681a ldr r2, [r3, #0] 8015a8c: f01e 0f10 tst.w lr, #16 8015a90: bf08 it eq 8015a92: ed20 8a10 vstmdbeq r0!, {s16-s31} 8015a96: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8015a9a: 6010 str r0, [r2, #0] 8015a9c: e92d 0009 stmdb sp!, {r0, r3} 8015aa0: f04f 0050 mov.w r0, #80 @ 0x50 8015aa4: f380 8811 msr BASEPRI, r0 8015aa8: f3bf 8f4f dsb sy 8015aac: f3bf 8f6f isb sy 8015ab0: f7fe fb44 bl 801413c 8015ab4: f04f 0000 mov.w r0, #0 8015ab8: f380 8811 msr BASEPRI, r0 8015abc: bc09 pop {r0, r3} 8015abe: 6819 ldr r1, [r3, #0] 8015ac0: 6808 ldr r0, [r1, #0] 8015ac2: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8015ac6: f01e 0f10 tst.w lr, #16 8015aca: bf08 it eq 8015acc: ecb0 8a10 vldmiaeq r0!, {s16-s31} 8015ad0: f380 8809 msr PSP, r0 8015ad4: f3bf 8f6f isb sy 8015ad8: 4770 bx lr 8015ada: bf00 nop 8015adc: f3af 8000 nop.w 08015ae0 : 8015ae0: 24003d70 .word 0x24003d70 " \n" " .align 4 \n" "pxCurrentTCBConst: .word pxCurrentTCB \n" ::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY) ); } 8015ae4: bf00 nop 8015ae6: bf00 nop 08015ae8 : /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 8015ae8: b580 push {r7, lr} 8015aea: b082 sub sp, #8 8015aec: af00 add r7, sp, #0 __asm volatile 8015aee: f04f 0350 mov.w r3, #80 @ 0x50 8015af2: f383 8811 msr BASEPRI, r3 8015af6: f3bf 8f6f isb sy 8015afa: f3bf 8f4f dsb sy 8015afe: 607b str r3, [r7, #4] } 8015b00: bf00 nop save and then restore the interrupt mask value as its value is already known. */ portDISABLE_INTERRUPTS(); { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 8015b02: f7fe fa61 bl 8013fc8 8015b06: 4603 mov r3, r0 8015b08: 2b00 cmp r3, #0 8015b0a: d003 beq.n 8015b14 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 8015b0c: 4b06 ldr r3, [pc, #24] @ (8015b28 ) 8015b0e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8015b12: 601a str r2, [r3, #0] 8015b14: 2300 movs r3, #0 8015b16: 603b str r3, [r7, #0] __asm volatile 8015b18: 683b ldr r3, [r7, #0] 8015b1a: f383 8811 msr BASEPRI, r3 } 8015b1e: bf00 nop } } portENABLE_INTERRUPTS(); } 8015b20: bf00 nop 8015b22: 3708 adds r7, #8 8015b24: 46bd mov sp, r7 8015b26: bd80 pop {r7, pc} 8015b28: e000ed04 .word 0xe000ed04 08015b2c : /* * Setup the systick timer to generate the tick interrupts at the required * frequency. */ __attribute__(( weak )) void vPortSetupTimerInterrupt( void ) { 8015b2c: b480 push {r7} 8015b2e: 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; 8015b30: 4b0b ldr r3, [pc, #44] @ (8015b60 ) 8015b32: 2200 movs r2, #0 8015b34: 601a str r2, [r3, #0] portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; 8015b36: 4b0b ldr r3, [pc, #44] @ (8015b64 ) 8015b38: 2200 movs r2, #0 8015b3a: 601a str r2, [r3, #0] /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 8015b3c: 4b0a ldr r3, [pc, #40] @ (8015b68 ) 8015b3e: 681b ldr r3, [r3, #0] 8015b40: 4a0a ldr r2, [pc, #40] @ (8015b6c ) 8015b42: fba2 2303 umull r2, r3, r2, r3 8015b46: 099b lsrs r3, r3, #6 8015b48: 4a09 ldr r2, [pc, #36] @ (8015b70 ) 8015b4a: 3b01 subs r3, #1 8015b4c: 6013 str r3, [r2, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 8015b4e: 4b04 ldr r3, [pc, #16] @ (8015b60 ) 8015b50: 2207 movs r2, #7 8015b52: 601a str r2, [r3, #0] } 8015b54: bf00 nop 8015b56: 46bd mov sp, r7 8015b58: f85d 7b04 ldr.w r7, [sp], #4 8015b5c: 4770 bx lr 8015b5e: bf00 nop 8015b60: e000e010 .word 0xe000e010 8015b64: e000e018 .word 0xe000e018 8015b68: 2400000c .word 0x2400000c 8015b6c: 10624dd3 .word 0x10624dd3 8015b70: e000e014 .word 0xe000e014 08015b74 : /*-----------------------------------------------------------*/ /* This is a naked function. */ static void vPortEnableVFP( void ) { __asm volatile 8015b74: f8df 000c ldr.w r0, [pc, #12] @ 8015b84 8015b78: 6801 ldr r1, [r0, #0] 8015b7a: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000 8015b7e: 6001 str r1, [r0, #0] 8015b80: 4770 bx lr " \n" " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */ " str r1, [r0] \n" " bx r14 " ); } 8015b82: bf00 nop 8015b84: e000ed88 .word 0xe000ed88 08015b88 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 8015b88: b480 push {r7} 8015b8a: b085 sub sp, #20 8015b8c: 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" ); 8015b8e: f3ef 8305 mrs r3, IPSR 8015b92: 60fb str r3, [r7, #12] /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 8015b94: 68fb ldr r3, [r7, #12] 8015b96: 2b0f cmp r3, #15 8015b98: d915 bls.n 8015bc6 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 8015b9a: 4a18 ldr r2, [pc, #96] @ (8015bfc ) 8015b9c: 68fb ldr r3, [r7, #12] 8015b9e: 4413 add r3, r2 8015ba0: 781b ldrb r3, [r3, #0] 8015ba2: 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 ); 8015ba4: 4b16 ldr r3, [pc, #88] @ (8015c00 ) 8015ba6: 781b ldrb r3, [r3, #0] 8015ba8: 7afa ldrb r2, [r7, #11] 8015baa: 429a cmp r2, r3 8015bac: d20b bcs.n 8015bc6 __asm volatile 8015bae: f04f 0350 mov.w r3, #80 @ 0x50 8015bb2: f383 8811 msr BASEPRI, r3 8015bb6: f3bf 8f6f isb sy 8015bba: f3bf 8f4f dsb sy 8015bbe: 607b str r3, [r7, #4] } 8015bc0: bf00 nop 8015bc2: bf00 nop 8015bc4: e7fd b.n 8015bc2 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 ); 8015bc6: 4b0f ldr r3, [pc, #60] @ (8015c04 ) 8015bc8: 681b ldr r3, [r3, #0] 8015bca: f403 62e0 and.w r2, r3, #1792 @ 0x700 8015bce: 4b0e ldr r3, [pc, #56] @ (8015c08 ) 8015bd0: 681b ldr r3, [r3, #0] 8015bd2: 429a cmp r2, r3 8015bd4: d90b bls.n 8015bee __asm volatile 8015bd6: f04f 0350 mov.w r3, #80 @ 0x50 8015bda: f383 8811 msr BASEPRI, r3 8015bde: f3bf 8f6f isb sy 8015be2: f3bf 8f4f dsb sy 8015be6: 603b str r3, [r7, #0] } 8015be8: bf00 nop 8015bea: bf00 nop 8015bec: e7fd b.n 8015bea } 8015bee: bf00 nop 8015bf0: 3714 adds r7, #20 8015bf2: 46bd mov sp, r7 8015bf4: f85d 7b04 ldr.w r7, [sp], #4 8015bf8: 4770 bx lr 8015bfa: bf00 nop 8015bfc: e000e3f0 .word 0xe000e3f0 8015c00: 2400439c .word 0x2400439c 8015c04: e000ed0c .word 0xe000ed0c 8015c08: 240043a0 .word 0x240043a0 08015c0c : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 8015c0c: b580 push {r7, lr} 8015c0e: b08a sub sp, #40 @ 0x28 8015c10: af00 add r7, sp, #0 8015c12: 6078 str r0, [r7, #4] BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 8015c14: 2300 movs r3, #0 8015c16: 61fb str r3, [r7, #28] vTaskSuspendAll(); 8015c18: f7fe f908 bl 8013e2c { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 8015c1c: 4b5c ldr r3, [pc, #368] @ (8015d90 ) 8015c1e: 681b ldr r3, [r3, #0] 8015c20: 2b00 cmp r3, #0 8015c22: d101 bne.n 8015c28 { prvHeapInit(); 8015c24: f000 f924 bl 8015e70 /* 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 ) 8015c28: 4b5a ldr r3, [pc, #360] @ (8015d94 ) 8015c2a: 681a ldr r2, [r3, #0] 8015c2c: 687b ldr r3, [r7, #4] 8015c2e: 4013 ands r3, r2 8015c30: 2b00 cmp r3, #0 8015c32: f040 8095 bne.w 8015d60 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 8015c36: 687b ldr r3, [r7, #4] 8015c38: 2b00 cmp r3, #0 8015c3a: d01e beq.n 8015c7a { xWantedSize += xHeapStructSize; 8015c3c: 2208 movs r2, #8 8015c3e: 687b ldr r3, [r7, #4] 8015c40: 4413 add r3, r2 8015c42: 607b str r3, [r7, #4] /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 8015c44: 687b ldr r3, [r7, #4] 8015c46: f003 0307 and.w r3, r3, #7 8015c4a: 2b00 cmp r3, #0 8015c4c: d015 beq.n 8015c7a { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 8015c4e: 687b ldr r3, [r7, #4] 8015c50: f023 0307 bic.w r3, r3, #7 8015c54: 3308 adds r3, #8 8015c56: 607b str r3, [r7, #4] configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 ); 8015c58: 687b ldr r3, [r7, #4] 8015c5a: f003 0307 and.w r3, r3, #7 8015c5e: 2b00 cmp r3, #0 8015c60: d00b beq.n 8015c7a __asm volatile 8015c62: f04f 0350 mov.w r3, #80 @ 0x50 8015c66: f383 8811 msr BASEPRI, r3 8015c6a: f3bf 8f6f isb sy 8015c6e: f3bf 8f4f dsb sy 8015c72: 617b str r3, [r7, #20] } 8015c74: bf00 nop 8015c76: bf00 nop 8015c78: e7fd b.n 8015c76 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 8015c7a: 687b ldr r3, [r7, #4] 8015c7c: 2b00 cmp r3, #0 8015c7e: d06f beq.n 8015d60 8015c80: 4b45 ldr r3, [pc, #276] @ (8015d98 ) 8015c82: 681b ldr r3, [r3, #0] 8015c84: 687a ldr r2, [r7, #4] 8015c86: 429a cmp r2, r3 8015c88: d86a bhi.n 8015d60 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; 8015c8a: 4b44 ldr r3, [pc, #272] @ (8015d9c ) 8015c8c: 623b str r3, [r7, #32] pxBlock = xStart.pxNextFreeBlock; 8015c8e: 4b43 ldr r3, [pc, #268] @ (8015d9c ) 8015c90: 681b ldr r3, [r3, #0] 8015c92: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8015c94: e004 b.n 8015ca0 { pxPreviousBlock = pxBlock; 8015c96: 6a7b ldr r3, [r7, #36] @ 0x24 8015c98: 623b str r3, [r7, #32] pxBlock = pxBlock->pxNextFreeBlock; 8015c9a: 6a7b ldr r3, [r7, #36] @ 0x24 8015c9c: 681b ldr r3, [r3, #0] 8015c9e: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8015ca0: 6a7b ldr r3, [r7, #36] @ 0x24 8015ca2: 685b ldr r3, [r3, #4] 8015ca4: 687a ldr r2, [r7, #4] 8015ca6: 429a cmp r2, r3 8015ca8: d903 bls.n 8015cb2 8015caa: 6a7b ldr r3, [r7, #36] @ 0x24 8015cac: 681b ldr r3, [r3, #0] 8015cae: 2b00 cmp r3, #0 8015cb0: d1f1 bne.n 8015c96 } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 8015cb2: 4b37 ldr r3, [pc, #220] @ (8015d90 ) 8015cb4: 681b ldr r3, [r3, #0] 8015cb6: 6a7a ldr r2, [r7, #36] @ 0x24 8015cb8: 429a cmp r2, r3 8015cba: d051 beq.n 8015d60 { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 8015cbc: 6a3b ldr r3, [r7, #32] 8015cbe: 681b ldr r3, [r3, #0] 8015cc0: 2208 movs r2, #8 8015cc2: 4413 add r3, r2 8015cc4: 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; 8015cc6: 6a7b ldr r3, [r7, #36] @ 0x24 8015cc8: 681a ldr r2, [r3, #0] 8015cca: 6a3b ldr r3, [r7, #32] 8015ccc: 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 ) 8015cce: 6a7b ldr r3, [r7, #36] @ 0x24 8015cd0: 685a ldr r2, [r3, #4] 8015cd2: 687b ldr r3, [r7, #4] 8015cd4: 1ad2 subs r2, r2, r3 8015cd6: 2308 movs r3, #8 8015cd8: 005b lsls r3, r3, #1 8015cda: 429a cmp r2, r3 8015cdc: d920 bls.n 8015d20 { /* 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 ); 8015cde: 6a7a ldr r2, [r7, #36] @ 0x24 8015ce0: 687b ldr r3, [r7, #4] 8015ce2: 4413 add r3, r2 8015ce4: 61bb str r3, [r7, #24] configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 8015ce6: 69bb ldr r3, [r7, #24] 8015ce8: f003 0307 and.w r3, r3, #7 8015cec: 2b00 cmp r3, #0 8015cee: d00b beq.n 8015d08 __asm volatile 8015cf0: f04f 0350 mov.w r3, #80 @ 0x50 8015cf4: f383 8811 msr BASEPRI, r3 8015cf8: f3bf 8f6f isb sy 8015cfc: f3bf 8f4f dsb sy 8015d00: 613b str r3, [r7, #16] } 8015d02: bf00 nop 8015d04: bf00 nop 8015d06: e7fd b.n 8015d04 /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 8015d08: 6a7b ldr r3, [r7, #36] @ 0x24 8015d0a: 685a ldr r2, [r3, #4] 8015d0c: 687b ldr r3, [r7, #4] 8015d0e: 1ad2 subs r2, r2, r3 8015d10: 69bb ldr r3, [r7, #24] 8015d12: 605a str r2, [r3, #4] pxBlock->xBlockSize = xWantedSize; 8015d14: 6a7b ldr r3, [r7, #36] @ 0x24 8015d16: 687a ldr r2, [r7, #4] 8015d18: 605a str r2, [r3, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( pxNewBlockLink ); 8015d1a: 69b8 ldr r0, [r7, #24] 8015d1c: f000 f90a bl 8015f34 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 8015d20: 4b1d ldr r3, [pc, #116] @ (8015d98 ) 8015d22: 681a ldr r2, [r3, #0] 8015d24: 6a7b ldr r3, [r7, #36] @ 0x24 8015d26: 685b ldr r3, [r3, #4] 8015d28: 1ad3 subs r3, r2, r3 8015d2a: 4a1b ldr r2, [pc, #108] @ (8015d98 ) 8015d2c: 6013 str r3, [r2, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 8015d2e: 4b1a ldr r3, [pc, #104] @ (8015d98 ) 8015d30: 681a ldr r2, [r3, #0] 8015d32: 4b1b ldr r3, [pc, #108] @ (8015da0 ) 8015d34: 681b ldr r3, [r3, #0] 8015d36: 429a cmp r2, r3 8015d38: d203 bcs.n 8015d42 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 8015d3a: 4b17 ldr r3, [pc, #92] @ (8015d98 ) 8015d3c: 681b ldr r3, [r3, #0] 8015d3e: 4a18 ldr r2, [pc, #96] @ (8015da0 ) 8015d40: 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; 8015d42: 6a7b ldr r3, [r7, #36] @ 0x24 8015d44: 685a ldr r2, [r3, #4] 8015d46: 4b13 ldr r3, [pc, #76] @ (8015d94 ) 8015d48: 681b ldr r3, [r3, #0] 8015d4a: 431a orrs r2, r3 8015d4c: 6a7b ldr r3, [r7, #36] @ 0x24 8015d4e: 605a str r2, [r3, #4] pxBlock->pxNextFreeBlock = NULL; 8015d50: 6a7b ldr r3, [r7, #36] @ 0x24 8015d52: 2200 movs r2, #0 8015d54: 601a str r2, [r3, #0] xNumberOfSuccessfulAllocations++; 8015d56: 4b13 ldr r3, [pc, #76] @ (8015da4 ) 8015d58: 681b ldr r3, [r3, #0] 8015d5a: 3301 adds r3, #1 8015d5c: 4a11 ldr r2, [pc, #68] @ (8015da4 ) 8015d5e: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 8015d60: f7fe f872 bl 8013e48 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 ); 8015d64: 69fb ldr r3, [r7, #28] 8015d66: f003 0307 and.w r3, r3, #7 8015d6a: 2b00 cmp r3, #0 8015d6c: d00b beq.n 8015d86 __asm volatile 8015d6e: f04f 0350 mov.w r3, #80 @ 0x50 8015d72: f383 8811 msr BASEPRI, r3 8015d76: f3bf 8f6f isb sy 8015d7a: f3bf 8f4f dsb sy 8015d7e: 60fb str r3, [r7, #12] } 8015d80: bf00 nop 8015d82: bf00 nop 8015d84: e7fd b.n 8015d82 return pvReturn; 8015d86: 69fb ldr r3, [r7, #28] } 8015d88: 4618 mov r0, r3 8015d8a: 3728 adds r7, #40 @ 0x28 8015d8c: 46bd mov sp, r7 8015d8e: bd80 pop {r7, pc} 8015d90: 240243ac .word 0x240243ac 8015d94: 240243c0 .word 0x240243c0 8015d98: 240243b0 .word 0x240243b0 8015d9c: 240243a4 .word 0x240243a4 8015da0: 240243b4 .word 0x240243b4 8015da4: 240243b8 .word 0x240243b8 08015da8 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 8015da8: b580 push {r7, lr} 8015daa: b086 sub sp, #24 8015dac: af00 add r7, sp, #0 8015dae: 6078 str r0, [r7, #4] uint8_t *puc = ( uint8_t * ) pv; 8015db0: 687b ldr r3, [r7, #4] 8015db2: 617b str r3, [r7, #20] BlockLink_t *pxLink; if( pv != NULL ) 8015db4: 687b ldr r3, [r7, #4] 8015db6: 2b00 cmp r3, #0 8015db8: d04f beq.n 8015e5a { /* The memory being freed will have an BlockLink_t structure immediately before it. */ puc -= xHeapStructSize; 8015dba: 2308 movs r3, #8 8015dbc: 425b negs r3, r3 8015dbe: 697a ldr r2, [r7, #20] 8015dc0: 4413 add r3, r2 8015dc2: 617b str r3, [r7, #20] /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; 8015dc4: 697b ldr r3, [r7, #20] 8015dc6: 613b str r3, [r7, #16] /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 8015dc8: 693b ldr r3, [r7, #16] 8015dca: 685a ldr r2, [r3, #4] 8015dcc: 4b25 ldr r3, [pc, #148] @ (8015e64 ) 8015dce: 681b ldr r3, [r3, #0] 8015dd0: 4013 ands r3, r2 8015dd2: 2b00 cmp r3, #0 8015dd4: d10b bne.n 8015dee __asm volatile 8015dd6: f04f 0350 mov.w r3, #80 @ 0x50 8015dda: f383 8811 msr BASEPRI, r3 8015dde: f3bf 8f6f isb sy 8015de2: f3bf 8f4f dsb sy 8015de6: 60fb str r3, [r7, #12] } 8015de8: bf00 nop 8015dea: bf00 nop 8015dec: e7fd b.n 8015dea configASSERT( pxLink->pxNextFreeBlock == NULL ); 8015dee: 693b ldr r3, [r7, #16] 8015df0: 681b ldr r3, [r3, #0] 8015df2: 2b00 cmp r3, #0 8015df4: d00b beq.n 8015e0e __asm volatile 8015df6: f04f 0350 mov.w r3, #80 @ 0x50 8015dfa: f383 8811 msr BASEPRI, r3 8015dfe: f3bf 8f6f isb sy 8015e02: f3bf 8f4f dsb sy 8015e06: 60bb str r3, [r7, #8] } 8015e08: bf00 nop 8015e0a: bf00 nop 8015e0c: e7fd b.n 8015e0a if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) 8015e0e: 693b ldr r3, [r7, #16] 8015e10: 685a ldr r2, [r3, #4] 8015e12: 4b14 ldr r3, [pc, #80] @ (8015e64 ) 8015e14: 681b ldr r3, [r3, #0] 8015e16: 4013 ands r3, r2 8015e18: 2b00 cmp r3, #0 8015e1a: d01e beq.n 8015e5a { if( pxLink->pxNextFreeBlock == NULL ) 8015e1c: 693b ldr r3, [r7, #16] 8015e1e: 681b ldr r3, [r3, #0] 8015e20: 2b00 cmp r3, #0 8015e22: d11a bne.n 8015e5a { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 8015e24: 693b ldr r3, [r7, #16] 8015e26: 685a ldr r2, [r3, #4] 8015e28: 4b0e ldr r3, [pc, #56] @ (8015e64 ) 8015e2a: 681b ldr r3, [r3, #0] 8015e2c: 43db mvns r3, r3 8015e2e: 401a ands r2, r3 8015e30: 693b ldr r3, [r7, #16] 8015e32: 605a str r2, [r3, #4] vTaskSuspendAll(); 8015e34: f7fd fffa bl 8013e2c { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 8015e38: 693b ldr r3, [r7, #16] 8015e3a: 685a ldr r2, [r3, #4] 8015e3c: 4b0a ldr r3, [pc, #40] @ (8015e68 ) 8015e3e: 681b ldr r3, [r3, #0] 8015e40: 4413 add r3, r2 8015e42: 4a09 ldr r2, [pc, #36] @ (8015e68 ) 8015e44: 6013 str r3, [r2, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 8015e46: 6938 ldr r0, [r7, #16] 8015e48: f000 f874 bl 8015f34 xNumberOfSuccessfulFrees++; 8015e4c: 4b07 ldr r3, [pc, #28] @ (8015e6c ) 8015e4e: 681b ldr r3, [r3, #0] 8015e50: 3301 adds r3, #1 8015e52: 4a06 ldr r2, [pc, #24] @ (8015e6c ) 8015e54: 6013 str r3, [r2, #0] } ( void ) xTaskResumeAll(); 8015e56: f7fd fff7 bl 8013e48 else { mtCOVERAGE_TEST_MARKER(); } } } 8015e5a: bf00 nop 8015e5c: 3718 adds r7, #24 8015e5e: 46bd mov sp, r7 8015e60: bd80 pop {r7, pc} 8015e62: bf00 nop 8015e64: 240243c0 .word 0x240243c0 8015e68: 240243b0 .word 0x240243b0 8015e6c: 240243bc .word 0x240243bc 08015e70 : /* This just exists to keep the linker quiet. */ } /*-----------------------------------------------------------*/ static void prvHeapInit( void ) { 8015e70: b480 push {r7} 8015e72: b085 sub sp, #20 8015e74: af00 add r7, sp, #0 BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; size_t uxAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 8015e76: f44f 3300 mov.w r3, #131072 @ 0x20000 8015e7a: 60bb str r3, [r7, #8] /* Ensure the heap starts on a correctly aligned boundary. */ uxAddress = ( size_t ) ucHeap; 8015e7c: 4b27 ldr r3, [pc, #156] @ (8015f1c ) 8015e7e: 60fb str r3, [r7, #12] if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 8015e80: 68fb ldr r3, [r7, #12] 8015e82: f003 0307 and.w r3, r3, #7 8015e86: 2b00 cmp r3, #0 8015e88: d00c beq.n 8015ea4 { uxAddress += ( portBYTE_ALIGNMENT - 1 ); 8015e8a: 68fb ldr r3, [r7, #12] 8015e8c: 3307 adds r3, #7 8015e8e: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8015e90: 68fb ldr r3, [r7, #12] 8015e92: f023 0307 bic.w r3, r3, #7 8015e96: 60fb str r3, [r7, #12] xTotalHeapSize -= uxAddress - ( size_t ) ucHeap; 8015e98: 68ba ldr r2, [r7, #8] 8015e9a: 68fb ldr r3, [r7, #12] 8015e9c: 1ad3 subs r3, r2, r3 8015e9e: 4a1f ldr r2, [pc, #124] @ (8015f1c ) 8015ea0: 4413 add r3, r2 8015ea2: 60bb str r3, [r7, #8] } pucAlignedHeap = ( uint8_t * ) uxAddress; 8015ea4: 68fb ldr r3, [r7, #12] 8015ea6: 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; 8015ea8: 4a1d ldr r2, [pc, #116] @ (8015f20 ) 8015eaa: 687b ldr r3, [r7, #4] 8015eac: 6013 str r3, [r2, #0] xStart.xBlockSize = ( size_t ) 0; 8015eae: 4b1c ldr r3, [pc, #112] @ (8015f20 ) 8015eb0: 2200 movs r2, #0 8015eb2: 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; 8015eb4: 687b ldr r3, [r7, #4] 8015eb6: 68ba ldr r2, [r7, #8] 8015eb8: 4413 add r3, r2 8015eba: 60fb str r3, [r7, #12] uxAddress -= xHeapStructSize; 8015ebc: 2208 movs r2, #8 8015ebe: 68fb ldr r3, [r7, #12] 8015ec0: 1a9b subs r3, r3, r2 8015ec2: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8015ec4: 68fb ldr r3, [r7, #12] 8015ec6: f023 0307 bic.w r3, r3, #7 8015eca: 60fb str r3, [r7, #12] pxEnd = ( void * ) uxAddress; 8015ecc: 68fb ldr r3, [r7, #12] 8015ece: 4a15 ldr r2, [pc, #84] @ (8015f24 ) 8015ed0: 6013 str r3, [r2, #0] pxEnd->xBlockSize = 0; 8015ed2: 4b14 ldr r3, [pc, #80] @ (8015f24 ) 8015ed4: 681b ldr r3, [r3, #0] 8015ed6: 2200 movs r2, #0 8015ed8: 605a str r2, [r3, #4] pxEnd->pxNextFreeBlock = NULL; 8015eda: 4b12 ldr r3, [pc, #72] @ (8015f24 ) 8015edc: 681b ldr r3, [r3, #0] 8015ede: 2200 movs r2, #0 8015ee0: 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; 8015ee2: 687b ldr r3, [r7, #4] 8015ee4: 603b str r3, [r7, #0] pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock; 8015ee6: 683b ldr r3, [r7, #0] 8015ee8: 68fa ldr r2, [r7, #12] 8015eea: 1ad2 subs r2, r2, r3 8015eec: 683b ldr r3, [r7, #0] 8015eee: 605a str r2, [r3, #4] pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 8015ef0: 4b0c ldr r3, [pc, #48] @ (8015f24 ) 8015ef2: 681a ldr r2, [r3, #0] 8015ef4: 683b ldr r3, [r7, #0] 8015ef6: 601a str r2, [r3, #0] /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015ef8: 683b ldr r3, [r7, #0] 8015efa: 685b ldr r3, [r3, #4] 8015efc: 4a0a ldr r2, [pc, #40] @ (8015f28 ) 8015efe: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015f00: 683b ldr r3, [r7, #0] 8015f02: 685b ldr r3, [r3, #4] 8015f04: 4a09 ldr r2, [pc, #36] @ (8015f2c ) 8015f06: 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 ); 8015f08: 4b09 ldr r3, [pc, #36] @ (8015f30 ) 8015f0a: f04f 4200 mov.w r2, #2147483648 @ 0x80000000 8015f0e: 601a str r2, [r3, #0] } 8015f10: bf00 nop 8015f12: 3714 adds r7, #20 8015f14: 46bd mov sp, r7 8015f16: f85d 7b04 ldr.w r7, [sp], #4 8015f1a: 4770 bx lr 8015f1c: 240043a4 .word 0x240043a4 8015f20: 240243a4 .word 0x240243a4 8015f24: 240243ac .word 0x240243ac 8015f28: 240243b4 .word 0x240243b4 8015f2c: 240243b0 .word 0x240243b0 8015f30: 240243c0 .word 0x240243c0 08015f34 : /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 8015f34: b480 push {r7} 8015f36: b085 sub sp, #20 8015f38: af00 add r7, sp, #0 8015f3a: 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 ) 8015f3c: 4b28 ldr r3, [pc, #160] @ (8015fe0 ) 8015f3e: 60fb str r3, [r7, #12] 8015f40: e002 b.n 8015f48 8015f42: 68fb ldr r3, [r7, #12] 8015f44: 681b ldr r3, [r3, #0] 8015f46: 60fb str r3, [r7, #12] 8015f48: 68fb ldr r3, [r7, #12] 8015f4a: 681b ldr r3, [r3, #0] 8015f4c: 687a ldr r2, [r7, #4] 8015f4e: 429a cmp r2, r3 8015f50: d8f7 bhi.n 8015f42 /* 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; 8015f52: 68fb ldr r3, [r7, #12] 8015f54: 60bb str r3, [r7, #8] if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 8015f56: 68fb ldr r3, [r7, #12] 8015f58: 685b ldr r3, [r3, #4] 8015f5a: 68ba ldr r2, [r7, #8] 8015f5c: 4413 add r3, r2 8015f5e: 687a ldr r2, [r7, #4] 8015f60: 429a cmp r2, r3 8015f62: d108 bne.n 8015f76 { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 8015f64: 68fb ldr r3, [r7, #12] 8015f66: 685a ldr r2, [r3, #4] 8015f68: 687b ldr r3, [r7, #4] 8015f6a: 685b ldr r3, [r3, #4] 8015f6c: 441a add r2, r3 8015f6e: 68fb ldr r3, [r7, #12] 8015f70: 605a str r2, [r3, #4] pxBlockToInsert = pxIterator; 8015f72: 68fb ldr r3, [r7, #12] 8015f74: 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; 8015f76: 687b ldr r3, [r7, #4] 8015f78: 60bb str r3, [r7, #8] if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 8015f7a: 687b ldr r3, [r7, #4] 8015f7c: 685b ldr r3, [r3, #4] 8015f7e: 68ba ldr r2, [r7, #8] 8015f80: 441a add r2, r3 8015f82: 68fb ldr r3, [r7, #12] 8015f84: 681b ldr r3, [r3, #0] 8015f86: 429a cmp r2, r3 8015f88: d118 bne.n 8015fbc { if( pxIterator->pxNextFreeBlock != pxEnd ) 8015f8a: 68fb ldr r3, [r7, #12] 8015f8c: 681a ldr r2, [r3, #0] 8015f8e: 4b15 ldr r3, [pc, #84] @ (8015fe4 ) 8015f90: 681b ldr r3, [r3, #0] 8015f92: 429a cmp r2, r3 8015f94: d00d beq.n 8015fb2 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 8015f96: 687b ldr r3, [r7, #4] 8015f98: 685a ldr r2, [r3, #4] 8015f9a: 68fb ldr r3, [r7, #12] 8015f9c: 681b ldr r3, [r3, #0] 8015f9e: 685b ldr r3, [r3, #4] 8015fa0: 441a add r2, r3 8015fa2: 687b ldr r3, [r7, #4] 8015fa4: 605a str r2, [r3, #4] pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 8015fa6: 68fb ldr r3, [r7, #12] 8015fa8: 681b ldr r3, [r3, #0] 8015faa: 681a ldr r2, [r3, #0] 8015fac: 687b ldr r3, [r7, #4] 8015fae: 601a str r2, [r3, #0] 8015fb0: e008 b.n 8015fc4 } else { pxBlockToInsert->pxNextFreeBlock = pxEnd; 8015fb2: 4b0c ldr r3, [pc, #48] @ (8015fe4 ) 8015fb4: 681a ldr r2, [r3, #0] 8015fb6: 687b ldr r3, [r7, #4] 8015fb8: 601a str r2, [r3, #0] 8015fba: e003 b.n 8015fc4 } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 8015fbc: 68fb ldr r3, [r7, #12] 8015fbe: 681a ldr r2, [r3, #0] 8015fc0: 687b ldr r3, [r7, #4] 8015fc2: 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 ) 8015fc4: 68fa ldr r2, [r7, #12] 8015fc6: 687b ldr r3, [r7, #4] 8015fc8: 429a cmp r2, r3 8015fca: d002 beq.n 8015fd2 { pxIterator->pxNextFreeBlock = pxBlockToInsert; 8015fcc: 68fb ldr r3, [r7, #12] 8015fce: 687a ldr r2, [r7, #4] 8015fd0: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8015fd2: bf00 nop 8015fd4: 3714 adds r7, #20 8015fd6: 46bd mov sp, r7 8015fd8: f85d 7b04 ldr.w r7, [sp], #4 8015fdc: 4770 bx lr 8015fde: bf00 nop 8015fe0: 240243a4 .word 0x240243a4 8015fe4: 240243ac .word 0x240243ac 08015fe8 : * @param apimsg a struct containing the function to call and its parameters * @return ERR_OK if the function was called, another err_t if not */ static err_t netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) { 8015fe8: b580 push {r7, lr} 8015fea: b084 sub sp, #16 8015fec: af00 add r7, sp, #0 8015fee: 6078 str r0, [r7, #4] 8015ff0: 6039 str r1, [r7, #0] err_t err; #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->err = ERR_VAL; 8015ff2: 683b ldr r3, [r7, #0] 8015ff4: 22fa movs r2, #250 @ 0xfa 8015ff6: 711a strb r2, [r3, #4] #if LWIP_NETCONN_SEM_PER_THREAD apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); #endif /* LWIP_NETCONN_SEM_PER_THREAD */ err = tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg)); 8015ff8: 683b ldr r3, [r7, #0] 8015ffa: 681b ldr r3, [r3, #0] 8015ffc: 330c adds r3, #12 8015ffe: 461a mov r2, r3 8016000: 6839 ldr r1, [r7, #0] 8016002: 6878 ldr r0, [r7, #4] 8016004: f003 fc7c bl 8019900 8016008: 4603 mov r3, r0 801600a: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801600c: f997 300f ldrsb.w r3, [r7, #15] 8016010: 2b00 cmp r3, #0 8016012: d103 bne.n 801601c return apimsg->err; 8016014: 683b ldr r3, [r7, #0] 8016016: f993 3004 ldrsb.w r3, [r3, #4] 801601a: e001 b.n 8016020 } return err; 801601c: f997 300f ldrsb.w r3, [r7, #15] } 8016020: 4618 mov r0, r3 8016022: 3710 adds r7, #16 8016024: 46bd mov sp, r7 8016026: bd80 pop {r7, pc} 08016028 : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn * netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback) { 8016028: b580 push {r7, lr} 801602a: b08c sub sp, #48 @ 0x30 801602c: af00 add r7, sp, #0 801602e: 4603 mov r3, r0 8016030: 603a str r2, [r7, #0] 8016032: 71fb strb r3, [r7, #7] 8016034: 460b mov r3, r1 8016036: 71bb strb r3, [r7, #6] struct netconn *conn; API_MSG_VAR_DECLARE(msg); API_MSG_VAR_ALLOC_RETURN_NULL(msg); conn = netconn_alloc(t, callback); 8016038: 79fb ldrb r3, [r7, #7] 801603a: 6839 ldr r1, [r7, #0] 801603c: 4618 mov r0, r3 801603e: f001 f8ad bl 801719c 8016042: 62f8 str r0, [r7, #44] @ 0x2c if (conn != NULL) { 8016044: 6afb ldr r3, [r7, #44] @ 0x2c 8016046: 2b00 cmp r3, #0 8016048: d054 beq.n 80160f4 err_t err; API_MSG_VAR_REF(msg).msg.n.proto = proto; 801604a: 79bb ldrb r3, [r7, #6] 801604c: 743b strb r3, [r7, #16] API_MSG_VAR_REF(msg).conn = conn; 801604e: 6afb ldr r3, [r7, #44] @ 0x2c 8016050: 60bb str r3, [r7, #8] err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); 8016052: f107 0308 add.w r3, r7, #8 8016056: 4619 mov r1, r3 8016058: 4829 ldr r0, [pc, #164] @ (8016100 ) 801605a: f7ff ffc5 bl 8015fe8 801605e: 4603 mov r3, r0 8016060: f887 302b strb.w r3, [r7, #43] @ 0x2b if (err != ERR_OK) { 8016064: f997 302b ldrsb.w r3, [r7, #43] @ 0x2b 8016068: 2b00 cmp r3, #0 801606a: d043 beq.n 80160f4 LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); 801606c: 6afb ldr r3, [r7, #44] @ 0x2c 801606e: 685b ldr r3, [r3, #4] 8016070: 2b00 cmp r3, #0 8016072: d005 beq.n 8016080 8016074: 4b23 ldr r3, [pc, #140] @ (8016104 ) 8016076: 22a3 movs r2, #163 @ 0xa3 8016078: 4923 ldr r1, [pc, #140] @ (8016108 ) 801607a: 4824 ldr r0, [pc, #144] @ (801610c ) 801607c: f014 fbf6 bl 802a86c LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); 8016080: 6afb ldr r3, [r7, #44] @ 0x2c 8016082: 3310 adds r3, #16 8016084: 4618 mov r0, r3 8016086: f011 f851 bl 802712c 801608a: 4603 mov r3, r0 801608c: 2b00 cmp r3, #0 801608e: d105 bne.n 801609c 8016090: 4b1c ldr r3, [pc, #112] @ (8016104 ) 8016092: 22a4 movs r2, #164 @ 0xa4 8016094: 491e ldr r1, [pc, #120] @ (8016110 ) 8016096: 481d ldr r0, [pc, #116] @ (801610c ) 8016098: f014 fbe8 bl 802a86c #if LWIP_TCP LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); 801609c: 6afb ldr r3, [r7, #44] @ 0x2c 801609e: 3314 adds r3, #20 80160a0: 4618 mov r0, r3 80160a2: f011 f843 bl 802712c 80160a6: 4603 mov r3, r0 80160a8: 2b00 cmp r3, #0 80160aa: d005 beq.n 80160b8 80160ac: 4b15 ldr r3, [pc, #84] @ (8016104 ) 80160ae: 22a6 movs r2, #166 @ 0xa6 80160b0: 4918 ldr r1, [pc, #96] @ (8016114 ) 80160b2: 4816 ldr r0, [pc, #88] @ (801610c ) 80160b4: f014 fbda bl 802a86c #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); 80160b8: 6afb ldr r3, [r7, #44] @ 0x2c 80160ba: 330c adds r3, #12 80160bc: 4618 mov r0, r3 80160be: f011 f8c3 bl 8027248 80160c2: 4603 mov r3, r0 80160c4: 2b00 cmp r3, #0 80160c6: d105 bne.n 80160d4 80160c8: 4b0e ldr r3, [pc, #56] @ (8016104 ) 80160ca: 22a9 movs r2, #169 @ 0xa9 80160cc: 4912 ldr r1, [pc, #72] @ (8016118 ) 80160ce: 480f ldr r0, [pc, #60] @ (801610c ) 80160d0: f014 fbcc bl 802a86c sys_sem_free(&conn->op_completed); 80160d4: 6afb ldr r3, [r7, #44] @ 0x2c 80160d6: 330c adds r3, #12 80160d8: 4618 mov r0, r3 80160da: f011 f8a8 bl 802722e #endif /* !LWIP_NETCONN_SEM_PER_THREAD */ sys_mbox_free(&conn->recvmbox); 80160de: 6afb ldr r3, [r7, #44] @ 0x2c 80160e0: 3310 adds r3, #16 80160e2: 4618 mov r0, r3 80160e4: f010 ffae bl 8027044 memp_free(MEMP_NETCONN, conn); 80160e8: 6af9 ldr r1, [r7, #44] @ 0x2c 80160ea: 2007 movs r0, #7 80160ec: f004 fa58 bl 801a5a0 API_MSG_VAR_FREE(msg); return NULL; 80160f0: 2300 movs r3, #0 80160f2: e000 b.n 80160f6 } } API_MSG_VAR_FREE(msg); return conn; 80160f4: 6afb ldr r3, [r7, #44] @ 0x2c } 80160f6: 4618 mov r0, r3 80160f8: 3730 adds r7, #48 @ 0x30 80160fa: 46bd mov sp, r7 80160fc: bd80 pop {r7, pc} 80160fe: bf00 nop 8016100: 08017171 .word 0x08017171 8016104: 0802db84 .word 0x0802db84 8016108: 0802dbb8 .word 0x0802dbb8 801610c: 0802dbdc .word 0x0802dbdc 8016110: 0802dc04 .word 0x0802dc04 8016114: 0802dc1c .word 0x0802dc1c 8016118: 0802dc40 .word 0x0802dc40 0801611c : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_prepare_delete(struct netconn *conn) { 801611c: b580 push {r7, lr} 801611e: b08c sub sp, #48 @ 0x30 8016120: af00 add r7, sp, #0 8016122: 6078 str r0, [r7, #4] err_t err; API_MSG_VAR_DECLARE(msg); /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ if (conn == NULL) { 8016124: 687b ldr r3, [r7, #4] 8016126: 2b00 cmp r3, #0 8016128: d101 bne.n 801612e return ERR_OK; 801612a: 2300 movs r3, #0 801612c: e014 b.n 8016158 } API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 801612e: 687b ldr r3, [r7, #4] 8016130: 60fb str r3, [r7, #12] /* get the time we started, which is later compared to sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ #if LWIP_TCP API_MSG_VAR_REF(msg).msg.sd.polls_left = 8016132: 2329 movs r3, #41 @ 0x29 8016134: 757b strb r3, [r7, #21] ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; #endif /* LWIP_TCP */ #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg)); 8016136: f107 030c add.w r3, r7, #12 801613a: 4619 mov r1, r3 801613c: 4808 ldr r0, [pc, #32] @ (8016160 ) 801613e: f7ff ff53 bl 8015fe8 8016142: 4603 mov r3, r0 8016144: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); if (err != ERR_OK) { 8016148: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 801614c: 2b00 cmp r3, #0 801614e: d002 beq.n 8016156 return err; 8016150: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 8016154: e000 b.n 8016158 } return ERR_OK; 8016156: 2300 movs r3, #0 } 8016158: 4618 mov r0, r3 801615a: 3730 adds r7, #48 @ 0x30 801615c: 46bd mov sp, r7 801615e: bd80 pop {r7, pc} 8016160: 080176f5 .word 0x080176f5 08016164 : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 8016164: b580 push {r7, lr} 8016166: b084 sub sp, #16 8016168: af00 add r7, sp, #0 801616a: 6078 str r0, [r7, #4] err_t err; /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ if (conn == NULL) { 801616c: 687b ldr r3, [r7, #4] 801616e: 2b00 cmp r3, #0 8016170: d101 bne.n 8016176 return ERR_OK; 8016172: 2300 movs r3, #0 8016174: e00d b.n 8016192 /* Already called netconn_prepare_delete() before */ err = ERR_OK; } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { err = netconn_prepare_delete(conn); 8016176: 6878 ldr r0, [r7, #4] 8016178: f7ff ffd0 bl 801611c 801617c: 4603 mov r3, r0 801617e: 73fb strb r3, [r7, #15] } if (err == ERR_OK) { 8016180: f997 300f ldrsb.w r3, [r7, #15] 8016184: 2b00 cmp r3, #0 8016186: d102 bne.n 801618e netconn_free(conn); 8016188: 6878 ldr r0, [r7, #4] 801618a: f001 f881 bl 8017290 } return err; 801618e: f997 300f ldrsb.w r3, [r7, #15] } 8016192: 4618 mov r0, r3 8016194: 3710 adds r7, #16 8016196: 46bd mov sp, r7 8016198: bd80 pop {r7, pc} ... 0801619c : * @return ERR_CONN for invalid connections * ERR_OK if the information was retrieved */ err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local) { 801619c: b580 push {r7, lr} 801619e: b08e sub sp, #56 @ 0x38 80161a0: af00 add r7, sp, #0 80161a2: 60f8 str r0, [r7, #12] 80161a4: 60b9 str r1, [r7, #8] 80161a6: 607a str r2, [r7, #4] 80161a8: 70fb strb r3, [r7, #3] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); 80161aa: 68fb ldr r3, [r7, #12] 80161ac: 2b00 cmp r3, #0 80161ae: d109 bne.n 80161c4 80161b0: 4b1d ldr r3, [pc, #116] @ (8016228 ) 80161b2: f44f 7289 mov.w r2, #274 @ 0x112 80161b6: 491d ldr r1, [pc, #116] @ (801622c ) 80161b8: 481d ldr r0, [pc, #116] @ (8016230 ) 80161ba: f014 fb57 bl 802a86c 80161be: f06f 030f mvn.w r3, #15 80161c2: e02d b.n 8016220 LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); 80161c4: 68bb ldr r3, [r7, #8] 80161c6: 2b00 cmp r3, #0 80161c8: d109 bne.n 80161de 80161ca: 4b17 ldr r3, [pc, #92] @ (8016228 ) 80161cc: f240 1213 movw r2, #275 @ 0x113 80161d0: 4918 ldr r1, [pc, #96] @ (8016234 ) 80161d2: 4817 ldr r0, [pc, #92] @ (8016230 ) 80161d4: f014 fb4a bl 802a86c 80161d8: f06f 030f mvn.w r3, #15 80161dc: e020 b.n 8016220 LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); 80161de: 687b ldr r3, [r7, #4] 80161e0: 2b00 cmp r3, #0 80161e2: d109 bne.n 80161f8 80161e4: 4b10 ldr r3, [pc, #64] @ (8016228 ) 80161e6: f44f 728a mov.w r2, #276 @ 0x114 80161ea: 4913 ldr r1, [pc, #76] @ (8016238 ) 80161ec: 4810 ldr r0, [pc, #64] @ (8016230 ) 80161ee: f014 fb3d bl 802a86c 80161f2: f06f 030f mvn.w r3, #15 80161f6: e013 b.n 8016220 API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 80161f8: 68fb ldr r3, [r7, #12] 80161fa: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.ad.local = local; 80161fc: 78fb ldrb r3, [r7, #3] 80161fe: f887 3024 strb.w r3, [r7, #36] @ 0x24 #if LWIP_MPU_COMPATIBLE err = netconn_apimsg(lwip_netconn_do_getaddr, &API_MSG_VAR_REF(msg)); *addr = msg->msg.ad.ipaddr; *port = msg->msg.ad.port; #else /* LWIP_MPU_COMPATIBLE */ msg.msg.ad.ipaddr = addr; 8016202: 68bb ldr r3, [r7, #8] 8016204: 61fb str r3, [r7, #28] msg.msg.ad.port = port; 8016206: 687b ldr r3, [r7, #4] 8016208: 623b str r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); 801620a: f107 0314 add.w r3, r7, #20 801620e: 4619 mov r1, r3 8016210: 480a ldr r0, [pc, #40] @ (801623c ) 8016212: f7ff fee9 bl 8015fe8 8016216: 4603 mov r3, r0 8016218: f887 3037 strb.w r3, [r7, #55] @ 0x37 #endif /* LWIP_MPU_COMPATIBLE */ API_MSG_VAR_FREE(msg); return err; 801621c: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8016220: 4618 mov r0, r3 8016222: 3738 adds r7, #56 @ 0x38 8016224: 46bd mov sp, r7 8016226: bd80 pop {r7, pc} 8016228: 0802db84 .word 0x0802db84 801622c: 0802dc5c .word 0x0802dc5c 8016230: 0802dbdc .word 0x0802dbdc 8016234: 0802dc7c .word 0x0802dc7c 8016238: 0802dc9c .word 0x0802dc9c 801623c: 08018151 .word 0x08018151 08016240 : * @param port the remote port to connect to (no used for RAW) * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise */ err_t netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port) { 8016240: b580 push {r7, lr} 8016242: b08e sub sp, #56 @ 0x38 8016244: af00 add r7, sp, #0 8016246: 60f8 str r0, [r7, #12] 8016248: 60b9 str r1, [r7, #8] 801624a: 4613 mov r3, r2 801624c: 80fb strh r3, [r7, #6] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 801624e: 68fb ldr r3, [r7, #12] 8016250: 2b00 cmp r3, #0 8016252: d109 bne.n 8016268 8016254: 4b11 ldr r3, [pc, #68] @ (801629c ) 8016256: f44f 72bf mov.w r2, #382 @ 0x17e 801625a: 4911 ldr r1, [pc, #68] @ (80162a0 ) 801625c: 4811 ldr r0, [pc, #68] @ (80162a4 ) 801625e: f014 fb05 bl 802a86c 8016262: f06f 030f mvn.w r3, #15 8016266: e015 b.n 8016294 #if LWIP_IPV4 /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ if (addr == NULL) { 8016268: 68bb ldr r3, [r7, #8] 801626a: 2b00 cmp r3, #0 801626c: d101 bne.n 8016272 addr = IP4_ADDR_ANY; 801626e: 4b0e ldr r3, [pc, #56] @ (80162a8 ) 8016270: 60bb str r3, [r7, #8] } #endif /* LWIP_IPV4 */ API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8016272: 68fb ldr r3, [r7, #12] 8016274: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); 8016276: 68bb ldr r3, [r7, #8] 8016278: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.bc.port = port; 801627a: 88fb ldrh r3, [r7, #6] 801627c: 843b strh r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); 801627e: f107 0314 add.w r3, r7, #20 8016282: 4619 mov r1, r3 8016284: 4809 ldr r0, [pc, #36] @ (80162ac ) 8016286: f7ff feaf bl 8015fe8 801628a: 4603 mov r3, r0 801628c: f887 3037 strb.w r3, [r7, #55] @ 0x37 API_MSG_VAR_FREE(msg); return err; 8016290: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8016294: 4618 mov r0, r3 8016296: 3738 adds r7, #56 @ 0x38 8016298: 46bd mov sp, r7 801629a: bd80 pop {r7, pc} 801629c: 0802db84 .word 0x0802db84 80162a0: 0802dcf8 .word 0x0802dcf8 80162a4: 0802dbdc .word 0x0802dbdc 80162a8: 08031c78 .word 0x08031c78 80162ac: 080179e1 .word 0x080179e1 080162b0 : * @param conn the netconn to disconnect * @return See @ref err_t */ err_t netconn_disconnect(struct netconn *conn) { 80162b0: b580 push {r7, lr} 80162b2: b08c sub sp, #48 @ 0x30 80162b4: af00 add r7, sp, #0 80162b6: 6078 str r0, [r7, #4] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 80162b8: 687b ldr r3, [r7, #4] 80162ba: 2b00 cmp r3, #0 80162bc: d109 bne.n 80162d2 80162be: 4b0d ldr r3, [pc, #52] @ (80162f4 ) 80162c0: f44f 72cf mov.w r2, #414 @ 0x19e 80162c4: 490c ldr r1, [pc, #48] @ (80162f8 ) 80162c6: 480d ldr r0, [pc, #52] @ (80162fc ) 80162c8: f014 fad0 bl 802a86c 80162cc: f06f 030f mvn.w r3, #15 80162d0: e00c b.n 80162ec API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 80162d2: 687b ldr r3, [r7, #4] 80162d4: 60fb str r3, [r7, #12] err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); 80162d6: f107 030c add.w r3, r7, #12 80162da: 4619 mov r1, r3 80162dc: 4808 ldr r0, [pc, #32] @ (8016300 ) 80162de: f7ff fe83 bl 8015fe8 80162e2: 4603 mov r3, r0 80162e4: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 80162e8: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 80162ec: 4618 mov r0, r3 80162ee: 3730 adds r7, #48 @ 0x30 80162f0: 46bd mov sp, r7 80162f2: bd80 pop {r7, pc} 80162f4: 0802db84 .word 0x0802db84 80162f8: 0802dd18 .word 0x0802dd18 80162fc: 0802dbdc .word 0x0802dbdc 8016300: 08017b61 .word 0x08017b61 08016304 : * ERR_WOULDBLOCK if the netconn is nonblocking but would block to wait for data * ERR_TIMEOUT if the netconn has a receive timeout and no data was received */ static err_t netconn_recv_data(struct netconn *conn, void **new_buf, u8_t apiflags) { 8016304: b580 push {r7, lr} 8016306: b08a sub sp, #40 @ 0x28 8016308: af00 add r7, sp, #0 801630a: 60f8 str r0, [r7, #12] 801630c: 60b9 str r1, [r7, #8] 801630e: 4613 mov r3, r2 8016310: 71fb strb r3, [r7, #7] void *buf = NULL; 8016312: 2300 movs r3, #0 8016314: 61bb str r3, [r7, #24] u16_t len; LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 8016316: 68bb ldr r3, [r7, #8] 8016318: 2b00 cmp r3, #0 801631a: d109 bne.n 8016330 801631c: 4b64 ldr r3, [pc, #400] @ (80164b0 ) 801631e: f44f 7212 mov.w r2, #584 @ 0x248 8016322: 4964 ldr r1, [pc, #400] @ (80164b4 ) 8016324: 4864 ldr r0, [pc, #400] @ (80164b8 ) 8016326: f014 faa1 bl 802a86c 801632a: f06f 030f mvn.w r3, #15 801632e: e0bb b.n 80164a8 *new_buf = NULL; 8016330: 68bb ldr r3, [r7, #8] 8016332: 2200 movs r2, #0 8016334: 601a str r2, [r3, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 8016336: 68fb ldr r3, [r7, #12] 8016338: 2b00 cmp r3, #0 801633a: d109 bne.n 8016350 801633c: 4b5c ldr r3, [pc, #368] @ (80164b0 ) 801633e: f240 224a movw r2, #586 @ 0x24a 8016342: 495e ldr r1, [pc, #376] @ (80164bc ) 8016344: 485c ldr r0, [pc, #368] @ (80164b8 ) 8016346: f014 fa91 bl 802a86c 801634a: f06f 030f mvn.w r3, #15 801634e: e0ab b.n 80164a8 if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 8016350: 68fb ldr r3, [r7, #12] 8016352: 3310 adds r3, #16 8016354: 4618 mov r0, r3 8016356: f010 fee9 bl 802712c 801635a: 4603 mov r3, r0 801635c: 2b00 cmp r3, #0 801635e: d10e bne.n 801637e err_t err = netconn_err(conn); 8016360: 68f8 ldr r0, [r7, #12] 8016362: f000 fb1f bl 80169a4 8016366: 4603 mov r3, r0 8016368: 77fb strb r3, [r7, #31] if (err != ERR_OK) { 801636a: f997 301f ldrsb.w r3, [r7, #31] 801636e: 2b00 cmp r3, #0 8016370: d002 beq.n 8016378 /* return pending error */ return err; 8016372: f997 301f ldrsb.w r3, [r7, #31] 8016376: e097 b.n 80164a8 } return ERR_CONN; 8016378: f06f 030a mvn.w r3, #10 801637c: e094 b.n 80164a8 } NETCONN_MBOX_WAITING_INC(conn); if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 801637e: 68fb ldr r3, [r7, #12] 8016380: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016384: f003 0302 and.w r3, r3, #2 8016388: 2b00 cmp r3, #0 801638a: d110 bne.n 80163ae 801638c: 79fb ldrb r3, [r7, #7] 801638e: f003 0304 and.w r3, r3, #4 8016392: 2b00 cmp r3, #0 8016394: d10b bne.n 80163ae (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 8016396: 68fb ldr r3, [r7, #12] 8016398: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801639c: f003 0301 and.w r3, r3, #1 if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 80163a0: 2b00 cmp r3, #0 80163a2: d104 bne.n 80163ae (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 80163a4: 68fb ldr r3, [r7, #12] 80163a6: f993 3008 ldrsb.w r3, [r3, #8] 80163aa: 2b00 cmp r3, #0 80163ac: d025 beq.n 80163fa if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { 80163ae: 68fb ldr r3, [r7, #12] 80163b0: 3310 adds r3, #16 80163b2: f107 0218 add.w r2, r7, #24 80163b6: 4611 mov r1, r2 80163b8: 4618 mov r0, r3 80163ba: f010 fea0 bl 80270fe 80163be: 4603 mov r3, r0 80163c0: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80163c4: d12a bne.n 801641c err_t err; NETCONN_MBOX_WAITING_DEC(conn); err = netconn_err(conn); 80163c6: 68f8 ldr r0, [r7, #12] 80163c8: f000 faec bl 80169a4 80163cc: 4603 mov r3, r0 80163ce: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err != ERR_OK) { 80163d2: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 80163d6: 2b00 cmp r3, #0 80163d8: d002 beq.n 80163e0 /* return pending error */ return err; 80163da: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 80163de: e063 b.n 80164a8 } if (conn->flags & NETCONN_FLAG_MBOXCLOSED) { 80163e0: 68fb ldr r3, [r7, #12] 80163e2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80163e6: f003 0301 and.w r3, r3, #1 80163ea: 2b00 cmp r3, #0 80163ec: d002 beq.n 80163f4 return ERR_CONN; 80163ee: f06f 030a mvn.w r3, #10 80163f2: e059 b.n 80164a8 } return ERR_WOULDBLOCK; 80163f4: f06f 0306 mvn.w r3, #6 80163f8: e056 b.n 80164a8 } } else { #if LWIP_SO_RCVTIMEO if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { 80163fa: 68fb ldr r3, [r7, #12] 80163fc: f103 0010 add.w r0, r3, #16 8016400: 68fb ldr r3, [r7, #12] 8016402: 69da ldr r2, [r3, #28] 8016404: f107 0318 add.w r3, r7, #24 8016408: 4619 mov r1, r3 801640a: f010 fe47 bl 802709c 801640e: 4603 mov r3, r0 8016410: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8016414: d102 bne.n 801641c NETCONN_MBOX_WAITING_DEC(conn); return ERR_TIMEOUT; 8016416: f06f 0302 mvn.w r3, #2 801641a: e045 b.n 80164a8 } #endif #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) 801641c: 68fb ldr r3, [r7, #12] 801641e: 781b ldrb r3, [r3, #0] 8016420: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016424: 2b10 cmp r3, #16 8016426: d117 bne.n 8016458 #endif /* (LWIP_UDP || LWIP_RAW) */ { err_t err; /* Check if this is an error message or a pbuf */ if (lwip_netconn_is_err_msg(buf, &err)) { 8016428: 69bb ldr r3, [r7, #24] 801642a: f107 0217 add.w r2, r7, #23 801642e: 4611 mov r1, r2 8016430: 4618 mov r0, r3 8016432: f000 fb09 bl 8016a48 8016436: 4603 mov r3, r0 8016438: 2b00 cmp r3, #0 801643a: d009 beq.n 8016450 /* new_buf has been zeroed above already */ if (err == ERR_CLSD) { 801643c: f997 3017 ldrsb.w r3, [r7, #23] 8016440: f113 0f0f cmn.w r3, #15 8016444: d101 bne.n 801644a /* connection closed translates to ERR_OK with *new_buf == NULL */ return ERR_OK; 8016446: 2300 movs r3, #0 8016448: e02e b.n 80164a8 } return err; 801644a: f997 3017 ldrsb.w r3, [r7, #23] 801644e: e02b b.n 80164a8 } len = ((struct pbuf *)buf)->tot_len; 8016450: 69bb ldr r3, [r7, #24] 8016452: 891b ldrh r3, [r3, #8] 8016454: 84fb strh r3, [r7, #38] @ 0x26 8016456: e00d b.n 8016474 #if LWIP_TCP && (LWIP_UDP || LWIP_RAW) else #endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ #if (LWIP_UDP || LWIP_RAW) { LWIP_ASSERT("buf != NULL", buf != NULL); 8016458: 69bb ldr r3, [r7, #24] 801645a: 2b00 cmp r3, #0 801645c: d106 bne.n 801646c 801645e: 4b14 ldr r3, [pc, #80] @ (80164b0 ) 8016460: f240 2291 movw r2, #657 @ 0x291 8016464: 4916 ldr r1, [pc, #88] @ (80164c0 ) 8016466: 4814 ldr r0, [pc, #80] @ (80164b8 ) 8016468: f014 fa00 bl 802a86c len = netbuf_len((struct netbuf *)buf); 801646c: 69bb ldr r3, [r7, #24] 801646e: 681b ldr r3, [r3, #0] 8016470: 891b ldrh r3, [r3, #8] 8016472: 84fb strh r3, [r7, #38] @ 0x26 } #endif /* (LWIP_UDP || LWIP_RAW) */ #if LWIP_SO_RCVBUF SYS_ARCH_DEC(conn->recv_avail, len); 8016474: f010 ff64 bl 8027340 8016478: 6238 str r0, [r7, #32] 801647a: 68fb ldr r3, [r7, #12] 801647c: 6a5a ldr r2, [r3, #36] @ 0x24 801647e: 8cfb ldrh r3, [r7, #38] @ 0x26 8016480: 1ad2 subs r2, r2, r3 8016482: 68fb ldr r3, [r7, #12] 8016484: 625a str r2, [r3, #36] @ 0x24 8016486: 6a38 ldr r0, [r7, #32] 8016488: f010 ff68 bl 802735c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); 801648c: 68fb ldr r3, [r7, #12] 801648e: 6b1b ldr r3, [r3, #48] @ 0x30 8016490: 2b00 cmp r3, #0 8016492: d005 beq.n 80164a0 8016494: 68fb ldr r3, [r7, #12] 8016496: 6b1b ldr r3, [r3, #48] @ 0x30 8016498: 8cfa ldrh r2, [r7, #38] @ 0x26 801649a: 2101 movs r1, #1 801649c: 68f8 ldr r0, [r7, #12] 801649e: 4798 blx r3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 80164a0: 69ba ldr r2, [r7, #24] 80164a2: 68bb ldr r3, [r7, #8] 80164a4: 601a str r2, [r3, #0] /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; 80164a6: 2300 movs r3, #0 } 80164a8: 4618 mov r0, r3 80164aa: 3728 adds r7, #40 @ 0x28 80164ac: 46bd mov sp, r7 80164ae: bd80 pop {r7, pc} 80164b0: 0802db84 .word 0x0802db84 80164b4: 0802dd9c .word 0x0802dd9c 80164b8: 0802dbdc .word 0x0802dbdc 80164bc: 0802ddbc .word 0x0802ddbc 80164c0: 0802ddd8 .word 0x0802ddd8 080164c4 : #if LWIP_TCP static err_t netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg) { 80164c4: b580 push {r7, lr} 80164c6: b084 sub sp, #16 80164c8: af00 add r7, sp, #0 80164ca: 60f8 str r0, [r7, #12] 80164cc: 60b9 str r1, [r7, #8] 80164ce: 607a str r2, [r7, #4] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 80164d0: 68fb ldr r3, [r7, #12] 80164d2: 2b00 cmp r3, #0 80164d4: d005 beq.n 80164e2 80164d6: 68fb ldr r3, [r7, #12] 80164d8: 781b ldrb r3, [r3, #0] 80164da: f003 03f0 and.w r3, r3, #240 @ 0xf0 80164de: 2b10 cmp r3, #16 80164e0: d009 beq.n 80164f6 80164e2: 4b0c ldr r3, [pc, #48] @ (8016514 ) 80164e4: f240 22a7 movw r2, #679 @ 0x2a7 80164e8: 490b ldr r1, [pc, #44] @ (8016518 ) 80164ea: 480c ldr r0, [pc, #48] @ (801651c ) 80164ec: f014 f9be bl 802a86c 80164f0: f06f 030f mvn.w r3, #15 80164f4: e00a b.n 801650c NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); msg->conn = conn; 80164f6: 687b ldr r3, [r7, #4] 80164f8: 68fa ldr r2, [r7, #12] 80164fa: 601a str r2, [r3, #0] msg->msg.r.len = len; 80164fc: 687b ldr r3, [r7, #4] 80164fe: 68ba ldr r2, [r7, #8] 8016500: 609a str r2, [r3, #8] return netconn_apimsg(lwip_netconn_do_recv, msg); 8016502: 6879 ldr r1, [r7, #4] 8016504: 4806 ldr r0, [pc, #24] @ (8016520 ) 8016506: f7ff fd6f bl 8015fe8 801650a: 4603 mov r3, r0 } 801650c: 4618 mov r0, r3 801650e: 3710 adds r7, #16 8016510: 46bd mov sp, r7 8016512: bd80 pop {r7, pc} 8016514: 0802db84 .word 0x0802db84 8016518: 0802dde4 .word 0x0802dde4 801651c: 0802dbdc .word 0x0802dbdc 8016520: 08017c37 .word 0x08017c37 08016524 : err_t netconn_tcp_recvd(struct netconn *conn, size_t len) { 8016524: b580 push {r7, lr} 8016526: b08c sub sp, #48 @ 0x30 8016528: af00 add r7, sp, #0 801652a: 6078 str r0, [r7, #4] 801652c: 6039 str r1, [r7, #0] err_t err; API_MSG_VAR_DECLARE(msg); LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 801652e: 687b ldr r3, [r7, #4] 8016530: 2b00 cmp r3, #0 8016532: d005 beq.n 8016540 8016534: 687b ldr r3, [r7, #4] 8016536: 781b ldrb r3, [r3, #0] 8016538: f003 03f0 and.w r3, r3, #240 @ 0xf0 801653c: 2b10 cmp r3, #16 801653e: d009 beq.n 8016554 8016540: 4b0c ldr r3, [pc, #48] @ (8016574 ) 8016542: f240 22b5 movw r2, #693 @ 0x2b5 8016546: 490c ldr r1, [pc, #48] @ (8016578 ) 8016548: 480c ldr r0, [pc, #48] @ (801657c ) 801654a: f014 f98f bl 802a86c 801654e: f06f 030f mvn.w r3, #15 8016552: e00b b.n 801656c NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); API_MSG_VAR_ALLOC(msg); err = netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); 8016554: f107 030c add.w r3, r7, #12 8016558: 461a mov r2, r3 801655a: 6839 ldr r1, [r7, #0] 801655c: 6878 ldr r0, [r7, #4] 801655e: f7ff ffb1 bl 80164c4 8016562: 4603 mov r3, r0 8016564: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8016568: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 801656c: 4618 mov r0, r3 801656e: 3730 adds r7, #48 @ 0x30 8016570: 46bd mov sp, r7 8016572: bd80 pop {r7, pc} 8016574: 0802db84 .word 0x0802db84 8016578: 0802dde4 .word 0x0802dde4 801657c: 0802dbdc .word 0x0802dbdc 08016580 : static err_t netconn_recv_data_tcp(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) { 8016580: b580 push {r7, lr} 8016582: b090 sub sp, #64 @ 0x40 8016584: af00 add r7, sp, #0 8016586: 60f8 str r0, [r7, #12] 8016588: 60b9 str r1, [r7, #8] 801658a: 4613 mov r3, r2 801658c: 71fb strb r3, [r7, #7] API_MSG_VAR_DECLARE(msg); #if LWIP_MPU_COMPATIBLE msg = NULL; #endif if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 801658e: 68fb ldr r3, [r7, #12] 8016590: 3310 adds r3, #16 8016592: 4618 mov r0, r3 8016594: f010 fdca bl 802712c 8016598: 4603 mov r3, r0 801659a: 2b00 cmp r3, #0 801659c: d102 bne.n 80165a4 /* This only happens when calling this function more than once *after* receiving FIN */ return ERR_CONN; 801659e: f06f 030a mvn.w r3, #10 80165a2: e072 b.n 801668a } if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) { 80165a4: 68fb ldr r3, [r7, #12] 80165a6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80165aa: b25b sxtb r3, r3 80165ac: 2b00 cmp r3, #0 80165ae: da09 bge.n 80165c4 netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING); 80165b0: 68fb ldr r3, [r7, #12] 80165b2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80165b6: f003 037f and.w r3, r3, #127 @ 0x7f 80165ba: b2da uxtb r2, r3 80165bc: 68fb ldr r3, [r7, #12] 80165be: f883 2028 strb.w r2, [r3, #40] @ 0x28 goto handle_fin; 80165c2: e03b b.n 801663c /* need to allocate API message here so empty message pool does not result in event loss * see bug #47512: MPU_COMPATIBLE may fail on empty pool */ API_MSG_VAR_ALLOC(msg); } err = netconn_recv_data(conn, (void **)new_buf, apiflags); 80165c4: 79fb ldrb r3, [r7, #7] 80165c6: 461a mov r2, r3 80165c8: 68b9 ldr r1, [r7, #8] 80165ca: 68f8 ldr r0, [r7, #12] 80165cc: f7ff fe9a bl 8016304 80165d0: 4603 mov r3, r0 80165d2: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 80165d6: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 80165da: 2b00 cmp r3, #0 80165dc: d002 beq.n 80165e4 if (!(apiflags & NETCONN_NOAUTORCVD)) { API_MSG_VAR_FREE(msg); } return err; 80165de: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 80165e2: e052 b.n 801668a } buf = *new_buf; 80165e4: 68bb ldr r3, [r7, #8] 80165e6: 681b ldr r3, [r3, #0] 80165e8: 63bb str r3, [r7, #56] @ 0x38 if (!(apiflags & NETCONN_NOAUTORCVD)) { 80165ea: 79fb ldrb r3, [r7, #7] 80165ec: f003 0308 and.w r3, r3, #8 80165f0: 2b00 cmp r3, #0 80165f2: d10e bne.n 8016612 /* Let the stack know that we have taken the data. */ u16_t len = buf ? buf->tot_len : 1; 80165f4: 6bbb ldr r3, [r7, #56] @ 0x38 80165f6: 2b00 cmp r3, #0 80165f8: d002 beq.n 8016600 80165fa: 6bbb ldr r3, [r7, #56] @ 0x38 80165fc: 891b ldrh r3, [r3, #8] 80165fe: e000 b.n 8016602 8016600: 2301 movs r3, #1 8016602: 86fb strh r3, [r7, #54] @ 0x36 /* don't care for the return value of lwip_netconn_do_recv */ /* @todo: this should really be fixed, e.g. by retrying in poll on error */ netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); 8016604: 8efb ldrh r3, [r7, #54] @ 0x36 8016606: f107 0214 add.w r2, r7, #20 801660a: 4619 mov r1, r3 801660c: 68f8 ldr r0, [r7, #12] 801660e: f7ff ff59 bl 80164c4 API_MSG_VAR_FREE(msg); } /* If we are closed, we indicate that we no longer wish to use the socket */ if (buf == NULL) { 8016612: 6bbb ldr r3, [r7, #56] @ 0x38 8016614: 2b00 cmp r3, #0 8016616: d136 bne.n 8016686 if (apiflags & NETCONN_NOFIN) { 8016618: 79fb ldrb r3, [r7, #7] 801661a: f003 0310 and.w r3, r3, #16 801661e: 2b00 cmp r3, #0 8016620: d00b beq.n 801663a /* received a FIN but the caller cannot handle it right now: re-enqueue it and return "no data" */ netconn_set_flags(conn, NETCONN_FIN_RX_PENDING); 8016622: 68fb ldr r3, [r7, #12] 8016624: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016628: f063 037f orn r3, r3, #127 @ 0x7f 801662c: b2da uxtb r2, r3 801662e: 68fb ldr r3, [r7, #12] 8016630: f883 2028 strb.w r2, [r3, #40] @ 0x28 return ERR_WOULDBLOCK; 8016634: f06f 0306 mvn.w r3, #6 8016638: e027 b.n 801668a } else { handle_fin: 801663a: bf00 nop API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 801663c: 68fb ldr r3, [r7, #12] 801663e: 6b1b ldr r3, [r3, #48] @ 0x30 8016640: 2b00 cmp r3, #0 8016642: d005 beq.n 8016650 8016644: 68fb ldr r3, [r7, #12] 8016646: 6b1b ldr r3, [r3, #48] @ 0x30 8016648: 2200 movs r2, #0 801664a: 2101 movs r1, #1 801664c: 68f8 ldr r0, [r7, #12] 801664e: 4798 blx r3 if (conn->pcb.ip == NULL) { 8016650: 68fb ldr r3, [r7, #12] 8016652: 685b ldr r3, [r3, #4] 8016654: 2b00 cmp r3, #0 8016656: d10f bne.n 8016678 /* race condition: RST during recv */ err = netconn_err(conn); 8016658: 68f8 ldr r0, [r7, #12] 801665a: f000 f9a3 bl 80169a4 801665e: 4603 mov r3, r0 8016660: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 8016664: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 8016668: 2b00 cmp r3, #0 801666a: d002 beq.n 8016672 return err; 801666c: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 8016670: e00b b.n 801668a } return ERR_RST; 8016672: f06f 030d mvn.w r3, #13 8016676: e008 b.n 801668a } /* RX side is closed, so deallocate the recvmbox */ netconn_close_shutdown(conn, NETCONN_SHUT_RD); 8016678: 2101 movs r1, #1 801667a: 68f8 ldr r0, [r7, #12] 801667c: f000 f962 bl 8016944 /* Don' store ERR_CLSD as conn->err since we are only half-closed */ return ERR_CLSD; 8016680: f06f 030e mvn.w r3, #14 8016684: e001 b.n 801668a } } return err; 8016686: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 801668a: 4618 mov r0, r3 801668c: 3740 adds r7, #64 @ 0x40 801668e: 46bd mov sp, r7 8016690: bd80 pop {r7, pc} ... 08016694 : * memory error or another error, @see netconn_recv_data) * ERR_ARG if conn is not a TCP netconn */ err_t netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) { 8016694: b580 push {r7, lr} 8016696: b084 sub sp, #16 8016698: af00 add r7, sp, #0 801669a: 60f8 str r0, [r7, #12] 801669c: 60b9 str r1, [r7, #8] 801669e: 4613 mov r3, r2 80166a0: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 80166a2: 68fb ldr r3, [r7, #12] 80166a4: 2b00 cmp r3, #0 80166a6: d005 beq.n 80166b4 80166a8: 68fb ldr r3, [r7, #12] 80166aa: 781b ldrb r3, [r3, #0] 80166ac: f003 03f0 and.w r3, r3, #240 @ 0xf0 80166b0: 2b10 cmp r3, #16 80166b2: d009 beq.n 80166c8 80166b4: 4b0a ldr r3, [pc, #40] @ (80166e0 ) 80166b6: f240 3225 movw r2, #805 @ 0x325 80166ba: 490a ldr r1, [pc, #40] @ (80166e4 ) 80166bc: 480a ldr r0, [pc, #40] @ (80166e8 ) 80166be: f014 f8d5 bl 802a86c 80166c2: f06f 030f mvn.w r3, #15 80166c6: e006 b.n 80166d6 NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); return netconn_recv_data_tcp(conn, new_buf, apiflags); 80166c8: 79fb ldrb r3, [r7, #7] 80166ca: 461a mov r2, r3 80166cc: 68b9 ldr r1, [r7, #8] 80166ce: 68f8 ldr r0, [r7, #12] 80166d0: f7ff ff56 bl 8016580 80166d4: 4603 mov r3, r0 } 80166d6: 4618 mov r0, r3 80166d8: 3710 adds r7, #16 80166da: 46bd mov sp, r7 80166dc: bd80 pop {r7, pc} 80166de: bf00 nop 80166e0: 0802db84 .word 0x0802db84 80166e4: 0802dde4 .word 0x0802dde4 80166e8: 0802dbdc .word 0x0802dbdc 080166ec : * memory error or another error) * ERR_ARG if conn is not a UDP/RAW netconn */ err_t netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags) { 80166ec: b580 push {r7, lr} 80166ee: b084 sub sp, #16 80166f0: af00 add r7, sp, #0 80166f2: 60f8 str r0, [r7, #12] 80166f4: 60b9 str r1, [r7, #8] 80166f6: 4613 mov r3, r2 80166f8: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && 80166fa: 68fb ldr r3, [r7, #12] 80166fc: 2b00 cmp r3, #0 80166fe: d005 beq.n 801670c 8016700: 68fb ldr r3, [r7, #12] 8016702: 781b ldrb r3, [r3, #0] 8016704: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016708: 2b10 cmp r3, #16 801670a: d109 bne.n 8016720 801670c: 4b0a ldr r3, [pc, #40] @ (8016738 ) 801670e: f44f 7253 mov.w r2, #844 @ 0x34c 8016712: 490a ldr r1, [pc, #40] @ (801673c ) 8016714: 480a ldr r0, [pc, #40] @ (8016740 ) 8016716: f014 f8a9 bl 802a86c 801671a: f06f 030f mvn.w r3, #15 801671e: e006 b.n 801672e NETCONNTYPE_GROUP(netconn_type(conn)) != NETCONN_TCP, return ERR_ARG;); return netconn_recv_data(conn, (void **)new_buf, apiflags); 8016720: 79fb ldrb r3, [r7, #7] 8016722: 461a mov r2, r3 8016724: 68b9 ldr r1, [r7, #8] 8016726: 68f8 ldr r0, [r7, #12] 8016728: f7ff fdec bl 8016304 801672c: 4603 mov r3, r0 } 801672e: 4618 mov r0, r3 8016730: 3710 adds r7, #16 8016732: 46bd mov sp, r7 8016734: bd80 pop {r7, pc} 8016736: bf00 nop 8016738: 0802db84 .word 0x0802db84 801673c: 0802de08 .word 0x0802de08 8016740: 0802dbdc .word 0x0802dbdc 08016744 : * @param buf a netbuf containing the data to send * @return ERR_OK if data was sent, any other err_t on error */ err_t netconn_send(struct netconn *conn, struct netbuf *buf) { 8016744: b580 push {r7, lr} 8016746: b08c sub sp, #48 @ 0x30 8016748: af00 add r7, sp, #0 801674a: 6078 str r0, [r7, #4] 801674c: 6039 str r1, [r7, #0] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 801674e: 687b ldr r3, [r7, #4] 8016750: 2b00 cmp r3, #0 8016752: d109 bne.n 8016768 8016754: 4b0e ldr r3, [pc, #56] @ (8016790 ) 8016756: f240 32b2 movw r2, #946 @ 0x3b2 801675a: 490e ldr r1, [pc, #56] @ (8016794 ) 801675c: 480e ldr r0, [pc, #56] @ (8016798 ) 801675e: f014 f885 bl 802a86c 8016762: f06f 030f mvn.w r3, #15 8016766: e00e b.n 8016786 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8016768: 687b ldr r3, [r7, #4] 801676a: 60fb str r3, [r7, #12] API_MSG_VAR_REF(msg).msg.b = buf; 801676c: 683b ldr r3, [r7, #0] 801676e: 617b str r3, [r7, #20] err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); 8016770: f107 030c add.w r3, r7, #12 8016774: 4619 mov r1, r3 8016776: 4809 ldr r0, [pc, #36] @ (801679c ) 8016778: f7ff fc36 bl 8015fe8 801677c: 4603 mov r3, r0 801677e: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8016782: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 8016786: 4618 mov r0, r3 8016788: 3730 adds r7, #48 @ 0x30 801678a: 46bd mov sp, r7 801678c: bd80 pop {r7, pc} 801678e: bf00 nop 8016790: 0802db84 .word 0x0802db84 8016794: 0802de40 .word 0x0802de40 8016798: 0802dbdc .word 0x0802dbdc 801679c: 08017b9d .word 0x08017b9d 080167a0 : * @return ERR_OK if data was sent, any other err_t on error */ err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written) { 80167a0: b580 push {r7, lr} 80167a2: b088 sub sp, #32 80167a4: af02 add r7, sp, #8 80167a6: 60f8 str r0, [r7, #12] 80167a8: 60b9 str r1, [r7, #8] 80167aa: 607a str r2, [r7, #4] 80167ac: 70fb strb r3, [r7, #3] struct netvector vector; vector.ptr = dataptr; 80167ae: 68bb ldr r3, [r7, #8] 80167b0: 613b str r3, [r7, #16] vector.len = size; 80167b2: 687b ldr r3, [r7, #4] 80167b4: 617b str r3, [r7, #20] return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written); 80167b6: 78fa ldrb r2, [r7, #3] 80167b8: f107 0110 add.w r1, r7, #16 80167bc: 6a3b ldr r3, [r7, #32] 80167be: 9300 str r3, [sp, #0] 80167c0: 4613 mov r3, r2 80167c2: 2201 movs r2, #1 80167c4: 68f8 ldr r0, [r7, #12] 80167c6: f000 f805 bl 80167d4 80167ca: 4603 mov r3, r0 } 80167cc: 4618 mov r0, r3 80167ce: 3718 adds r7, #24 80167d0: 46bd mov sp, r7 80167d2: bd80 pop {r7, pc} 080167d4 : * @return ERR_OK if data was sent, any other err_t on error */ err_t netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt, u8_t apiflags, size_t *bytes_written) { 80167d4: b580 push {r7, lr} 80167d6: b092 sub sp, #72 @ 0x48 80167d8: af00 add r7, sp, #0 80167da: 60f8 str r0, [r7, #12] 80167dc: 60b9 str r1, [r7, #8] 80167de: 4611 mov r1, r2 80167e0: 461a mov r2, r3 80167e2: 460b mov r3, r1 80167e4: 80fb strh r3, [r7, #6] 80167e6: 4613 mov r3, r2 80167e8: 717b strb r3, [r7, #5] err_t err; u8_t dontblock; size_t size; int i; LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); 80167ea: 68fb ldr r3, [r7, #12] 80167ec: 2b00 cmp r3, #0 80167ee: d109 bne.n 8016804 80167f0: 4b4e ldr r3, [pc, #312] @ (801692c ) 80167f2: f240 32ee movw r2, #1006 @ 0x3ee 80167f6: 494e ldr r1, [pc, #312] @ (8016930 ) 80167f8: 484e ldr r0, [pc, #312] @ (8016934 ) 80167fa: f014 f837 bl 802a86c 80167fe: f06f 030f mvn.w r3, #15 8016802: e08f b.n 8016924 LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); 8016804: 68fb ldr r3, [r7, #12] 8016806: 781b ldrb r3, [r3, #0] 8016808: f003 03f0 and.w r3, r3, #240 @ 0xf0 801680c: 2b10 cmp r3, #16 801680e: d009 beq.n 8016824 8016810: 4b46 ldr r3, [pc, #280] @ (801692c ) 8016812: f240 32ef movw r2, #1007 @ 0x3ef 8016816: 4948 ldr r1, [pc, #288] @ (8016938 ) 8016818: 4846 ldr r0, [pc, #280] @ (8016934 ) 801681a: f014 f827 bl 802a86c 801681e: f06f 0305 mvn.w r3, #5 8016822: e07f b.n 8016924 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8016824: 68fb ldr r3, [r7, #12] 8016826: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801682a: f003 0302 and.w r3, r3, #2 801682e: 2b00 cmp r3, #0 8016830: d104 bne.n 801683c 8016832: 797b ldrb r3, [r7, #5] 8016834: f003 0304 and.w r3, r3, #4 8016838: 2b00 cmp r3, #0 801683a: d001 beq.n 8016840 801683c: 2301 movs r3, #1 801683e: e000 b.n 8016842 8016840: 2300 movs r3, #0 8016842: f887 303f strb.w r3, [r7, #63] @ 0x3f #if LWIP_SO_SNDTIMEO if (conn->send_timeout != 0) { dontblock = 1; } #endif /* LWIP_SO_SNDTIMEO */ if (dontblock && !bytes_written) { 8016846: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 801684a: 2b00 cmp r3, #0 801684c: d005 beq.n 801685a 801684e: 6d3b ldr r3, [r7, #80] @ 0x50 8016850: 2b00 cmp r3, #0 8016852: d102 bne.n 801685a /* This implies netconn_write() cannot be used for non-blocking send, since it has no way to return the number of bytes written. */ return ERR_VAL; 8016854: f06f 0305 mvn.w r3, #5 8016858: e064 b.n 8016924 } /* sum up the total size */ size = 0; 801685a: 2300 movs r3, #0 801685c: 647b str r3, [r7, #68] @ 0x44 for (i = 0; i < vectorcnt; i++) { 801685e: 2300 movs r3, #0 8016860: 643b str r3, [r7, #64] @ 0x40 8016862: e015 b.n 8016890 size += vectors[i].len; 8016864: 6c3b ldr r3, [r7, #64] @ 0x40 8016866: 00db lsls r3, r3, #3 8016868: 68ba ldr r2, [r7, #8] 801686a: 4413 add r3, r2 801686c: 685b ldr r3, [r3, #4] 801686e: 6c7a ldr r2, [r7, #68] @ 0x44 8016870: 4413 add r3, r2 8016872: 647b str r3, [r7, #68] @ 0x44 if (size < vectors[i].len) { 8016874: 6c3b ldr r3, [r7, #64] @ 0x40 8016876: 00db lsls r3, r3, #3 8016878: 68ba ldr r2, [r7, #8] 801687a: 4413 add r3, r2 801687c: 685b ldr r3, [r3, #4] 801687e: 6c7a ldr r2, [r7, #68] @ 0x44 8016880: 429a cmp r2, r3 8016882: d202 bcs.n 801688a /* overflow */ return ERR_VAL; 8016884: f06f 0305 mvn.w r3, #5 8016888: e04c b.n 8016924 for (i = 0; i < vectorcnt; i++) { 801688a: 6c3b ldr r3, [r7, #64] @ 0x40 801688c: 3301 adds r3, #1 801688e: 643b str r3, [r7, #64] @ 0x40 8016890: 88fb ldrh r3, [r7, #6] 8016892: 6c3a ldr r2, [r7, #64] @ 0x40 8016894: 429a cmp r2, r3 8016896: dbe5 blt.n 8016864 } } if (size == 0) { 8016898: 6c7b ldr r3, [r7, #68] @ 0x44 801689a: 2b00 cmp r3, #0 801689c: d101 bne.n 80168a2 return ERR_OK; 801689e: 2300 movs r3, #0 80168a0: e040 b.n 8016924 } else if (size > SSIZE_MAX) { 80168a2: 6c7b ldr r3, [r7, #68] @ 0x44 80168a4: 2b00 cmp r3, #0 80168a6: da0a bge.n 80168be ssize_t limited; /* this is required by the socket layer (cannot send full size_t range) */ if (!bytes_written) { 80168a8: 6d3b ldr r3, [r7, #80] @ 0x50 80168aa: 2b00 cmp r3, #0 80168ac: d102 bne.n 80168b4 return ERR_VAL; 80168ae: f06f 0305 mvn.w r3, #5 80168b2: e037 b.n 8016924 } /* limit the amount of data to send */ limited = SSIZE_MAX; 80168b4: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 80168b8: 63bb str r3, [r7, #56] @ 0x38 size = (size_t)limited; 80168ba: 6bbb ldr r3, [r7, #56] @ 0x38 80168bc: 647b str r3, [r7, #68] @ 0x44 } API_MSG_VAR_ALLOC(msg); /* non-blocking write sends as much */ API_MSG_VAR_REF(msg).conn = conn; 80168be: 68fb ldr r3, [r7, #12] 80168c0: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.w.vector = vectors; 80168c2: 68bb ldr r3, [r7, #8] 80168c4: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt; 80168c6: 88fb ldrh r3, [r7, #6] 80168c8: 843b strh r3, [r7, #32] API_MSG_VAR_REF(msg).msg.w.vector_off = 0; 80168ca: 2300 movs r3, #0 80168cc: 627b str r3, [r7, #36] @ 0x24 API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; 80168ce: 797b ldrb r3, [r7, #5] 80168d0: f887 3030 strb.w r3, [r7, #48] @ 0x30 API_MSG_VAR_REF(msg).msg.w.len = size; 80168d4: 6c7b ldr r3, [r7, #68] @ 0x44 80168d6: 62bb str r3, [r7, #40] @ 0x28 API_MSG_VAR_REF(msg).msg.w.offset = 0; 80168d8: 2300 movs r3, #0 80168da: 62fb str r3, [r7, #44] @ 0x2c #endif /* LWIP_SO_SNDTIMEO */ /* For locking the core: this _can_ be delayed on low memory/low send buffer, but if it is, this is done inside api_msg.c:do_write(), so we can use the non-blocking version here. */ err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); 80168dc: f107 0314 add.w r3, r7, #20 80168e0: 4619 mov r1, r3 80168e2: 4816 ldr r0, [pc, #88] @ (801693c ) 80168e4: f7ff fb80 bl 8015fe8 80168e8: 4603 mov r3, r0 80168ea: f887 3037 strb.w r3, [r7, #55] @ 0x37 if (err == ERR_OK) { 80168ee: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 80168f2: 2b00 cmp r3, #0 80168f4: d114 bne.n 8016920 if (bytes_written != NULL) { 80168f6: 6d3b ldr r3, [r7, #80] @ 0x50 80168f8: 2b00 cmp r3, #0 80168fa: d002 beq.n 8016902 *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset; 80168fc: 6afa ldr r2, [r7, #44] @ 0x2c 80168fe: 6d3b ldr r3, [r7, #80] @ 0x50 8016900: 601a str r2, [r3, #0] } /* for blocking, check all requested bytes were written, NOTE: send_timeout is treated as dontblock (see dontblock assignment above) */ if (!dontblock) { 8016902: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 8016906: 2b00 cmp r3, #0 8016908: d10a bne.n 8016920 LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size); 801690a: 6afb ldr r3, [r7, #44] @ 0x2c 801690c: 6c7a ldr r2, [r7, #68] @ 0x44 801690e: 429a cmp r2, r3 8016910: d006 beq.n 8016920 8016912: 4b06 ldr r3, [pc, #24] @ (801692c ) 8016914: f44f 6286 mov.w r2, #1072 @ 0x430 8016918: 4909 ldr r1, [pc, #36] @ (8016940 ) 801691a: 4806 ldr r0, [pc, #24] @ (8016934 ) 801691c: f013 ffa6 bl 802a86c } } API_MSG_VAR_FREE(msg); return err; 8016920: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8016924: 4618 mov r0, r3 8016926: 3748 adds r7, #72 @ 0x48 8016928: 46bd mov sp, r7 801692a: bd80 pop {r7, pc} 801692c: 0802db84 .word 0x0802db84 8016930: 0802de5c .word 0x0802de5c 8016934: 0802dbdc .word 0x0802dbdc 8016938: 0802de78 .word 0x0802de78 801693c: 08018041 .word 0x08018041 8016940: 0802de9c .word 0x0802de9c 08016944 : * @param how fully close or only shutdown one side? * @return ERR_OK if the netconn was closed, any other err_t on error */ static err_t netconn_close_shutdown(struct netconn *conn, u8_t how) { 8016944: b580 push {r7, lr} 8016946: b08c sub sp, #48 @ 0x30 8016948: af00 add r7, sp, #0 801694a: 6078 str r0, [r7, #4] 801694c: 460b mov r3, r1 801694e: 70fb strb r3, [r7, #3] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_UNUSED_ARG(how); LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;); 8016950: 687b ldr r3, [r7, #4] 8016952: 2b00 cmp r3, #0 8016954: d109 bne.n 801696a 8016956: 4b0f ldr r3, [pc, #60] @ (8016994 ) 8016958: f240 4247 movw r2, #1095 @ 0x447 801695c: 490e ldr r1, [pc, #56] @ (8016998 ) 801695e: 480f ldr r0, [pc, #60] @ (801699c ) 8016960: f013 ff84 bl 802a86c 8016964: f06f 030f mvn.w r3, #15 8016968: e010 b.n 801698c API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 801696a: 687b ldr r3, [r7, #4] 801696c: 60fb str r3, [r7, #12] #if LWIP_TCP /* shutting down both ends is the same as closing */ API_MSG_VAR_REF(msg).msg.sd.shut = how; 801696e: 78fb ldrb r3, [r7, #3] 8016970: 753b strb r3, [r7, #20] #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER /* get the time we started, which is later compared to sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ API_MSG_VAR_REF(msg).msg.sd.polls_left = 8016972: 2329 movs r3, #41 @ 0x29 8016974: 757b strb r3, [r7, #21] ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ #endif /* LWIP_TCP */ err = netconn_apimsg(lwip_netconn_do_close, &API_MSG_VAR_REF(msg)); 8016976: f107 030c add.w r3, r7, #12 801697a: 4619 mov r1, r3 801697c: 4808 ldr r0, [pc, #32] @ (80169a0 ) 801697e: f7ff fb33 bl 8015fe8 8016982: 4603 mov r3, r0 8016984: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8016988: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 801698c: 4618 mov r0, r3 801698e: 3730 adds r7, #48 @ 0x30 8016990: 46bd mov sp, r7 8016992: bd80 pop {r7, pc} 8016994: 0802db84 .word 0x0802db84 8016998: 0802dec0 .word 0x0802dec0 801699c: 0802dbdc .word 0x0802dbdc 80169a0: 0801825d .word 0x0801825d 080169a4 : * @param conn the netconn to get the error from * @return and pending error or ERR_OK if no error was pending */ err_t netconn_err(struct netconn *conn) { 80169a4: b580 push {r7, lr} 80169a6: b084 sub sp, #16 80169a8: af00 add r7, sp, #0 80169aa: 6078 str r0, [r7, #4] err_t err; SYS_ARCH_DECL_PROTECT(lev); if (conn == NULL) { 80169ac: 687b ldr r3, [r7, #4] 80169ae: 2b00 cmp r3, #0 80169b0: d101 bne.n 80169b6 return ERR_OK; 80169b2: 2300 movs r3, #0 80169b4: e00d b.n 80169d2 } SYS_ARCH_PROTECT(lev); 80169b6: f010 fcc3 bl 8027340 80169ba: 60f8 str r0, [r7, #12] err = conn->pending_err; 80169bc: 687b ldr r3, [r7, #4] 80169be: 7a1b ldrb r3, [r3, #8] 80169c0: 72fb strb r3, [r7, #11] conn->pending_err = ERR_OK; 80169c2: 687b ldr r3, [r7, #4] 80169c4: 2200 movs r2, #0 80169c6: 721a strb r2, [r3, #8] SYS_ARCH_UNPROTECT(lev); 80169c8: 68f8 ldr r0, [r7, #12] 80169ca: f010 fcc7 bl 802735c return err; 80169ce: f997 300b ldrsb.w r3, [r7, #11] } 80169d2: 4618 mov r0, r3 80169d4: 3710 adds r7, #16 80169d6: 46bd mov sp, r7 80169d8: bd80 pop {r7, pc} ... 080169dc : const u8_t netconn_closed = 0; /** Translate an error to a unique void* passed via an mbox */ static void * lwip_netconn_err_to_msg(err_t err) { 80169dc: b580 push {r7, lr} 80169de: b082 sub sp, #8 80169e0: af00 add r7, sp, #0 80169e2: 4603 mov r3, r0 80169e4: 71fb strb r3, [r7, #7] switch (err) { 80169e6: f997 3007 ldrsb.w r3, [r7, #7] 80169ea: f113 0f0d cmn.w r3, #13 80169ee: d009 beq.n 8016a04 80169f0: f113 0f0d cmn.w r3, #13 80169f4: dc0c bgt.n 8016a10 80169f6: f113 0f0f cmn.w r3, #15 80169fa: d007 beq.n 8016a0c 80169fc: f113 0f0e cmn.w r3, #14 8016a00: d002 beq.n 8016a08 8016a02: e005 b.n 8016a10 case ERR_ABRT: return LWIP_CONST_CAST(void *, &netconn_aborted); 8016a04: 4b0a ldr r3, [pc, #40] @ (8016a30 ) 8016a06: e00e b.n 8016a26 case ERR_RST: return LWIP_CONST_CAST(void *, &netconn_reset); 8016a08: 4b0a ldr r3, [pc, #40] @ (8016a34 ) 8016a0a: e00c b.n 8016a26 case ERR_CLSD: return LWIP_CONST_CAST(void *, &netconn_closed); 8016a0c: 4b0a ldr r3, [pc, #40] @ (8016a38 ) 8016a0e: e00a b.n 8016a26 default: LWIP_ASSERT("unhandled error", err == ERR_OK); 8016a10: f997 3007 ldrsb.w r3, [r7, #7] 8016a14: 2b00 cmp r3, #0 8016a16: d005 beq.n 8016a24 8016a18: 4b08 ldr r3, [pc, #32] @ (8016a3c ) 8016a1a: 227d movs r2, #125 @ 0x7d 8016a1c: 4908 ldr r1, [pc, #32] @ (8016a40 ) 8016a1e: 4809 ldr r0, [pc, #36] @ (8016a44 ) 8016a20: f013 ff24 bl 802a86c return NULL; 8016a24: 2300 movs r3, #0 } } 8016a26: 4618 mov r0, r3 8016a28: 3708 adds r7, #8 8016a2a: 46bd mov sp, r7 8016a2c: bd80 pop {r7, pc} 8016a2e: bf00 nop 8016a30: 08031adc .word 0x08031adc 8016a34: 08031add .word 0x08031add 8016a38: 08031ade .word 0x08031ade 8016a3c: 0802dedc .word 0x0802dedc 8016a40: 0802df10 .word 0x0802df10 8016a44: 0802df20 .word 0x0802df20 08016a48 : int lwip_netconn_is_err_msg(void *msg, err_t *err) { 8016a48: b580 push {r7, lr} 8016a4a: b082 sub sp, #8 8016a4c: af00 add r7, sp, #0 8016a4e: 6078 str r0, [r7, #4] 8016a50: 6039 str r1, [r7, #0] LWIP_ASSERT("err != NULL", err != NULL); 8016a52: 683b ldr r3, [r7, #0] 8016a54: 2b00 cmp r3, #0 8016a56: d105 bne.n 8016a64 8016a58: 4b12 ldr r3, [pc, #72] @ (8016aa4 ) 8016a5a: 2285 movs r2, #133 @ 0x85 8016a5c: 4912 ldr r1, [pc, #72] @ (8016aa8 ) 8016a5e: 4813 ldr r0, [pc, #76] @ (8016aac ) 8016a60: f013 ff04 bl 802a86c if (msg == &netconn_aborted) { 8016a64: 687b ldr r3, [r7, #4] 8016a66: 4a12 ldr r2, [pc, #72] @ (8016ab0 ) 8016a68: 4293 cmp r3, r2 8016a6a: d104 bne.n 8016a76 *err = ERR_ABRT; 8016a6c: 683b ldr r3, [r7, #0] 8016a6e: 22f3 movs r2, #243 @ 0xf3 8016a70: 701a strb r2, [r3, #0] return 1; 8016a72: 2301 movs r3, #1 8016a74: e012 b.n 8016a9c } else if (msg == &netconn_reset) { 8016a76: 687b ldr r3, [r7, #4] 8016a78: 4a0e ldr r2, [pc, #56] @ (8016ab4 ) 8016a7a: 4293 cmp r3, r2 8016a7c: d104 bne.n 8016a88 *err = ERR_RST; 8016a7e: 683b ldr r3, [r7, #0] 8016a80: 22f2 movs r2, #242 @ 0xf2 8016a82: 701a strb r2, [r3, #0] return 1; 8016a84: 2301 movs r3, #1 8016a86: e009 b.n 8016a9c } else if (msg == &netconn_closed) { 8016a88: 687b ldr r3, [r7, #4] 8016a8a: 4a0b ldr r2, [pc, #44] @ (8016ab8 ) 8016a8c: 4293 cmp r3, r2 8016a8e: d104 bne.n 8016a9a *err = ERR_CLSD; 8016a90: 683b ldr r3, [r7, #0] 8016a92: 22f1 movs r2, #241 @ 0xf1 8016a94: 701a strb r2, [r3, #0] return 1; 8016a96: 2301 movs r3, #1 8016a98: e000 b.n 8016a9c } return 0; 8016a9a: 2300 movs r3, #0 } 8016a9c: 4618 mov r0, r3 8016a9e: 3708 adds r7, #8 8016aa0: 46bd mov sp, r7 8016aa2: bd80 pop {r7, pc} 8016aa4: 0802dedc .word 0x0802dedc 8016aa8: 0802df48 .word 0x0802df48 8016aac: 0802df20 .word 0x0802df20 8016ab0: 08031adc .word 0x08031adc 8016ab4: 08031add .word 0x08031add 8016ab8: 08031ade .word 0x08031ade 08016abc : * @see udp.h (struct udp_pcb.recv) for parameters */ static void recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { 8016abc: b580 push {r7, lr} 8016abe: b08a sub sp, #40 @ 0x28 8016ac0: af00 add r7, sp, #0 8016ac2: 60f8 str r0, [r7, #12] 8016ac4: 60b9 str r1, [r7, #8] 8016ac6: 607a str r2, [r7, #4] 8016ac8: 603b str r3, [r7, #0] #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ LWIP_UNUSED_ARG(pcb); /* only used for asserts... */ LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL); 8016aca: 68bb ldr r3, [r7, #8] 8016acc: 2b00 cmp r3, #0 8016ace: d105 bne.n 8016adc 8016ad0: 4b43 ldr r3, [pc, #268] @ (8016be0 ) 8016ad2: 22e5 movs r2, #229 @ 0xe5 8016ad4: 4943 ldr r1, [pc, #268] @ (8016be4 ) 8016ad6: 4844 ldr r0, [pc, #272] @ (8016be8 ) 8016ad8: f013 fec8 bl 802a86c LWIP_ASSERT("recv_udp must have an argument", arg != NULL); 8016adc: 68fb ldr r3, [r7, #12] 8016ade: 2b00 cmp r3, #0 8016ae0: d105 bne.n 8016aee 8016ae2: 4b3f ldr r3, [pc, #252] @ (8016be0 ) 8016ae4: 22e6 movs r2, #230 @ 0xe6 8016ae6: 4941 ldr r1, [pc, #260] @ (8016bec ) 8016ae8: 483f ldr r0, [pc, #252] @ (8016be8 ) 8016aea: f013 febf bl 802a86c conn = (struct netconn *)arg; 8016aee: 68fb ldr r3, [r7, #12] 8016af0: 627b str r3, [r7, #36] @ 0x24 if (conn == NULL) { 8016af2: 6a7b ldr r3, [r7, #36] @ 0x24 8016af4: 2b00 cmp r3, #0 8016af6: d103 bne.n 8016b00 pbuf_free(p); 8016af8: 6878 ldr r0, [r7, #4] 8016afa: f004 fc3f bl 801b37c return; 8016afe: e06b b.n 8016bd8 } LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); 8016b00: 6a7b ldr r3, [r7, #36] @ 0x24 8016b02: 685b ldr r3, [r3, #4] 8016b04: 68ba ldr r2, [r7, #8] 8016b06: 429a cmp r2, r3 8016b08: d005 beq.n 8016b16 8016b0a: 4b35 ldr r3, [pc, #212] @ (8016be0 ) 8016b0c: 22ee movs r2, #238 @ 0xee 8016b0e: 4938 ldr r1, [pc, #224] @ (8016bf0 ) 8016b10: 4835 ldr r0, [pc, #212] @ (8016be8 ) 8016b12: f013 feab bl 802a86c #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); 8016b16: f010 fc13 bl 8027340 8016b1a: 6238 str r0, [r7, #32] 8016b1c: 6a7b ldr r3, [r7, #36] @ 0x24 8016b1e: 6a5b ldr r3, [r3, #36] @ 0x24 8016b20: 61fb str r3, [r7, #28] 8016b22: 6a38 ldr r0, [r7, #32] 8016b24: f010 fc1a bl 802735c if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8016b28: 6a7b ldr r3, [r7, #36] @ 0x24 8016b2a: 3310 adds r3, #16 8016b2c: 4618 mov r0, r3 8016b2e: f010 fafd bl 802712c 8016b32: 4603 mov r3, r0 8016b34: 2b00 cmp r3, #0 8016b36: d008 beq.n 8016b4a ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { 8016b38: 687b ldr r3, [r7, #4] 8016b3a: 891b ldrh r3, [r3, #8] 8016b3c: 461a mov r2, r3 8016b3e: 69fb ldr r3, [r7, #28] 8016b40: 441a add r2, r3 8016b42: 6a7b ldr r3, [r7, #36] @ 0x24 8016b44: 6a1b ldr r3, [r3, #32] if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8016b46: 429a cmp r2, r3 8016b48: dd03 ble.n 8016b52 #else /* LWIP_SO_RCVBUF */ if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 8016b4a: 6878 ldr r0, [r7, #4] 8016b4c: f004 fc16 bl 801b37c return; 8016b50: e042 b.n 8016bd8 } buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 8016b52: 2006 movs r0, #6 8016b54: f003 fcae bl 801a4b4 8016b58: 61b8 str r0, [r7, #24] if (buf == NULL) { 8016b5a: 69bb ldr r3, [r7, #24] 8016b5c: 2b00 cmp r3, #0 8016b5e: d103 bne.n 8016b68 pbuf_free(p); 8016b60: 6878 ldr r0, [r7, #4] 8016b62: f004 fc0b bl 801b37c return; 8016b66: e037 b.n 8016bd8 } else { buf->p = p; 8016b68: 69bb ldr r3, [r7, #24] 8016b6a: 687a ldr r2, [r7, #4] 8016b6c: 601a str r2, [r3, #0] buf->ptr = p; 8016b6e: 69bb ldr r3, [r7, #24] 8016b70: 687a ldr r2, [r7, #4] 8016b72: 605a str r2, [r3, #4] ip_addr_set(&buf->addr, addr); 8016b74: 683b ldr r3, [r7, #0] 8016b76: 2b00 cmp r3, #0 8016b78: d002 beq.n 8016b80 8016b7a: 683b ldr r3, [r7, #0] 8016b7c: 681b ldr r3, [r3, #0] 8016b7e: e000 b.n 8016b82 8016b80: 2300 movs r3, #0 8016b82: 69ba ldr r2, [r7, #24] 8016b84: 6093 str r3, [r2, #8] buf->port = port; 8016b86: 69bb ldr r3, [r7, #24] 8016b88: 8e3a ldrh r2, [r7, #48] @ 0x30 8016b8a: 819a strh r2, [r3, #12] buf->toport_chksum = udphdr->dest; } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; 8016b8c: 687b ldr r3, [r7, #4] 8016b8e: 891b ldrh r3, [r3, #8] 8016b90: 82fb strh r3, [r7, #22] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 8016b92: 6a7b ldr r3, [r7, #36] @ 0x24 8016b94: 3310 adds r3, #16 8016b96: 69b9 ldr r1, [r7, #24] 8016b98: 4618 mov r0, r3 8016b9a: f010 fa65 bl 8027068 8016b9e: 4603 mov r3, r0 8016ba0: 2b00 cmp r3, #0 8016ba2: d003 beq.n 8016bac netbuf_delete(buf); 8016ba4: 69b8 ldr r0, [r7, #24] 8016ba6: f001 fbff bl 80183a8 return; 8016baa: e015 b.n 8016bd8 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8016bac: f010 fbc8 bl 8027340 8016bb0: 6138 str r0, [r7, #16] 8016bb2: 6a7b ldr r3, [r7, #36] @ 0x24 8016bb4: 6a5a ldr r2, [r3, #36] @ 0x24 8016bb6: 8afb ldrh r3, [r7, #22] 8016bb8: 441a add r2, r3 8016bba: 6a7b ldr r3, [r7, #36] @ 0x24 8016bbc: 625a str r2, [r3, #36] @ 0x24 8016bbe: 6938 ldr r0, [r7, #16] 8016bc0: f010 fbcc bl 802735c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8016bc4: 6a7b ldr r3, [r7, #36] @ 0x24 8016bc6: 6b1b ldr r3, [r3, #48] @ 0x30 8016bc8: 2b00 cmp r3, #0 8016bca: d005 beq.n 8016bd8 8016bcc: 6a7b ldr r3, [r7, #36] @ 0x24 8016bce: 6b1b ldr r3, [r3, #48] @ 0x30 8016bd0: 8afa ldrh r2, [r7, #22] 8016bd2: 2100 movs r1, #0 8016bd4: 6a78 ldr r0, [r7, #36] @ 0x24 8016bd6: 4798 blx r3 } } 8016bd8: 3728 adds r7, #40 @ 0x28 8016bda: 46bd mov sp, r7 8016bdc: bd80 pop {r7, pc} 8016bde: bf00 nop 8016be0: 0802dedc .word 0x0802dedc 8016be4: 0802df54 .word 0x0802df54 8016be8: 0802df20 .word 0x0802df20 8016bec: 0802df78 .word 0x0802df78 8016bf0: 0802df98 .word 0x0802df98 08016bf4 : * * @see tcp.h (struct tcp_pcb.recv) for parameters and return value */ static err_t recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 8016bf4: b580 push {r7, lr} 8016bf6: b088 sub sp, #32 8016bf8: af00 add r7, sp, #0 8016bfa: 60f8 str r0, [r7, #12] 8016bfc: 60b9 str r1, [r7, #8] 8016bfe: 607a str r2, [r7, #4] 8016c00: 70fb strb r3, [r7, #3] struct netconn *conn; u16_t len; void *msg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); 8016c02: 68bb ldr r3, [r7, #8] 8016c04: 2b00 cmp r3, #0 8016c06: d106 bne.n 8016c16 8016c08: 4b3c ldr r3, [pc, #240] @ (8016cfc ) 8016c0a: f44f 7296 mov.w r2, #300 @ 0x12c 8016c0e: 493c ldr r1, [pc, #240] @ (8016d00 ) 8016c10: 483c ldr r0, [pc, #240] @ (8016d04 ) 8016c12: f013 fe2b bl 802a86c LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); 8016c16: 68fb ldr r3, [r7, #12] 8016c18: 2b00 cmp r3, #0 8016c1a: d106 bne.n 8016c2a 8016c1c: 4b37 ldr r3, [pc, #220] @ (8016cfc ) 8016c1e: f240 122d movw r2, #301 @ 0x12d 8016c22: 4939 ldr r1, [pc, #228] @ (8016d08 ) 8016c24: 4837 ldr r0, [pc, #220] @ (8016d04 ) 8016c26: f013 fe21 bl 802a86c LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); 8016c2a: f997 3003 ldrsb.w r3, [r7, #3] 8016c2e: 2b00 cmp r3, #0 8016c30: d006 beq.n 8016c40 8016c32: 4b32 ldr r3, [pc, #200] @ (8016cfc ) 8016c34: f44f 7297 mov.w r2, #302 @ 0x12e 8016c38: 4934 ldr r1, [pc, #208] @ (8016d0c ) 8016c3a: 4832 ldr r0, [pc, #200] @ (8016d04 ) 8016c3c: f013 fe16 bl 802a86c LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ conn = (struct netconn *)arg; 8016c40: 68fb ldr r3, [r7, #12] 8016c42: 617b str r3, [r7, #20] if (conn == NULL) { 8016c44: 697b ldr r3, [r7, #20] 8016c46: 2b00 cmp r3, #0 8016c48: d102 bne.n 8016c50 return ERR_VAL; 8016c4a: f06f 0305 mvn.w r3, #5 8016c4e: e051 b.n 8016cf4 } LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); 8016c50: 697b ldr r3, [r7, #20] 8016c52: 685b ldr r3, [r3, #4] 8016c54: 68ba ldr r2, [r7, #8] 8016c56: 429a cmp r2, r3 8016c58: d006 beq.n 8016c68 8016c5a: 4b28 ldr r3, [pc, #160] @ (8016cfc ) 8016c5c: f240 1235 movw r2, #309 @ 0x135 8016c60: 492b ldr r1, [pc, #172] @ (8016d10 ) 8016c62: 4828 ldr r0, [pc, #160] @ (8016d04 ) 8016c64: f013 fe02 bl 802a86c if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8016c68: 697b ldr r3, [r7, #20] 8016c6a: 3310 adds r3, #16 8016c6c: 4618 mov r0, r3 8016c6e: f010 fa5d bl 802712c 8016c72: 4603 mov r3, r0 8016c74: 2b00 cmp r3, #0 8016c76: d10d bne.n 8016c94 /* recvmbox already deleted */ if (p != NULL) { 8016c78: 687b ldr r3, [r7, #4] 8016c7a: 2b00 cmp r3, #0 8016c7c: d008 beq.n 8016c90 tcp_recved(pcb, p->tot_len); 8016c7e: 687b ldr r3, [r7, #4] 8016c80: 891b ldrh r3, [r3, #8] 8016c82: 4619 mov r1, r3 8016c84: 68b8 ldr r0, [r7, #8] 8016c86: f005 f9e5 bl 801c054 pbuf_free(p); 8016c8a: 6878 ldr r0, [r7, #4] 8016c8c: f004 fb76 bl 801b37c } return ERR_OK; 8016c90: 2300 movs r3, #0 8016c92: e02f b.n 8016cf4 } /* Unlike for UDP or RAW pcbs, don't check for available space using recv_avail since that could break the connection (data is already ACKed) */ if (p != NULL) { 8016c94: 687b ldr r3, [r7, #4] 8016c96: 2b00 cmp r3, #0 8016c98: d005 beq.n 8016ca6 msg = p; 8016c9a: 687b ldr r3, [r7, #4] 8016c9c: 61bb str r3, [r7, #24] len = p->tot_len; 8016c9e: 687b ldr r3, [r7, #4] 8016ca0: 891b ldrh r3, [r3, #8] 8016ca2: 83fb strh r3, [r7, #30] 8016ca4: e003 b.n 8016cae } else { msg = LWIP_CONST_CAST(void *, &netconn_closed); 8016ca6: 4b1b ldr r3, [pc, #108] @ (8016d14 ) 8016ca8: 61bb str r3, [r7, #24] len = 0; 8016caa: 2300 movs r3, #0 8016cac: 83fb strh r3, [r7, #30] } if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) { 8016cae: 697b ldr r3, [r7, #20] 8016cb0: 3310 adds r3, #16 8016cb2: 69b9 ldr r1, [r7, #24] 8016cb4: 4618 mov r0, r3 8016cb6: f010 f9d7 bl 8027068 8016cba: 4603 mov r3, r0 8016cbc: 2b00 cmp r3, #0 8016cbe: d002 beq.n 8016cc6 /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ return ERR_MEM; 8016cc0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8016cc4: e016 b.n 8016cf4 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8016cc6: f010 fb3b bl 8027340 8016cca: 6138 str r0, [r7, #16] 8016ccc: 697b ldr r3, [r7, #20] 8016cce: 6a5a ldr r2, [r3, #36] @ 0x24 8016cd0: 8bfb ldrh r3, [r7, #30] 8016cd2: 441a add r2, r3 8016cd4: 697b ldr r3, [r7, #20] 8016cd6: 625a str r2, [r3, #36] @ 0x24 8016cd8: 6938 ldr r0, [r7, #16] 8016cda: f010 fb3f bl 802735c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8016cde: 697b ldr r3, [r7, #20] 8016ce0: 6b1b ldr r3, [r3, #48] @ 0x30 8016ce2: 2b00 cmp r3, #0 8016ce4: d005 beq.n 8016cf2 8016ce6: 697b ldr r3, [r7, #20] 8016ce8: 6b1b ldr r3, [r3, #48] @ 0x30 8016cea: 8bfa ldrh r2, [r7, #30] 8016cec: 2100 movs r1, #0 8016cee: 6978 ldr r0, [r7, #20] 8016cf0: 4798 blx r3 } return ERR_OK; 8016cf2: 2300 movs r3, #0 } 8016cf4: 4618 mov r0, r3 8016cf6: 3720 adds r7, #32 8016cf8: 46bd mov sp, r7 8016cfa: bd80 pop {r7, pc} 8016cfc: 0802dedc .word 0x0802dedc 8016d00: 0802dfb8 .word 0x0802dfb8 8016d04: 0802df20 .word 0x0802df20 8016d08: 0802dfdc .word 0x0802dfdc 8016d0c: 0802dffc .word 0x0802dffc 8016d10: 0802e014 .word 0x0802e014 8016d14: 08031ade .word 0x08031ade 08016d18 : * * @see tcp.h (struct tcp_pcb.poll) for parameters and return value */ static err_t poll_tcp(void *arg, struct tcp_pcb *pcb) { 8016d18: b580 push {r7, lr} 8016d1a: b084 sub sp, #16 8016d1c: af00 add r7, sp, #0 8016d1e: 6078 str r0, [r7, #4] 8016d20: 6039 str r1, [r7, #0] struct netconn *conn = (struct netconn *)arg; 8016d22: 687b ldr r3, [r7, #4] 8016d24: 60fb str r3, [r7, #12] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016d26: 68fb ldr r3, [r7, #12] 8016d28: 2b00 cmp r3, #0 8016d2a: d106 bne.n 8016d3a 8016d2c: 4b2b ldr r3, [pc, #172] @ (8016ddc ) 8016d2e: f44f 72b5 mov.w r2, #362 @ 0x16a 8016d32: 492b ldr r1, [pc, #172] @ (8016de0 ) 8016d34: 482b ldr r0, [pc, #172] @ (8016de4 ) 8016d36: f013 fd99 bl 802a86c if (conn->state == NETCONN_WRITE) { 8016d3a: 68fb ldr r3, [r7, #12] 8016d3c: 785b ldrb r3, [r3, #1] 8016d3e: 2b01 cmp r3, #1 8016d40: d104 bne.n 8016d4c lwip_netconn_do_writemore(conn WRITE_DELAYED); 8016d42: 2101 movs r1, #1 8016d44: 68f8 ldr r0, [r7, #12] 8016d46: f000 ffab bl 8017ca0 8016d4a: e016 b.n 8016d7a } else if (conn->state == NETCONN_CLOSE) { 8016d4c: 68fb ldr r3, [r7, #12] 8016d4e: 785b ldrb r3, [r3, #1] 8016d50: 2b04 cmp r3, #4 8016d52: d112 bne.n 8016d7a #if !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { 8016d54: 68fb ldr r3, [r7, #12] 8016d56: 6adb ldr r3, [r3, #44] @ 0x2c 8016d58: 2b00 cmp r3, #0 8016d5a: d00a beq.n 8016d72 8016d5c: 68fb ldr r3, [r7, #12] 8016d5e: 6adb ldr r3, [r3, #44] @ 0x2c 8016d60: 7a5b ldrb r3, [r3, #9] 8016d62: 2b00 cmp r3, #0 8016d64: d005 beq.n 8016d72 conn->current_msg->msg.sd.polls_left--; 8016d66: 68fb ldr r3, [r7, #12] 8016d68: 6adb ldr r3, [r3, #44] @ 0x2c 8016d6a: 7a5a ldrb r2, [r3, #9] 8016d6c: 3a01 subs r2, #1 8016d6e: b2d2 uxtb r2, r2 8016d70: 725a strb r2, [r3, #9] } #endif /* !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER */ lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8016d72: 2101 movs r1, #1 8016d74: 68f8 ldr r0, [r7, #12] 8016d76: f000 fb53 bl 8017420 } /* @todo: implement connect timeout here? */ /* Did a nonblocking write fail before? Then check available write-space. */ if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 8016d7a: 68fb ldr r3, [r7, #12] 8016d7c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016d80: f003 0310 and.w r3, r3, #16 8016d84: 2b00 cmp r3, #0 8016d86: d024 beq.n 8016dd2 /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016d88: 68fb ldr r3, [r7, #12] 8016d8a: 685b ldr r3, [r3, #4] 8016d8c: 2b00 cmp r3, #0 8016d8e: d020 beq.n 8016dd2 8016d90: 68fb ldr r3, [r7, #12] 8016d92: 685b ldr r3, [r3, #4] 8016d94: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8016d98: f640 3269 movw r2, #2921 @ 0xb69 8016d9c: 4293 cmp r3, r2 8016d9e: d918 bls.n 8016dd2 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8016da0: 68fb ldr r3, [r7, #12] 8016da2: 685b ldr r3, [r3, #4] 8016da4: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016da8: 2b07 cmp r3, #7 8016daa: d812 bhi.n 8016dd2 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8016dac: 68fb ldr r3, [r7, #12] 8016dae: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016db2: f023 0310 bic.w r3, r3, #16 8016db6: b2da uxtb r2, r3 8016db8: 68fb ldr r3, [r7, #12] 8016dba: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016dbe: 68fb ldr r3, [r7, #12] 8016dc0: 6b1b ldr r3, [r3, #48] @ 0x30 8016dc2: 2b00 cmp r3, #0 8016dc4: d005 beq.n 8016dd2 8016dc6: 68fb ldr r3, [r7, #12] 8016dc8: 6b1b ldr r3, [r3, #48] @ 0x30 8016dca: 2200 movs r2, #0 8016dcc: 2102 movs r1, #2 8016dce: 68f8 ldr r0, [r7, #12] 8016dd0: 4798 blx r3 } } return ERR_OK; 8016dd2: 2300 movs r3, #0 } 8016dd4: 4618 mov r0, r3 8016dd6: 3710 adds r7, #16 8016dd8: 46bd mov sp, r7 8016dda: bd80 pop {r7, pc} 8016ddc: 0802dedc .word 0x0802dedc 8016de0: 0802e034 .word 0x0802e034 8016de4: 0802df20 .word 0x0802df20 08016de8 : * * @see tcp.h (struct tcp_pcb.sent) for parameters and return value */ static err_t sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) { 8016de8: b580 push {r7, lr} 8016dea: b086 sub sp, #24 8016dec: af00 add r7, sp, #0 8016dee: 60f8 str r0, [r7, #12] 8016df0: 60b9 str r1, [r7, #8] 8016df2: 4613 mov r3, r2 8016df4: 80fb strh r3, [r7, #6] struct netconn *conn = (struct netconn *)arg; 8016df6: 68fb ldr r3, [r7, #12] 8016df8: 617b str r3, [r7, #20] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016dfa: 697b ldr r3, [r7, #20] 8016dfc: 2b00 cmp r3, #0 8016dfe: d106 bne.n 8016e0e 8016e00: 4b22 ldr r3, [pc, #136] @ (8016e8c ) 8016e02: f240 1293 movw r2, #403 @ 0x193 8016e06: 4922 ldr r1, [pc, #136] @ (8016e90 ) 8016e08: 4822 ldr r0, [pc, #136] @ (8016e94 ) 8016e0a: f013 fd2f bl 802a86c if (conn) { 8016e0e: 697b ldr r3, [r7, #20] 8016e10: 2b00 cmp r3, #0 8016e12: d035 beq.n 8016e80 if (conn->state == NETCONN_WRITE) { 8016e14: 697b ldr r3, [r7, #20] 8016e16: 785b ldrb r3, [r3, #1] 8016e18: 2b01 cmp r3, #1 8016e1a: d104 bne.n 8016e26 lwip_netconn_do_writemore(conn WRITE_DELAYED); 8016e1c: 2101 movs r1, #1 8016e1e: 6978 ldr r0, [r7, #20] 8016e20: f000 ff3e bl 8017ca0 8016e24: e007 b.n 8016e36 } else if (conn->state == NETCONN_CLOSE) { 8016e26: 697b ldr r3, [r7, #20] 8016e28: 785b ldrb r3, [r3, #1] 8016e2a: 2b04 cmp r3, #4 8016e2c: d103 bne.n 8016e36 lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8016e2e: 2101 movs r1, #1 8016e30: 6978 ldr r0, [r7, #20] 8016e32: f000 faf5 bl 8017420 } /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016e36: 697b ldr r3, [r7, #20] 8016e38: 685b ldr r3, [r3, #4] 8016e3a: 2b00 cmp r3, #0 8016e3c: d020 beq.n 8016e80 8016e3e: 697b ldr r3, [r7, #20] 8016e40: 685b ldr r3, [r3, #4] 8016e42: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8016e46: f640 3269 movw r2, #2921 @ 0xb69 8016e4a: 4293 cmp r3, r2 8016e4c: d918 bls.n 8016e80 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8016e4e: 697b ldr r3, [r7, #20] 8016e50: 685b ldr r3, [r3, #4] 8016e52: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016e56: 2b07 cmp r3, #7 8016e58: d812 bhi.n 8016e80 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8016e5a: 697b ldr r3, [r7, #20] 8016e5c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016e60: f023 0310 bic.w r3, r3, #16 8016e64: b2da uxtb r2, r3 8016e66: 697b ldr r3, [r7, #20] 8016e68: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 8016e6c: 697b ldr r3, [r7, #20] 8016e6e: 6b1b ldr r3, [r3, #48] @ 0x30 8016e70: 2b00 cmp r3, #0 8016e72: d005 beq.n 8016e80 8016e74: 697b ldr r3, [r7, #20] 8016e76: 6b1b ldr r3, [r3, #48] @ 0x30 8016e78: 88fa ldrh r2, [r7, #6] 8016e7a: 2102 movs r1, #2 8016e7c: 6978 ldr r0, [r7, #20] 8016e7e: 4798 blx r3 } } return ERR_OK; 8016e80: 2300 movs r3, #0 } 8016e82: 4618 mov r0, r3 8016e84: 3718 adds r7, #24 8016e86: 46bd mov sp, r7 8016e88: bd80 pop {r7, pc} 8016e8a: bf00 nop 8016e8c: 0802dedc .word 0x0802dedc 8016e90: 0802e034 .word 0x0802e034 8016e94: 0802df20 .word 0x0802df20 08016e98 : * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 8016e98: b580 push {r7, lr} 8016e9a: b088 sub sp, #32 8016e9c: af00 add r7, sp, #0 8016e9e: 6078 str r0, [r7, #4] 8016ea0: 460b mov r3, r1 8016ea2: 70fb strb r3, [r7, #3] struct netconn *conn; enum netconn_state old_state; void *mbox_msg; SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; 8016ea4: 687b ldr r3, [r7, #4] 8016ea6: 61fb str r3, [r7, #28] LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016ea8: 69fb ldr r3, [r7, #28] 8016eaa: 2b00 cmp r3, #0 8016eac: d106 bne.n 8016ebc 8016eae: 4b61 ldr r3, [pc, #388] @ (8017034 ) 8016eb0: f44f 72dc mov.w r2, #440 @ 0x1b8 8016eb4: 4960 ldr r1, [pc, #384] @ (8017038 ) 8016eb6: 4861 ldr r0, [pc, #388] @ (801703c ) 8016eb8: f013 fcd8 bl 802a86c SYS_ARCH_PROTECT(lev); 8016ebc: f010 fa40 bl 8027340 8016ec0: 61b8 str r0, [r7, #24] /* when err is called, the pcb is deallocated, so delete the reference */ conn->pcb.tcp = NULL; 8016ec2: 69fb ldr r3, [r7, #28] 8016ec4: 2200 movs r2, #0 8016ec6: 605a str r2, [r3, #4] /* store pending error */ conn->pending_err = err; 8016ec8: 69fb ldr r3, [r7, #28] 8016eca: 78fa ldrb r2, [r7, #3] 8016ecc: 721a strb r2, [r3, #8] /* prevent application threads from blocking on 'recvmbox'/'acceptmbox' */ conn->flags |= NETCONN_FLAG_MBOXCLOSED; 8016ece: 69fb ldr r3, [r7, #28] 8016ed0: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016ed4: f043 0301 orr.w r3, r3, #1 8016ed8: b2da uxtb r2, r3 8016eda: 69fb ldr r3, [r7, #28] 8016edc: f883 2028 strb.w r2, [r3, #40] @ 0x28 /* reset conn->state now before waking up other threads */ old_state = conn->state; 8016ee0: 69fb ldr r3, [r7, #28] 8016ee2: 785b ldrb r3, [r3, #1] 8016ee4: 75fb strb r3, [r7, #23] conn->state = NETCONN_NONE; 8016ee6: 69fb ldr r3, [r7, #28] 8016ee8: 2200 movs r2, #0 8016eea: 705a strb r2, [r3, #1] SYS_ARCH_UNPROTECT(lev); 8016eec: 69b8 ldr r0, [r7, #24] 8016eee: f010 fa35 bl 802735c /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 8016ef2: 69fb ldr r3, [r7, #28] 8016ef4: 6b1b ldr r3, [r3, #48] @ 0x30 8016ef6: 2b00 cmp r3, #0 8016ef8: d005 beq.n 8016f06 8016efa: 69fb ldr r3, [r7, #28] 8016efc: 6b1b ldr r3, [r3, #48] @ 0x30 8016efe: 2200 movs r2, #0 8016f00: 2104 movs r1, #4 8016f02: 69f8 ldr r0, [r7, #28] 8016f04: 4798 blx r3 /* Try to release selects pending on 'read' or 'write', too. They will get an error if they actually try to read or write. */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 8016f06: 69fb ldr r3, [r7, #28] 8016f08: 6b1b ldr r3, [r3, #48] @ 0x30 8016f0a: 2b00 cmp r3, #0 8016f0c: d005 beq.n 8016f1a 8016f0e: 69fb ldr r3, [r7, #28] 8016f10: 6b1b ldr r3, [r3, #48] @ 0x30 8016f12: 2200 movs r2, #0 8016f14: 2100 movs r1, #0 8016f16: 69f8 ldr r0, [r7, #28] 8016f18: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016f1a: 69fb ldr r3, [r7, #28] 8016f1c: 6b1b ldr r3, [r3, #48] @ 0x30 8016f1e: 2b00 cmp r3, #0 8016f20: d005 beq.n 8016f2e 8016f22: 69fb ldr r3, [r7, #28] 8016f24: 6b1b ldr r3, [r3, #48] @ 0x30 8016f26: 2200 movs r2, #0 8016f28: 2102 movs r1, #2 8016f2a: 69f8 ldr r0, [r7, #28] 8016f2c: 4798 blx r3 mbox_msg = lwip_netconn_err_to_msg(err); 8016f2e: f997 3003 ldrsb.w r3, [r7, #3] 8016f32: 4618 mov r0, r3 8016f34: f7ff fd52 bl 80169dc 8016f38: 6138 str r0, [r7, #16] /* pass error message to recvmbox to wake up pending recv */ if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8016f3a: 69fb ldr r3, [r7, #28] 8016f3c: 3310 adds r3, #16 8016f3e: 4618 mov r0, r3 8016f40: f010 f8f4 bl 802712c 8016f44: 4603 mov r3, r0 8016f46: 2b00 cmp r3, #0 8016f48: d005 beq.n 8016f56 /* use trypost to prevent deadlock */ sys_mbox_trypost(&conn->recvmbox, mbox_msg); 8016f4a: 69fb ldr r3, [r7, #28] 8016f4c: 3310 adds r3, #16 8016f4e: 6939 ldr r1, [r7, #16] 8016f50: 4618 mov r0, r3 8016f52: f010 f889 bl 8027068 } /* pass error message to acceptmbox to wake up pending accept */ if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { 8016f56: 69fb ldr r3, [r7, #28] 8016f58: 3314 adds r3, #20 8016f5a: 4618 mov r0, r3 8016f5c: f010 f8e6 bl 802712c 8016f60: 4603 mov r3, r0 8016f62: 2b00 cmp r3, #0 8016f64: d005 beq.n 8016f72 /* use trypost to preven deadlock */ sys_mbox_trypost(&conn->acceptmbox, mbox_msg); 8016f66: 69fb ldr r3, [r7, #28] 8016f68: 3314 adds r3, #20 8016f6a: 6939 ldr r1, [r7, #16] 8016f6c: 4618 mov r0, r3 8016f6e: f010 f87b bl 8027068 } if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || 8016f72: 7dfb ldrb r3, [r7, #23] 8016f74: 2b01 cmp r3, #1 8016f76: d005 beq.n 8016f84 8016f78: 7dfb ldrb r3, [r7, #23] 8016f7a: 2b04 cmp r3, #4 8016f7c: d002 beq.n 8016f84 8016f7e: 7dfb ldrb r3, [r7, #23] 8016f80: 2b03 cmp r3, #3 8016f82: d146 bne.n 8017012 (old_state == NETCONN_CONNECT)) { /* calling lwip_netconn_do_writemore/lwip_netconn_do_close_internal is not necessary since the pcb has already been deleted! */ int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); 8016f84: 69fb ldr r3, [r7, #28] 8016f86: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016f8a: f003 0304 and.w r3, r3, #4 8016f8e: 2b00 cmp r3, #0 8016f90: bf14 ite ne 8016f92: 2301 movne r3, #1 8016f94: 2300 moveq r3, #0 8016f96: b2db uxtb r3, r3 8016f98: 60fb str r3, [r7, #12] SET_NONBLOCKING_CONNECT(conn, 0); 8016f9a: 69fb ldr r3, [r7, #28] 8016f9c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016fa0: f023 0304 bic.w r3, r3, #4 8016fa4: b2da uxtb r2, r3 8016fa6: 69fb ldr r3, [r7, #28] 8016fa8: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (!was_nonblocking_connect) { 8016fac: 68fb ldr r3, [r7, #12] 8016fae: 2b00 cmp r3, #0 8016fb0: d13b bne.n 801702a sys_sem_t *op_completed_sem; /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8016fb2: 69fb ldr r3, [r7, #28] 8016fb4: 6adb ldr r3, [r3, #44] @ 0x2c 8016fb6: 2b00 cmp r3, #0 8016fb8: d106 bne.n 8016fc8 8016fba: 4b1e ldr r3, [pc, #120] @ (8017034 ) 8016fbc: f44f 72f3 mov.w r2, #486 @ 0x1e6 8016fc0: 491f ldr r1, [pc, #124] @ (8017040 ) 8016fc2: 481e ldr r0, [pc, #120] @ (801703c ) 8016fc4: f013 fc52 bl 802a86c if (old_state == NETCONN_CLOSE) { 8016fc8: 7dfb ldrb r3, [r7, #23] 8016fca: 2b04 cmp r3, #4 8016fcc: d104 bne.n 8016fd8 /* let close succeed: the connection is closed after all... */ conn->current_msg->err = ERR_OK; 8016fce: 69fb ldr r3, [r7, #28] 8016fd0: 6adb ldr r3, [r3, #44] @ 0x2c 8016fd2: 2200 movs r2, #0 8016fd4: 711a strb r2, [r3, #4] 8016fd6: e003 b.n 8016fe0 } else { /* Write and connect fail */ conn->current_msg->err = err; 8016fd8: 69fb ldr r3, [r7, #28] 8016fda: 6adb ldr r3, [r3, #44] @ 0x2c 8016fdc: 78fa ldrb r2, [r7, #3] 8016fde: 711a strb r2, [r3, #4] } op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8016fe0: 69fb ldr r3, [r7, #28] 8016fe2: 6adb ldr r3, [r3, #44] @ 0x2c 8016fe4: 681b ldr r3, [r3, #0] 8016fe6: 330c adds r3, #12 8016fe8: 60bb str r3, [r7, #8] LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); 8016fea: 68b8 ldr r0, [r7, #8] 8016fec: f010 f92c bl 8027248 8016ff0: 4603 mov r3, r0 8016ff2: 2b00 cmp r3, #0 8016ff4: d106 bne.n 8017004 8016ff6: 4b0f ldr r3, [pc, #60] @ (8017034 ) 8016ff8: f240 12ef movw r2, #495 @ 0x1ef 8016ffc: 4911 ldr r1, [pc, #68] @ (8017044 ) 8016ffe: 480f ldr r0, [pc, #60] @ (801703c ) 8017000: f013 fc34 bl 802a86c conn->current_msg = NULL; 8017004: 69fb ldr r3, [r7, #28] 8017006: 2200 movs r2, #0 8017008: 62da str r2, [r3, #44] @ 0x2c /* wake up the waiting task */ sys_sem_signal(op_completed_sem); 801700a: 68b8 ldr r0, [r7, #8] 801700c: f010 f902 bl 8027214 (old_state == NETCONN_CONNECT)) { 8017010: e00b b.n 801702a } else { /* @todo: test what happens for error on nonblocking connect */ } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); 8017012: 69fb ldr r3, [r7, #28] 8017014: 6adb ldr r3, [r3, #44] @ 0x2c 8017016: 2b00 cmp r3, #0 8017018: d008 beq.n 801702c 801701a: 4b06 ldr r3, [pc, #24] @ (8017034 ) 801701c: f240 12f7 movw r2, #503 @ 0x1f7 8017020: 4909 ldr r1, [pc, #36] @ (8017048 ) 8017022: 4806 ldr r0, [pc, #24] @ (801703c ) 8017024: f013 fc22 bl 802a86c } } 8017028: e000 b.n 801702c (old_state == NETCONN_CONNECT)) { 801702a: bf00 nop } 801702c: bf00 nop 801702e: 3720 adds r7, #32 8017030: 46bd mov sp, r7 8017032: bd80 pop {r7, pc} 8017034: 0802dedc .word 0x0802dedc 8017038: 0802e034 .word 0x0802e034 801703c: 0802df20 .word 0x0802df20 8017040: 0802e044 .word 0x0802e044 8017044: 0802e060 .word 0x0802e060 8017048: 0802e07c .word 0x0802e07c 0801704c : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 801704c: b580 push {r7, lr} 801704e: b084 sub sp, #16 8017050: af00 add r7, sp, #0 8017052: 6078 str r0, [r7, #4] struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 8017054: 687b ldr r3, [r7, #4] 8017056: 685b ldr r3, [r3, #4] 8017058: 60fb str r3, [r7, #12] tcp_arg(pcb, conn); 801705a: 6879 ldr r1, [r7, #4] 801705c: 68f8 ldr r0, [r7, #12] 801705e: f005 ffe3 bl 801d028 tcp_recv(pcb, recv_tcp); 8017062: 490a ldr r1, [pc, #40] @ (801708c ) 8017064: 68f8 ldr r0, [r7, #12] 8017066: f005 fff1 bl 801d04c tcp_sent(pcb, sent_tcp); 801706a: 4909 ldr r1, [pc, #36] @ (8017090 ) 801706c: 68f8 ldr r0, [r7, #12] 801706e: f006 f811 bl 801d094 tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); 8017072: 2202 movs r2, #2 8017074: 4907 ldr r1, [pc, #28] @ (8017094 ) 8017076: 68f8 ldr r0, [r7, #12] 8017078: f006 f86c bl 801d154 tcp_err(pcb, err_tcp); 801707c: 4906 ldr r1, [pc, #24] @ (8017098 ) 801707e: 68f8 ldr r0, [r7, #12] 8017080: f006 f82c bl 801d0dc } 8017084: bf00 nop 8017086: 3710 adds r7, #16 8017088: 46bd mov sp, r7 801708a: bd80 pop {r7, pc} 801708c: 08016bf5 .word 0x08016bf5 8017090: 08016de9 .word 0x08016de9 8017094: 08016d19 .word 0x08016d19 8017098: 08016e99 .word 0x08016e99 0801709c : * * @param msg the api_msg describing the connection type */ static void pcb_new(struct api_msg *msg) { 801709c: b590 push {r4, r7, lr} 801709e: b085 sub sp, #20 80170a0: af00 add r7, sp, #0 80170a2: 6078 str r0, [r7, #4] enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; 80170a4: 2300 movs r3, #0 80170a6: 73fb strb r3, [r7, #15] LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); 80170a8: 687b ldr r3, [r7, #4] 80170aa: 681b ldr r3, [r3, #0] 80170ac: 685b ldr r3, [r3, #4] 80170ae: 2b00 cmp r3, #0 80170b0: d006 beq.n 80170c0 80170b2: 4b2b ldr r3, [pc, #172] @ (8017160 ) 80170b4: f240 2265 movw r2, #613 @ 0x265 80170b8: 492a ldr r1, [pc, #168] @ (8017164 ) 80170ba: 482b ldr r0, [pc, #172] @ (8017168 ) 80170bc: f013 fbd6 bl 802a86c iptype = IPADDR_TYPE_ANY; } #endif /* Allocate a PCB for this connection */ switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80170c0: 687b ldr r3, [r7, #4] 80170c2: 681b ldr r3, [r3, #0] 80170c4: 781b ldrb r3, [r3, #0] 80170c6: f003 03f0 and.w r3, r3, #240 @ 0xf0 80170ca: 2b10 cmp r3, #16 80170cc: d022 beq.n 8017114 80170ce: 2b20 cmp r3, #32 80170d0: d133 bne.n 801713a } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new_ip_type(iptype); 80170d2: 687b ldr r3, [r7, #4] 80170d4: 681c ldr r4, [r3, #0] 80170d6: 7bfb ldrb r3, [r7, #15] 80170d8: 4618 mov r0, r3 80170da: f00b fb94 bl 8022806 80170de: 4603 mov r3, r0 80170e0: 6063 str r3, [r4, #4] if (msg->conn->pcb.udp != NULL) { 80170e2: 687b ldr r3, [r7, #4] 80170e4: 681b ldr r3, [r3, #0] 80170e6: 685b ldr r3, [r3, #4] 80170e8: 2b00 cmp r3, #0 80170ea: d02a beq.n 8017142 #if LWIP_UDPLITE if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) { udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE); } #endif /* LWIP_UDPLITE */ if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) { 80170ec: 687b ldr r3, [r7, #4] 80170ee: 681b ldr r3, [r3, #0] 80170f0: 781b ldrb r3, [r3, #0] 80170f2: 2b22 cmp r3, #34 @ 0x22 80170f4: d104 bne.n 8017100 udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 80170f6: 687b ldr r3, [r7, #4] 80170f8: 681b ldr r3, [r3, #0] 80170fa: 685b ldr r3, [r3, #4] 80170fc: 2201 movs r2, #1 80170fe: 741a strb r2, [r3, #16] } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 8017100: 687b ldr r3, [r7, #4] 8017102: 681b ldr r3, [r3, #0] 8017104: 6858 ldr r0, [r3, #4] 8017106: 687b ldr r3, [r7, #4] 8017108: 681b ldr r3, [r3, #0] 801710a: 461a mov r2, r3 801710c: 4917 ldr r1, [pc, #92] @ (801716c ) 801710e: f00b fafb bl 8022708 } break; 8017112: e016 b.n 8017142 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->conn->pcb.tcp = tcp_new_ip_type(iptype); 8017114: 687b ldr r3, [r7, #4] 8017116: 681c ldr r4, [r3, #0] 8017118: 7bfb ldrb r3, [r7, #15] 801711a: 4618 mov r0, r3 801711c: f005 ff76 bl 801d00c 8017120: 4603 mov r3, r0 8017122: 6063 str r3, [r4, #4] if (msg->conn->pcb.tcp != NULL) { 8017124: 687b ldr r3, [r7, #4] 8017126: 681b ldr r3, [r3, #0] 8017128: 685b ldr r3, [r3, #4] 801712a: 2b00 cmp r3, #0 801712c: d00b beq.n 8017146 setup_tcp(msg->conn); 801712e: 687b ldr r3, [r7, #4] 8017130: 681b ldr r3, [r3, #0] 8017132: 4618 mov r0, r3 8017134: f7ff ff8a bl 801704c } break; 8017138: e005 b.n 8017146 #endif /* LWIP_TCP */ default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; 801713a: 687b ldr r3, [r7, #4] 801713c: 22fa movs r2, #250 @ 0xfa 801713e: 711a strb r2, [r3, #4] return; 8017140: e00a b.n 8017158 break; 8017142: bf00 nop 8017144: e000 b.n 8017148 break; 8017146: bf00 nop } if (msg->conn->pcb.ip == NULL) { 8017148: 687b ldr r3, [r7, #4] 801714a: 681b ldr r3, [r3, #0] 801714c: 685b ldr r3, [r3, #4] 801714e: 2b00 cmp r3, #0 8017150: d102 bne.n 8017158 msg->err = ERR_MEM; 8017152: 687b ldr r3, [r7, #4] 8017154: 22ff movs r2, #255 @ 0xff 8017156: 711a strb r2, [r3, #4] } } 8017158: 3714 adds r7, #20 801715a: 46bd mov sp, r7 801715c: bd90 pop {r4, r7, pc} 801715e: bf00 nop 8017160: 0802dedc .word 0x0802dedc 8017164: 0802e0c0 .word 0x0802e0c0 8017168: 0802df20 .word 0x0802df20 801716c: 08016abd .word 0x08016abd 08017170 : * * @param m the api_msg describing the connection type */ void lwip_netconn_do_newconn(void *m) { 8017170: b580 push {r7, lr} 8017172: b084 sub sp, #16 8017174: af00 add r7, sp, #0 8017176: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017178: 687b ldr r3, [r7, #4] 801717a: 60fb str r3, [r7, #12] msg->err = ERR_OK; 801717c: 68fb ldr r3, [r7, #12] 801717e: 2200 movs r2, #0 8017180: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp == NULL) { 8017182: 68fb ldr r3, [r7, #12] 8017184: 681b ldr r3, [r3, #0] 8017186: 685b ldr r3, [r3, #4] 8017188: 2b00 cmp r3, #0 801718a: d102 bne.n 8017192 pcb_new(msg); 801718c: 68f8 ldr r0, [r7, #12] 801718e: f7ff ff85 bl 801709c /* Else? This "new" connection already has a PCB allocated. */ /* Is this an error condition? Should it be deleted? */ /* We currently just are happy and return. */ TCPIP_APIMSG_ACK(msg); } 8017192: bf00 nop 8017194: 3710 adds r7, #16 8017196: 46bd mov sp, r7 8017198: bd80 pop {r7, pc} ... 0801719c : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn * netconn_alloc(enum netconn_type t, netconn_callback callback) { 801719c: b580 push {r7, lr} 801719e: b086 sub sp, #24 80171a0: af00 add r7, sp, #0 80171a2: 4603 mov r3, r0 80171a4: 6039 str r1, [r7, #0] 80171a6: 71fb strb r3, [r7, #7] struct netconn *conn; int size; u8_t init_flags = 0; 80171a8: 2300 movs r3, #0 80171aa: 74fb strb r3, [r7, #19] conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 80171ac: 2007 movs r0, #7 80171ae: f003 f981 bl 801a4b4 80171b2: 60f8 str r0, [r7, #12] if (conn == NULL) { 80171b4: 68fb ldr r3, [r7, #12] 80171b6: 2b00 cmp r3, #0 80171b8: d101 bne.n 80171be return NULL; 80171ba: 2300 movs r3, #0 80171bc: e05c b.n 8017278 } conn->pending_err = ERR_OK; 80171be: 68fb ldr r3, [r7, #12] 80171c0: 2200 movs r2, #0 80171c2: 721a strb r2, [r3, #8] conn->type = t; 80171c4: 68fb ldr r3, [r7, #12] 80171c6: 79fa ldrb r2, [r7, #7] 80171c8: 701a strb r2, [r3, #0] conn->pcb.tcp = NULL; 80171ca: 68fb ldr r3, [r7, #12] 80171cc: 2200 movs r2, #0 80171ce: 605a str r2, [r3, #4] /* If all sizes are the same, every compiler should optimize this switch to nothing */ switch (NETCONNTYPE_GROUP(t)) { 80171d0: 79fb ldrb r3, [r7, #7] 80171d2: f003 03f0 and.w r3, r3, #240 @ 0xf0 80171d6: 2b10 cmp r3, #16 80171d8: d004 beq.n 80171e4 80171da: 2b20 cmp r3, #32 80171dc: d105 bne.n 80171ea size = DEFAULT_RAW_RECVMBOX_SIZE; break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: size = DEFAULT_UDP_RECVMBOX_SIZE; 80171de: 2306 movs r3, #6 80171e0: 617b str r3, [r7, #20] #if LWIP_NETBUF_RECVINFO init_flags |= NETCONN_FLAG_PKTINFO; #endif /* LWIP_NETBUF_RECVINFO */ break; 80171e2: e00a b.n 80171fa #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: size = DEFAULT_TCP_RECVMBOX_SIZE; 80171e4: 2306 movs r3, #6 80171e6: 617b str r3, [r7, #20] break; 80171e8: e007 b.n 80171fa #endif /* LWIP_TCP */ default: LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); 80171ea: 4b25 ldr r3, [pc, #148] @ (8017280 ) 80171ec: f240 22e5 movw r2, #741 @ 0x2e5 80171f0: 4924 ldr r1, [pc, #144] @ (8017284 ) 80171f2: 4825 ldr r0, [pc, #148] @ (8017288 ) 80171f4: f013 fb3a bl 802a86c goto free_and_return; 80171f8: e039 b.n 801726e } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 80171fa: 68fb ldr r3, [r7, #12] 80171fc: 3310 adds r3, #16 80171fe: 6979 ldr r1, [r7, #20] 8017200: 4618 mov r0, r3 8017202: f00f ff05 bl 8027010 8017206: 4603 mov r3, r0 8017208: 2b00 cmp r3, #0 801720a: d12f bne.n 801726c goto free_and_return; } #if !LWIP_NETCONN_SEM_PER_THREAD if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { 801720c: 68fb ldr r3, [r7, #12] 801720e: 330c adds r3, #12 8017210: 2100 movs r1, #0 8017212: 4618 mov r0, r3 8017214: f00f ffa8 bl 8027168 8017218: 4603 mov r3, r0 801721a: 2b00 cmp r3, #0 801721c: d005 beq.n 801722a sys_mbox_free(&conn->recvmbox); 801721e: 68fb ldr r3, [r7, #12] 8017220: 3310 adds r3, #16 8017222: 4618 mov r0, r3 8017224: f00f ff0e bl 8027044 goto free_and_return; 8017228: e021 b.n 801726e } #endif #if LWIP_TCP sys_mbox_set_invalid(&conn->acceptmbox); 801722a: 68fb ldr r3, [r7, #12] 801722c: 3314 adds r3, #20 801722e: 4618 mov r0, r3 8017230: f00f ff8d bl 802714e #endif conn->state = NETCONN_NONE; 8017234: 68fb ldr r3, [r7, #12] 8017236: 2200 movs r2, #0 8017238: 705a strb r2, [r3, #1] #if LWIP_SOCKET /* initialize socket to -1 since 0 is a valid socket */ conn->socket = -1; 801723a: 68fb ldr r3, [r7, #12] 801723c: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8017240: 619a str r2, [r3, #24] #endif /* LWIP_SOCKET */ conn->callback = callback; 8017242: 68fb ldr r3, [r7, #12] 8017244: 683a ldr r2, [r7, #0] 8017246: 631a str r2, [r3, #48] @ 0x30 #if LWIP_TCP conn->current_msg = NULL; 8017248: 68fb ldr r3, [r7, #12] 801724a: 2200 movs r2, #0 801724c: 62da str r2, [r3, #44] @ 0x2c #endif /* LWIP_TCP */ #if LWIP_SO_SNDTIMEO conn->send_timeout = 0; #endif /* LWIP_SO_SNDTIMEO */ #if LWIP_SO_RCVTIMEO conn->recv_timeout = 0; 801724e: 68fb ldr r3, [r7, #12] 8017250: 2200 movs r2, #0 8017252: 61da str r2, [r3, #28] #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; 8017254: 68fb ldr r3, [r7, #12] 8017256: 4a0d ldr r2, [pc, #52] @ (801728c ) 8017258: 621a str r2, [r3, #32] conn->recv_avail = 0; 801725a: 68fb ldr r3, [r7, #12] 801725c: 2200 movs r2, #0 801725e: 625a str r2, [r3, #36] @ 0x24 #endif /* LWIP_SO_RCVBUF */ #if LWIP_SO_LINGER conn->linger = -1; #endif /* LWIP_SO_LINGER */ conn->flags = init_flags; 8017260: 68fb ldr r3, [r7, #12] 8017262: 7cfa ldrb r2, [r7, #19] 8017264: f883 2028 strb.w r2, [r3, #40] @ 0x28 return conn; 8017268: 68fb ldr r3, [r7, #12] 801726a: e005 b.n 8017278 goto free_and_return; 801726c: bf00 nop free_and_return: memp_free(MEMP_NETCONN, conn); 801726e: 68f9 ldr r1, [r7, #12] 8017270: 2007 movs r0, #7 8017272: f003 f995 bl 801a5a0 return NULL; 8017276: 2300 movs r3, #0 } 8017278: 4618 mov r0, r3 801727a: 3718 adds r7, #24 801727c: 46bd mov sp, r7 801727e: bd80 pop {r7, pc} 8017280: 0802dedc .word 0x0802dedc 8017284: 0802e0e0 .word 0x0802e0e0 8017288: 0802df20 .word 0x0802df20 801728c: 77359400 .word 0x77359400 08017290 : * * @param conn the netconn to free */ void netconn_free(struct netconn *conn) { 8017290: b580 push {r7, lr} 8017292: b082 sub sp, #8 8017294: af00 add r7, sp, #0 8017296: 6078 str r0, [r7, #4] LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); 8017298: 687b ldr r3, [r7, #4] 801729a: 685b ldr r3, [r3, #4] 801729c: 2b00 cmp r3, #0 801729e: d006 beq.n 80172ae 80172a0: 4b1b ldr r3, [pc, #108] @ (8017310 ) 80172a2: f44f 7247 mov.w r2, #796 @ 0x31c 80172a6: 491b ldr r1, [pc, #108] @ (8017314 ) 80172a8: 481b ldr r0, [pc, #108] @ (8017318 ) 80172aa: f013 fadf bl 802a86c #if LWIP_NETCONN_FULLDUPLEX /* in fullduplex, netconn is drained here */ netconn_drain(conn); #endif /* LWIP_NETCONN_FULLDUPLEX */ LWIP_ASSERT("recvmbox must be deallocated before calling this function", 80172ae: 687b ldr r3, [r7, #4] 80172b0: 3310 adds r3, #16 80172b2: 4618 mov r0, r3 80172b4: f00f ff3a bl 802712c 80172b8: 4603 mov r3, r0 80172ba: 2b00 cmp r3, #0 80172bc: d006 beq.n 80172cc 80172be: 4b14 ldr r3, [pc, #80] @ (8017310 ) 80172c0: f240 3223 movw r2, #803 @ 0x323 80172c4: 4915 ldr r1, [pc, #84] @ (801731c ) 80172c6: 4814 ldr r0, [pc, #80] @ (8017318 ) 80172c8: f013 fad0 bl 802a86c !sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", 80172cc: 687b ldr r3, [r7, #4] 80172ce: 3314 adds r3, #20 80172d0: 4618 mov r0, r3 80172d2: f00f ff2b bl 802712c 80172d6: 4603 mov r3, r0 80172d8: 2b00 cmp r3, #0 80172da: d006 beq.n 80172ea 80172dc: 4b0c ldr r3, [pc, #48] @ (8017310 ) 80172de: f240 3226 movw r2, #806 @ 0x326 80172e2: 490f ldr r1, [pc, #60] @ (8017320 ) 80172e4: 480c ldr r0, [pc, #48] @ (8017318 ) 80172e6: f013 fac1 bl 802a86c !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD sys_sem_free(&conn->op_completed); 80172ea: 687b ldr r3, [r7, #4] 80172ec: 330c adds r3, #12 80172ee: 4618 mov r0, r3 80172f0: f00f ff9d bl 802722e sys_sem_set_invalid(&conn->op_completed); 80172f4: 687b ldr r3, [r7, #4] 80172f6: 330c adds r3, #12 80172f8: 4618 mov r0, r3 80172fa: f00f ffb6 bl 802726a #endif memp_free(MEMP_NETCONN, conn); 80172fe: 6879 ldr r1, [r7, #4] 8017300: 2007 movs r0, #7 8017302: f003 f94d bl 801a5a0 } 8017306: bf00 nop 8017308: 3708 adds r7, #8 801730a: 46bd mov sp, r7 801730c: bd80 pop {r7, pc} 801730e: bf00 nop 8017310: 0802dedc .word 0x0802dedc 8017314: 0802e108 .word 0x0802e108 8017318: 0802df20 .word 0x0802df20 801731c: 0802e138 .word 0x0802e138 8017320: 0802e174 .word 0x0802e174 08017324 : * @bytes_drained bytes drained from recvmbox * @accepts_drained pending connections drained from acceptmbox */ static void netconn_drain(struct netconn *conn) { 8017324: b580 push {r7, lr} 8017326: b086 sub sp, #24 8017328: af00 add r7, sp, #0 801732a: 6078 str r0, [r7, #4] #if LWIP_NETCONN_FULLDUPLEX LWIP_ASSERT("netconn marked closed", conn->flags & NETCONN_FLAG_MBOXINVALID); #endif /* LWIP_NETCONN_FULLDUPLEX */ /* Delete and drain the recvmbox. */ if (sys_mbox_valid(&conn->recvmbox)) { 801732c: 687b ldr r3, [r7, #4] 801732e: 3310 adds r3, #16 8017330: 4618 mov r0, r3 8017332: f00f fefb bl 802712c 8017336: 4603 mov r3, r0 8017338: 2b00 cmp r3, #0 801733a: d02f beq.n 801739c while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 801733c: e018 b.n 8017370 #if LWIP_NETCONN_FULLDUPLEX if (!lwip_netconn_is_deallocated_msg(mem)) #endif /* LWIP_NETCONN_FULLDUPLEX */ { #if LWIP_TCP if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { 801733e: 687b ldr r3, [r7, #4] 8017340: 781b ldrb r3, [r3, #0] 8017342: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017346: 2b10 cmp r3, #16 8017348: d10e bne.n 8017368 err_t err; if (!lwip_netconn_is_err_msg(mem, &err)) { 801734a: 693b ldr r3, [r7, #16] 801734c: f107 020f add.w r2, r7, #15 8017350: 4611 mov r1, r2 8017352: 4618 mov r0, r3 8017354: f7ff fb78 bl 8016a48 8017358: 4603 mov r3, r0 801735a: 2b00 cmp r3, #0 801735c: d108 bne.n 8017370 pbuf_free((struct pbuf *)mem); 801735e: 693b ldr r3, [r7, #16] 8017360: 4618 mov r0, r3 8017362: f004 f80b bl 801b37c 8017366: e003 b.n 8017370 } } else #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); 8017368: 693b ldr r3, [r7, #16] 801736a: 4618 mov r0, r3 801736c: f001 f81c bl 80183a8 while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 8017370: 687b ldr r3, [r7, #4] 8017372: 3310 adds r3, #16 8017374: f107 0210 add.w r2, r7, #16 8017378: 4611 mov r1, r2 801737a: 4618 mov r0, r3 801737c: f00f febf bl 80270fe 8017380: 4603 mov r3, r0 8017382: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017386: d1da bne.n 801733e } } } sys_mbox_free(&conn->recvmbox); 8017388: 687b ldr r3, [r7, #4] 801738a: 3310 adds r3, #16 801738c: 4618 mov r0, r3 801738e: f00f fe59 bl 8027044 sys_mbox_set_invalid(&conn->recvmbox); 8017392: 687b ldr r3, [r7, #4] 8017394: 3310 adds r3, #16 8017396: 4618 mov r0, r3 8017398: f00f fed9 bl 802714e } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { 801739c: 687b ldr r3, [r7, #4] 801739e: 3314 adds r3, #20 80173a0: 4618 mov r0, r3 80173a2: f00f fec3 bl 802712c 80173a6: 4603 mov r3, r0 80173a8: 2b00 cmp r3, #0 80173aa: d034 beq.n 8017416 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 80173ac: e01d b.n 80173ea #if LWIP_NETCONN_FULLDUPLEX if (!lwip_netconn_is_deallocated_msg(mem)) #endif /* LWIP_NETCONN_FULLDUPLEX */ { err_t err; if (!lwip_netconn_is_err_msg(mem, &err)) { 80173ae: 693b ldr r3, [r7, #16] 80173b0: f107 020e add.w r2, r7, #14 80173b4: 4611 mov r1, r2 80173b6: 4618 mov r0, r3 80173b8: f7ff fb46 bl 8016a48 80173bc: 4603 mov r3, r0 80173be: 2b00 cmp r3, #0 80173c0: d113 bne.n 80173ea struct netconn *newconn = (struct netconn *)mem; 80173c2: 693b ldr r3, [r7, #16] 80173c4: 617b str r3, [r7, #20] /* Only tcp pcbs have an acceptmbox, so no need to check conn->type */ /* pcb might be set to NULL already by err_tcp() */ /* drain recvmbox */ netconn_drain(newconn); 80173c6: 6978 ldr r0, [r7, #20] 80173c8: f7ff ffac bl 8017324 if (newconn->pcb.tcp != NULL) { 80173cc: 697b ldr r3, [r7, #20] 80173ce: 685b ldr r3, [r3, #4] 80173d0: 2b00 cmp r3, #0 80173d2: d007 beq.n 80173e4 tcp_abort(newconn->pcb.tcp); 80173d4: 697b ldr r3, [r7, #20] 80173d6: 685b ldr r3, [r3, #4] 80173d8: 4618 mov r0, r3 80173da: f004 fdd5 bl 801bf88 newconn->pcb.tcp = NULL; 80173de: 697b ldr r3, [r7, #20] 80173e0: 2200 movs r2, #0 80173e2: 605a str r2, [r3, #4] } netconn_free(newconn); 80173e4: 6978 ldr r0, [r7, #20] 80173e6: f7ff ff53 bl 8017290 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 80173ea: 687b ldr r3, [r7, #4] 80173ec: 3314 adds r3, #20 80173ee: f107 0210 add.w r2, r7, #16 80173f2: 4611 mov r1, r2 80173f4: 4618 mov r0, r3 80173f6: f00f fe82 bl 80270fe 80173fa: 4603 mov r3, r0 80173fc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017400: d1d5 bne.n 80173ae } } } sys_mbox_free(&conn->acceptmbox); 8017402: 687b ldr r3, [r7, #4] 8017404: 3314 adds r3, #20 8017406: 4618 mov r0, r3 8017408: f00f fe1c bl 8027044 sys_mbox_set_invalid(&conn->acceptmbox); 801740c: 687b ldr r3, [r7, #4] 801740e: 3314 adds r3, #20 8017410: 4618 mov r0, r3 8017412: f00f fe9c bl 802714e } #endif /* LWIP_TCP */ } 8017416: bf00 nop 8017418: 3718 adds r7, #24 801741a: 46bd mov sp, r7 801741c: bd80 pop {r7, pc} ... 08017420 : * * @param conn the TCP netconn to close */ static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) { 8017420: b580 push {r7, lr} 8017422: b086 sub sp, #24 8017424: af00 add r7, sp, #0 8017426: 6078 str r0, [r7, #4] 8017428: 460b mov r3, r1 801742a: 70fb strb r3, [r7, #3] err_t err; u8_t shut, shut_rx, shut_tx, shut_close; u8_t close_finished = 0; 801742c: 2300 movs r3, #0 801742e: 757b strb r3, [r7, #21] struct tcp_pcb *tpcb; #if LWIP_SO_LINGER u8_t linger_wait_required = 0; #endif /* LWIP_SO_LINGER */ LWIP_ASSERT("invalid conn", (conn != NULL)); 8017430: 687b ldr r3, [r7, #4] 8017432: 2b00 cmp r3, #0 8017434: d106 bne.n 8017444 8017436: 4b87 ldr r3, [pc, #540] @ (8017654 ) 8017438: f240 32a2 movw r2, #930 @ 0x3a2 801743c: 4986 ldr r1, [pc, #536] @ (8017658 ) 801743e: 4887 ldr r0, [pc, #540] @ (801765c ) 8017440: f013 fa14 bl 802a86c LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); 8017444: 687b ldr r3, [r7, #4] 8017446: 781b ldrb r3, [r3, #0] 8017448: f003 03f0 and.w r3, r3, #240 @ 0xf0 801744c: 2b10 cmp r3, #16 801744e: d006 beq.n 801745e 8017450: 4b80 ldr r3, [pc, #512] @ (8017654 ) 8017452: f240 32a3 movw r2, #931 @ 0x3a3 8017456: 4982 ldr r1, [pc, #520] @ (8017660 ) 8017458: 4880 ldr r0, [pc, #512] @ (801765c ) 801745a: f013 fa07 bl 802a86c LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); 801745e: 687b ldr r3, [r7, #4] 8017460: 785b ldrb r3, [r3, #1] 8017462: 2b04 cmp r3, #4 8017464: d006 beq.n 8017474 8017466: 4b7b ldr r3, [pc, #492] @ (8017654 ) 8017468: f44f 7269 mov.w r2, #932 @ 0x3a4 801746c: 497d ldr r1, [pc, #500] @ (8017664 ) 801746e: 487b ldr r0, [pc, #492] @ (801765c ) 8017470: f013 f9fc bl 802a86c LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); 8017474: 687b ldr r3, [r7, #4] 8017476: 685b ldr r3, [r3, #4] 8017478: 2b00 cmp r3, #0 801747a: d106 bne.n 801748a 801747c: 4b75 ldr r3, [pc, #468] @ (8017654 ) 801747e: f240 32a5 movw r2, #933 @ 0x3a5 8017482: 4979 ldr r1, [pc, #484] @ (8017668 ) 8017484: 4875 ldr r0, [pc, #468] @ (801765c ) 8017486: f013 f9f1 bl 802a86c LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 801748a: 687b ldr r3, [r7, #4] 801748c: 6adb ldr r3, [r3, #44] @ 0x2c 801748e: 2b00 cmp r3, #0 8017490: d106 bne.n 80174a0 8017492: 4b70 ldr r3, [pc, #448] @ (8017654 ) 8017494: f240 32a6 movw r2, #934 @ 0x3a6 8017498: 4974 ldr r1, [pc, #464] @ (801766c ) 801749a: 4870 ldr r0, [pc, #448] @ (801765c ) 801749c: f013 f9e6 bl 802a86c tpcb = conn->pcb.tcp; 80174a0: 687b ldr r3, [r7, #4] 80174a2: 685b ldr r3, [r3, #4] 80174a4: 613b str r3, [r7, #16] shut = conn->current_msg->msg.sd.shut; 80174a6: 687b ldr r3, [r7, #4] 80174a8: 6adb ldr r3, [r3, #44] @ 0x2c 80174aa: 7a1b ldrb r3, [r3, #8] 80174ac: 73fb strb r3, [r7, #15] shut_rx = shut & NETCONN_SHUT_RD; 80174ae: 7bfb ldrb r3, [r7, #15] 80174b0: f003 0301 and.w r3, r3, #1 80174b4: 73bb strb r3, [r7, #14] shut_tx = shut & NETCONN_SHUT_WR; 80174b6: 7bfb ldrb r3, [r7, #15] 80174b8: f003 0302 and.w r3, r3, #2 80174bc: 737b strb r3, [r7, #13] /* shutting down both ends is the same as closing (also if RD or WR side was shut down before already) */ if (shut == NETCONN_SHUT_RDWR) { 80174be: 7bfb ldrb r3, [r7, #15] 80174c0: 2b03 cmp r3, #3 80174c2: d102 bne.n 80174ca shut_close = 1; 80174c4: 2301 movs r3, #1 80174c6: 75bb strb r3, [r7, #22] 80174c8: e01f b.n 801750a } else if (shut_rx && 80174ca: 7bbb ldrb r3, [r7, #14] 80174cc: 2b00 cmp r3, #0 80174ce: d00e beq.n 80174ee ((tpcb->state == FIN_WAIT_1) || 80174d0: 693b ldr r3, [r7, #16] 80174d2: 7d1b ldrb r3, [r3, #20] } else if (shut_rx && 80174d4: 2b05 cmp r3, #5 80174d6: d007 beq.n 80174e8 (tpcb->state == FIN_WAIT_2) || 80174d8: 693b ldr r3, [r7, #16] 80174da: 7d1b ldrb r3, [r3, #20] ((tpcb->state == FIN_WAIT_1) || 80174dc: 2b06 cmp r3, #6 80174de: d003 beq.n 80174e8 (tpcb->state == CLOSING))) { 80174e0: 693b ldr r3, [r7, #16] 80174e2: 7d1b ldrb r3, [r3, #20] (tpcb->state == FIN_WAIT_2) || 80174e4: 2b08 cmp r3, #8 80174e6: d102 bne.n 80174ee shut_close = 1; 80174e8: 2301 movs r3, #1 80174ea: 75bb strb r3, [r7, #22] 80174ec: e00d b.n 801750a } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { 80174ee: 7b7b ldrb r3, [r7, #13] 80174f0: 2b00 cmp r3, #0 80174f2: d008 beq.n 8017506 80174f4: 693b ldr r3, [r7, #16] 80174f6: 8b5b ldrh r3, [r3, #26] 80174f8: f003 0310 and.w r3, r3, #16 80174fc: 2b00 cmp r3, #0 80174fe: d002 beq.n 8017506 shut_close = 1; 8017500: 2301 movs r3, #1 8017502: 75bb strb r3, [r7, #22] 8017504: e001 b.n 801750a } else { shut_close = 0; 8017506: 2300 movs r3, #0 8017508: 75bb strb r3, [r7, #22] } /* Set back some callback pointers */ if (shut_close) { 801750a: 7dbb ldrb r3, [r7, #22] 801750c: 2b00 cmp r3, #0 801750e: d003 beq.n 8017518 tcp_arg(tpcb, NULL); 8017510: 2100 movs r1, #0 8017512: 6938 ldr r0, [r7, #16] 8017514: f005 fd88 bl 801d028 } if (tpcb->state == LISTEN) { 8017518: 693b ldr r3, [r7, #16] 801751a: 7d1b ldrb r3, [r3, #20] 801751c: 2b01 cmp r3, #1 801751e: d104 bne.n 801752a tcp_accept(tpcb, NULL); 8017520: 2100 movs r1, #0 8017522: 6938 ldr r0, [r7, #16] 8017524: f005 fdfe bl 801d124 8017528: e01d b.n 8017566 } else { /* some callbacks have to be reset if tcp_close is not successful */ if (shut_rx) { 801752a: 7bbb ldrb r3, [r7, #14] 801752c: 2b00 cmp r3, #0 801752e: d007 beq.n 8017540 tcp_recv(tpcb, NULL); 8017530: 2100 movs r1, #0 8017532: 6938 ldr r0, [r7, #16] 8017534: f005 fd8a bl 801d04c tcp_accept(tpcb, NULL); 8017538: 2100 movs r1, #0 801753a: 6938 ldr r0, [r7, #16] 801753c: f005 fdf2 bl 801d124 } if (shut_tx) { 8017540: 7b7b ldrb r3, [r7, #13] 8017542: 2b00 cmp r3, #0 8017544: d003 beq.n 801754e tcp_sent(tpcb, NULL); 8017546: 2100 movs r1, #0 8017548: 6938 ldr r0, [r7, #16] 801754a: f005 fda3 bl 801d094 } if (shut_close) { 801754e: 7dbb ldrb r3, [r7, #22] 8017550: 2b00 cmp r3, #0 8017552: d008 beq.n 8017566 tcp_poll(tpcb, NULL, 0); 8017554: 2200 movs r2, #0 8017556: 2100 movs r1, #0 8017558: 6938 ldr r0, [r7, #16] 801755a: f005 fdfb bl 801d154 tcp_err(tpcb, NULL); 801755e: 2100 movs r1, #0 8017560: 6938 ldr r0, [r7, #16] 8017562: f005 fdbb bl 801d0dc } } /* Try to close the connection */ if (shut_close) { 8017566: 7dbb ldrb r3, [r7, #22] 8017568: 2b00 cmp r3, #0 801756a: d005 beq.n 8017578 } } if ((err == ERR_OK) && (tpcb != NULL)) #endif /* LWIP_SO_LINGER */ { err = tcp_close(tpcb); 801756c: 6938 ldr r0, [r7, #16] 801756e: f004 fbbf bl 801bcf0 8017572: 4603 mov r3, r0 8017574: 75fb strb r3, [r7, #23] 8017576: e007 b.n 8017588 } } else { err = tcp_shutdown(tpcb, shut_rx, shut_tx); 8017578: 7bbb ldrb r3, [r7, #14] 801757a: 7b7a ldrb r2, [r7, #13] 801757c: 4619 mov r1, r3 801757e: 6938 ldr r0, [r7, #16] 8017580: f004 fbe4 bl 801bd4c 8017584: 4603 mov r3, r0 8017586: 75fb strb r3, [r7, #23] } if (err == ERR_OK) { 8017588: f997 3017 ldrsb.w r3, [r7, #23] 801758c: 2b00 cmp r3, #0 801758e: d102 bne.n 8017596 close_finished = 1; 8017590: 2301 movs r3, #1 8017592: 757b strb r3, [r7, #21] 8017594: e016 b.n 80175c4 close_finished = 0; err = ERR_INPROGRESS; } #endif /* LWIP_SO_LINGER */ } else { if (err == ERR_MEM) { 8017596: f997 3017 ldrsb.w r3, [r7, #23] 801759a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801759e: d10f bne.n 80175c0 close_timeout = conn->linger * 1000U; } #endif if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= close_timeout) { #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ if (conn->current_msg->msg.sd.polls_left == 0) { 80175a0: 687b ldr r3, [r7, #4] 80175a2: 6adb ldr r3, [r3, #44] @ 0x2c 80175a4: 7a5b ldrb r3, [r3, #9] 80175a6: 2b00 cmp r3, #0 80175a8: d10c bne.n 80175c4 #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ close_finished = 1; 80175aa: 2301 movs r3, #1 80175ac: 757b strb r3, [r7, #21] if (shut_close) { 80175ae: 7dbb ldrb r3, [r7, #22] 80175b0: 2b00 cmp r3, #0 80175b2: d007 beq.n 80175c4 /* in this case, we want to RST the connection */ tcp_abort(tpcb); 80175b4: 6938 ldr r0, [r7, #16] 80175b6: f004 fce7 bl 801bf88 err = ERR_OK; 80175ba: 2300 movs r3, #0 80175bc: 75fb strb r3, [r7, #23] 80175be: e001 b.n 80175c4 } } } else { /* Closing failed for a non-memory error: give up */ close_finished = 1; 80175c0: 2301 movs r3, #1 80175c2: 757b strb r3, [r7, #21] } } if (close_finished) { 80175c4: 7d7b ldrb r3, [r7, #21] 80175c6: 2b00 cmp r3, #0 80175c8: d052 beq.n 8017670 /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 80175ca: 687b ldr r3, [r7, #4] 80175cc: 6adb ldr r3, [r3, #44] @ 0x2c 80175ce: 681b ldr r3, [r3, #0] 80175d0: 330c adds r3, #12 80175d2: 60bb str r3, [r7, #8] conn->current_msg->err = err; 80175d4: 687b ldr r3, [r7, #4] 80175d6: 6adb ldr r3, [r3, #44] @ 0x2c 80175d8: 7dfa ldrb r2, [r7, #23] 80175da: 711a strb r2, [r3, #4] conn->current_msg = NULL; 80175dc: 687b ldr r3, [r7, #4] 80175de: 2200 movs r2, #0 80175e0: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 80175e2: 687b ldr r3, [r7, #4] 80175e4: 2200 movs r2, #0 80175e6: 705a strb r2, [r3, #1] if (err == ERR_OK) { 80175e8: f997 3017 ldrsb.w r3, [r7, #23] 80175ec: 2b00 cmp r3, #0 80175ee: d129 bne.n 8017644 if (shut_close) { 80175f0: 7dbb ldrb r3, [r7, #22] 80175f2: 2b00 cmp r3, #0 80175f4: d00c beq.n 8017610 /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; 80175f6: 687b ldr r3, [r7, #4] 80175f8: 2200 movs r2, #0 80175fa: 605a str r2, [r3, #4] /* Trigger select() in socket layer. Make sure everybody notices activity on the connection, error first! */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 80175fc: 687b ldr r3, [r7, #4] 80175fe: 6b1b ldr r3, [r3, #48] @ 0x30 8017600: 2b00 cmp r3, #0 8017602: d005 beq.n 8017610 8017604: 687b ldr r3, [r7, #4] 8017606: 6b1b ldr r3, [r3, #48] @ 0x30 8017608: 2200 movs r2, #0 801760a: 2104 movs r1, #4 801760c: 6878 ldr r0, [r7, #4] 801760e: 4798 blx r3 } if (shut_rx) { 8017610: 7bbb ldrb r3, [r7, #14] 8017612: 2b00 cmp r3, #0 8017614: d009 beq.n 801762a API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 8017616: 687b ldr r3, [r7, #4] 8017618: 6b1b ldr r3, [r3, #48] @ 0x30 801761a: 2b00 cmp r3, #0 801761c: d005 beq.n 801762a 801761e: 687b ldr r3, [r7, #4] 8017620: 6b1b ldr r3, [r3, #48] @ 0x30 8017622: 2200 movs r2, #0 8017624: 2100 movs r1, #0 8017626: 6878 ldr r0, [r7, #4] 8017628: 4798 blx r3 } if (shut_tx) { 801762a: 7b7b ldrb r3, [r7, #13] 801762c: 2b00 cmp r3, #0 801762e: d009 beq.n 8017644 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8017630: 687b ldr r3, [r7, #4] 8017632: 6b1b ldr r3, [r3, #48] @ 0x30 8017634: 2b00 cmp r3, #0 8017636: d005 beq.n 8017644 8017638: 687b ldr r3, [r7, #4] 801763a: 6b1b ldr r3, [r3, #48] @ 0x30 801763c: 2200 movs r2, #0 801763e: 2102 movs r1, #2 8017640: 6878 ldr r0, [r7, #4] 8017642: 4798 blx r3 } } #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8017644: 78fb ldrb r3, [r7, #3] 8017646: 2b00 cmp r3, #0 8017648: d002 beq.n 8017650 #endif { /* wake up the application task */ sys_sem_signal(op_completed_sem); 801764a: 68b8 ldr r0, [r7, #8] 801764c: f00f fde2 bl 8027214 } return ERR_OK; 8017650: 2300 movs r3, #0 8017652: e03c b.n 80176ce 8017654: 0802dedc .word 0x0802dedc 8017658: 0802e1b0 .word 0x0802e1b0 801765c: 0802df20 .word 0x0802df20 8017660: 0802e1c0 .word 0x0802e1c0 8017664: 0802e1e0 .word 0x0802e1e0 8017668: 0802e204 .word 0x0802e204 801766c: 0802e044 .word 0x0802e044 } if (!close_finished) { 8017670: 7d7b ldrb r3, [r7, #21] 8017672: 2b00 cmp r3, #0 8017674: d11e bne.n 80176b4 /* Closing failed and we want to wait: restore some of the callbacks */ /* Closing of listen pcb will never fail! */ LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN)); 8017676: 693b ldr r3, [r7, #16] 8017678: 7d1b ldrb r3, [r3, #20] 801767a: 2b01 cmp r3, #1 801767c: d106 bne.n 801768c 801767e: 4b16 ldr r3, [pc, #88] @ (80176d8 ) 8017680: f240 4241 movw r2, #1089 @ 0x441 8017684: 4915 ldr r1, [pc, #84] @ (80176dc ) 8017686: 4816 ldr r0, [pc, #88] @ (80176e0 ) 8017688: f013 f8f0 bl 802a86c if (shut_tx) { 801768c: 7b7b ldrb r3, [r7, #13] 801768e: 2b00 cmp r3, #0 8017690: d003 beq.n 801769a tcp_sent(tpcb, sent_tcp); 8017692: 4914 ldr r1, [pc, #80] @ (80176e4 ) 8017694: 6938 ldr r0, [r7, #16] 8017696: f005 fcfd bl 801d094 } /* when waiting for close, set up poll interval to 500ms */ tcp_poll(tpcb, poll_tcp, 1); 801769a: 2201 movs r2, #1 801769c: 4912 ldr r1, [pc, #72] @ (80176e8 ) 801769e: 6938 ldr r0, [r7, #16] 80176a0: f005 fd58 bl 801d154 tcp_err(tpcb, err_tcp); 80176a4: 4911 ldr r1, [pc, #68] @ (80176ec ) 80176a6: 6938 ldr r0, [r7, #16] 80176a8: f005 fd18 bl 801d0dc tcp_arg(tpcb, conn); 80176ac: 6879 ldr r1, [r7, #4] 80176ae: 6938 ldr r0, [r7, #16] 80176b0: f005 fcba bl 801d028 /* don't restore recv callback: we don't want to receive any more data */ } /* If closing didn't succeed, we get called again either from poll_tcp or from sent_tcp */ LWIP_ASSERT("err != ERR_OK", err != ERR_OK); 80176b4: f997 3017 ldrsb.w r3, [r7, #23] 80176b8: 2b00 cmp r3, #0 80176ba: d106 bne.n 80176ca 80176bc: 4b06 ldr r3, [pc, #24] @ (80176d8 ) 80176be: f240 424d movw r2, #1101 @ 0x44d 80176c2: 490b ldr r1, [pc, #44] @ (80176f0 ) 80176c4: 4806 ldr r0, [pc, #24] @ (80176e0 ) 80176c6: f013 f8d1 bl 802a86c return err; 80176ca: f997 3017 ldrsb.w r3, [r7, #23] } 80176ce: 4618 mov r0, r3 80176d0: 3718 adds r7, #24 80176d2: 46bd mov sp, r7 80176d4: bd80 pop {r7, pc} 80176d6: bf00 nop 80176d8: 0802dedc .word 0x0802dedc 80176dc: 0802e218 .word 0x0802e218 80176e0: 0802df20 .word 0x0802df20 80176e4: 08016de9 .word 0x08016de9 80176e8: 08016d19 .word 0x08016d19 80176ec: 08016e99 .word 0x08016e99 80176f0: 0802e23c .word 0x0802e23c 080176f4 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_delconn(void *m) { 80176f4: b580 push {r7, lr} 80176f6: b084 sub sp, #16 80176f8: af00 add r7, sp, #0 80176fa: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80176fc: 687b ldr r3, [r7, #4] 80176fe: 60fb str r3, [r7, #12] enum netconn_state state = msg->conn->state; 8017700: 68fb ldr r3, [r7, #12] 8017702: 681b ldr r3, [r3, #0] 8017704: 785b ldrb r3, [r3, #1] 8017706: 72fb strb r3, [r7, #11] LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ 8017708: 7afb ldrb r3, [r7, #11] 801770a: 2b00 cmp r3, #0 801770c: d00d beq.n 801772a 801770e: 68fb ldr r3, [r7, #12] 8017710: 681b ldr r3, [r3, #0] 8017712: 781b ldrb r3, [r3, #0] 8017714: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017718: 2b10 cmp r3, #16 801771a: d006 beq.n 801772a 801771c: 4b60 ldr r3, [pc, #384] @ (80178a0 ) 801771e: f240 425e movw r2, #1118 @ 0x45e 8017722: 4960 ldr r1, [pc, #384] @ (80178a4 ) 8017724: 4860 ldr r0, [pc, #384] @ (80178a8 ) 8017726: f013 f8a1 bl 802a86c msg->conn->state = NETCONN_NONE; sys_sem_signal(op_completed_sem); } } #else /* LWIP_NETCONN_FULLDUPLEX */ if (((state != NETCONN_NONE) && 801772a: 7afb ldrb r3, [r7, #11] 801772c: 2b00 cmp r3, #0 801772e: d005 beq.n 801773c 8017730: 7afb ldrb r3, [r7, #11] 8017732: 2b02 cmp r3, #2 8017734: d002 beq.n 801773c (state != NETCONN_LISTEN) && 8017736: 7afb ldrb r3, [r7, #11] 8017738: 2b03 cmp r3, #3 801773a: d10a bne.n 8017752 (state != NETCONN_CONNECT)) || 801773c: 7afb ldrb r3, [r7, #11] 801773e: 2b03 cmp r3, #3 8017740: d10b bne.n 801775a ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { 8017742: 68fb ldr r3, [r7, #12] 8017744: 681b ldr r3, [r3, #0] 8017746: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801774a: f003 0304 and.w r3, r3, #4 801774e: 2b00 cmp r3, #0 8017750: d103 bne.n 801775a /* This means either a blocking write or blocking connect is running (nonblocking write returns and sets state to NONE) */ msg->err = ERR_INPROGRESS; 8017752: 68fb ldr r3, [r7, #12] 8017754: 22fb movs r2, #251 @ 0xfb 8017756: 711a strb r2, [r3, #4] 8017758: e096 b.n 8017888 } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { LWIP_ASSERT("blocking connect in progress", 801775a: 7afb ldrb r3, [r7, #11] 801775c: 2b03 cmp r3, #3 801775e: d10e bne.n 801777e 8017760: 68fb ldr r3, [r7, #12] 8017762: 681b ldr r3, [r3, #0] 8017764: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017768: f003 0304 and.w r3, r3, #4 801776c: 2b00 cmp r3, #0 801776e: d106 bne.n 801777e 8017770: 4b4b ldr r3, [pc, #300] @ (80178a0 ) 8017772: f240 427a movw r2, #1146 @ 0x47a 8017776: 494d ldr r1, [pc, #308] @ (80178ac ) 8017778: 484b ldr r0, [pc, #300] @ (80178a8 ) 801777a: f013 f877 bl 802a86c (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); msg->err = ERR_OK; 801777e: 68fb ldr r3, [r7, #12] 8017780: 2200 movs r2, #0 8017782: 711a strb r2, [r3, #4] #if LWIP_NETCONN_FULLDUPLEX /* Mark mboxes invalid */ netconn_mark_mbox_invalid(msg->conn); #else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); 8017784: 68fb ldr r3, [r7, #12] 8017786: 681b ldr r3, [r3, #0] 8017788: 4618 mov r0, r3 801778a: f7ff fdcb bl 8017324 #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->conn->pcb.tcp != NULL) { 801778e: 68fb ldr r3, [r7, #12] 8017790: 681b ldr r3, [r3, #0] 8017792: 685b ldr r3, [r3, #4] 8017794: 2b00 cmp r3, #0 8017796: d05d beq.n 8017854 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8017798: 68fb ldr r3, [r7, #12] 801779a: 681b ldr r3, [r3, #0] 801779c: 781b ldrb r3, [r3, #0] 801779e: f003 03f0 and.w r3, r3, #240 @ 0xf0 80177a2: 2b10 cmp r3, #16 80177a4: d00d beq.n 80177c2 80177a6: 2b20 cmp r3, #32 80177a8: d14f bne.n 801784a raw_remove(msg->conn->pcb.raw); break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp->recv_arg = NULL; 80177aa: 68fb ldr r3, [r7, #12] 80177ac: 681b ldr r3, [r3, #0] 80177ae: 685b ldr r3, [r3, #4] 80177b0: 2200 movs r2, #0 80177b2: 61da str r2, [r3, #28] udp_remove(msg->conn->pcb.udp); 80177b4: 68fb ldr r3, [r7, #12] 80177b6: 681b ldr r3, [r3, #0] 80177b8: 685b ldr r3, [r3, #4] 80177ba: 4618 mov r0, r3 80177bc: f00a ffc6 bl 802274c break; 80177c0: e044 b.n 801784c #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 80177c2: 68fb ldr r3, [r7, #12] 80177c4: 681b ldr r3, [r3, #0] 80177c6: 6adb ldr r3, [r3, #44] @ 0x2c 80177c8: 2b00 cmp r3, #0 80177ca: d006 beq.n 80177da 80177cc: 4b34 ldr r3, [pc, #208] @ (80178a0 ) 80177ce: f240 4294 movw r2, #1172 @ 0x494 80177d2: 4937 ldr r1, [pc, #220] @ (80178b0 ) 80177d4: 4834 ldr r0, [pc, #208] @ (80178a8 ) 80177d6: f013 f849 bl 802a86c msg->conn->state = NETCONN_CLOSE; 80177da: 68fb ldr r3, [r7, #12] 80177dc: 681b ldr r3, [r3, #0] 80177de: 2204 movs r2, #4 80177e0: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; 80177e2: 68fb ldr r3, [r7, #12] 80177e4: 2203 movs r2, #3 80177e6: 721a strb r2, [r3, #8] msg->conn->current_msg = msg; 80177e8: 68fb ldr r3, [r7, #12] 80177ea: 681b ldr r3, [r3, #0] 80177ec: 68fa ldr r2, [r7, #12] 80177ee: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 80177f0: 68fb ldr r3, [r7, #12] 80177f2: 681b ldr r3, [r3, #0] 80177f4: 2100 movs r1, #0 80177f6: 4618 mov r0, r3 80177f8: f7ff fe12 bl 8017420 80177fc: 4603 mov r3, r0 80177fe: 2b00 cmp r3, #0 8017800: d049 beq.n 8017896 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8017802: 68fb ldr r3, [r7, #12] 8017804: 681b ldr r3, [r3, #0] 8017806: 785b ldrb r3, [r3, #1] 8017808: 2b04 cmp r3, #4 801780a: d006 beq.n 801781a 801780c: 4b24 ldr r3, [pc, #144] @ (80178a0 ) 801780e: f240 429a movw r2, #1178 @ 0x49a 8017812: 4928 ldr r1, [pc, #160] @ (80178b4 ) 8017814: 4824 ldr r0, [pc, #144] @ (80178a8 ) 8017816: f013 f829 bl 802a86c UNLOCK_TCPIP_CORE(); 801781a: f7f9 fbf1 bl 8011000 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801781e: 68fb ldr r3, [r7, #12] 8017820: 681b ldr r3, [r3, #0] 8017822: 330c adds r3, #12 8017824: 2100 movs r1, #0 8017826: 4618 mov r0, r3 8017828: f00f fcc3 bl 80271b2 LOCK_TCPIP_CORE(); 801782c: f7f9 fbd8 bl 8010fe0 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8017830: 68fb ldr r3, [r7, #12] 8017832: 681b ldr r3, [r3, #0] 8017834: 785b ldrb r3, [r3, #1] 8017836: 2b00 cmp r3, #0 8017838: d02d beq.n 8017896 801783a: 4b19 ldr r3, [pc, #100] @ (80178a0 ) 801783c: f240 429e movw r2, #1182 @ 0x49e 8017840: 491c ldr r1, [pc, #112] @ (80178b4 ) 8017842: 4819 ldr r0, [pc, #100] @ (80178a8 ) 8017844: f013 f812 bl 802a86c #else /* LWIP_TCPIP_CORE_LOCKING */ lwip_netconn_do_close_internal(msg->conn); #endif /* LWIP_TCPIP_CORE_LOCKING */ /* API_EVENT is called inside lwip_netconn_do_close_internal, before releasing the application thread, so we can return at this point! */ return; 8017848: e025 b.n 8017896 #endif /* LWIP_TCP */ default: break; 801784a: bf00 nop } msg->conn->pcb.tcp = NULL; 801784c: 68fb ldr r3, [r7, #12] 801784e: 681b ldr r3, [r3, #0] 8017850: 2200 movs r2, #0 8017852: 605a str r2, [r3, #4] } /* tcp netconns don't come here! */ /* @todo: this lets select make the socket readable and writable, which is wrong! errfd instead? */ API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); 8017854: 68fb ldr r3, [r7, #12] 8017856: 681b ldr r3, [r3, #0] 8017858: 6b1b ldr r3, [r3, #48] @ 0x30 801785a: 2b00 cmp r3, #0 801785c: d007 beq.n 801786e 801785e: 68fb ldr r3, [r7, #12] 8017860: 681b ldr r3, [r3, #0] 8017862: 6b1b ldr r3, [r3, #48] @ 0x30 8017864: 68fa ldr r2, [r7, #12] 8017866: 6810 ldr r0, [r2, #0] 8017868: 2200 movs r2, #0 801786a: 2100 movs r1, #0 801786c: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 801786e: 68fb ldr r3, [r7, #12] 8017870: 681b ldr r3, [r3, #0] 8017872: 6b1b ldr r3, [r3, #48] @ 0x30 8017874: 2b00 cmp r3, #0 8017876: d007 beq.n 8017888 8017878: 68fb ldr r3, [r7, #12] 801787a: 681b ldr r3, [r3, #0] 801787c: 6b1b ldr r3, [r3, #48] @ 0x30 801787e: 68fa ldr r2, [r7, #12] 8017880: 6810 ldr r0, [r2, #0] 8017882: 2200 movs r2, #0 8017884: 2102 movs r1, #2 8017886: 4798 blx r3 } if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { 8017888: 68fb ldr r3, [r7, #12] 801788a: 681b ldr r3, [r3, #0] 801788c: 330c adds r3, #12 801788e: 4618 mov r0, r3 8017890: f00f fcda bl 8027248 8017894: e000 b.n 8017898 return; 8017896: bf00 nop TCPIP_APIMSG_ACK(msg); } } 8017898: 3710 adds r7, #16 801789a: 46bd mov sp, r7 801789c: bd80 pop {r7, pc} 801789e: bf00 nop 80178a0: 0802dedc .word 0x0802dedc 80178a4: 0802e24c .word 0x0802e24c 80178a8: 0802df20 .word 0x0802df20 80178ac: 0802e260 .word 0x0802e260 80178b0: 0802e280 .word 0x0802e280 80178b4: 0802e29c .word 0x0802e29c 080178b8 : * * @see tcp.h (struct tcp_pcb.connected) for parameters and return values */ static err_t lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) { 80178b8: b580 push {r7, lr} 80178ba: b088 sub sp, #32 80178bc: af00 add r7, sp, #0 80178be: 60f8 str r0, [r7, #12] 80178c0: 60b9 str r1, [r7, #8] 80178c2: 4613 mov r3, r2 80178c4: 71fb strb r3, [r7, #7] struct netconn *conn; int was_blocking; sys_sem_t *op_completed_sem = NULL; 80178c6: 2300 movs r3, #0 80178c8: 61fb str r3, [r7, #28] LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; 80178ca: 68fb ldr r3, [r7, #12] 80178cc: 61bb str r3, [r7, #24] if (conn == NULL) { 80178ce: 69bb ldr r3, [r7, #24] 80178d0: 2b00 cmp r3, #0 80178d2: d102 bne.n 80178da return ERR_VAL; 80178d4: f06f 0305 mvn.w r3, #5 80178d8: e074 b.n 80179c4 } LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); 80178da: 69bb ldr r3, [r7, #24] 80178dc: 785b ldrb r3, [r3, #1] 80178de: 2b03 cmp r3, #3 80178e0: d006 beq.n 80178f0 80178e2: 4b3a ldr r3, [pc, #232] @ (80179cc ) 80178e4: f240 5223 movw r2, #1315 @ 0x523 80178e8: 4939 ldr r1, [pc, #228] @ (80179d0 ) 80178ea: 483a ldr r0, [pc, #232] @ (80179d4 ) 80178ec: f012 ffbe bl 802a86c LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", 80178f0: 69bb ldr r3, [r7, #24] 80178f2: 6adb ldr r3, [r3, #44] @ 0x2c 80178f4: 2b00 cmp r3, #0 80178f6: d10d bne.n 8017914 80178f8: 69bb ldr r3, [r7, #24] 80178fa: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80178fe: f003 0304 and.w r3, r3, #4 8017902: 2b00 cmp r3, #0 8017904: d106 bne.n 8017914 8017906: 4b31 ldr r3, [pc, #196] @ (80179cc ) 8017908: f240 5224 movw r2, #1316 @ 0x524 801790c: 4932 ldr r1, [pc, #200] @ (80179d8 ) 801790e: 4831 ldr r0, [pc, #196] @ (80179d4 ) 8017910: f012 ffac bl 802a86c (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { 8017914: 69bb ldr r3, [r7, #24] 8017916: 6adb ldr r3, [r3, #44] @ 0x2c 8017918: 2b00 cmp r3, #0 801791a: d008 beq.n 801792e conn->current_msg->err = err; 801791c: 69bb ldr r3, [r7, #24] 801791e: 6adb ldr r3, [r3, #44] @ 0x2c 8017920: 79fa ldrb r2, [r7, #7] 8017922: 711a strb r2, [r3, #4] op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8017924: 69bb ldr r3, [r7, #24] 8017926: 6adb ldr r3, [r3, #44] @ 0x2c 8017928: 681b ldr r3, [r3, #0] 801792a: 330c adds r3, #12 801792c: 61fb str r3, [r7, #28] } if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { 801792e: 69bb ldr r3, [r7, #24] 8017930: 781b ldrb r3, [r3, #0] 8017932: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017936: 2b10 cmp r3, #16 8017938: d106 bne.n 8017948 801793a: f997 3007 ldrsb.w r3, [r7, #7] 801793e: 2b00 cmp r3, #0 8017940: d102 bne.n 8017948 setup_tcp(conn); 8017942: 69b8 ldr r0, [r7, #24] 8017944: f7ff fb82 bl 801704c } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 8017948: 69bb ldr r3, [r7, #24] 801794a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801794e: f003 0304 and.w r3, r3, #4 8017952: 2b00 cmp r3, #0 8017954: bf0c ite eq 8017956: 2301 moveq r3, #1 8017958: 2300 movne r3, #0 801795a: b2db uxtb r3, r3 801795c: 617b str r3, [r7, #20] SET_NONBLOCKING_CONNECT(conn, 0); 801795e: 69bb ldr r3, [r7, #24] 8017960: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017964: f023 0304 bic.w r3, r3, #4 8017968: b2da uxtb r2, r3 801796a: 69bb ldr r3, [r7, #24] 801796c: f883 2028 strb.w r2, [r3, #40] @ 0x28 LWIP_ASSERT("blocking connect state error", 8017970: 697b ldr r3, [r7, #20] 8017972: 2b00 cmp r3, #0 8017974: d002 beq.n 801797c 8017976: 69fb ldr r3, [r7, #28] 8017978: 2b00 cmp r3, #0 801797a: d10c bne.n 8017996 801797c: 697b ldr r3, [r7, #20] 801797e: 2b00 cmp r3, #0 8017980: d102 bne.n 8017988 8017982: 69fb ldr r3, [r7, #28] 8017984: 2b00 cmp r3, #0 8017986: d006 beq.n 8017996 8017988: 4b10 ldr r3, [pc, #64] @ (80179cc ) 801798a: f44f 62a6 mov.w r2, #1328 @ 0x530 801798e: 4913 ldr r1, [pc, #76] @ (80179dc ) 8017990: 4810 ldr r0, [pc, #64] @ (80179d4 ) 8017992: f012 ff6b bl 802a86c (was_blocking && op_completed_sem != NULL) || (!was_blocking && op_completed_sem == NULL)); conn->current_msg = NULL; 8017996: 69bb ldr r3, [r7, #24] 8017998: 2200 movs r2, #0 801799a: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 801799c: 69bb ldr r3, [r7, #24] 801799e: 2200 movs r2, #0 80179a0: 705a strb r2, [r3, #1] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 80179a2: 69bb ldr r3, [r7, #24] 80179a4: 6b1b ldr r3, [r3, #48] @ 0x30 80179a6: 2b00 cmp r3, #0 80179a8: d005 beq.n 80179b6 80179aa: 69bb ldr r3, [r7, #24] 80179ac: 6b1b ldr r3, [r3, #48] @ 0x30 80179ae: 2200 movs r2, #0 80179b0: 2102 movs r1, #2 80179b2: 69b8 ldr r0, [r7, #24] 80179b4: 4798 blx r3 if (was_blocking) { 80179b6: 697b ldr r3, [r7, #20] 80179b8: 2b00 cmp r3, #0 80179ba: d002 beq.n 80179c2 sys_sem_signal(op_completed_sem); 80179bc: 69f8 ldr r0, [r7, #28] 80179be: f00f fc29 bl 8027214 } return ERR_OK; 80179c2: 2300 movs r3, #0 } 80179c4: 4618 mov r0, r3 80179c6: 3720 adds r7, #32 80179c8: 46bd mov sp, r7 80179ca: bd80 pop {r7, pc} 80179cc: 0802dedc .word 0x0802dedc 80179d0: 0802e2a4 .word 0x0802e2a4 80179d4: 0802df20 .word 0x0802df20 80179d8: 0802e2c4 .word 0x0802e2c4 80179dc: 0802e304 .word 0x0802e304 080179e0 : * @param m the api_msg pointing to the connection and containing * the IP address and port to connect to */ void lwip_netconn_do_connect(void *m) { 80179e0: b580 push {r7, lr} 80179e2: b086 sub sp, #24 80179e4: af00 add r7, sp, #0 80179e6: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80179e8: 687b ldr r3, [r7, #4] 80179ea: 613b str r3, [r7, #16] err_t err; if (msg->conn->pcb.tcp == NULL) { 80179ec: 693b ldr r3, [r7, #16] 80179ee: 681b ldr r3, [r3, #0] 80179f0: 685b ldr r3, [r3, #4] 80179f2: 2b00 cmp r3, #0 80179f4: d102 bne.n 80179fc /* This may happen when calling netconn_connect() a second time */ err = ERR_CLSD; 80179f6: 23f1 movs r3, #241 @ 0xf1 80179f8: 75fb strb r3, [r7, #23] 80179fa: e09e b.n 8017b3a } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80179fc: 693b ldr r3, [r7, #16] 80179fe: 681b ldr r3, [r3, #0] 8017a00: 781b ldrb r3, [r3, #0] 8017a02: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017a06: 2b10 cmp r3, #16 8017a08: d00f beq.n 8017a2a 8017a0a: 2b20 cmp r3, #32 8017a0c: f040 808a bne.w 8017b24 err = raw_connect(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); 8017a10: 693b ldr r3, [r7, #16] 8017a12: 681b ldr r3, [r3, #0] 8017a14: 6858 ldr r0, [r3, #4] 8017a16: 693b ldr r3, [r7, #16] 8017a18: 6899 ldr r1, [r3, #8] 8017a1a: 693b ldr r3, [r7, #16] 8017a1c: 899b ldrh r3, [r3, #12] 8017a1e: 461a mov r2, r3 8017a20: f00a fdd8 bl 80225d4 8017a24: 4603 mov r3, r0 8017a26: 75fb strb r3, [r7, #23] break; 8017a28: e087 b.n 8017b3a #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: /* Prevent connect while doing any other action. */ if (msg->conn->state == NETCONN_CONNECT) { 8017a2a: 693b ldr r3, [r7, #16] 8017a2c: 681b ldr r3, [r3, #0] 8017a2e: 785b ldrb r3, [r3, #1] 8017a30: 2b03 cmp r3, #3 8017a32: d102 bne.n 8017a3a err = ERR_ALREADY; 8017a34: 23f7 movs r3, #247 @ 0xf7 8017a36: 75fb strb r3, [r7, #23] #endif /* LWIP_TCPIP_CORE_LOCKING */ return; } } } break; 8017a38: e07e b.n 8017b38 } else if (msg->conn->state != NETCONN_NONE) { 8017a3a: 693b ldr r3, [r7, #16] 8017a3c: 681b ldr r3, [r3, #0] 8017a3e: 785b ldrb r3, [r3, #1] 8017a40: 2b00 cmp r3, #0 8017a42: d002 beq.n 8017a4a err = ERR_ISCONN; 8017a44: 23f6 movs r3, #246 @ 0xf6 8017a46: 75fb strb r3, [r7, #23] break; 8017a48: e076 b.n 8017b38 setup_tcp(msg->conn); 8017a4a: 693b ldr r3, [r7, #16] 8017a4c: 681b ldr r3, [r3, #0] 8017a4e: 4618 mov r0, r3 8017a50: f7ff fafc bl 801704c err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), 8017a54: 693b ldr r3, [r7, #16] 8017a56: 681b ldr r3, [r3, #0] 8017a58: 6858 ldr r0, [r3, #4] 8017a5a: 693b ldr r3, [r7, #16] 8017a5c: 6899 ldr r1, [r3, #8] 8017a5e: 693b ldr r3, [r7, #16] 8017a60: 899a ldrh r2, [r3, #12] 8017a62: 4b3a ldr r3, [pc, #232] @ (8017b4c ) 8017a64: f004 fb90 bl 801c188 8017a68: 4603 mov r3, r0 8017a6a: 75fb strb r3, [r7, #23] if (err == ERR_OK) { 8017a6c: f997 3017 ldrsb.w r3, [r7, #23] 8017a70: 2b00 cmp r3, #0 8017a72: d161 bne.n 8017b38 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 8017a74: 693b ldr r3, [r7, #16] 8017a76: 681b ldr r3, [r3, #0] 8017a78: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017a7c: f003 0302 and.w r3, r3, #2 8017a80: 2b00 cmp r3, #0 8017a82: bf14 ite ne 8017a84: 2301 movne r3, #1 8017a86: 2300 moveq r3, #0 8017a88: b2db uxtb r3, r3 8017a8a: 73fb strb r3, [r7, #15] msg->conn->state = NETCONN_CONNECT; 8017a8c: 693b ldr r3, [r7, #16] 8017a8e: 681b ldr r3, [r3, #0] 8017a90: 2203 movs r2, #3 8017a92: 705a strb r2, [r3, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 8017a94: 7bfb ldrb r3, [r7, #15] 8017a96: 2b00 cmp r3, #0 8017a98: d00b beq.n 8017ab2 8017a9a: 693b ldr r3, [r7, #16] 8017a9c: 681b ldr r3, [r3, #0] 8017a9e: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8017aa2: 693b ldr r3, [r7, #16] 8017aa4: 681b ldr r3, [r3, #0] 8017aa6: f042 0204 orr.w r2, r2, #4 8017aaa: b2d2 uxtb r2, r2 8017aac: f883 2028 strb.w r2, [r3, #40] @ 0x28 8017ab0: e00a b.n 8017ac8 8017ab2: 693b ldr r3, [r7, #16] 8017ab4: 681b ldr r3, [r3, #0] 8017ab6: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8017aba: 693b ldr r3, [r7, #16] 8017abc: 681b ldr r3, [r3, #0] 8017abe: f022 0204 bic.w r2, r2, #4 8017ac2: b2d2 uxtb r2, r2 8017ac4: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (non_blocking) { 8017ac8: 7bfb ldrb r3, [r7, #15] 8017aca: 2b00 cmp r3, #0 8017acc: d002 beq.n 8017ad4 err = ERR_INPROGRESS; 8017ace: 23fb movs r3, #251 @ 0xfb 8017ad0: 75fb strb r3, [r7, #23] break; 8017ad2: e031 b.n 8017b38 msg->conn->current_msg = msg; 8017ad4: 693b ldr r3, [r7, #16] 8017ad6: 681b ldr r3, [r3, #0] 8017ad8: 693a ldr r2, [r7, #16] 8017ada: 62da str r2, [r3, #44] @ 0x2c LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); 8017adc: 693b ldr r3, [r7, #16] 8017ade: 681b ldr r3, [r3, #0] 8017ae0: 785b ldrb r3, [r3, #1] 8017ae2: 2b03 cmp r3, #3 8017ae4: d006 beq.n 8017af4 8017ae6: 4b1a ldr r3, [pc, #104] @ (8017b50 ) 8017ae8: f44f 62ae mov.w r2, #1392 @ 0x570 8017aec: 4919 ldr r1, [pc, #100] @ (8017b54 ) 8017aee: 481a ldr r0, [pc, #104] @ (8017b58 ) 8017af0: f012 febc bl 802a86c UNLOCK_TCPIP_CORE(); 8017af4: f7f9 fa84 bl 8011000 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8017af8: 693b ldr r3, [r7, #16] 8017afa: 681b ldr r3, [r3, #0] 8017afc: 330c adds r3, #12 8017afe: 2100 movs r1, #0 8017b00: 4618 mov r0, r3 8017b02: f00f fb56 bl 80271b2 LOCK_TCPIP_CORE(); 8017b06: f7f9 fa6b bl 8010fe0 LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); 8017b0a: 693b ldr r3, [r7, #16] 8017b0c: 681b ldr r3, [r3, #0] 8017b0e: 785b ldrb r3, [r3, #1] 8017b10: 2b03 cmp r3, #3 8017b12: d116 bne.n 8017b42 8017b14: 4b0e ldr r3, [pc, #56] @ (8017b50 ) 8017b16: f240 5274 movw r2, #1396 @ 0x574 8017b1a: 490e ldr r1, [pc, #56] @ (8017b54 ) 8017b1c: 480e ldr r0, [pc, #56] @ (8017b58 ) 8017b1e: f012 fea5 bl 802a86c return; 8017b22: e00e b.n 8017b42 #endif /* LWIP_TCP */ default: LWIP_ERROR("Invalid netconn type", 0, do { 8017b24: 4b0a ldr r3, [pc, #40] @ (8017b50 ) 8017b26: f240 527d movw r2, #1405 @ 0x57d 8017b2a: 490c ldr r1, [pc, #48] @ (8017b5c ) 8017b2c: 480a ldr r0, [pc, #40] @ (8017b58 ) 8017b2e: f012 fe9d bl 802a86c 8017b32: 23fa movs r3, #250 @ 0xfa 8017b34: 75fb strb r3, [r7, #23] err = ERR_VAL; } while (0)); break; 8017b36: e000 b.n 8017b3a break; 8017b38: bf00 nop } } msg->err = err; 8017b3a: 693b ldr r3, [r7, #16] 8017b3c: 7dfa ldrb r2, [r7, #23] 8017b3e: 711a strb r2, [r3, #4] 8017b40: e000 b.n 8017b44 return; 8017b42: bf00 nop /* For all other protocols, netconn_connect() calls netconn_apimsg(), so use TCPIP_APIMSG_ACK() here. */ TCPIP_APIMSG_ACK(msg); } 8017b44: 3718 adds r7, #24 8017b46: 46bd mov sp, r7 8017b48: bd80 pop {r7, pc} 8017b4a: bf00 nop 8017b4c: 080178b9 .word 0x080178b9 8017b50: 0802dedc .word 0x0802dedc 8017b54: 0802e29c .word 0x0802e29c 8017b58: 0802df20 .word 0x0802df20 8017b5c: 0802e324 .word 0x0802e324 08017b60 : * * @param m the api_msg pointing to the connection to disconnect */ void lwip_netconn_do_disconnect(void *m) { 8017b60: b580 push {r7, lr} 8017b62: b084 sub sp, #16 8017b64: af00 add r7, sp, #0 8017b66: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017b68: 687b ldr r3, [r7, #4] 8017b6a: 60fb str r3, [r7, #12] #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 8017b6c: 68fb ldr r3, [r7, #12] 8017b6e: 681b ldr r3, [r3, #0] 8017b70: 781b ldrb r3, [r3, #0] 8017b72: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017b76: 2b20 cmp r3, #32 8017b78: d109 bne.n 8017b8e udp_disconnect(msg->conn->pcb.udp); 8017b7a: 68fb ldr r3, [r7, #12] 8017b7c: 681b ldr r3, [r3, #0] 8017b7e: 685b ldr r3, [r3, #4] 8017b80: 4618 mov r0, r3 8017b82: f00a fd97 bl 80226b4 msg->err = ERR_OK; 8017b86: 68fb ldr r3, [r7, #12] 8017b88: 2200 movs r2, #0 8017b8a: 711a strb r2, [r3, #4] #endif /* LWIP_UDP */ { msg->err = ERR_VAL; } TCPIP_APIMSG_ACK(msg); } 8017b8c: e002 b.n 8017b94 msg->err = ERR_VAL; 8017b8e: 68fb ldr r3, [r7, #12] 8017b90: 22fa movs r2, #250 @ 0xfa 8017b92: 711a strb r2, [r3, #4] } 8017b94: bf00 nop 8017b96: 3710 adds r7, #16 8017b98: 46bd mov sp, r7 8017b9a: bd80 pop {r7, pc} 08017b9c : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_send(void *m) { 8017b9c: b580 push {r7, lr} 8017b9e: b084 sub sp, #16 8017ba0: af00 add r7, sp, #0 8017ba2: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017ba4: 687b ldr r3, [r7, #4] 8017ba6: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 8017ba8: 68bb ldr r3, [r7, #8] 8017baa: 681b ldr r3, [r3, #0] 8017bac: 4618 mov r0, r3 8017bae: f7fe fef9 bl 80169a4 8017bb2: 4603 mov r3, r0 8017bb4: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 8017bb6: f997 300f ldrsb.w r3, [r7, #15] 8017bba: 2b00 cmp r3, #0 8017bbc: d134 bne.n 8017c28 if (msg->conn->pcb.tcp != NULL) { 8017bbe: 68bb ldr r3, [r7, #8] 8017bc0: 681b ldr r3, [r3, #0] 8017bc2: 685b ldr r3, [r3, #4] 8017bc4: 2b00 cmp r3, #0 8017bc6: d02d beq.n 8017c24 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8017bc8: 68bb ldr r3, [r7, #8] 8017bca: 681b ldr r3, [r3, #0] 8017bcc: 781b ldrb r3, [r3, #0] 8017bce: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017bd2: 2b20 cmp r3, #32 8017bd4: d123 bne.n 8017c1e err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port, msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); } #else /* LWIP_CHECKSUM_ON_COPY */ if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { 8017bd6: 68bb ldr r3, [r7, #8] 8017bd8: 689b ldr r3, [r3, #8] 8017bda: 689b ldr r3, [r3, #8] 8017bdc: 2b00 cmp r3, #0 8017bde: d10c bne.n 8017bfa err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 8017be0: 68bb ldr r3, [r7, #8] 8017be2: 681b ldr r3, [r3, #0] 8017be4: 685a ldr r2, [r3, #4] 8017be6: 68bb ldr r3, [r7, #8] 8017be8: 689b ldr r3, [r3, #8] 8017bea: 681b ldr r3, [r3, #0] 8017bec: 4619 mov r1, r3 8017bee: 4610 mov r0, r2 8017bf0: f00a fa7a bl 80220e8 8017bf4: 4603 mov r3, r0 8017bf6: 73fb strb r3, [r7, #15] } else { err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); } #endif /* LWIP_CHECKSUM_ON_COPY */ break; 8017bf8: e016 b.n 8017c28 err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 8017bfa: 68bb ldr r3, [r7, #8] 8017bfc: 681b ldr r3, [r3, #0] 8017bfe: 6858 ldr r0, [r3, #4] 8017c00: 68bb ldr r3, [r7, #8] 8017c02: 689b ldr r3, [r3, #8] 8017c04: 6819 ldr r1, [r3, #0] 8017c06: 68bb ldr r3, [r7, #8] 8017c08: 689b ldr r3, [r3, #8] 8017c0a: f103 0208 add.w r2, r3, #8 8017c0e: 68bb ldr r3, [r7, #8] 8017c10: 689b ldr r3, [r3, #8] 8017c12: 899b ldrh r3, [r3, #12] 8017c14: f00a fa9c bl 8022150 8017c18: 4603 mov r3, r0 8017c1a: 73fb strb r3, [r7, #15] break; 8017c1c: e004 b.n 8017c28 #endif /* LWIP_UDP */ default: err = ERR_CONN; 8017c1e: 23f5 movs r3, #245 @ 0xf5 8017c20: 73fb strb r3, [r7, #15] break; 8017c22: e001 b.n 8017c28 } } else { err = ERR_CONN; 8017c24: 23f5 movs r3, #245 @ 0xf5 8017c26: 73fb strb r3, [r7, #15] } } msg->err = err; 8017c28: 68bb ldr r3, [r7, #8] 8017c2a: 7bfa ldrb r2, [r7, #15] 8017c2c: 711a strb r2, [r3, #4] TCPIP_APIMSG_ACK(msg); } 8017c2e: bf00 nop 8017c30: 3710 adds r7, #16 8017c32: 46bd mov sp, r7 8017c34: bd80 pop {r7, pc} 08017c36 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_recv(void *m) { 8017c36: b580 push {r7, lr} 8017c38: b086 sub sp, #24 8017c3a: af00 add r7, sp, #0 8017c3c: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017c3e: 687b ldr r3, [r7, #4] 8017c40: 613b str r3, [r7, #16] msg->err = ERR_OK; 8017c42: 693b ldr r3, [r7, #16] 8017c44: 2200 movs r2, #0 8017c46: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp != NULL) { 8017c48: 693b ldr r3, [r7, #16] 8017c4a: 681b ldr r3, [r3, #0] 8017c4c: 685b ldr r3, [r3, #4] 8017c4e: 2b00 cmp r3, #0 8017c50: d022 beq.n 8017c98 if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8017c52: 693b ldr r3, [r7, #16] 8017c54: 681b ldr r3, [r3, #0] 8017c56: 781b ldrb r3, [r3, #0] 8017c58: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017c5c: 2b10 cmp r3, #16 8017c5e: d11b bne.n 8017c98 size_t remaining = msg->msg.r.len; 8017c60: 693b ldr r3, [r7, #16] 8017c62: 689b ldr r3, [r3, #8] 8017c64: 617b str r3, [r7, #20] do { u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); 8017c66: 697b ldr r3, [r7, #20] 8017c68: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017c6c: d202 bcs.n 8017c74 8017c6e: 697b ldr r3, [r7, #20] 8017c70: b29b uxth r3, r3 8017c72: e001 b.n 8017c78 8017c74: f64f 73ff movw r3, #65535 @ 0xffff 8017c78: 81fb strh r3, [r7, #14] tcp_recved(msg->conn->pcb.tcp, recved); 8017c7a: 693b ldr r3, [r7, #16] 8017c7c: 681b ldr r3, [r3, #0] 8017c7e: 685b ldr r3, [r3, #4] 8017c80: 89fa ldrh r2, [r7, #14] 8017c82: 4611 mov r1, r2 8017c84: 4618 mov r0, r3 8017c86: f004 f9e5 bl 801c054 remaining -= recved; 8017c8a: 89fb ldrh r3, [r7, #14] 8017c8c: 697a ldr r2, [r7, #20] 8017c8e: 1ad3 subs r3, r2, r3 8017c90: 617b str r3, [r7, #20] } while (remaining != 0); 8017c92: 697b ldr r3, [r7, #20] 8017c94: 2b00 cmp r3, #0 8017c96: d1e6 bne.n 8017c66 } } TCPIP_APIMSG_ACK(msg); } 8017c98: bf00 nop 8017c9a: 3718 adds r7, #24 8017c9c: 46bd mov sp, r7 8017c9e: bd80 pop {r7, pc} 08017ca0 : * @return ERR_OK * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished */ static err_t lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM) { 8017ca0: b580 push {r7, lr} 8017ca2: b088 sub sp, #32 8017ca4: af00 add r7, sp, #0 8017ca6: 6078 str r0, [r7, #4] 8017ca8: 460b mov r3, r1 8017caa: 70fb strb r3, [r7, #3] err_t err; const void *dataptr; u16_t len, available; u8_t write_finished = 0; 8017cac: 2300 movs r3, #0 8017cae: 76fb strb r3, [r7, #27] size_t diff; u8_t dontblock; u8_t apiflags; u8_t write_more; LWIP_ASSERT("conn != NULL", conn != NULL); 8017cb0: 687b ldr r3, [r7, #4] 8017cb2: 2b00 cmp r3, #0 8017cb4: d106 bne.n 8017cc4 8017cb6: 4b61 ldr r3, [pc, #388] @ (8017e3c ) 8017cb8: f240 6273 movw r2, #1651 @ 0x673 8017cbc: 4960 ldr r1, [pc, #384] @ (8017e40 ) 8017cbe: 4861 ldr r0, [pc, #388] @ (8017e44 ) 8017cc0: f012 fdd4 bl 802a86c LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); 8017cc4: 687b ldr r3, [r7, #4] 8017cc6: 785b ldrb r3, [r3, #1] 8017cc8: 2b01 cmp r3, #1 8017cca: d006 beq.n 8017cda 8017ccc: 4b5b ldr r3, [pc, #364] @ (8017e3c ) 8017cce: f240 6274 movw r2, #1652 @ 0x674 8017cd2: 495d ldr r1, [pc, #372] @ (8017e48 ) 8017cd4: 485b ldr r0, [pc, #364] @ (8017e44 ) 8017cd6: f012 fdc9 bl 802a86c LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8017cda: 687b ldr r3, [r7, #4] 8017cdc: 6adb ldr r3, [r3, #44] @ 0x2c 8017cde: 2b00 cmp r3, #0 8017ce0: d106 bne.n 8017cf0 8017ce2: 4b56 ldr r3, [pc, #344] @ (8017e3c ) 8017ce4: f240 6275 movw r2, #1653 @ 0x675 8017ce8: 4958 ldr r1, [pc, #352] @ (8017e4c ) 8017cea: 4856 ldr r0, [pc, #344] @ (8017e44 ) 8017cec: f012 fdbe bl 802a86c LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); 8017cf0: 687b ldr r3, [r7, #4] 8017cf2: 685b ldr r3, [r3, #4] 8017cf4: 2b00 cmp r3, #0 8017cf6: d106 bne.n 8017d06 8017cf8: 4b50 ldr r3, [pc, #320] @ (8017e3c ) 8017cfa: f240 6276 movw r2, #1654 @ 0x676 8017cfe: 4954 ldr r1, [pc, #336] @ (8017e50 ) 8017d00: 4850 ldr r0, [pc, #320] @ (8017e44 ) 8017d02: f012 fdb3 bl 802a86c LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", 8017d06: 687b ldr r3, [r7, #4] 8017d08: 6adb ldr r3, [r3, #44] @ 0x2c 8017d0a: 699a ldr r2, [r3, #24] 8017d0c: 687b ldr r3, [r7, #4] 8017d0e: 6adb ldr r3, [r3, #44] @ 0x2c 8017d10: 695b ldr r3, [r3, #20] 8017d12: 429a cmp r2, r3 8017d14: d306 bcc.n 8017d24 8017d16: 4b49 ldr r3, [pc, #292] @ (8017e3c ) 8017d18: f240 6277 movw r2, #1655 @ 0x677 8017d1c: 494d ldr r1, [pc, #308] @ (8017e54 ) 8017d1e: 4849 ldr r0, [pc, #292] @ (8017e44 ) 8017d20: f012 fda4 bl 802a86c conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len); LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0); 8017d24: 687b ldr r3, [r7, #4] 8017d26: 6adb ldr r3, [r3, #44] @ 0x2c 8017d28: 899b ldrh r3, [r3, #12] 8017d2a: 2b00 cmp r3, #0 8017d2c: d106 bne.n 8017d3c 8017d2e: 4b43 ldr r3, [pc, #268] @ (8017e3c ) 8017d30: f240 6279 movw r2, #1657 @ 0x679 8017d34: 4948 ldr r1, [pc, #288] @ (8017e58 ) 8017d36: 4843 ldr r0, [pc, #268] @ (8017e44 ) 8017d38: f012 fd98 bl 802a86c apiflags = conn->current_msg->msg.w.apiflags; 8017d3c: 687b ldr r3, [r7, #4] 8017d3e: 6adb ldr r3, [r3, #44] @ 0x2c 8017d40: 7f1b ldrb r3, [r3, #28] 8017d42: 76bb strb r3, [r7, #26] dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8017d44: 687b ldr r3, [r7, #4] 8017d46: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017d4a: f003 0302 and.w r3, r3, #2 8017d4e: 2b00 cmp r3, #0 8017d50: d104 bne.n 8017d5c 8017d52: 7ebb ldrb r3, [r7, #26] 8017d54: f003 0304 and.w r3, r3, #4 8017d58: 2b00 cmp r3, #0 8017d5a: d001 beq.n 8017d60 8017d5c: 2301 movs r3, #1 8017d5e: e000 b.n 8017d62 8017d60: 2300 movs r3, #0 8017d62: 763b strb r3, [r7, #24] } } else #endif /* LWIP_SO_SNDTIMEO */ { do { dataptr = (const u8_t *)conn->current_msg->msg.w.vector->ptr + conn->current_msg->msg.w.vector_off; 8017d64: 687b ldr r3, [r7, #4] 8017d66: 6adb ldr r3, [r3, #44] @ 0x2c 8017d68: 689b ldr r3, [r3, #8] 8017d6a: 681a ldr r2, [r3, #0] 8017d6c: 687b ldr r3, [r7, #4] 8017d6e: 6adb ldr r3, [r3, #44] @ 0x2c 8017d70: 691b ldr r3, [r3, #16] 8017d72: 4413 add r3, r2 8017d74: 617b str r3, [r7, #20] diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; 8017d76: 687b ldr r3, [r7, #4] 8017d78: 6adb ldr r3, [r3, #44] @ 0x2c 8017d7a: 689b ldr r3, [r3, #8] 8017d7c: 685a ldr r2, [r3, #4] 8017d7e: 687b ldr r3, [r7, #4] 8017d80: 6adb ldr r3, [r3, #44] @ 0x2c 8017d82: 691b ldr r3, [r3, #16] 8017d84: 1ad3 subs r3, r2, r3 8017d86: 613b str r3, [r7, #16] if (diff > 0xffffUL) { /* max_u16_t */ 8017d88: 693b ldr r3, [r7, #16] 8017d8a: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017d8e: d307 bcc.n 8017da0 len = 0xffff; 8017d90: f64f 73ff movw r3, #65535 @ 0xffff 8017d94: 83bb strh r3, [r7, #28] apiflags |= TCP_WRITE_FLAG_MORE; 8017d96: 7ebb ldrb r3, [r7, #26] 8017d98: f043 0302 orr.w r3, r3, #2 8017d9c: 76bb strb r3, [r7, #26] 8017d9e: e001 b.n 8017da4 } else { len = (u16_t)diff; 8017da0: 693b ldr r3, [r7, #16] 8017da2: 83bb strh r3, [r7, #28] } available = tcp_sndbuf(conn->pcb.tcp); 8017da4: 687b ldr r3, [r7, #4] 8017da6: 685b ldr r3, [r3, #4] 8017da8: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8017dac: 81fb strh r3, [r7, #14] if (available < len) { 8017dae: 89fa ldrh r2, [r7, #14] 8017db0: 8bbb ldrh r3, [r7, #28] 8017db2: 429a cmp r2, r3 8017db4: d216 bcs.n 8017de4 /* don't try to write more than sendbuf */ len = available; 8017db6: 89fb ldrh r3, [r7, #14] 8017db8: 83bb strh r3, [r7, #28] if (dontblock) { 8017dba: 7e3b ldrb r3, [r7, #24] 8017dbc: 2b00 cmp r3, #0 8017dbe: d00d beq.n 8017ddc if (!len) { 8017dc0: 8bbb ldrh r3, [r7, #28] 8017dc2: 2b00 cmp r3, #0 8017dc4: d10e bne.n 8017de4 /* set error according to partial write or not */ err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 8017dc6: 687b ldr r3, [r7, #4] 8017dc8: 6adb ldr r3, [r3, #44] @ 0x2c 8017dca: 699b ldr r3, [r3, #24] 8017dcc: 2b00 cmp r3, #0 8017dce: d102 bne.n 8017dd6 8017dd0: f06f 0306 mvn.w r3, #6 8017dd4: e000 b.n 8017dd8 8017dd6: 2300 movs r3, #0 8017dd8: 77fb strb r3, [r7, #31] goto err_mem; 8017dda: e08f b.n 8017efc } } else { apiflags |= TCP_WRITE_FLAG_MORE; 8017ddc: 7ebb ldrb r3, [r7, #26] 8017dde: f043 0302 orr.w r3, r3, #2 8017de2: 76bb strb r3, [r7, #26] } } LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", 8017de4: 687b ldr r3, [r7, #4] 8017de6: 6adb ldr r3, [r3, #44] @ 0x2c 8017de8: 691a ldr r2, [r3, #16] 8017dea: 8bbb ldrh r3, [r7, #28] 8017dec: 441a add r2, r3 8017dee: 687b ldr r3, [r7, #4] 8017df0: 6adb ldr r3, [r3, #44] @ 0x2c 8017df2: 689b ldr r3, [r3, #8] 8017df4: 685b ldr r3, [r3, #4] 8017df6: 429a cmp r2, r3 8017df8: d906 bls.n 8017e08 8017dfa: 4b10 ldr r3, [pc, #64] @ (8017e3c ) 8017dfc: f240 62a3 movw r2, #1699 @ 0x6a3 8017e00: 4916 ldr r1, [pc, #88] @ (8017e5c ) 8017e02: 4810 ldr r0, [pc, #64] @ (8017e44 ) 8017e04: f012 fd32 bl 802a86c ((conn->current_msg->msg.w.vector_off + len) <= conn->current_msg->msg.w.vector->len)); /* we should loop around for more sending in the following cases: 1) We couldn't finish the current vector because of 16-bit size limitations. tcp_write() and tcp_sndbuf() both are limited to 16-bit sizes 2) We are sending the remainder of the current vector and have more */ if ((len == 0xffff && diff > 0xffffUL) || 8017e08: 8bbb ldrh r3, [r7, #28] 8017e0a: f64f 72ff movw r2, #65535 @ 0xffff 8017e0e: 4293 cmp r3, r2 8017e10: d103 bne.n 8017e1a 8017e12: 693b ldr r3, [r7, #16] 8017e14: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017e18: d209 bcs.n 8017e2e (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8017e1a: 693b ldr r3, [r7, #16] 8017e1c: b29b uxth r3, r3 if ((len == 0xffff && diff > 0xffffUL) || 8017e1e: 8bba ldrh r2, [r7, #28] 8017e20: 429a cmp r2, r3 8017e22: d11d bne.n 8017e60 (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8017e24: 687b ldr r3, [r7, #4] 8017e26: 6adb ldr r3, [r3, #44] @ 0x2c 8017e28: 899b ldrh r3, [r3, #12] 8017e2a: 2b01 cmp r3, #1 8017e2c: d918 bls.n 8017e60 write_more = 1; 8017e2e: 2301 movs r3, #1 8017e30: 767b strb r3, [r7, #25] apiflags |= TCP_WRITE_FLAG_MORE; 8017e32: 7ebb ldrb r3, [r7, #26] 8017e34: f043 0302 orr.w r3, r3, #2 8017e38: 76bb strb r3, [r7, #26] 8017e3a: e013 b.n 8017e64 8017e3c: 0802dedc .word 0x0802dedc 8017e40: 0802e034 .word 0x0802e034 8017e44: 0802df20 .word 0x0802df20 8017e48: 0802e33c .word 0x0802e33c 8017e4c: 0802e044 .word 0x0802e044 8017e50: 0802e35c .word 0x0802e35c 8017e54: 0802e374 .word 0x0802e374 8017e58: 0802e3b4 .word 0x0802e3b4 8017e5c: 0802e3dc .word 0x0802e3dc } else { write_more = 0; 8017e60: 2300 movs r3, #0 8017e62: 767b strb r3, [r7, #25] } err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 8017e64: 687b ldr r3, [r7, #4] 8017e66: 6858 ldr r0, [r3, #4] 8017e68: 7ebb ldrb r3, [r7, #26] 8017e6a: 8bba ldrh r2, [r7, #28] 8017e6c: 6979 ldr r1, [r7, #20] 8017e6e: f008 f827 bl 801fec0 8017e72: 4603 mov r3, r0 8017e74: 77fb strb r3, [r7, #31] if (err == ERR_OK) { 8017e76: f997 301f ldrsb.w r3, [r7, #31] 8017e7a: 2b00 cmp r3, #0 8017e7c: d12c bne.n 8017ed8 conn->current_msg->msg.w.offset += len; 8017e7e: 687b ldr r3, [r7, #4] 8017e80: 6adb ldr r3, [r3, #44] @ 0x2c 8017e82: 6999 ldr r1, [r3, #24] 8017e84: 8bba ldrh r2, [r7, #28] 8017e86: 687b ldr r3, [r7, #4] 8017e88: 6adb ldr r3, [r3, #44] @ 0x2c 8017e8a: 440a add r2, r1 8017e8c: 619a str r2, [r3, #24] conn->current_msg->msg.w.vector_off += len; 8017e8e: 687b ldr r3, [r7, #4] 8017e90: 6adb ldr r3, [r3, #44] @ 0x2c 8017e92: 6919 ldr r1, [r3, #16] 8017e94: 8bba ldrh r2, [r7, #28] 8017e96: 687b ldr r3, [r7, #4] 8017e98: 6adb ldr r3, [r3, #44] @ 0x2c 8017e9a: 440a add r2, r1 8017e9c: 611a str r2, [r3, #16] /* check if current vector is finished */ if (conn->current_msg->msg.w.vector_off == conn->current_msg->msg.w.vector->len) { 8017e9e: 687b ldr r3, [r7, #4] 8017ea0: 6adb ldr r3, [r3, #44] @ 0x2c 8017ea2: 691a ldr r2, [r3, #16] 8017ea4: 687b ldr r3, [r7, #4] 8017ea6: 6adb ldr r3, [r3, #44] @ 0x2c 8017ea8: 689b ldr r3, [r3, #8] 8017eaa: 685b ldr r3, [r3, #4] 8017eac: 429a cmp r2, r3 8017eae: d113 bne.n 8017ed8 conn->current_msg->msg.w.vector_cnt--; 8017eb0: 687b ldr r3, [r7, #4] 8017eb2: 6adb ldr r3, [r3, #44] @ 0x2c 8017eb4: 899a ldrh r2, [r3, #12] 8017eb6: 3a01 subs r2, #1 8017eb8: b292 uxth r2, r2 8017eba: 819a strh r2, [r3, #12] /* if we have additional vectors, move on to them */ if (conn->current_msg->msg.w.vector_cnt > 0) { 8017ebc: 687b ldr r3, [r7, #4] 8017ebe: 6adb ldr r3, [r3, #44] @ 0x2c 8017ec0: 899b ldrh r3, [r3, #12] 8017ec2: 2b00 cmp r3, #0 8017ec4: d008 beq.n 8017ed8 conn->current_msg->msg.w.vector++; 8017ec6: 687b ldr r3, [r7, #4] 8017ec8: 6adb ldr r3, [r3, #44] @ 0x2c 8017eca: 689a ldr r2, [r3, #8] 8017ecc: 3208 adds r2, #8 8017ece: 609a str r2, [r3, #8] conn->current_msg->msg.w.vector_off = 0; 8017ed0: 687b ldr r3, [r7, #4] 8017ed2: 6adb ldr r3, [r3, #44] @ 0x2c 8017ed4: 2200 movs r2, #0 8017ed6: 611a str r2, [r3, #16] } } } } while (write_more && err == ERR_OK); 8017ed8: 7e7b ldrb r3, [r7, #25] 8017eda: 2b00 cmp r3, #0 8017edc: d004 beq.n 8017ee8 8017ede: f997 301f ldrsb.w r3, [r7, #31] 8017ee2: 2b00 cmp r3, #0 8017ee4: f43f af3e beq.w 8017d64 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 8017ee8: f997 301f ldrsb.w r3, [r7, #31] 8017eec: 2b00 cmp r3, #0 8017eee: d004 beq.n 8017efa 8017ef0: f997 301f ldrsb.w r3, [r7, #31] 8017ef4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017ef8: d137 bne.n 8017f6a err_mem: 8017efa: bf00 nop if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) { 8017efc: 7e3b ldrb r3, [r7, #24] 8017efe: 2b00 cmp r3, #0 8017f00: d01b beq.n 8017f3a 8017f02: 687b ldr r3, [r7, #4] 8017f04: 6adb ldr r3, [r3, #44] @ 0x2c 8017f06: 699a ldr r2, [r3, #24] 8017f08: 687b ldr r3, [r7, #4] 8017f0a: 6adb ldr r3, [r3, #44] @ 0x2c 8017f0c: 695b ldr r3, [r3, #20] 8017f0e: 429a cmp r2, r3 8017f10: d213 bcs.n 8017f3a /* non-blocking write did not write everything: mark the pcb non-writable and let poll_tcp check writable space to mark the pcb writable again */ API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); 8017f12: 687b ldr r3, [r7, #4] 8017f14: 6b1b ldr r3, [r3, #48] @ 0x30 8017f16: 2b00 cmp r3, #0 8017f18: d005 beq.n 8017f26 8017f1a: 687b ldr r3, [r7, #4] 8017f1c: 6b1b ldr r3, [r3, #48] @ 0x30 8017f1e: 2200 movs r2, #0 8017f20: 2103 movs r1, #3 8017f22: 6878 ldr r0, [r7, #4] 8017f24: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 8017f26: 687b ldr r3, [r7, #4] 8017f28: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017f2c: f043 0310 orr.w r3, r3, #16 8017f30: b2da uxtb r2, r3 8017f32: 687b ldr r3, [r7, #4] 8017f34: f883 2028 strb.w r2, [r3, #40] @ 0x28 8017f38: e017 b.n 8017f6a } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 8017f3a: 687b ldr r3, [r7, #4] 8017f3c: 685b ldr r3, [r3, #4] 8017f3e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8017f42: f640 3269 movw r2, #2921 @ 0xb69 8017f46: 4293 cmp r3, r2 8017f48: d905 bls.n 8017f56 (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { 8017f4a: 687b ldr r3, [r7, #4] 8017f4c: 685b ldr r3, [r3, #4] 8017f4e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 8017f52: 2b07 cmp r3, #7 8017f54: d909 bls.n 8017f6a /* The queued byte- or pbuf-count exceeds the configured low-water limit, let select mark this pcb as non-writable. */ API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); 8017f56: 687b ldr r3, [r7, #4] 8017f58: 6b1b ldr r3, [r3, #48] @ 0x30 8017f5a: 2b00 cmp r3, #0 8017f5c: d005 beq.n 8017f6a 8017f5e: 687b ldr r3, [r7, #4] 8017f60: 6b1b ldr r3, [r3, #48] @ 0x30 8017f62: 2200 movs r2, #0 8017f64: 2103 movs r1, #3 8017f66: 6878 ldr r0, [r7, #4] 8017f68: 4798 blx r3 } } if (err == ERR_OK) { 8017f6a: f997 301f ldrsb.w r3, [r7, #31] 8017f6e: 2b00 cmp r3, #0 8017f70: d11d bne.n 8017fae err_t out_err; if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) { 8017f72: 687b ldr r3, [r7, #4] 8017f74: 6adb ldr r3, [r3, #44] @ 0x2c 8017f76: 699a ldr r2, [r3, #24] 8017f78: 687b ldr r3, [r7, #4] 8017f7a: 6adb ldr r3, [r3, #44] @ 0x2c 8017f7c: 695b ldr r3, [r3, #20] 8017f7e: 429a cmp r2, r3 8017f80: d002 beq.n 8017f88 8017f82: 7e3b ldrb r3, [r7, #24] 8017f84: 2b00 cmp r3, #0 8017f86: d001 beq.n 8017f8c /* return sent length (caller reads length from msg.w.offset) */ write_finished = 1; 8017f88: 2301 movs r3, #1 8017f8a: 76fb strb r3, [r7, #27] } out_err = tcp_output(conn->pcb.tcp); 8017f8c: 687b ldr r3, [r7, #4] 8017f8e: 685b ldr r3, [r3, #4] 8017f90: 4618 mov r0, r3 8017f92: f008 fddf bl 8020b54 8017f96: 4603 mov r3, r0 8017f98: 733b strb r3, [r7, #12] if (out_err == ERR_RTE) { 8017f9a: f997 300c ldrsb.w r3, [r7, #12] 8017f9e: f113 0f04 cmn.w r3, #4 8017fa2: d12c bne.n 8017ffe /* If tcp_output fails because no route is found, don't try writing any more but return the error to the application thread. */ err = out_err; 8017fa4: 7b3b ldrb r3, [r7, #12] 8017fa6: 77fb strb r3, [r7, #31] write_finished = 1; 8017fa8: 2301 movs r3, #1 8017faa: 76fb strb r3, [r7, #27] 8017fac: e027 b.n 8017ffe } } else if (err == ERR_MEM) { 8017fae: f997 301f ldrsb.w r3, [r7, #31] 8017fb2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017fb6: d120 bne.n 8017ffa For blocking sockets, we do NOT return to the application thread, since ERR_MEM is only a temporary error! Non-blocking will remain non-writable until sent_tcp/poll_tcp is called */ /* tcp_write returned ERR_MEM, try tcp_output anyway */ err_t out_err = tcp_output(conn->pcb.tcp); 8017fb8: 687b ldr r3, [r7, #4] 8017fba: 685b ldr r3, [r3, #4] 8017fbc: 4618 mov r0, r3 8017fbe: f008 fdc9 bl 8020b54 8017fc2: 4603 mov r3, r0 8017fc4: 737b strb r3, [r7, #13] if (out_err == ERR_RTE) { 8017fc6: f997 300d ldrsb.w r3, [r7, #13] 8017fca: f113 0f04 cmn.w r3, #4 8017fce: d104 bne.n 8017fda /* If tcp_output fails because no route is found, don't try writing any more but return the error to the application thread. */ err = out_err; 8017fd0: 7b7b ldrb r3, [r7, #13] 8017fd2: 77fb strb r3, [r7, #31] write_finished = 1; 8017fd4: 2301 movs r3, #1 8017fd6: 76fb strb r3, [r7, #27] 8017fd8: e011 b.n 8017ffe } else if (dontblock) { 8017fda: 7e3b ldrb r3, [r7, #24] 8017fdc: 2b00 cmp r3, #0 8017fde: d00e beq.n 8017ffe /* non-blocking write is done on ERR_MEM, set error according to partial write or not */ err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 8017fe0: 687b ldr r3, [r7, #4] 8017fe2: 6adb ldr r3, [r3, #44] @ 0x2c 8017fe4: 699b ldr r3, [r3, #24] 8017fe6: 2b00 cmp r3, #0 8017fe8: d102 bne.n 8017ff0 8017fea: f06f 0306 mvn.w r3, #6 8017fee: e000 b.n 8017ff2 8017ff0: 2300 movs r3, #0 8017ff2: 77fb strb r3, [r7, #31] write_finished = 1; 8017ff4: 2301 movs r3, #1 8017ff6: 76fb strb r3, [r7, #27] 8017ff8: e001 b.n 8017ffe } } else { /* On errors != ERR_MEM, we don't try writing any more but return the error to the application thread. */ write_finished = 1; 8017ffa: 2301 movs r3, #1 8017ffc: 76fb strb r3, [r7, #27] } } if (write_finished) { 8017ffe: 7efb ldrb r3, [r7, #27] 8018000: 2b00 cmp r3, #0 8018002: d015 beq.n 8018030 /* everything was written: set back connection state and back to application task */ sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8018004: 687b ldr r3, [r7, #4] 8018006: 6adb ldr r3, [r3, #44] @ 0x2c 8018008: 681b ldr r3, [r3, #0] 801800a: 330c adds r3, #12 801800c: 60bb str r3, [r7, #8] conn->current_msg->err = err; 801800e: 687b ldr r3, [r7, #4] 8018010: 6adb ldr r3, [r3, #44] @ 0x2c 8018012: 7ffa ldrb r2, [r7, #31] 8018014: 711a strb r2, [r3, #4] conn->current_msg = NULL; 8018016: 687b ldr r3, [r7, #4] 8018018: 2200 movs r2, #0 801801a: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 801801c: 687b ldr r3, [r7, #4] 801801e: 2200 movs r2, #0 8018020: 705a strb r2, [r3, #1] #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8018022: 78fb ldrb r3, [r7, #3] 8018024: 2b00 cmp r3, #0 8018026: d006 beq.n 8018036 #endif { sys_sem_signal(op_completed_sem); 8018028: 68b8 ldr r0, [r7, #8] 801802a: f00f f8f3 bl 8027214 801802e: e002 b.n 8018036 } } #if LWIP_TCPIP_CORE_LOCKING else { return ERR_MEM; 8018030: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018034: e000 b.n 8018038 } #endif return ERR_OK; 8018036: 2300 movs r3, #0 } 8018038: 4618 mov r0, r3 801803a: 3720 adds r7, #32 801803c: 46bd mov sp, r7 801803e: bd80 pop {r7, pc} 08018040 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_write(void *m) { 8018040: b580 push {r7, lr} 8018042: b084 sub sp, #16 8018044: af00 add r7, sp, #0 8018046: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018048: 687b ldr r3, [r7, #4] 801804a: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 801804c: 68bb ldr r3, [r7, #8] 801804e: 681b ldr r3, [r3, #0] 8018050: 4618 mov r0, r3 8018052: f7fe fca7 bl 80169a4 8018056: 4603 mov r3, r0 8018058: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801805a: f997 300f ldrsb.w r3, [r7, #15] 801805e: 2b00 cmp r3, #0 8018060: d164 bne.n 801812c if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8018062: 68bb ldr r3, [r7, #8] 8018064: 681b ldr r3, [r3, #0] 8018066: 781b ldrb r3, [r3, #0] 8018068: f003 03f0 and.w r3, r3, #240 @ 0xf0 801806c: 2b10 cmp r3, #16 801806e: d15b bne.n 8018128 #if LWIP_TCP if (msg->conn->state != NETCONN_NONE) { 8018070: 68bb ldr r3, [r7, #8] 8018072: 681b ldr r3, [r3, #0] 8018074: 785b ldrb r3, [r3, #1] 8018076: 2b00 cmp r3, #0 8018078: d002 beq.n 8018080 /* netconn is connecting, closing or in blocking write */ err = ERR_INPROGRESS; 801807a: 23fb movs r3, #251 @ 0xfb 801807c: 73fb strb r3, [r7, #15] 801807e: e055 b.n 801812c } else if (msg->conn->pcb.tcp != NULL) { 8018080: 68bb ldr r3, [r7, #8] 8018082: 681b ldr r3, [r3, #0] 8018084: 685b ldr r3, [r3, #4] 8018086: 2b00 cmp r3, #0 8018088: d04b beq.n 8018122 msg->conn->state = NETCONN_WRITE; 801808a: 68bb ldr r3, [r7, #8] 801808c: 681b ldr r3, [r3, #0] 801808e: 2201 movs r2, #1 8018090: 705a strb r2, [r3, #1] /* set all the variables used by lwip_netconn_do_writemore */ LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8018092: 68bb ldr r3, [r7, #8] 8018094: 681b ldr r3, [r3, #0] 8018096: 6adb ldr r3, [r3, #44] @ 0x2c 8018098: 2b00 cmp r3, #0 801809a: d006 beq.n 80180aa 801809c: 4b27 ldr r3, [pc, #156] @ (801813c ) 801809e: f240 7223 movw r2, #1827 @ 0x723 80180a2: 4927 ldr r1, [pc, #156] @ (8018140 ) 80180a4: 4827 ldr r0, [pc, #156] @ (8018144 ) 80180a6: f012 fbe1 bl 802a86c LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); 80180aa: 68bb ldr r3, [r7, #8] 80180ac: 695b ldr r3, [r3, #20] 80180ae: 2b00 cmp r3, #0 80180b0: d106 bne.n 80180c0 80180b2: 4b22 ldr r3, [pc, #136] @ (801813c ) 80180b4: f240 7224 movw r2, #1828 @ 0x724 80180b8: 4923 ldr r1, [pc, #140] @ (8018148 ) 80180ba: 4822 ldr r0, [pc, #136] @ (8018144 ) 80180bc: f012 fbd6 bl 802a86c msg->conn->current_msg = msg; 80180c0: 68bb ldr r3, [r7, #8] 80180c2: 681b ldr r3, [r3, #0] 80180c4: 68ba ldr r2, [r7, #8] 80180c6: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { 80180c8: 68bb ldr r3, [r7, #8] 80180ca: 681b ldr r3, [r3, #0] 80180cc: 2100 movs r1, #0 80180ce: 4618 mov r0, r3 80180d0: f7ff fde6 bl 8017ca0 80180d4: 4603 mov r3, r0 80180d6: 2b00 cmp r3, #0 80180d8: d02c beq.n 8018134 LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); 80180da: 68bb ldr r3, [r7, #8] 80180dc: 681b ldr r3, [r3, #0] 80180de: 785b ldrb r3, [r3, #1] 80180e0: 2b01 cmp r3, #1 80180e2: d006 beq.n 80180f2 80180e4: 4b15 ldr r3, [pc, #84] @ (801813c ) 80180e6: f44f 62e5 mov.w r2, #1832 @ 0x728 80180ea: 4918 ldr r1, [pc, #96] @ (801814c ) 80180ec: 4815 ldr r0, [pc, #84] @ (8018144 ) 80180ee: f012 fbbd bl 802a86c UNLOCK_TCPIP_CORE(); 80180f2: f7f8 ff85 bl 8011000 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 80180f6: 68bb ldr r3, [r7, #8] 80180f8: 681b ldr r3, [r3, #0] 80180fa: 330c adds r3, #12 80180fc: 2100 movs r1, #0 80180fe: 4618 mov r0, r3 8018100: f00f f857 bl 80271b2 LOCK_TCPIP_CORE(); 8018104: f7f8 ff6c bl 8010fe0 LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); 8018108: 68bb ldr r3, [r7, #8] 801810a: 681b ldr r3, [r3, #0] 801810c: 785b ldrb r3, [r3, #1] 801810e: 2b01 cmp r3, #1 8018110: d110 bne.n 8018134 8018112: 4b0a ldr r3, [pc, #40] @ (801813c ) 8018114: f240 722c movw r2, #1836 @ 0x72c 8018118: 490c ldr r1, [pc, #48] @ (801814c ) 801811a: 480a ldr r0, [pc, #40] @ (8018144 ) 801811c: f012 fba6 bl 802a86c #else /* LWIP_TCPIP_CORE_LOCKING */ lwip_netconn_do_writemore(msg->conn); #endif /* LWIP_TCPIP_CORE_LOCKING */ /* for both cases: if lwip_netconn_do_writemore was called, don't ACK the APIMSG since lwip_netconn_do_writemore ACKs it! */ return; 8018120: e008 b.n 8018134 } else { err = ERR_CONN; 8018122: 23f5 movs r3, #245 @ 0xf5 8018124: 73fb strb r3, [r7, #15] 8018126: e001 b.n 801812c #else /* LWIP_TCP */ err = ERR_VAL; #endif /* LWIP_TCP */ #if (LWIP_UDP || LWIP_RAW) } else { err = ERR_VAL; 8018128: 23fa movs r3, #250 @ 0xfa 801812a: 73fb strb r3, [r7, #15] #endif /* (LWIP_UDP || LWIP_RAW) */ } } msg->err = err; 801812c: 68bb ldr r3, [r7, #8] 801812e: 7bfa ldrb r2, [r7, #15] 8018130: 711a strb r2, [r3, #4] 8018132: e000 b.n 8018136 return; 8018134: bf00 nop TCPIP_APIMSG_ACK(msg); } 8018136: 3710 adds r7, #16 8018138: 46bd mov sp, r7 801813a: bd80 pop {r7, pc} 801813c: 0802dedc .word 0x0802dedc 8018140: 0802e280 .word 0x0802e280 8018144: 0802df20 .word 0x0802df20 8018148: 0802e408 .word 0x0802e408 801814c: 0802e29c .word 0x0802e29c 08018150 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_getaddr(void *m) { 8018150: b580 push {r7, lr} 8018152: b084 sub sp, #16 8018154: af00 add r7, sp, #0 8018156: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018158: 687b ldr r3, [r7, #4] 801815a: 60fb str r3, [r7, #12] if (msg->conn->pcb.ip != NULL) { 801815c: 68fb ldr r3, [r7, #12] 801815e: 681b ldr r3, [r3, #0] 8018160: 685b ldr r3, [r3, #4] 8018162: 2b00 cmp r3, #0 8018164: d06b beq.n 801823e if (msg->msg.ad.local) { 8018166: 68fb ldr r3, [r7, #12] 8018168: 7c1b ldrb r3, [r3, #16] 801816a: 2b00 cmp r3, #0 801816c: d007 beq.n 801817e ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 801816e: 68fb ldr r3, [r7, #12] 8018170: 681b ldr r3, [r3, #0] 8018172: 685a ldr r2, [r3, #4] 8018174: 68fb ldr r3, [r7, #12] 8018176: 689b ldr r3, [r3, #8] 8018178: 6812 ldr r2, [r2, #0] 801817a: 601a str r2, [r3, #0] 801817c: e006 b.n 801818c msg->conn->pcb.ip->local_ip); } else { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 801817e: 68fb ldr r3, [r7, #12] 8018180: 681b ldr r3, [r3, #0] 8018182: 685a ldr r2, [r3, #4] 8018184: 68fb ldr r3, [r7, #12] 8018186: 689b ldr r3, [r3, #8] 8018188: 6852 ldr r2, [r2, #4] 801818a: 601a str r2, [r3, #0] msg->conn->pcb.ip->remote_ip); } msg->err = ERR_OK; 801818c: 68fb ldr r3, [r7, #12] 801818e: 2200 movs r2, #0 8018190: 711a strb r2, [r3, #4] switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8018192: 68fb ldr r3, [r7, #12] 8018194: 681b ldr r3, [r3, #0] 8018196: 781b ldrb r3, [r3, #0] 8018198: f003 03f0 and.w r3, r3, #240 @ 0xf0 801819c: 2b10 cmp r3, #16 801819e: d021 beq.n 80181e4 80181a0: 2b20 cmp r3, #32 80181a2: d144 bne.n 801822e } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: if (msg->msg.ad.local) { 80181a4: 68fb ldr r3, [r7, #12] 80181a6: 7c1b ldrb r3, [r3, #16] 80181a8: 2b00 cmp r3, #0 80181aa: d007 beq.n 80181bc API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; 80181ac: 68fb ldr r3, [r7, #12] 80181ae: 681b ldr r3, [r3, #0] 80181b0: 685a ldr r2, [r3, #4] 80181b2: 68fb ldr r3, [r7, #12] 80181b4: 68db ldr r3, [r3, #12] 80181b6: 8a52 ldrh r2, [r2, #18] 80181b8: 801a strh r2, [r3, #0] msg->err = ERR_CONN; } else { API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; } } break; 80181ba: e044 b.n 8018246 if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { 80181bc: 68fb ldr r3, [r7, #12] 80181be: 681b ldr r3, [r3, #0] 80181c0: 685b ldr r3, [r3, #4] 80181c2: 7c1b ldrb r3, [r3, #16] 80181c4: f003 0304 and.w r3, r3, #4 80181c8: 2b00 cmp r3, #0 80181ca: d103 bne.n 80181d4 msg->err = ERR_CONN; 80181cc: 68fb ldr r3, [r7, #12] 80181ce: 22f5 movs r2, #245 @ 0xf5 80181d0: 711a strb r2, [r3, #4] break; 80181d2: e038 b.n 8018246 API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; 80181d4: 68fb ldr r3, [r7, #12] 80181d6: 681b ldr r3, [r3, #0] 80181d8: 685a ldr r2, [r3, #4] 80181da: 68fb ldr r3, [r7, #12] 80181dc: 68db ldr r3, [r3, #12] 80181de: 8a92 ldrh r2, [r2, #20] 80181e0: 801a strh r2, [r3, #0] break; 80181e2: e030 b.n 8018246 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: if ((msg->msg.ad.local == 0) && 80181e4: 68fb ldr r3, [r7, #12] 80181e6: 7c1b ldrb r3, [r3, #16] 80181e8: 2b00 cmp r3, #0 80181ea: d10f bne.n 801820c ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 80181ec: 68fb ldr r3, [r7, #12] 80181ee: 681b ldr r3, [r3, #0] 80181f0: 685b ldr r3, [r3, #4] 80181f2: 7d1b ldrb r3, [r3, #20] if ((msg->msg.ad.local == 0) && 80181f4: 2b00 cmp r3, #0 80181f6: d005 beq.n 8018204 ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 80181f8: 68fb ldr r3, [r7, #12] 80181fa: 681b ldr r3, [r3, #0] 80181fc: 685b ldr r3, [r3, #4] 80181fe: 7d1b ldrb r3, [r3, #20] 8018200: 2b01 cmp r3, #1 8018202: d103 bne.n 801820c /* pcb is not connected and remote name is requested */ msg->err = ERR_CONN; 8018204: 68fb ldr r3, [r7, #12] 8018206: 22f5 movs r2, #245 @ 0xf5 8018208: 711a strb r2, [r3, #4] } else { API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); } break; 801820a: e01c b.n 8018246 API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); 801820c: 68fb ldr r3, [r7, #12] 801820e: 7c1b ldrb r3, [r3, #16] 8018210: 2b00 cmp r3, #0 8018212: d004 beq.n 801821e 8018214: 68fb ldr r3, [r7, #12] 8018216: 681b ldr r3, [r3, #0] 8018218: 685b ldr r3, [r3, #4] 801821a: 8adb ldrh r3, [r3, #22] 801821c: e003 b.n 8018226 801821e: 68fb ldr r3, [r7, #12] 8018220: 681b ldr r3, [r3, #0] 8018222: 685b ldr r3, [r3, #4] 8018224: 8b1b ldrh r3, [r3, #24] 8018226: 68fa ldr r2, [r7, #12] 8018228: 68d2 ldr r2, [r2, #12] 801822a: 8013 strh r3, [r2, #0] break; 801822c: e00b b.n 8018246 #endif /* LWIP_TCP */ default: LWIP_ASSERT("invalid netconn_type", 0); 801822e: 4b08 ldr r3, [pc, #32] @ (8018250 ) 8018230: f240 727d movw r2, #1917 @ 0x77d 8018234: 4907 ldr r1, [pc, #28] @ (8018254 ) 8018236: 4808 ldr r0, [pc, #32] @ (8018258 ) 8018238: f012 fb18 bl 802a86c break; 801823c: e003 b.n 8018246 } } else { msg->err = ERR_CONN; 801823e: 68fb ldr r3, [r7, #12] 8018240: 22f5 movs r2, #245 @ 0xf5 8018242: 711a strb r2, [r3, #4] } TCPIP_APIMSG_ACK(msg); } 8018244: bf00 nop 8018246: bf00 nop 8018248: 3710 adds r7, #16 801824a: 46bd mov sp, r7 801824c: bd80 pop {r7, pc} 801824e: bf00 nop 8018250: 0802dedc .word 0x0802dedc 8018254: 0802e41c .word 0x0802e41c 8018258: 0802df20 .word 0x0802df20 0801825c : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_close(void *m) { 801825c: b580 push {r7, lr} 801825e: b084 sub sp, #16 8018260: af00 add r7, sp, #0 8018262: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018264: 687b ldr r3, [r7, #4] 8018266: 60fb str r3, [r7, #12] #if LWIP_TCP enum netconn_state state = msg->conn->state; 8018268: 68fb ldr r3, [r7, #12] 801826a: 681b ldr r3, [r3, #0] 801826c: 785b ldrb r3, [r3, #1] 801826e: 72fb strb r3, [r7, #11] /* First check if this is a TCP netconn and if it is in a correct state (LISTEN doesn't support half shutdown) */ if ((msg->conn->pcb.tcp != NULL) && 8018270: 68fb ldr r3, [r7, #12] 8018272: 681b ldr r3, [r3, #0] 8018274: 685b ldr r3, [r3, #4] 8018276: 2b00 cmp r3, #0 8018278: d067 beq.n 801834a (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 801827a: 68fb ldr r3, [r7, #12] 801827c: 681b ldr r3, [r3, #0] 801827e: 781b ldrb r3, [r3, #0] 8018280: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((msg->conn->pcb.tcp != NULL) && 8018284: 2b10 cmp r3, #16 8018286: d160 bne.n 801834a ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 8018288: 68fb ldr r3, [r7, #12] 801828a: 7a1b ldrb r3, [r3, #8] (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 801828c: 2b03 cmp r3, #3 801828e: d002 beq.n 8018296 ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 8018290: 7afb ldrb r3, [r7, #11] 8018292: 2b02 cmp r3, #2 8018294: d059 beq.n 801834a /* Check if we are in a connected state */ if (state == NETCONN_CONNECT) { 8018296: 7afb ldrb r3, [r7, #11] 8018298: 2b03 cmp r3, #3 801829a: d103 bne.n 80182a4 /* TCP connect in progress: cannot shutdown */ msg->err = ERR_CONN; 801829c: 68fb ldr r3, [r7, #12] 801829e: 22f5 movs r2, #245 @ 0xf5 80182a0: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 80182a2: e057 b.n 8018354 } else if (state == NETCONN_WRITE) { 80182a4: 7afb ldrb r3, [r7, #11] 80182a6: 2b01 cmp r3, #1 80182a8: d103 bne.n 80182b2 msg->err = tcp_shutdown(msg->conn->pcb.tcp, 1, 0); } } if (state == NETCONN_NONE) { #else /* LWIP_NETCONN_FULLDUPLEX */ msg->err = ERR_INPROGRESS; 80182aa: 68fb ldr r3, [r7, #12] 80182ac: 22fb movs r2, #251 @ 0xfb 80182ae: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 80182b0: e050 b.n 8018354 } else { #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->msg.sd.shut & NETCONN_SHUT_RD) { 80182b2: 68fb ldr r3, [r7, #12] 80182b4: 7a1b ldrb r3, [r3, #8] 80182b6: f003 0301 and.w r3, r3, #1 80182ba: 2b00 cmp r3, #0 80182bc: d004 beq.n 80182c8 #if LWIP_NETCONN_FULLDUPLEX /* Mark mboxes invalid */ netconn_mark_mbox_invalid(msg->conn); #else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); 80182be: 68fb ldr r3, [r7, #12] 80182c0: 681b ldr r3, [r3, #0] 80182c2: 4618 mov r0, r3 80182c4: f7ff f82e bl 8017324 #endif /* LWIP_NETCONN_FULLDUPLEX */ } LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 80182c8: 68fb ldr r3, [r7, #12] 80182ca: 681b ldr r3, [r3, #0] 80182cc: 6adb ldr r3, [r3, #44] @ 0x2c 80182ce: 2b00 cmp r3, #0 80182d0: d006 beq.n 80182e0 80182d2: 4b22 ldr r3, [pc, #136] @ (801835c ) 80182d4: f240 72bd movw r2, #1981 @ 0x7bd 80182d8: 4921 ldr r1, [pc, #132] @ (8018360 ) 80182da: 4822 ldr r0, [pc, #136] @ (8018364 ) 80182dc: f012 fac6 bl 802a86c msg->conn->state = NETCONN_CLOSE; 80182e0: 68fb ldr r3, [r7, #12] 80182e2: 681b ldr r3, [r3, #0] 80182e4: 2204 movs r2, #4 80182e6: 705a strb r2, [r3, #1] msg->conn->current_msg = msg; 80182e8: 68fb ldr r3, [r7, #12] 80182ea: 681b ldr r3, [r3, #0] 80182ec: 68fa ldr r2, [r7, #12] 80182ee: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 80182f0: 68fb ldr r3, [r7, #12] 80182f2: 681b ldr r3, [r3, #0] 80182f4: 2100 movs r1, #0 80182f6: 4618 mov r0, r3 80182f8: f7ff f892 bl 8017420 80182fc: 4603 mov r3, r0 80182fe: 2b00 cmp r3, #0 8018300: d027 beq.n 8018352 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8018302: 68fb ldr r3, [r7, #12] 8018304: 681b ldr r3, [r3, #0] 8018306: 785b ldrb r3, [r3, #1] 8018308: 2b04 cmp r3, #4 801830a: d006 beq.n 801831a 801830c: 4b13 ldr r3, [pc, #76] @ (801835c ) 801830e: f240 72c2 movw r2, #1986 @ 0x7c2 8018312: 4915 ldr r1, [pc, #84] @ (8018368 ) 8018314: 4813 ldr r0, [pc, #76] @ (8018364 ) 8018316: f012 faa9 bl 802a86c UNLOCK_TCPIP_CORE(); 801831a: f7f8 fe71 bl 8011000 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801831e: 68fb ldr r3, [r7, #12] 8018320: 681b ldr r3, [r3, #0] 8018322: 330c adds r3, #12 8018324: 2100 movs r1, #0 8018326: 4618 mov r0, r3 8018328: f00e ff43 bl 80271b2 LOCK_TCPIP_CORE(); 801832c: f7f8 fe58 bl 8010fe0 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8018330: 68fb ldr r3, [r7, #12] 8018332: 681b ldr r3, [r3, #0] 8018334: 785b ldrb r3, [r3, #1] 8018336: 2b00 cmp r3, #0 8018338: d00b beq.n 8018352 801833a: 4b08 ldr r3, [pc, #32] @ (801835c ) 801833c: f240 72c6 movw r2, #1990 @ 0x7c6 8018340: 4909 ldr r1, [pc, #36] @ (8018368 ) 8018342: 4808 ldr r0, [pc, #32] @ (8018364 ) 8018344: f012 fa92 bl 802a86c } #else /* LWIP_TCPIP_CORE_LOCKING */ lwip_netconn_do_close_internal(msg->conn); #endif /* LWIP_TCPIP_CORE_LOCKING */ /* for tcp netconns, lwip_netconn_do_close_internal ACKs the message */ return; 8018348: e003 b.n 8018352 } } else #endif /* LWIP_TCP */ { msg->err = ERR_CONN; 801834a: 68fb ldr r3, [r7, #12] 801834c: 22f5 movs r2, #245 @ 0xf5 801834e: 711a strb r2, [r3, #4] 8018350: e000 b.n 8018354 return; 8018352: bf00 nop } TCPIP_APIMSG_ACK(msg); } 8018354: 3710 adds r7, #16 8018356: 46bd mov sp, r7 8018358: bd80 pop {r7, pc} 801835a: bf00 nop 801835c: 0802dedc .word 0x0802dedc 8018360: 0802e280 .word 0x0802e280 8018364: 0802df20 .word 0x0802df20 8018368: 0802e29c .word 0x0802e29c 0801836c : EIO /* ERR_ARG -16 Illegal argument. */ }; int err_to_errno(err_t err) { 801836c: b480 push {r7} 801836e: b083 sub sp, #12 8018370: af00 add r7, sp, #0 8018372: 4603 mov r3, r0 8018374: 71fb strb r3, [r7, #7] if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { 8018376: f997 3007 ldrsb.w r3, [r7, #7] 801837a: 2b00 cmp r3, #0 801837c: dc04 bgt.n 8018388 801837e: f997 3007 ldrsb.w r3, [r7, #7] 8018382: f113 0f10 cmn.w r3, #16 8018386: da01 bge.n 801838c return EIO; 8018388: 2305 movs r3, #5 801838a: e005 b.n 8018398 } return err_to_errno_table[-err]; 801838c: f997 3007 ldrsb.w r3, [r7, #7] 8018390: 425b negs r3, r3 8018392: 4a04 ldr r2, [pc, #16] @ (80183a4 ) 8018394: f852 3023 ldr.w r3, [r2, r3, lsl #2] } 8018398: 4618 mov r0, r3 801839a: 370c adds r7, #12 801839c: 46bd mov sp, r7 801839e: f85d 7b04 ldr.w r7, [sp], #4 80183a2: 4770 bx lr 80183a4: 08031ae0 .word 0x08031ae0 080183a8 : * * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { 80183a8: b580 push {r7, lr} 80183aa: b082 sub sp, #8 80183ac: af00 add r7, sp, #0 80183ae: 6078 str r0, [r7, #4] if (buf != NULL) { 80183b0: 687b ldr r3, [r7, #4] 80183b2: 2b00 cmp r3, #0 80183b4: d013 beq.n 80183de if (buf->p != NULL) { 80183b6: 687b ldr r3, [r7, #4] 80183b8: 681b ldr r3, [r3, #0] 80183ba: 2b00 cmp r3, #0 80183bc: d00b beq.n 80183d6 pbuf_free(buf->p); 80183be: 687b ldr r3, [r7, #4] 80183c0: 681b ldr r3, [r3, #0] 80183c2: 4618 mov r0, r3 80183c4: f002 ffda bl 801b37c buf->p = buf->ptr = NULL; 80183c8: 687b ldr r3, [r7, #4] 80183ca: 2200 movs r2, #0 80183cc: 605a str r2, [r3, #4] 80183ce: 687b ldr r3, [r7, #4] 80183d0: 685a ldr r2, [r3, #4] 80183d2: 687b ldr r3, [r7, #4] 80183d4: 601a str r2, [r3, #0] } memp_free(MEMP_NETBUF, buf); 80183d6: 6879 ldr r1, [r7, #4] 80183d8: 2006 movs r0, #6 80183da: f002 f8e1 bl 801a5a0 } } 80183de: bf00 nop 80183e0: 3708 adds r7, #8 80183e2: 46bd mov sp, r7 80183e4: bd80 pop {r7, pc} ... 080183e8 : * * @param buf pointer to the netbuf which contains the packet buffer to free */ void netbuf_free(struct netbuf *buf) { 80183e8: b580 push {r7, lr} 80183ea: b082 sub sp, #8 80183ec: af00 add r7, sp, #0 80183ee: 6078 str r0, [r7, #4] LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); 80183f0: 687b ldr r3, [r7, #4] 80183f2: 2b00 cmp r3, #0 80183f4: d106 bne.n 8018404 80183f6: 4b0d ldr r3, [pc, #52] @ (801842c ) 80183f8: 2281 movs r2, #129 @ 0x81 80183fa: 490d ldr r1, [pc, #52] @ (8018430 ) 80183fc: 480d ldr r0, [pc, #52] @ (8018434 ) 80183fe: f012 fa35 bl 802a86c 8018402: e00f b.n 8018424 if (buf->p != NULL) { 8018404: 687b ldr r3, [r7, #4] 8018406: 681b ldr r3, [r3, #0] 8018408: 2b00 cmp r3, #0 801840a: d004 beq.n 8018416 pbuf_free(buf->p); 801840c: 687b ldr r3, [r7, #4] 801840e: 681b ldr r3, [r3, #0] 8018410: 4618 mov r0, r3 8018412: f002 ffb3 bl 801b37c } buf->p = buf->ptr = NULL; 8018416: 687b ldr r3, [r7, #4] 8018418: 2200 movs r2, #0 801841a: 605a str r2, [r3, #4] 801841c: 687b ldr r3, [r7, #4] 801841e: 685a ldr r2, [r3, #4] 8018420: 687b ldr r3, [r7, #4] 8018422: 601a str r2, [r3, #0] #if LWIP_CHECKSUM_ON_COPY buf->flags = 0; buf->toport_chksum = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ } 8018424: 3708 adds r7, #8 8018426: 46bd mov sp, r7 8018428: bd80 pop {r7, pc} 801842a: bf00 nop 801842c: 0802e434 .word 0x0802e434 8018430: 0802e4d0 .word 0x0802e4d0 8018434: 0802e484 .word 0x0802e484 08018438 : * @return ERR_OK if data is referenced * ERR_MEM if data couldn't be referenced due to lack of memory */ err_t netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size) { 8018438: b580 push {r7, lr} 801843a: b084 sub sp, #16 801843c: af00 add r7, sp, #0 801843e: 60f8 str r0, [r7, #12] 8018440: 60b9 str r1, [r7, #8] 8018442: 4613 mov r3, r2 8018444: 80fb strh r3, [r7, #6] LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); 8018446: 68fb ldr r3, [r7, #12] 8018448: 2b00 cmp r3, #0 801844a: d108 bne.n 801845e 801844c: 4b1c ldr r3, [pc, #112] @ (80184c0 ) 801844e: 2299 movs r2, #153 @ 0x99 8018450: 491c ldr r1, [pc, #112] @ (80184c4 ) 8018452: 481d ldr r0, [pc, #116] @ (80184c8 ) 8018454: f012 fa0a bl 802a86c 8018458: f06f 030f mvn.w r3, #15 801845c: e02b b.n 80184b6 if (buf->p != NULL) { 801845e: 68fb ldr r3, [r7, #12] 8018460: 681b ldr r3, [r3, #0] 8018462: 2b00 cmp r3, #0 8018464: d004 beq.n 8018470 pbuf_free(buf->p); 8018466: 68fb ldr r3, [r7, #12] 8018468: 681b ldr r3, [r3, #0] 801846a: 4618 mov r0, r3 801846c: f002 ff86 bl 801b37c } buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); 8018470: 2241 movs r2, #65 @ 0x41 8018472: 2100 movs r1, #0 8018474: 2036 movs r0, #54 @ 0x36 8018476: f002 fc6b bl 801ad50 801847a: 4602 mov r2, r0 801847c: 68fb ldr r3, [r7, #12] 801847e: 601a str r2, [r3, #0] if (buf->p == NULL) { 8018480: 68fb ldr r3, [r7, #12] 8018482: 681b ldr r3, [r3, #0] 8018484: 2b00 cmp r3, #0 8018486: d105 bne.n 8018494 buf->ptr = NULL; 8018488: 68fb ldr r3, [r7, #12] 801848a: 2200 movs r2, #0 801848c: 605a str r2, [r3, #4] return ERR_MEM; 801848e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018492: e010 b.n 80184b6 } ((struct pbuf_rom *)buf->p)->payload = dataptr; 8018494: 68fb ldr r3, [r7, #12] 8018496: 681b ldr r3, [r3, #0] 8018498: 68ba ldr r2, [r7, #8] 801849a: 605a str r2, [r3, #4] buf->p->len = buf->p->tot_len = size; 801849c: 68fb ldr r3, [r7, #12] 801849e: 681b ldr r3, [r3, #0] 80184a0: 88fa ldrh r2, [r7, #6] 80184a2: 811a strh r2, [r3, #8] 80184a4: 68fa ldr r2, [r7, #12] 80184a6: 6812 ldr r2, [r2, #0] 80184a8: 891b ldrh r3, [r3, #8] 80184aa: 8153 strh r3, [r2, #10] buf->ptr = buf->p; 80184ac: 68fb ldr r3, [r7, #12] 80184ae: 681a ldr r2, [r3, #0] 80184b0: 68fb ldr r3, [r7, #12] 80184b2: 605a str r2, [r3, #4] return ERR_OK; 80184b4: 2300 movs r3, #0 } 80184b6: 4618 mov r0, r3 80184b8: 3710 adds r7, #16 80184ba: 46bd mov sp, r7 80184bc: bd80 pop {r7, pc} 80184be: bf00 nop 80184c0: 0802e434 .word 0x0802e434 80184c4: 0802e4ec .word 0x0802e4ec 80184c8: 0802e484 .word 0x0802e484 080184cc : #endif /* LWIP_NETCONN_FULLDUPLEX */ /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn_nouse(int fd) { 80184cc: b480 push {r7} 80184ce: b085 sub sp, #20 80184d0: af00 add r7, sp, #0 80184d2: 6078 str r0, [r7, #4] int s = fd - LWIP_SOCKET_OFFSET; 80184d4: 687b ldr r3, [r7, #4] 80184d6: 60fb str r3, [r7, #12] if ((s < 0) || (s >= NUM_SOCKETS)) { 80184d8: 68fb ldr r3, [r7, #12] 80184da: 2b00 cmp r3, #0 80184dc: db02 blt.n 80184e4 80184de: 68fb ldr r3, [r7, #12] 80184e0: 2b03 cmp r3, #3 80184e2: dd01 ble.n 80184e8 LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd)); return NULL; 80184e4: 2300 movs r3, #0 80184e6: e003 b.n 80184f0 } return &sockets[s]; 80184e8: 68fb ldr r3, [r7, #12] 80184ea: 011b lsls r3, r3, #4 80184ec: 4a03 ldr r2, [pc, #12] @ (80184fc ) 80184ee: 4413 add r3, r2 } 80184f0: 4618 mov r0, r3 80184f2: 3714 adds r7, #20 80184f4: 46bd mov sp, r7 80184f6: f85d 7b04 ldr.w r7, [sp], #4 80184fa: 4770 bx lr 80184fc: 240243c4 .word 0x240243c4 08018500 : } /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn(int fd) { 8018500: b580 push {r7, lr} 8018502: b084 sub sp, #16 8018504: af00 add r7, sp, #0 8018506: 6078 str r0, [r7, #4] struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); 8018508: 6878 ldr r0, [r7, #4] 801850a: f7ff ffdf bl 80184cc 801850e: 60f8 str r0, [r7, #12] if (ret != NULL) { if (!sock_inc_used(ret)) { return NULL; } } return ret; 8018510: 68fb ldr r3, [r7, #12] } 8018512: 4618 mov r0, r3 8018514: 3710 adds r7, #16 8018516: 46bd mov sp, r7 8018518: bd80 pop {r7, pc} 0801851a : * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */ static struct lwip_sock * tryget_socket(int fd) { 801851a: b580 push {r7, lr} 801851c: b084 sub sp, #16 801851e: af00 add r7, sp, #0 8018520: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket_unconn(fd); 8018522: 6878 ldr r0, [r7, #4] 8018524: f7ff ffec bl 8018500 8018528: 60f8 str r0, [r7, #12] if (sock != NULL) { 801852a: 68fb ldr r3, [r7, #12] 801852c: 2b00 cmp r3, #0 801852e: d005 beq.n 801853c if (sock->conn) { 8018530: 68fb ldr r3, [r7, #12] 8018532: 681b ldr r3, [r3, #0] 8018534: 2b00 cmp r3, #0 8018536: d001 beq.n 801853c return sock; 8018538: 68fb ldr r3, [r7, #12] 801853a: e000 b.n 801853e } done_socket(sock); } return NULL; 801853c: 2300 movs r3, #0 } 801853e: 4618 mov r0, r3 8018540: 3710 adds r7, #16 8018542: 46bd mov sp, r7 8018544: bd80 pop {r7, pc} ... 08018548 : * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */ static struct lwip_sock * get_socket(int fd) { 8018548: b580 push {r7, lr} 801854a: b084 sub sp, #16 801854c: af00 add r7, sp, #0 801854e: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket(fd); 8018550: 6878 ldr r0, [r7, #4] 8018552: f7ff ffe2 bl 801851a 8018556: 60f8 str r0, [r7, #12] if (!sock) { 8018558: 68fb ldr r3, [r7, #12] 801855a: 2b00 cmp r3, #0 801855c: d104 bne.n 8018568 if ((fd < LWIP_SOCKET_OFFSET) || (fd >= (LWIP_SOCKET_OFFSET + NUM_SOCKETS))) { LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", fd)); } set_errno(EBADF); 801855e: 4b05 ldr r3, [pc, #20] @ (8018574 ) 8018560: 2209 movs r2, #9 8018562: 601a str r2, [r3, #0] return NULL; 8018564: 2300 movs r3, #0 8018566: e000 b.n 801856a } return sock; 8018568: 68fb ldr r3, [r7, #12] } 801856a: 4618 mov r0, r3 801856c: 3710 adds r7, #16 801856e: 46bd mov sp, r7 8018570: bd80 pop {r7, pc} 8018572: bf00 nop 8018574: 2402b260 .word 0x2402b260 08018578 : * 0 if socket has been created by socket() * @return the index of the new socket; -1 on error */ static int alloc_socket(struct netconn *newconn, int accepted) { 8018578: b580 push {r7, lr} 801857a: b084 sub sp, #16 801857c: af00 add r7, sp, #0 801857e: 6078 str r0, [r7, #4] 8018580: 6039 str r1, [r7, #0] int i; SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(accepted); /* allocate a new socket identifier */ for (i = 0; i < NUM_SOCKETS; ++i) { 8018582: 2300 movs r3, #0 8018584: 60fb str r3, [r7, #12] 8018586: e052 b.n 801862e /* Protect socket array */ SYS_ARCH_PROTECT(lev); 8018588: f00e feda bl 8027340 801858c: 60b8 str r0, [r7, #8] if (!sockets[i].conn) { 801858e: 4a2c ldr r2, [pc, #176] @ (8018640 ) 8018590: 68fb ldr r3, [r7, #12] 8018592: 011b lsls r3, r3, #4 8018594: 4413 add r3, r2 8018596: 681b ldr r3, [r3, #0] 8018598: 2b00 cmp r3, #0 801859a: d142 bne.n 8018622 continue; } sockets[i].fd_used = 1; sockets[i].fd_free_pending = 0; #endif sockets[i].conn = newconn; 801859c: 4a28 ldr r2, [pc, #160] @ (8018640 ) 801859e: 68fb ldr r3, [r7, #12] 80185a0: 011b lsls r3, r3, #4 80185a2: 4413 add r3, r2 80185a4: 687a ldr r2, [r7, #4] 80185a6: 601a str r2, [r3, #0] /* The socket is not yet known to anyone, so no need to protect after having marked it as used. */ SYS_ARCH_UNPROTECT(lev); 80185a8: 68b8 ldr r0, [r7, #8] 80185aa: f00e fed7 bl 802735c sockets[i].lastdata.pbuf = NULL; 80185ae: 4a24 ldr r2, [pc, #144] @ (8018640 ) 80185b0: 68fb ldr r3, [r7, #12] 80185b2: 011b lsls r3, r3, #4 80185b4: 4413 add r3, r2 80185b6: 3304 adds r3, #4 80185b8: 2200 movs r2, #0 80185ba: 601a str r2, [r3, #0] #if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); 80185bc: 4a20 ldr r2, [pc, #128] @ (8018640 ) 80185be: 68fb ldr r3, [r7, #12] 80185c0: 011b lsls r3, r3, #4 80185c2: 4413 add r3, r2 80185c4: 330e adds r3, #14 80185c6: 781b ldrb r3, [r3, #0] 80185c8: 2b00 cmp r3, #0 80185ca: d006 beq.n 80185da 80185cc: 4b1d ldr r3, [pc, #116] @ (8018644 ) 80185ce: f240 220e movw r2, #526 @ 0x20e 80185d2: 491d ldr r1, [pc, #116] @ (8018648 ) 80185d4: 481d ldr r0, [pc, #116] @ (801864c ) 80185d6: f012 f949 bl 802a86c sockets[i].rcvevent = 0; 80185da: 4a19 ldr r2, [pc, #100] @ (8018640 ) 80185dc: 68fb ldr r3, [r7, #12] 80185de: 011b lsls r3, r3, #4 80185e0: 4413 add r3, r2 80185e2: 3308 adds r3, #8 80185e4: 2200 movs r2, #0 80185e6: 801a strh r2, [r3, #0] /* TCP sendbuf is empty, but the socket is not yet writable until connected * (unless it has been created by accept()). */ sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); 80185e8: 687b ldr r3, [r7, #4] 80185ea: 781b ldrb r3, [r3, #0] 80185ec: f003 03f0 and.w r3, r3, #240 @ 0xf0 80185f0: 2b10 cmp r3, #16 80185f2: d102 bne.n 80185fa 80185f4: 683b ldr r3, [r7, #0] 80185f6: 2b00 cmp r3, #0 80185f8: d001 beq.n 80185fe 80185fa: 2301 movs r3, #1 80185fc: e000 b.n 8018600 80185fe: 2300 movs r3, #0 8018600: b299 uxth r1, r3 8018602: 4a0f ldr r2, [pc, #60] @ (8018640 ) 8018604: 68fb ldr r3, [r7, #12] 8018606: 011b lsls r3, r3, #4 8018608: 4413 add r3, r2 801860a: 330a adds r3, #10 801860c: 460a mov r2, r1 801860e: 801a strh r2, [r3, #0] sockets[i].errevent = 0; 8018610: 4a0b ldr r2, [pc, #44] @ (8018640 ) 8018612: 68fb ldr r3, [r7, #12] 8018614: 011b lsls r3, r3, #4 8018616: 4413 add r3, r2 8018618: 330c adds r3, #12 801861a: 2200 movs r2, #0 801861c: 801a strh r2, [r3, #0] #endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ return i + LWIP_SOCKET_OFFSET; 801861e: 68fb ldr r3, [r7, #12] 8018620: e00a b.n 8018638 } SYS_ARCH_UNPROTECT(lev); 8018622: 68b8 ldr r0, [r7, #8] 8018624: f00e fe9a bl 802735c for (i = 0; i < NUM_SOCKETS; ++i) { 8018628: 68fb ldr r3, [r7, #12] 801862a: 3301 adds r3, #1 801862c: 60fb str r3, [r7, #12] 801862e: 68fb ldr r3, [r7, #12] 8018630: 2b03 cmp r3, #3 8018632: dda9 ble.n 8018588 } return -1; 8018634: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8018638: 4618 mov r0, r3 801863a: 3710 adds r7, #16 801863c: 46bd mov sp, r7 801863e: bd80 pop {r7, pc} 8018640: 240243c4 .word 0x240243c4 8018644: 0802e5cc .word 0x0802e5cc 8018648: 0802e600 .word 0x0802e600 801864c: 0802e620 .word 0x0802e620 08018650 : * @param lastdata lastdata is stored here, must be freed externally */ static int free_socket_locked(struct lwip_sock *sock, int is_tcp, struct netconn **conn, union lwip_sock_lastdata *lastdata) { 8018650: b480 push {r7} 8018652: b085 sub sp, #20 8018654: af00 add r7, sp, #0 8018656: 60f8 str r0, [r7, #12] 8018658: 60b9 str r1, [r7, #8] 801865a: 607a str r2, [r7, #4] 801865c: 603b str r3, [r7, #0] } #else /* LWIP_NETCONN_FULLDUPLEX */ LWIP_UNUSED_ARG(is_tcp); #endif /* LWIP_NETCONN_FULLDUPLEX */ *lastdata = sock->lastdata; 801865e: 683b ldr r3, [r7, #0] 8018660: 68fa ldr r2, [r7, #12] 8018662: 6852 ldr r2, [r2, #4] 8018664: 601a str r2, [r3, #0] sock->lastdata.pbuf = NULL; 8018666: 68fb ldr r3, [r7, #12] 8018668: 2200 movs r2, #0 801866a: 605a str r2, [r3, #4] *conn = sock->conn; 801866c: 68fb ldr r3, [r7, #12] 801866e: 681a ldr r2, [r3, #0] 8018670: 687b ldr r3, [r7, #4] 8018672: 601a str r2, [r3, #0] sock->conn = NULL; 8018674: 68fb ldr r3, [r7, #12] 8018676: 2200 movs r2, #0 8018678: 601a str r2, [r3, #0] return 1; 801867a: 2301 movs r3, #1 } 801867c: 4618 mov r0, r3 801867e: 3714 adds r7, #20 8018680: 46bd mov sp, r7 8018682: f85d 7b04 ldr.w r7, [sp], #4 8018686: 4770 bx lr 08018688 : /** Free a socket's leftover members. */ static void free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_lastdata *lastdata) { 8018688: b580 push {r7, lr} 801868a: b084 sub sp, #16 801868c: af00 add r7, sp, #0 801868e: 60f8 str r0, [r7, #12] 8018690: 60b9 str r1, [r7, #8] 8018692: 607a str r2, [r7, #4] if (lastdata->pbuf != NULL) { 8018694: 687b ldr r3, [r7, #4] 8018696: 681b ldr r3, [r3, #0] 8018698: 2b00 cmp r3, #0 801869a: d00d beq.n 80186b8 if (is_tcp) { 801869c: 68fb ldr r3, [r7, #12] 801869e: 2b00 cmp r3, #0 80186a0: d005 beq.n 80186ae pbuf_free(lastdata->pbuf); 80186a2: 687b ldr r3, [r7, #4] 80186a4: 681b ldr r3, [r3, #0] 80186a6: 4618 mov r0, r3 80186a8: f002 fe68 bl 801b37c 80186ac: e004 b.n 80186b8 } else { netbuf_delete(lastdata->netbuf); 80186ae: 687b ldr r3, [r7, #4] 80186b0: 681b ldr r3, [r3, #0] 80186b2: 4618 mov r0, r3 80186b4: f7ff fe78 bl 80183a8 } } if (conn != NULL) { 80186b8: 68bb ldr r3, [r7, #8] 80186ba: 2b00 cmp r3, #0 80186bc: d002 beq.n 80186c4 /* netconn_prepare_delete() has already been called, here we only free the conn */ netconn_delete(conn); 80186be: 68b8 ldr r0, [r7, #8] 80186c0: f7fd fd50 bl 8016164 } } 80186c4: bf00 nop 80186c6: 3710 adds r7, #16 80186c8: 46bd mov sp, r7 80186ca: bd80 pop {r7, pc} 080186cc : * @param sock the socket to free * @param is_tcp != 0 for TCP sockets, used to free lastdata */ static void free_socket(struct lwip_sock *sock, int is_tcp) { 80186cc: b580 push {r7, lr} 80186ce: b086 sub sp, #24 80186d0: af00 add r7, sp, #0 80186d2: 6078 str r0, [r7, #4] 80186d4: 6039 str r1, [r7, #0] struct netconn *conn; union lwip_sock_lastdata lastdata; SYS_ARCH_DECL_PROTECT(lev); /* Protect socket array */ SYS_ARCH_PROTECT(lev); 80186d6: f00e fe33 bl 8027340 80186da: 6178 str r0, [r7, #20] freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); 80186dc: f107 0308 add.w r3, r7, #8 80186e0: f107 020c add.w r2, r7, #12 80186e4: 6839 ldr r1, [r7, #0] 80186e6: 6878 ldr r0, [r7, #4] 80186e8: f7ff ffb2 bl 8018650 80186ec: 6138 str r0, [r7, #16] SYS_ARCH_UNPROTECT(lev); 80186ee: 6978 ldr r0, [r7, #20] 80186f0: f00e fe34 bl 802735c /* don't use 'sock' after this line, as another task might have allocated it */ if (freed) { 80186f4: 693b ldr r3, [r7, #16] 80186f6: 2b00 cmp r3, #0 80186f8: d006 beq.n 8018708 free_socket_free_elements(is_tcp, conn, &lastdata); 80186fa: 68fb ldr r3, [r7, #12] 80186fc: f107 0208 add.w r2, r7, #8 8018700: 4619 mov r1, r3 8018702: 6838 ldr r0, [r7, #0] 8018704: f7ff ffc0 bl 8018688 } } 8018708: bf00 nop 801870a: 3718 adds r7, #24 801870c: 46bd mov sp, r7 801870e: bd80 pop {r7, pc} 08018710 : return 0; } int lwip_close(int s) { 8018710: b580 push {r7, lr} 8018712: b086 sub sp, #24 8018714: af00 add r7, sp, #0 8018716: 6078 str r0, [r7, #4] struct lwip_sock *sock; int is_tcp = 0; 8018718: 2300 movs r3, #0 801871a: 617b str r3, [r7, #20] err_t err; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_close(%d)\n", s)); sock = get_socket(s); 801871c: 6878 ldr r0, [r7, #4] 801871e: f7ff ff13 bl 8018548 8018722: 6138 str r0, [r7, #16] if (!sock) { 8018724: 693b ldr r3, [r7, #16] 8018726: 2b00 cmp r3, #0 8018728: d102 bne.n 8018730 return -1; 801872a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801872e: e039 b.n 80187a4 } if (sock->conn != NULL) { 8018730: 693b ldr r3, [r7, #16] 8018732: 681b ldr r3, [r3, #0] 8018734: 2b00 cmp r3, #0 8018736: d00b beq.n 8018750 is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; 8018738: 693b ldr r3, [r7, #16] 801873a: 681b ldr r3, [r3, #0] 801873c: 781b ldrb r3, [r3, #0] 801873e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018742: 2b10 cmp r3, #16 8018744: bf0c ite eq 8018746: 2301 moveq r3, #1 8018748: 2300 movne r3, #0 801874a: b2db uxtb r3, r3 801874c: 617b str r3, [r7, #20] 801874e: e00a b.n 8018766 } else { LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL); 8018750: 693b ldr r3, [r7, #16] 8018752: 685b ldr r3, [r3, #4] 8018754: 2b00 cmp r3, #0 8018756: d006 beq.n 8018766 8018758: 4b14 ldr r3, [pc, #80] @ (80187ac ) 801875a: f44f 7245 mov.w r2, #788 @ 0x314 801875e: 4914 ldr r1, [pc, #80] @ (80187b0 ) 8018760: 4814 ldr r0, [pc, #80] @ (80187b4 ) 8018762: f012 f883 bl 802a86c #if LWIP_IPV6_MLD /* drop all possibly joined MLD6 memberships */ lwip_socket_drop_registered_mld6_memberships(s); #endif /* LWIP_IPV6_MLD */ err = netconn_prepare_delete(sock->conn); 8018766: 693b ldr r3, [r7, #16] 8018768: 681b ldr r3, [r3, #0] 801876a: 4618 mov r0, r3 801876c: f7fd fcd6 bl 801611c 8018770: 4603 mov r3, r0 8018772: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8018774: f997 300f ldrsb.w r3, [r7, #15] 8018778: 2b00 cmp r3, #0 801877a: d00e beq.n 801879a sock_set_errno(sock, err_to_errno(err)); 801877c: f997 300f ldrsb.w r3, [r7, #15] 8018780: 4618 mov r0, r3 8018782: f7ff fdf3 bl 801836c 8018786: 60b8 str r0, [r7, #8] 8018788: 68bb ldr r3, [r7, #8] 801878a: 2b00 cmp r3, #0 801878c: d002 beq.n 8018794 801878e: 4a0a ldr r2, [pc, #40] @ (80187b8 ) 8018790: 68bb ldr r3, [r7, #8] 8018792: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8018794: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018798: e004 b.n 80187a4 } free_socket(sock, is_tcp); 801879a: 6979 ldr r1, [r7, #20] 801879c: 6938 ldr r0, [r7, #16] 801879e: f7ff ff95 bl 80186cc set_errno(0); return 0; 80187a2: 2300 movs r3, #0 } 80187a4: 4618 mov r0, r3 80187a6: 3718 adds r7, #24 80187a8: 46bd mov sp, r7 80187aa: bd80 pop {r7, pc} 80187ac: 0802e5cc .word 0x0802e5cc 80187b0: 0802e68c .word 0x0802e68c 80187b4: 0802e620 .word 0x0802e620 80187b8: 2402b260 .word 0x2402b260 080187bc : int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) { 80187bc: b580 push {r7, lr} 80187be: b08a sub sp, #40 @ 0x28 80187c0: af00 add r7, sp, #0 80187c2: 60f8 str r0, [r7, #12] 80187c4: 60b9 str r1, [r7, #8] 80187c6: 607a str r2, [r7, #4] struct lwip_sock *sock; err_t err; sock = get_socket(s); 80187c8: 68f8 ldr r0, [r7, #12] 80187ca: f7ff febd bl 8018548 80187ce: 6278 str r0, [r7, #36] @ 0x24 if (!sock) { 80187d0: 6a7b ldr r3, [r7, #36] @ 0x24 80187d2: 2b00 cmp r3, #0 80187d4: d102 bne.n 80187dc return -1; 80187d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80187da: e062 b.n 80188a2 done_socket(sock); return -1; } LWIP_UNUSED_ARG(namelen); if (name->sa_family == AF_UNSPEC) { 80187dc: 68bb ldr r3, [r7, #8] 80187de: 785b ldrb r3, [r3, #1] 80187e0: 2b00 cmp r3, #0 80187e2: d108 bne.n 80187f6 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, AF_UNSPEC)\n", s)); err = netconn_disconnect(sock->conn); 80187e4: 6a7b ldr r3, [r7, #36] @ 0x24 80187e6: 681b ldr r3, [r3, #0] 80187e8: 4618 mov r0, r3 80187ea: f7fd fd61 bl 80162b0 80187ee: 4603 mov r3, r0 80187f0: f887 3021 strb.w r3, [r7, #33] @ 0x21 80187f4: e039 b.n 801886a } else { ip_addr_t remote_addr; u16_t remote_port; /* check size, family and alignment of 'name' */ LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && 80187f6: 687b ldr r3, [r7, #4] 80187f8: 2b10 cmp r3, #16 80187fa: d10c bne.n 8018816 80187fc: 68bb ldr r3, [r7, #8] 80187fe: 785b ldrb r3, [r3, #1] 8018800: 2b00 cmp r3, #0 8018802: d003 beq.n 801880c 8018804: 68bb ldr r3, [r7, #8] 8018806: 785b ldrb r3, [r3, #1] 8018808: 2b02 cmp r3, #2 801880a: d104 bne.n 8018816 801880c: 68bb ldr r3, [r7, #8] 801880e: f003 0303 and.w r3, r3, #3 8018812: 2b00 cmp r3, #0 8018814: d014 beq.n 8018840 8018816: 4b25 ldr r3, [pc, #148] @ (80188ac ) 8018818: f240 3247 movw r2, #839 @ 0x347 801881c: 4924 ldr r1, [pc, #144] @ (80188b0 ) 801881e: 4825 ldr r0, [pc, #148] @ (80188b4 ) 8018820: f012 f824 bl 802a86c 8018824: f06f 000f mvn.w r0, #15 8018828: f7ff fda0 bl 801836c 801882c: 61f8 str r0, [r7, #28] 801882e: 69fb ldr r3, [r7, #28] 8018830: 2b00 cmp r3, #0 8018832: d002 beq.n 801883a 8018834: 4a20 ldr r2, [pc, #128] @ (80188b8 ) 8018836: 69fb ldr r3, [r7, #28] 8018838: 6013 str r3, [r2, #0] 801883a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801883e: e030 b.n 80188a2 IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) && IS_SOCK_ADDR_ALIGNED(name), sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port); 8018840: 68bb ldr r3, [r7, #8] 8018842: 685b ldr r3, [r3, #4] 8018844: 613b str r3, [r7, #16] 8018846: 68bb ldr r3, [r7, #8] 8018848: 885b ldrh r3, [r3, #2] 801884a: 4618 mov r0, r3 801884c: f001 f8b4 bl 80199b8 8018850: 4603 mov r3, r0 8018852: 847b strh r3, [r7, #34] @ 0x22 unmap_ipv4_mapped_ipv6(ip_2_ip4(&remote_addr), ip_2_ip6(&remote_addr)); IP_SET_TYPE_VAL(remote_addr, IPADDR_TYPE_V4); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ err = netconn_connect(sock->conn, &remote_addr, remote_port); 8018854: 6a7b ldr r3, [r7, #36] @ 0x24 8018856: 681b ldr r3, [r3, #0] 8018858: 8c7a ldrh r2, [r7, #34] @ 0x22 801885a: f107 0110 add.w r1, r7, #16 801885e: 4618 mov r0, r3 8018860: f7fd fcee bl 8016240 8018864: 4603 mov r3, r0 8018866: f887 3021 strb.w r3, [r7, #33] @ 0x21 } if (err != ERR_OK) { 801886a: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 801886e: 2b00 cmp r3, #0 8018870: d00e beq.n 8018890 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); 8018872: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 8018876: 4618 mov r0, r3 8018878: f7ff fd78 bl 801836c 801887c: 6178 str r0, [r7, #20] 801887e: 697b ldr r3, [r7, #20] 8018880: 2b00 cmp r3, #0 8018882: d002 beq.n 801888a 8018884: 4a0c ldr r2, [pc, #48] @ (80188b8 ) 8018886: 697b ldr r3, [r7, #20] 8018888: 6013 str r3, [r2, #0] done_socket(sock); return -1; 801888a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801888e: e008 b.n 80188a2 } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); sock_set_errno(sock, 0); 8018890: 2300 movs r3, #0 8018892: 61bb str r3, [r7, #24] 8018894: 69bb ldr r3, [r7, #24] 8018896: 2b00 cmp r3, #0 8018898: d002 beq.n 80188a0 801889a: 4a07 ldr r2, [pc, #28] @ (80188b8 ) 801889c: 69bb ldr r3, [r7, #24] 801889e: 6013 str r3, [r2, #0] done_socket(sock); return 0; 80188a0: 2300 movs r3, #0 } 80188a2: 4618 mov r0, r3 80188a4: 3728 adds r7, #40 @ 0x28 80188a6: 46bd mov sp, r7 80188a8: bd80 pop {r7, pc} 80188aa: bf00 nop 80188ac: 0802e5cc .word 0x0802e5cc 80188b0: 0802e6a4 .word 0x0802e6a4 80188b4: 0802e620 .word 0x0802e620 80188b8: 2402b260 .word 0x2402b260 080188bc : * until "len" bytes are received or we're otherwise done. * Keeps sock->lastdata for peeking or partly copying. */ static ssize_t lwip_recv_tcp(struct lwip_sock *sock, void *mem, size_t len, int flags) { 80188bc: b580 push {r7, lr} 80188be: b08c sub sp, #48 @ 0x30 80188c0: af00 add r7, sp, #0 80188c2: 60f8 str r0, [r7, #12] 80188c4: 60b9 str r1, [r7, #8] 80188c6: 607a str r2, [r7, #4] 80188c8: 603b str r3, [r7, #0] u8_t apiflags = NETCONN_NOAUTORCVD; 80188ca: 2308 movs r3, #8 80188cc: f887 3023 strb.w r3, [r7, #35] @ 0x23 ssize_t recvd = 0; 80188d0: 2300 movs r3, #0 80188d2: 62bb str r3, [r7, #40] @ 0x28 ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; 80188d4: 687b ldr r3, [r7, #4] 80188d6: 2b00 cmp r3, #0 80188d8: db01 blt.n 80188de 80188da: 687b ldr r3, [r7, #4] 80188dc: e001 b.n 80188e2 80188de: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 80188e2: 627b str r3, [r7, #36] @ 0x24 LWIP_ASSERT("no socket given", sock != NULL); 80188e4: 68fb ldr r3, [r7, #12] 80188e6: 2b00 cmp r3, #0 80188e8: d106 bne.n 80188f8 80188ea: 4b74 ldr r3, [pc, #464] @ (8018abc ) 80188ec: f240 329e movw r2, #926 @ 0x39e 80188f0: 4973 ldr r1, [pc, #460] @ (8018ac0 ) 80188f2: 4874 ldr r0, [pc, #464] @ (8018ac4 ) 80188f4: f011 ffba bl 802a86c LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); 80188f8: 68fb ldr r3, [r7, #12] 80188fa: 681b ldr r3, [r3, #0] 80188fc: 781b ldrb r3, [r3, #0] 80188fe: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018902: 2b10 cmp r3, #16 8018904: d006 beq.n 8018914 8018906: 4b6d ldr r3, [pc, #436] @ (8018abc ) 8018908: f240 329f movw r2, #927 @ 0x39f 801890c: 496e ldr r1, [pc, #440] @ (8018ac8 ) 801890e: 486d ldr r0, [pc, #436] @ (8018ac4 ) 8018910: f011 ffac bl 802a86c if (flags & MSG_DONTWAIT) { 8018914: 683b ldr r3, [r7, #0] 8018916: f003 0308 and.w r3, r3, #8 801891a: 2b00 cmp r3, #0 801891c: d005 beq.n 801892a apiflags |= NETCONN_DONTBLOCK; 801891e: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8018922: f043 0304 orr.w r3, r3, #4 8018926: f887 3023 strb.w r3, [r7, #35] @ 0x23 err_t err; u16_t copylen; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: top while sock->lastdata=%p\n", (void *)sock->lastdata.pbuf)); /* Check if there is data left from the last recv operation. */ if (sock->lastdata.pbuf) { 801892a: 68fb ldr r3, [r7, #12] 801892c: 685b ldr r3, [r3, #4] 801892e: 2b00 cmp r3, #0 8018930: d003 beq.n 801893a p = sock->lastdata.pbuf; 8018932: 68fb ldr r3, [r7, #12] 8018934: 685b ldr r3, [r3, #4] 8018936: 617b str r3, [r7, #20] 8018938: e036 b.n 80189a8 } else { /* No data was left from the previous operation, so we try to get some from the network. */ err = netconn_recv_tcp_pbuf_flags(sock->conn, &p, apiflags); 801893a: 68fb ldr r3, [r7, #12] 801893c: 681b ldr r3, [r3, #0] 801893e: f897 2023 ldrb.w r2, [r7, #35] @ 0x23 8018942: f107 0114 add.w r1, r7, #20 8018946: 4618 mov r0, r3 8018948: f7fd fea4 bl 8016694 801894c: 4603 mov r3, r0 801894e: f887 3022 strb.w r3, [r7, #34] @ 0x22 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: netconn_recv err=%d, pbuf=%p\n", err, (void *)p)); if (err != ERR_OK) { 8018952: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8018956: 2b00 cmp r3, #0 8018958: d019 beq.n 801898e if (recvd > 0) { 801895a: 6abb ldr r3, [r7, #40] @ 0x28 801895c: 2b00 cmp r3, #0 801895e: f300 808d bgt.w 8018a7c goto lwip_recv_tcp_done; } /* We should really do some error checking here. */ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: p == NULL, error is \"%s\"!\n", lwip_strerr(err))); sock_set_errno(sock, err_to_errno(err)); 8018962: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8018966: 4618 mov r0, r3 8018968: f7ff fd00 bl 801836c 801896c: 61f8 str r0, [r7, #28] 801896e: 69fb ldr r3, [r7, #28] 8018970: 2b00 cmp r3, #0 8018972: d002 beq.n 801897a 8018974: 4a55 ldr r2, [pc, #340] @ (8018acc ) 8018976: 69fb ldr r3, [r7, #28] 8018978: 6013 str r3, [r2, #0] if (err == ERR_CLSD) { 801897a: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 801897e: f113 0f0f cmn.w r3, #15 8018982: d101 bne.n 8018988 return 0; 8018984: 2300 movs r3, #0 8018986: e094 b.n 8018ab2 } else { return -1; 8018988: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801898c: e091 b.n 8018ab2 } } LWIP_ASSERT("p != NULL", p != NULL); 801898e: 697b ldr r3, [r7, #20] 8018990: 2b00 cmp r3, #0 8018992: d106 bne.n 80189a2 8018994: 4b49 ldr r3, [pc, #292] @ (8018abc ) 8018996: f240 32c5 movw r2, #965 @ 0x3c5 801899a: 494d ldr r1, [pc, #308] @ (8018ad0 ) 801899c: 4849 ldr r0, [pc, #292] @ (8018ac4 ) 801899e: f011 ff65 bl 802a86c sock->lastdata.pbuf = p; 80189a2: 697a ldr r2, [r7, #20] 80189a4: 68fb ldr r3, [r7, #12] 80189a6: 605a str r2, [r3, #4] } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: buflen=%"U16_F" recv_left=%d off=%d\n", p->tot_len, (int)recv_left, (int)recvd)); if (recv_left > p->tot_len) { 80189a8: 697b ldr r3, [r7, #20] 80189aa: 891b ldrh r3, [r3, #8] 80189ac: 461a mov r2, r3 80189ae: 6a7b ldr r3, [r7, #36] @ 0x24 80189b0: 4293 cmp r3, r2 80189b2: dd03 ble.n 80189bc copylen = p->tot_len; 80189b4: 697b ldr r3, [r7, #20] 80189b6: 891b ldrh r3, [r3, #8] 80189b8: 85fb strh r3, [r7, #46] @ 0x2e 80189ba: e001 b.n 80189c0 } else { copylen = (u16_t)recv_left; 80189bc: 6a7b ldr r3, [r7, #36] @ 0x24 80189be: 85fb strh r3, [r7, #46] @ 0x2e } if (recvd + copylen < recvd) { 80189c0: 8dfa ldrh r2, [r7, #46] @ 0x2e 80189c2: 6abb ldr r3, [r7, #40] @ 0x28 80189c4: 4413 add r3, r2 80189c6: 6aba ldr r2, [r7, #40] @ 0x28 80189c8: 429a cmp r2, r3 80189ca: dd03 ble.n 80189d4 /* overflow */ copylen = (u16_t)(SSIZE_MAX - recvd); 80189cc: 6abb ldr r3, [r7, #40] @ 0x28 80189ce: b29b uxth r3, r3 80189d0: 43db mvns r3, r3 80189d2: 85fb strh r3, [r7, #46] @ 0x2e } /* copy the contents of the received buffer into the supplied memory pointer mem */ pbuf_copy_partial(p, (u8_t *)mem + recvd, copylen, 0); 80189d4: 6978 ldr r0, [r7, #20] 80189d6: 6abb ldr r3, [r7, #40] @ 0x28 80189d8: 68ba ldr r2, [r7, #8] 80189da: 18d1 adds r1, r2, r3 80189dc: 8dfa ldrh r2, [r7, #46] @ 0x2e 80189de: 2300 movs r3, #0 80189e0: f002 fed2 bl 801b788 recvd += copylen; 80189e4: 8dfb ldrh r3, [r7, #46] @ 0x2e 80189e6: 6aba ldr r2, [r7, #40] @ 0x28 80189e8: 4413 add r3, r2 80189ea: 62bb str r3, [r7, #40] @ 0x28 /* TCP combines multiple pbufs for one recv */ LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); 80189ec: 8dfb ldrh r3, [r7, #46] @ 0x2e 80189ee: 6a7a ldr r2, [r7, #36] @ 0x24 80189f0: 429a cmp r2, r3 80189f2: da06 bge.n 8018a02 80189f4: 4b31 ldr r3, [pc, #196] @ (8018abc ) 80189f6: f240 32dd movw r2, #989 @ 0x3dd 80189fa: 4936 ldr r1, [pc, #216] @ (8018ad4 ) 80189fc: 4831 ldr r0, [pc, #196] @ (8018ac4 ) 80189fe: f011 ff35 bl 802a86c recv_left -= copylen; 8018a02: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a04: 6a7a ldr r2, [r7, #36] @ 0x24 8018a06: 1ad3 subs r3, r2, r3 8018a08: 627b str r3, [r7, #36] @ 0x24 /* Unless we peek the incoming message... */ if ((flags & MSG_PEEK) == 0) { 8018a0a: 683b ldr r3, [r7, #0] 8018a0c: f003 0301 and.w r3, r3, #1 8018a10: 2b00 cmp r3, #0 8018a12: d123 bne.n 8018a5c /* ... check if there is data left in the pbuf */ LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); 8018a14: 697b ldr r3, [r7, #20] 8018a16: 891b ldrh r3, [r3, #8] 8018a18: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018a1a: 429a cmp r2, r3 8018a1c: d906 bls.n 8018a2c 8018a1e: 4b27 ldr r3, [pc, #156] @ (8018abc ) 8018a20: f240 32e3 movw r2, #995 @ 0x3e3 8018a24: 492c ldr r1, [pc, #176] @ (8018ad8 ) 8018a26: 4827 ldr r0, [pc, #156] @ (8018ac4 ) 8018a28: f011 ff20 bl 802a86c if (p->tot_len - copylen > 0) { 8018a2c: 697b ldr r3, [r7, #20] 8018a2e: 891b ldrh r3, [r3, #8] 8018a30: 461a mov r2, r3 8018a32: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a34: 1ad3 subs r3, r2, r3 8018a36: 2b00 cmp r3, #0 8018a38: dd09 ble.n 8018a4e /* If so, it should be saved in the sock structure for the next recv call. We store the pbuf but hide/free the consumed data: */ sock->lastdata.pbuf = pbuf_free_header(p, copylen); 8018a3a: 697b ldr r3, [r7, #20] 8018a3c: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018a3e: 4611 mov r1, r2 8018a40: 4618 mov r0, r3 8018a42: f002 fc68 bl 801b316 8018a46: 4602 mov r2, r0 8018a48: 68fb ldr r3, [r7, #12] 8018a4a: 605a str r2, [r3, #4] 8018a4c: e006 b.n 8018a5c LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf)); } else { sock->lastdata.pbuf = NULL; 8018a4e: 68fb ldr r3, [r7, #12] 8018a50: 2200 movs r2, #0 8018a52: 605a str r2, [r3, #4] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: deleting pbuf=%p\n", (void *)p)); pbuf_free(p); 8018a54: 697b ldr r3, [r7, #20] 8018a56: 4618 mov r0, r3 8018a58: f002 fc90 bl 801b37c } } /* once we have some data to return, only add more if we don't need to wait */ apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN; 8018a5c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8018a60: f043 0314 orr.w r3, r3, #20 8018a64: f887 3023 strb.w r3, [r7, #35] @ 0x23 /* @todo: do we need to support peeking more than one pbuf? */ } while ((recv_left > 0) && !(flags & MSG_PEEK)); 8018a68: 6a7b ldr r3, [r7, #36] @ 0x24 8018a6a: 2b00 cmp r3, #0 8018a6c: dd08 ble.n 8018a80 8018a6e: 683b ldr r3, [r7, #0] 8018a70: f003 0301 and.w r3, r3, #1 8018a74: 2b00 cmp r3, #0 8018a76: f43f af58 beq.w 801892a lwip_recv_tcp_done: 8018a7a: e001 b.n 8018a80 goto lwip_recv_tcp_done; 8018a7c: bf00 nop 8018a7e: e000 b.n 8018a82 lwip_recv_tcp_done: 8018a80: bf00 nop if ((recvd > 0) && !(flags & MSG_PEEK)) { 8018a82: 6abb ldr r3, [r7, #40] @ 0x28 8018a84: 2b00 cmp r3, #0 8018a86: dd0b ble.n 8018aa0 8018a88: 683b ldr r3, [r7, #0] 8018a8a: f003 0301 and.w r3, r3, #1 8018a8e: 2b00 cmp r3, #0 8018a90: d106 bne.n 8018aa0 /* ensure window update after copying all data */ netconn_tcp_recvd(sock->conn, (size_t)recvd); 8018a92: 68fb ldr r3, [r7, #12] 8018a94: 681b ldr r3, [r3, #0] 8018a96: 6aba ldr r2, [r7, #40] @ 0x28 8018a98: 4611 mov r1, r2 8018a9a: 4618 mov r0, r3 8018a9c: f7fd fd42 bl 8016524 } sock_set_errno(sock, 0); 8018aa0: 2300 movs r3, #0 8018aa2: 61bb str r3, [r7, #24] 8018aa4: 69bb ldr r3, [r7, #24] 8018aa6: 2b00 cmp r3, #0 8018aa8: d002 beq.n 8018ab0 8018aaa: 4a08 ldr r2, [pc, #32] @ (8018acc ) 8018aac: 69bb ldr r3, [r7, #24] 8018aae: 6013 str r3, [r2, #0] return recvd; 8018ab0: 6abb ldr r3, [r7, #40] @ 0x28 } 8018ab2: 4618 mov r0, r3 8018ab4: 3730 adds r7, #48 @ 0x30 8018ab6: 46bd mov sp, r7 8018ab8: bd80 pop {r7, pc} 8018aba: bf00 nop 8018abc: 0802e5cc .word 0x0802e5cc 8018ac0: 0802e6c4 .word 0x0802e6c4 8018ac4: 0802e620 .word 0x0802e620 8018ac8: 0802e6d4 .word 0x0802e6d4 8018acc: 2402b260 .word 0x2402b260 8018ad0: 0802e6f8 .word 0x0802e6f8 8018ad4: 0802e704 .word 0x0802e704 8018ad8: 0802e72c .word 0x0802e72c 08018adc : /* Convert a netbuf's address data to struct sockaddr */ static int lwip_sock_make_addr(struct netconn *conn, ip_addr_t *fromaddr, u16_t port, struct sockaddr *from, socklen_t *fromlen) { 8018adc: b590 push {r4, r7, lr} 8018ade: b08b sub sp, #44 @ 0x2c 8018ae0: af00 add r7, sp, #0 8018ae2: 60f8 str r0, [r7, #12] 8018ae4: 60b9 str r1, [r7, #8] 8018ae6: 603b str r3, [r7, #0] 8018ae8: 4613 mov r3, r2 8018aea: 80fb strh r3, [r7, #6] int truncated = 0; 8018aec: 2300 movs r3, #0 8018aee: 627b str r3, [r7, #36] @ 0x24 union sockaddr_aligned saddr; LWIP_UNUSED_ARG(conn); LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); 8018af0: 68bb ldr r3, [r7, #8] 8018af2: 2b00 cmp r3, #0 8018af4: d106 bne.n 8018b04 8018af6: 4b2b ldr r3, [pc, #172] @ (8018ba4 ) 8018af8: f240 4207 movw r2, #1031 @ 0x407 8018afc: 492a ldr r1, [pc, #168] @ (8018ba8 ) 8018afe: 482b ldr r0, [pc, #172] @ (8018bac ) 8018b00: f011 feb4 bl 802a86c LWIP_ASSERT("from != NULL", from != NULL); 8018b04: 683b ldr r3, [r7, #0] 8018b06: 2b00 cmp r3, #0 8018b08: d106 bne.n 8018b18 8018b0a: 4b26 ldr r3, [pc, #152] @ (8018ba4 ) 8018b0c: f44f 6281 mov.w r2, #1032 @ 0x408 8018b10: 4927 ldr r1, [pc, #156] @ (8018bb0 ) 8018b12: 4826 ldr r0, [pc, #152] @ (8018bac ) 8018b14: f011 feaa bl 802a86c LWIP_ASSERT("fromlen != NULL", fromlen != NULL); 8018b18: 6bbb ldr r3, [r7, #56] @ 0x38 8018b1a: 2b00 cmp r3, #0 8018b1c: d106 bne.n 8018b2c 8018b1e: 4b21 ldr r3, [pc, #132] @ (8018ba4 ) 8018b20: f240 4209 movw r2, #1033 @ 0x409 8018b24: 4923 ldr r1, [pc, #140] @ (8018bb4 ) 8018b26: 4821 ldr r0, [pc, #132] @ (8018bac ) 8018b28: f011 fea0 bl 802a86c ip4_2_ipv4_mapped_ipv6(ip_2_ip6(fromaddr), ip_2_ip4(fromaddr)); IP_SET_TYPE(fromaddr, IPADDR_TYPE_V6); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); 8018b2c: f107 0314 add.w r3, r7, #20 8018b30: 2210 movs r2, #16 8018b32: 701a strb r2, [r3, #0] 8018b34: f107 0314 add.w r3, r7, #20 8018b38: 2202 movs r2, #2 8018b3a: 705a strb r2, [r3, #1] 8018b3c: f107 0414 add.w r4, r7, #20 8018b40: 88fb ldrh r3, [r7, #6] 8018b42: 4618 mov r0, r3 8018b44: f000 ff38 bl 80199b8 8018b48: 4603 mov r3, r0 8018b4a: 8063 strh r3, [r4, #2] 8018b4c: f107 0314 add.w r3, r7, #20 8018b50: 68ba ldr r2, [r7, #8] 8018b52: 6812 ldr r2, [r2, #0] 8018b54: 605a str r2, [r3, #4] 8018b56: f107 0314 add.w r3, r7, #20 8018b5a: 3308 adds r3, #8 8018b5c: 2208 movs r2, #8 8018b5e: 2100 movs r1, #0 8018b60: 4618 mov r0, r3 8018b62: f012 f815 bl 802ab90 if (*fromlen < saddr.sa.sa_len) { 8018b66: 6bbb ldr r3, [r7, #56] @ 0x38 8018b68: 681b ldr r3, [r3, #0] 8018b6a: 7d3a ldrb r2, [r7, #20] 8018b6c: 4293 cmp r3, r2 8018b6e: d202 bcs.n 8018b76 truncated = 1; 8018b70: 2301 movs r3, #1 8018b72: 627b str r3, [r7, #36] @ 0x24 8018b74: e008 b.n 8018b88 } else if (*fromlen > saddr.sa.sa_len) { 8018b76: 6bbb ldr r3, [r7, #56] @ 0x38 8018b78: 681b ldr r3, [r3, #0] 8018b7a: 7d3a ldrb r2, [r7, #20] 8018b7c: 4293 cmp r3, r2 8018b7e: d903 bls.n 8018b88 *fromlen = saddr.sa.sa_len; 8018b80: 7d3b ldrb r3, [r7, #20] 8018b82: 461a mov r2, r3 8018b84: 6bbb ldr r3, [r7, #56] @ 0x38 8018b86: 601a str r2, [r3, #0] } MEMCPY(from, &saddr, *fromlen); 8018b88: 6bbb ldr r3, [r7, #56] @ 0x38 8018b8a: 681a ldr r2, [r3, #0] 8018b8c: f107 0314 add.w r3, r7, #20 8018b90: 4619 mov r1, r3 8018b92: 6838 ldr r0, [r7, #0] 8018b94: f012 f8f3 bl 802ad7e return truncated; 8018b98: 6a7b ldr r3, [r7, #36] @ 0x24 } 8018b9a: 4618 mov r0, r3 8018b9c: 372c adds r7, #44 @ 0x2c 8018b9e: 46bd mov sp, r7 8018ba0: bd90 pop {r4, r7, pc} 8018ba2: bf00 nop 8018ba4: 0802e5cc .word 0x0802e5cc 8018ba8: 0802e73c .word 0x0802e73c 8018bac: 0802e620 .word 0x0802e620 8018bb0: 0802e750 .word 0x0802e750 8018bb4: 0802e760 .word 0x0802e760 08018bb8 : #if LWIP_TCP /* Helper function to get a tcp socket's remote address info */ static int lwip_recv_tcp_from(struct lwip_sock *sock, struct sockaddr *from, socklen_t *fromlen, const char *dbg_fn, int dbg_s, ssize_t dbg_ret) { 8018bb8: b580 push {r7, lr} 8018bba: b088 sub sp, #32 8018bbc: af02 add r7, sp, #8 8018bbe: 60f8 str r0, [r7, #12] 8018bc0: 60b9 str r1, [r7, #8] 8018bc2: 607a str r2, [r7, #4] 8018bc4: 603b str r3, [r7, #0] if (sock == NULL) { 8018bc6: 68fb ldr r3, [r7, #12] 8018bc8: 2b00 cmp r3, #0 8018bca: d101 bne.n 8018bd0 return 0; 8018bcc: 2300 movs r3, #0 8018bce: e021 b.n 8018c14 LWIP_UNUSED_ARG(dbg_fn); LWIP_UNUSED_ARG(dbg_s); LWIP_UNUSED_ARG(dbg_ret); #if !SOCKETS_DEBUG if (from && fromlen) 8018bd0: 68bb ldr r3, [r7, #8] 8018bd2: 2b00 cmp r3, #0 8018bd4: d01d beq.n 8018c12 8018bd6: 687b ldr r3, [r7, #4] 8018bd8: 2b00 cmp r3, #0 8018bda: d01a beq.n 8018c12 #endif /* !SOCKETS_DEBUG */ { /* get remote addr/port from tcp_pcb */ u16_t port; ip_addr_t tmpaddr; netconn_getaddr(sock->conn, &tmpaddr, &port, 0); 8018bdc: 68fb ldr r3, [r7, #12] 8018bde: 6818 ldr r0, [r3, #0] 8018be0: f107 0216 add.w r2, r7, #22 8018be4: f107 0110 add.w r1, r7, #16 8018be8: 2300 movs r3, #0 8018bea: f7fd fad7 bl 801619c LWIP_DEBUGF(SOCKETS_DEBUG, ("%s(%d): addr=", dbg_fn, dbg_s)); ip_addr_debug_print_val(SOCKETS_DEBUG, tmpaddr); LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, (int)dbg_ret)); if (from && fromlen) { 8018bee: 68bb ldr r3, [r7, #8] 8018bf0: 2b00 cmp r3, #0 8018bf2: d00e beq.n 8018c12 8018bf4: 687b ldr r3, [r7, #4] 8018bf6: 2b00 cmp r3, #0 8018bf8: d00b beq.n 8018c12 return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen); 8018bfa: 68fb ldr r3, [r7, #12] 8018bfc: 6818 ldr r0, [r3, #0] 8018bfe: 8afa ldrh r2, [r7, #22] 8018c00: f107 0110 add.w r1, r7, #16 8018c04: 687b ldr r3, [r7, #4] 8018c06: 9300 str r3, [sp, #0] 8018c08: 68bb ldr r3, [r7, #8] 8018c0a: f7ff ff67 bl 8018adc 8018c0e: 4603 mov r3, r0 8018c10: e000 b.n 8018c14 } } return 0; 8018c12: 2300 movs r3, #0 } 8018c14: 4618 mov r0, r3 8018c16: 3718 adds r7, #24 8018c18: 46bd mov sp, r7 8018c1a: bd80 pop {r7, pc} 08018c1c : /* Helper function to receive a netbuf from a udp or raw netconn. * Keeps sock->lastdata for peeking. */ static err_t lwip_recvfrom_udp_raw(struct lwip_sock *sock, int flags, struct msghdr *msg, u16_t *datagram_len, int dbg_s) { 8018c1c: b590 push {r4, r7, lr} 8018c1e: b08d sub sp, #52 @ 0x34 8018c20: af02 add r7, sp, #8 8018c22: 60f8 str r0, [r7, #12] 8018c24: 60b9 str r1, [r7, #8] 8018c26: 607a str r2, [r7, #4] 8018c28: 603b str r3, [r7, #0] err_t err; u16_t buflen, copylen, copied; int i; LWIP_UNUSED_ARG(dbg_s); LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;); 8018c2a: 687b ldr r3, [r7, #4] 8018c2c: 689b ldr r3, [r3, #8] 8018c2e: 2b00 cmp r3, #0 8018c30: d10d bne.n 8018c4e 8018c32: 687b ldr r3, [r7, #4] 8018c34: 68db ldr r3, [r3, #12] 8018c36: 2b00 cmp r3, #0 8018c38: dd09 ble.n 8018c4e 8018c3a: 4b5e ldr r3, [pc, #376] @ (8018db4 ) 8018c3c: f240 4249 movw r2, #1097 @ 0x449 8018c40: 495d ldr r1, [pc, #372] @ (8018db8 ) 8018c42: 485e ldr r0, [pc, #376] @ (8018dbc ) 8018c44: f011 fe12 bl 802a86c 8018c48: f06f 030f mvn.w r3, #15 8018c4c: e0ae b.n 8018dac if (flags & MSG_DONTWAIT) { 8018c4e: 68bb ldr r3, [r7, #8] 8018c50: f003 0308 and.w r3, r3, #8 8018c54: 2b00 cmp r3, #0 8018c56: d003 beq.n 8018c60 apiflags = NETCONN_DONTBLOCK; 8018c58: 2304 movs r3, #4 8018c5a: f887 3026 strb.w r3, [r7, #38] @ 0x26 8018c5e: e002 b.n 8018c66 } else { apiflags = 0; 8018c60: 2300 movs r3, #0 8018c62: f887 3026 strb.w r3, [r7, #38] @ 0x26 } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=%p\n", (void *)sock->lastdata.netbuf)); /* Check if there is data left from the last recv operation. */ buf = sock->lastdata.netbuf; 8018c66: 68fb ldr r3, [r7, #12] 8018c68: 685b ldr r3, [r3, #4] 8018c6a: 613b str r3, [r7, #16] if (buf == NULL) { 8018c6c: 693b ldr r3, [r7, #16] 8018c6e: 2b00 cmp r3, #0 8018c70: d11f bne.n 8018cb2 /* No data was left from the previous operation, so we try to get some from the network. */ err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &buf, apiflags); 8018c72: 68fb ldr r3, [r7, #12] 8018c74: 681b ldr r3, [r3, #0] 8018c76: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 8018c7a: f107 0110 add.w r1, r7, #16 8018c7e: 4618 mov r0, r3 8018c80: f7fd fd34 bl 80166ec 8018c84: 4603 mov r3, r0 8018c86: f887 3027 strb.w r3, [r7, #39] @ 0x27 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=%d, netbuf=%p\n", err, (void *)buf)); if (err != ERR_OK) { 8018c8a: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8018c8e: 2b00 cmp r3, #0 8018c90: d002 beq.n 8018c98 return err; 8018c92: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8018c96: e089 b.n 8018dac } LWIP_ASSERT("buf != NULL", buf != NULL); 8018c98: 693b ldr r3, [r7, #16] 8018c9a: 2b00 cmp r3, #0 8018c9c: d106 bne.n 8018cac 8018c9e: 4b45 ldr r3, [pc, #276] @ (8018db4 ) 8018ca0: f240 425e movw r2, #1118 @ 0x45e 8018ca4: 4946 ldr r1, [pc, #280] @ (8018dc0 ) 8018ca6: 4845 ldr r0, [pc, #276] @ (8018dbc ) 8018ca8: f011 fde0 bl 802a86c sock->lastdata.netbuf = buf; 8018cac: 693a ldr r2, [r7, #16] 8018cae: 68fb ldr r3, [r7, #12] 8018cb0: 605a str r2, [r3, #4] } buflen = buf->p->tot_len; 8018cb2: 693b ldr r3, [r7, #16] 8018cb4: 681b ldr r3, [r3, #0] 8018cb6: 891b ldrh r3, [r3, #8] 8018cb8: 837b strh r3, [r7, #26] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw: buflen=%"U16_F"\n", buflen)); copied = 0; 8018cba: 2300 movs r3, #0 8018cbc: 847b strh r3, [r7, #34] @ 0x22 /* copy the pbuf payload into the iovs */ for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8018cbe: 2300 movs r3, #0 8018cc0: 61fb str r3, [r7, #28] 8018cc2: e029 b.n 8018d18 u16_t len_left = (u16_t)(buflen - copied); 8018cc4: 8b7a ldrh r2, [r7, #26] 8018cc6: 8c7b ldrh r3, [r7, #34] @ 0x22 8018cc8: 1ad3 subs r3, r2, r3 8018cca: 833b strh r3, [r7, #24] if (msg->msg_iov[i].iov_len > len_left) { 8018ccc: 687b ldr r3, [r7, #4] 8018cce: 689a ldr r2, [r3, #8] 8018cd0: 69fb ldr r3, [r7, #28] 8018cd2: 00db lsls r3, r3, #3 8018cd4: 4413 add r3, r2 8018cd6: 685a ldr r2, [r3, #4] 8018cd8: 8b3b ldrh r3, [r7, #24] 8018cda: 429a cmp r2, r3 8018cdc: d902 bls.n 8018ce4 copylen = len_left; 8018cde: 8b3b ldrh r3, [r7, #24] 8018ce0: 84bb strh r3, [r7, #36] @ 0x24 8018ce2: e006 b.n 8018cf2 } else { copylen = (u16_t)msg->msg_iov[i].iov_len; 8018ce4: 687b ldr r3, [r7, #4] 8018ce6: 689a ldr r2, [r3, #8] 8018ce8: 69fb ldr r3, [r7, #28] 8018cea: 00db lsls r3, r3, #3 8018cec: 4413 add r3, r2 8018cee: 685b ldr r3, [r3, #4] 8018cf0: 84bb strh r3, [r7, #36] @ 0x24 } /* copy the contents of the received buffer into the supplied memory buffer */ pbuf_copy_partial(buf->p, (u8_t *)msg->msg_iov[i].iov_base, copylen, copied); 8018cf2: 693b ldr r3, [r7, #16] 8018cf4: 6818 ldr r0, [r3, #0] 8018cf6: 687b ldr r3, [r7, #4] 8018cf8: 689a ldr r2, [r3, #8] 8018cfa: 69fb ldr r3, [r7, #28] 8018cfc: 00db lsls r3, r3, #3 8018cfe: 4413 add r3, r2 8018d00: 6819 ldr r1, [r3, #0] 8018d02: 8c7b ldrh r3, [r7, #34] @ 0x22 8018d04: 8cba ldrh r2, [r7, #36] @ 0x24 8018d06: f002 fd3f bl 801b788 copied = (u16_t)(copied + copylen); 8018d0a: 8c7a ldrh r2, [r7, #34] @ 0x22 8018d0c: 8cbb ldrh r3, [r7, #36] @ 0x24 8018d0e: 4413 add r3, r2 8018d10: 847b strh r3, [r7, #34] @ 0x22 for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8018d12: 69fb ldr r3, [r7, #28] 8018d14: 3301 adds r3, #1 8018d16: 61fb str r3, [r7, #28] 8018d18: 687b ldr r3, [r7, #4] 8018d1a: 68db ldr r3, [r3, #12] 8018d1c: 69fa ldr r2, [r7, #28] 8018d1e: 429a cmp r2, r3 8018d20: da03 bge.n 8018d2a 8018d22: 8c7a ldrh r2, [r7, #34] @ 0x22 8018d24: 8b7b ldrh r3, [r7, #26] 8018d26: 429a cmp r2, r3 8018d28: d3cc bcc.n 8018cc4 } /* Check to see from where the data was.*/ #if !SOCKETS_DEBUG if (msg->msg_name && msg->msg_namelen) 8018d2a: 687b ldr r3, [r7, #4] 8018d2c: 681b ldr r3, [r3, #0] 8018d2e: 2b00 cmp r3, #0 8018d30: d01a beq.n 8018d68 8018d32: 687b ldr r3, [r7, #4] 8018d34: 685b ldr r3, [r3, #4] 8018d36: 2b00 cmp r3, #0 8018d38: d016 beq.n 8018d68 #endif /* !SOCKETS_DEBUG */ { LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw(%d): addr=", dbg_s)); ip_addr_debug_print_val(SOCKETS_DEBUG, *netbuf_fromaddr(buf)); LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", netbuf_fromport(buf), copied)); if (msg->msg_name && msg->msg_namelen) { 8018d3a: 687b ldr r3, [r7, #4] 8018d3c: 681b ldr r3, [r3, #0] 8018d3e: 2b00 cmp r3, #0 8018d40: d012 beq.n 8018d68 8018d42: 687b ldr r3, [r7, #4] 8018d44: 685b ldr r3, [r3, #4] 8018d46: 2b00 cmp r3, #0 8018d48: d00e beq.n 8018d68 lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8018d4a: 68fb ldr r3, [r7, #12] 8018d4c: 6818 ldr r0, [r3, #0] 8018d4e: 693b ldr r3, [r7, #16] 8018d50: f103 0108 add.w r1, r3, #8 8018d54: 693b ldr r3, [r7, #16] 8018d56: 899a ldrh r2, [r3, #12] (struct sockaddr *)msg->msg_name, &msg->msg_namelen); 8018d58: 687b ldr r3, [r7, #4] 8018d5a: 681c ldr r4, [r3, #0] lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8018d5c: 687b ldr r3, [r7, #4] 8018d5e: 3304 adds r3, #4 8018d60: 9300 str r3, [sp, #0] 8018d62: 4623 mov r3, r4 8018d64: f7ff feba bl 8018adc } } /* Initialize flag output */ msg->msg_flags = 0; 8018d68: 687b ldr r3, [r7, #4] 8018d6a: 2200 movs r2, #0 8018d6c: 619a str r2, [r3, #24] if (msg->msg_control) { 8018d6e: 687b ldr r3, [r7, #4] 8018d70: 691b ldr r3, [r3, #16] 8018d72: 2b00 cmp r3, #0 8018d74: d007 beq.n 8018d86 u8_t wrote_msg = 0; 8018d76: 2300 movs r3, #0 8018d78: 75fb strb r3, [r7, #23] #endif /* LWIP_IPV4 */ } } #endif /* LWIP_NETBUF_RECVINFO */ if (!wrote_msg) { 8018d7a: 7dfb ldrb r3, [r7, #23] 8018d7c: 2b00 cmp r3, #0 8018d7e: d102 bne.n 8018d86 msg->msg_controllen = 0; 8018d80: 687b ldr r3, [r7, #4] 8018d82: 2200 movs r2, #0 8018d84: 615a str r2, [r3, #20] } } /* If we don't peek the incoming message: zero lastdata pointer and free the netbuf */ if ((flags & MSG_PEEK) == 0) { 8018d86: 68bb ldr r3, [r7, #8] 8018d88: f003 0301 and.w r3, r3, #1 8018d8c: 2b00 cmp r3, #0 8018d8e: d106 bne.n 8018d9e sock->lastdata.netbuf = NULL; 8018d90: 68fb ldr r3, [r7, #12] 8018d92: 2200 movs r2, #0 8018d94: 605a str r2, [r3, #4] netbuf_delete(buf); 8018d96: 693b ldr r3, [r7, #16] 8018d98: 4618 mov r0, r3 8018d9a: f7ff fb05 bl 80183a8 } if (datagram_len) { 8018d9e: 683b ldr r3, [r7, #0] 8018da0: 2b00 cmp r3, #0 8018da2: d002 beq.n 8018daa *datagram_len = buflen; 8018da4: 683b ldr r3, [r7, #0] 8018da6: 8b7a ldrh r2, [r7, #26] 8018da8: 801a strh r2, [r3, #0] } return ERR_OK; 8018daa: 2300 movs r3, #0 } 8018dac: 4618 mov r0, r3 8018dae: 372c adds r7, #44 @ 0x2c 8018db0: 46bd mov sp, r7 8018db2: bd90 pop {r4, r7, pc} 8018db4: 0802e5cc .word 0x0802e5cc 8018db8: 0802e770 .word 0x0802e770 8018dbc: 0802e620 .word 0x0802e620 8018dc0: 0802e79c .word 0x0802e79c 08018dc4 : ssize_t lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { 8018dc4: b580 push {r7, lr} 8018dc6: b096 sub sp, #88 @ 0x58 8018dc8: af02 add r7, sp, #8 8018dca: 60f8 str r0, [r7, #12] 8018dcc: 60b9 str r1, [r7, #8] 8018dce: 607a str r2, [r7, #4] 8018dd0: 603b str r3, [r7, #0] struct lwip_sock *sock; ssize_t ret; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d, %p, %"SZT_F", 0x%x, ..)\n", s, mem, len, flags)); sock = get_socket(s); 8018dd2: 68f8 ldr r0, [r7, #12] 8018dd4: f7ff fbb8 bl 8018548 8018dd8: 64f8 str r0, [r7, #76] @ 0x4c if (!sock) { 8018dda: 6cfb ldr r3, [r7, #76] @ 0x4c 8018ddc: 2b00 cmp r3, #0 8018dde: d102 bne.n 8018de6 return -1; 8018de0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018de4: e078 b.n 8018ed8 } #if LWIP_TCP if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8018de6: 6cfb ldr r3, [r7, #76] @ 0x4c 8018de8: 681b ldr r3, [r3, #0] 8018dea: 781b ldrb r3, [r3, #0] 8018dec: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018df0: 2b10 cmp r3, #16 8018df2: d112 bne.n 8018e1a ret = lwip_recv_tcp(sock, mem, len, flags); 8018df4: 683b ldr r3, [r7, #0] 8018df6: 687a ldr r2, [r7, #4] 8018df8: 68b9 ldr r1, [r7, #8] 8018dfa: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018dfc: f7ff fd5e bl 80188bc 8018e00: 6478 str r0, [r7, #68] @ 0x44 lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret); 8018e02: 6c7b ldr r3, [r7, #68] @ 0x44 8018e04: 9301 str r3, [sp, #4] 8018e06: 68fb ldr r3, [r7, #12] 8018e08: 9300 str r3, [sp, #0] 8018e0a: 4b35 ldr r3, [pc, #212] @ (8018ee0 ) 8018e0c: 6dfa ldr r2, [r7, #92] @ 0x5c 8018e0e: 6db9 ldr r1, [r7, #88] @ 0x58 8018e10: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018e12: f7ff fed1 bl 8018bb8 done_socket(sock); return ret; 8018e16: 6c7b ldr r3, [r7, #68] @ 0x44 8018e18: e05e b.n 8018ed8 } else #endif { u16_t datagram_len = 0; 8018e1a: 2300 movs r3, #0 8018e1c: 877b strh r3, [r7, #58] @ 0x3a struct iovec vec; struct msghdr msg; err_t err; vec.iov_base = mem; 8018e1e: 68bb ldr r3, [r7, #8] 8018e20: 633b str r3, [r7, #48] @ 0x30 vec.iov_len = len; 8018e22: 687b ldr r3, [r7, #4] 8018e24: 637b str r3, [r7, #52] @ 0x34 msg.msg_control = NULL; 8018e26: 2300 movs r3, #0 8018e28: 627b str r3, [r7, #36] @ 0x24 msg.msg_controllen = 0; 8018e2a: 2300 movs r3, #0 8018e2c: 62bb str r3, [r7, #40] @ 0x28 msg.msg_flags = 0; 8018e2e: 2300 movs r3, #0 8018e30: 62fb str r3, [r7, #44] @ 0x2c msg.msg_iov = &vec; 8018e32: f107 0330 add.w r3, r7, #48 @ 0x30 8018e36: 61fb str r3, [r7, #28] msg.msg_iovlen = 1; 8018e38: 2301 movs r3, #1 8018e3a: 623b str r3, [r7, #32] msg.msg_name = from; 8018e3c: 6dbb ldr r3, [r7, #88] @ 0x58 8018e3e: 617b str r3, [r7, #20] msg.msg_namelen = (fromlen ? *fromlen : 0); 8018e40: 6dfb ldr r3, [r7, #92] @ 0x5c 8018e42: 2b00 cmp r3, #0 8018e44: d002 beq.n 8018e4c 8018e46: 6dfb ldr r3, [r7, #92] @ 0x5c 8018e48: 681b ldr r3, [r3, #0] 8018e4a: e000 b.n 8018e4e 8018e4c: 2300 movs r3, #0 8018e4e: 61bb str r3, [r7, #24] err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s); 8018e50: f107 013a add.w r1, r7, #58 @ 0x3a 8018e54: f107 0214 add.w r2, r7, #20 8018e58: 68fb ldr r3, [r7, #12] 8018e5a: 9300 str r3, [sp, #0] 8018e5c: 460b mov r3, r1 8018e5e: 6839 ldr r1, [r7, #0] 8018e60: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018e62: f7ff fedb bl 8018c1c 8018e66: 4603 mov r3, r0 8018e68: f887 304b strb.w r3, [r7, #75] @ 0x4b if (err != ERR_OK) { 8018e6c: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8018e70: 2b00 cmp r3, #0 8018e72: d00e beq.n 8018e92 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom[UDP/RAW](%d): buf == NULL, error is \"%s\"!\n", s, lwip_strerr(err))); sock_set_errno(sock, err_to_errno(err)); 8018e74: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8018e78: 4618 mov r0, r3 8018e7a: f7ff fa77 bl 801836c 8018e7e: 63f8 str r0, [r7, #60] @ 0x3c 8018e80: 6bfb ldr r3, [r7, #60] @ 0x3c 8018e82: 2b00 cmp r3, #0 8018e84: d002 beq.n 8018e8c 8018e86: 4a17 ldr r2, [pc, #92] @ (8018ee4 ) 8018e88: 6bfb ldr r3, [r7, #60] @ 0x3c 8018e8a: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8018e8c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018e90: e022 b.n 8018ed8 } ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); 8018e92: 8f7b ldrh r3, [r7, #58] @ 0x3a 8018e94: 461a mov r2, r3 8018e96: 687b ldr r3, [r7, #4] 8018e98: 4293 cmp r3, r2 8018e9a: bf28 it cs 8018e9c: 4613 movcs r3, r2 8018e9e: f06f 4200 mvn.w r2, #2147483648 @ 0x80000000 8018ea2: 4293 cmp r3, r2 8018ea4: d206 bcs.n 8018eb4 8018ea6: 8f7b ldrh r3, [r7, #58] @ 0x3a 8018ea8: 461a mov r2, r3 8018eaa: 687b ldr r3, [r7, #4] 8018eac: 4293 cmp r3, r2 8018eae: bf28 it cs 8018eb0: 4613 movcs r3, r2 8018eb2: e001 b.n 8018eb8 8018eb4: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8018eb8: 647b str r3, [r7, #68] @ 0x44 if (fromlen) { 8018eba: 6dfb ldr r3, [r7, #92] @ 0x5c 8018ebc: 2b00 cmp r3, #0 8018ebe: d002 beq.n 8018ec6 *fromlen = msg.msg_namelen; 8018ec0: 69ba ldr r2, [r7, #24] 8018ec2: 6dfb ldr r3, [r7, #92] @ 0x5c 8018ec4: 601a str r2, [r3, #0] } } sock_set_errno(sock, 0); 8018ec6: 2300 movs r3, #0 8018ec8: 643b str r3, [r7, #64] @ 0x40 8018eca: 6c3b ldr r3, [r7, #64] @ 0x40 8018ecc: 2b00 cmp r3, #0 8018ece: d002 beq.n 8018ed6 8018ed0: 4a04 ldr r2, [pc, #16] @ (8018ee4 ) 8018ed2: 6c3b ldr r3, [r7, #64] @ 0x40 8018ed4: 6013 str r3, [r2, #0] done_socket(sock); return ret; 8018ed6: 6c7b ldr r3, [r7, #68] @ 0x44 } 8018ed8: 4618 mov r0, r3 8018eda: 3750 adds r7, #80 @ 0x50 8018edc: 46bd mov sp, r7 8018ede: bd80 pop {r7, pc} 8018ee0: 0802e7a8 .word 0x0802e7a8 8018ee4: 2402b260 .word 0x2402b260 08018ee8 : return lwip_recvmsg(s, &msg, 0); } ssize_t lwip_recv(int s, void *mem, size_t len, int flags) { 8018ee8: b580 push {r7, lr} 8018eea: b086 sub sp, #24 8018eec: af02 add r7, sp, #8 8018eee: 60f8 str r0, [r7, #12] 8018ef0: 60b9 str r1, [r7, #8] 8018ef2: 607a str r2, [r7, #4] 8018ef4: 603b str r3, [r7, #0] return lwip_recvfrom(s, mem, len, flags, NULL, NULL); 8018ef6: 2300 movs r3, #0 8018ef8: 9301 str r3, [sp, #4] 8018efa: 2300 movs r3, #0 8018efc: 9300 str r3, [sp, #0] 8018efe: 683b ldr r3, [r7, #0] 8018f00: 687a ldr r2, [r7, #4] 8018f02: 68b9 ldr r1, [r7, #8] 8018f04: 68f8 ldr r0, [r7, #12] 8018f06: f7ff ff5d bl 8018dc4 8018f0a: 4603 mov r3, r0 } 8018f0c: 4618 mov r0, r3 8018f0e: 3710 adds r7, #16 8018f10: 46bd mov sp, r7 8018f12: bd80 pop {r7, pc} 08018f14 : #endif /* LWIP_UDP || LWIP_RAW */ } ssize_t lwip_send(int s, const void *data, size_t size, int flags) { 8018f14: b580 push {r7, lr} 8018f16: b08a sub sp, #40 @ 0x28 8018f18: af02 add r7, sp, #8 8018f1a: 60f8 str r0, [r7, #12] 8018f1c: 60b9 str r1, [r7, #8] 8018f1e: 607a str r2, [r7, #4] 8018f20: 603b str r3, [r7, #0] size_t written; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d, data=%p, size=%"SZT_F", flags=0x%x)\n", s, data, size, flags)); sock = get_socket(s); 8018f22: 68f8 ldr r0, [r7, #12] 8018f24: f7ff fb10 bl 8018548 8018f28: 61f8 str r0, [r7, #28] if (!sock) { 8018f2a: 69fb ldr r3, [r7, #28] 8018f2c: 2b00 cmp r3, #0 8018f2e: d102 bne.n 8018f36 return -1; 8018f30: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018f34: e046 b.n 8018fc4 } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { 8018f36: 69fb ldr r3, [r7, #28] 8018f38: 681b ldr r3, [r3, #0] 8018f3a: 781b ldrb r3, [r3, #0] 8018f3c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018f40: 2b10 cmp r3, #16 8018f42: d00b beq.n 8018f5c #if (LWIP_UDP || LWIP_RAW) done_socket(sock); return lwip_sendto(s, data, size, flags, NULL, 0); 8018f44: 2300 movs r3, #0 8018f46: 9301 str r3, [sp, #4] 8018f48: 2300 movs r3, #0 8018f4a: 9300 str r3, [sp, #0] 8018f4c: 683b ldr r3, [r7, #0] 8018f4e: 687a ldr r2, [r7, #4] 8018f50: 68b9 ldr r1, [r7, #8] 8018f52: 68f8 ldr r0, [r7, #12] 8018f54: f000 f83c bl 8018fd0 8018f58: 4603 mov r3, r0 8018f5a: e033 b.n 8018fc4 return -1; #endif /* (LWIP_UDP || LWIP_RAW) */ } write_flags = (u8_t)(NETCONN_COPY | ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 8018f5c: 683b ldr r3, [r7, #0] 8018f5e: f003 0310 and.w r3, r3, #16 write_flags = (u8_t)(NETCONN_COPY | 8018f62: 2b00 cmp r3, #0 8018f64: d001 beq.n 8018f6a 8018f66: 2203 movs r2, #3 8018f68: e000 b.n 8018f6c 8018f6a: 2201 movs r2, #1 ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 8018f6c: 683b ldr r3, [r7, #0] 8018f6e: 105b asrs r3, r3, #1 8018f70: b25b sxtb r3, r3 8018f72: f003 0304 and.w r3, r3, #4 8018f76: b25b sxtb r3, r3 8018f78: 4313 orrs r3, r2 8018f7a: b25b sxtb r3, r3 write_flags = (u8_t)(NETCONN_COPY | 8018f7c: 76fb strb r3, [r7, #27] ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0)); written = 0; 8018f7e: 2300 movs r3, #0 8018f80: 613b str r3, [r7, #16] err = netconn_write_partly(sock->conn, data, size, write_flags, &written); 8018f82: 69fb ldr r3, [r7, #28] 8018f84: 6818 ldr r0, [r3, #0] 8018f86: 7efa ldrb r2, [r7, #27] 8018f88: f107 0310 add.w r3, r7, #16 8018f8c: 9300 str r3, [sp, #0] 8018f8e: 4613 mov r3, r2 8018f90: 687a ldr r2, [r7, #4] 8018f92: 68b9 ldr r1, [r7, #8] 8018f94: f7fd fc04 bl 80167a0 8018f98: 4603 mov r3, r0 8018f9a: 76bb strb r3, [r7, #26] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d) err=%d written=%"SZT_F"\n", s, err, written)); sock_set_errno(sock, err_to_errno(err)); 8018f9c: f997 301a ldrsb.w r3, [r7, #26] 8018fa0: 4618 mov r0, r3 8018fa2: f7ff f9e3 bl 801836c 8018fa6: 6178 str r0, [r7, #20] 8018fa8: 697b ldr r3, [r7, #20] 8018faa: 2b00 cmp r3, #0 8018fac: d002 beq.n 8018fb4 8018fae: 4a07 ldr r2, [pc, #28] @ (8018fcc ) 8018fb0: 697b ldr r3, [r7, #20] 8018fb2: 6013 str r3, [r2, #0] done_socket(sock); /* casting 'written' to ssize_t is OK here since the netconn API limits it to SSIZE_MAX */ return (err == ERR_OK ? (ssize_t)written : -1); 8018fb4: f997 301a ldrsb.w r3, [r7, #26] 8018fb8: 2b00 cmp r3, #0 8018fba: d101 bne.n 8018fc0 8018fbc: 693b ldr r3, [r7, #16] 8018fbe: e001 b.n 8018fc4 8018fc0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8018fc4: 4618 mov r0, r3 8018fc6: 3720 adds r7, #32 8018fc8: 46bd mov sp, r7 8018fca: bd80 pop {r7, pc} 8018fcc: 2402b260 .word 0x2402b260 08018fd0 : } ssize_t lwip_sendto(int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen) { 8018fd0: b580 push {r7, lr} 8018fd2: b08e sub sp, #56 @ 0x38 8018fd4: af00 add r7, sp, #0 8018fd6: 60f8 str r0, [r7, #12] 8018fd8: 60b9 str r1, [r7, #8] 8018fda: 607a str r2, [r7, #4] 8018fdc: 603b str r3, [r7, #0] err_t err; u16_t short_size; u16_t remote_port; struct netbuf buf; sock = get_socket(s); 8018fde: 68f8 ldr r0, [r7, #12] 8018fe0: f7ff fab2 bl 8018548 8018fe4: 6338 str r0, [r7, #48] @ 0x30 if (!sock) { 8018fe6: 6b3b ldr r3, [r7, #48] @ 0x30 8018fe8: 2b00 cmp r3, #0 8018fea: d102 bne.n 8018ff2 return -1; 8018fec: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018ff0: e093 b.n 801911a } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8018ff2: 6b3b ldr r3, [r7, #48] @ 0x30 8018ff4: 681b ldr r3, [r3, #0] 8018ff6: 781b ldrb r3, [r3, #0] 8018ff8: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018ffc: 2b10 cmp r3, #16 8018ffe: d107 bne.n 8019010 #if LWIP_TCP done_socket(sock); return lwip_send(s, data, size, flags); 8019000: 683b ldr r3, [r7, #0] 8019002: 687a ldr r2, [r7, #4] 8019004: 68b9 ldr r1, [r7, #8] 8019006: 68f8 ldr r0, [r7, #12] 8019008: f7ff ff84 bl 8018f14 801900c: 4603 mov r3, r0 801900e: e084 b.n 801911a done_socket(sock); return -1; #endif /* LWIP_TCP */ } if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) { 8019010: 687b ldr r3, [r7, #4] 8019012: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8019016: d30a bcc.n 801902e /* cannot fit into one datagram (at least for us) */ sock_set_errno(sock, EMSGSIZE); 8019018: 235a movs r3, #90 @ 0x5a 801901a: 623b str r3, [r7, #32] 801901c: 6a3b ldr r3, [r7, #32] 801901e: 2b00 cmp r3, #0 8019020: d002 beq.n 8019028 8019022: 4a40 ldr r2, [pc, #256] @ (8019124 ) 8019024: 6a3b ldr r3, [r7, #32] 8019026: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019028: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801902c: e075 b.n 801911a } short_size = (u16_t)size; 801902e: 687b ldr r3, [r7, #4] 8019030: 85fb strh r3, [r7, #46] @ 0x2e LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || 8019032: 6c3b ldr r3, [r7, #64] @ 0x40 8019034: 2b00 cmp r3, #0 8019036: d102 bne.n 801903e 8019038: 6c7b ldr r3, [r7, #68] @ 0x44 801903a: 2b00 cmp r3, #0 801903c: d023 beq.n 8019086 801903e: 6c7b ldr r3, [r7, #68] @ 0x44 8019040: 2b10 cmp r3, #16 8019042: d10b bne.n 801905c 8019044: 6c3b ldr r3, [r7, #64] @ 0x40 8019046: 2b00 cmp r3, #0 8019048: d008 beq.n 801905c 801904a: 6c3b ldr r3, [r7, #64] @ 0x40 801904c: 785b ldrb r3, [r3, #1] 801904e: 2b02 cmp r3, #2 8019050: d104 bne.n 801905c 8019052: 6c3b ldr r3, [r7, #64] @ 0x40 8019054: f003 0303 and.w r3, r3, #3 8019058: 2b00 cmp r3, #0 801905a: d014 beq.n 8019086 801905c: 4b32 ldr r3, [pc, #200] @ (8019128 ) 801905e: f240 6252 movw r2, #1618 @ 0x652 8019062: 4932 ldr r1, [pc, #200] @ (801912c ) 8019064: 4832 ldr r0, [pc, #200] @ (8019130 ) 8019066: f011 fc01 bl 802a86c 801906a: f06f 000f mvn.w r0, #15 801906e: f7ff f97d bl 801836c 8019072: 62b8 str r0, [r7, #40] @ 0x28 8019074: 6abb ldr r3, [r7, #40] @ 0x28 8019076: 2b00 cmp r3, #0 8019078: d002 beq.n 8019080 801907a: 4a2a ldr r2, [pc, #168] @ (8019124 ) 801907c: 6abb ldr r3, [r7, #40] @ 0x28 801907e: 6013 str r3, [r2, #0] 8019080: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8019084: e049 b.n 801911a ((to != NULL) && (IS_SOCK_ADDR_TYPE_VALID(to) && IS_SOCK_ADDR_ALIGNED(to))))), sock_set_errno(sock, err_to_errno(ERR_ARG)); done_socket(sock); return -1;); LWIP_UNUSED_ARG(tolen); /* initialize a buffer */ buf.p = buf.ptr = NULL; 8019086: 2300 movs r3, #0 8019088: 617b str r3, [r7, #20] 801908a: 697b ldr r3, [r7, #20] 801908c: 613b str r3, [r7, #16] #if LWIP_CHECKSUM_ON_COPY buf.flags = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ if (to) { 801908e: 6c3b ldr r3, [r7, #64] @ 0x40 8019090: 2b00 cmp r3, #0 8019092: d00a beq.n 80190aa SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); 8019094: 6c3b ldr r3, [r7, #64] @ 0x40 8019096: 685b ldr r3, [r3, #4] 8019098: 61bb str r3, [r7, #24] 801909a: 6c3b ldr r3, [r7, #64] @ 0x40 801909c: 885b ldrh r3, [r3, #2] 801909e: 4618 mov r0, r3 80190a0: f000 fc8a bl 80199b8 80190a4: 4603 mov r3, r0 80190a6: 86fb strh r3, [r7, #54] @ 0x36 80190a8: e003 b.n 80190b2 } else { remote_port = 0; 80190aa: 2300 movs r3, #0 80190ac: 86fb strh r3, [r7, #54] @ 0x36 ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); 80190ae: 2300 movs r3, #0 80190b0: 61bb str r3, [r7, #24] } netbuf_fromport(&buf) = remote_port; 80190b2: 8efb ldrh r3, [r7, #54] @ 0x36 80190b4: 83bb strh r3, [r7, #28] MEMCPY(buf.p->payload, data, short_size); } err = ERR_OK; } #else /* LWIP_NETIF_TX_SINGLE_PBUF */ err = netbuf_ref(&buf, data, short_size); 80190b6: 8dfa ldrh r2, [r7, #46] @ 0x2e 80190b8: f107 0310 add.w r3, r7, #16 80190bc: 68b9 ldr r1, [r7, #8] 80190be: 4618 mov r0, r3 80190c0: f7ff f9ba bl 8018438 80190c4: 4603 mov r3, r0 80190c6: f887 302d strb.w r3, [r7, #45] @ 0x2d #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ if (err == ERR_OK) { 80190ca: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 80190ce: 2b00 cmp r3, #0 80190d0: d10a bne.n 80190e8 IP_SET_TYPE_VAL(buf.addr, IPADDR_TYPE_V4); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ /* send the data */ err = netconn_send(sock->conn, &buf); 80190d2: 6b3b ldr r3, [r7, #48] @ 0x30 80190d4: 681b ldr r3, [r3, #0] 80190d6: f107 0210 add.w r2, r7, #16 80190da: 4611 mov r1, r2 80190dc: 4618 mov r0, r3 80190de: f7fd fb31 bl 8016744 80190e2: 4603 mov r3, r0 80190e4: f887 302d strb.w r3, [r7, #45] @ 0x2d } /* deallocated the buffer */ netbuf_free(&buf); 80190e8: f107 0310 add.w r3, r7, #16 80190ec: 4618 mov r0, r3 80190ee: f7ff f97b bl 80183e8 sock_set_errno(sock, err_to_errno(err)); 80190f2: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 80190f6: 4618 mov r0, r3 80190f8: f7ff f938 bl 801836c 80190fc: 6278 str r0, [r7, #36] @ 0x24 80190fe: 6a7b ldr r3, [r7, #36] @ 0x24 8019100: 2b00 cmp r3, #0 8019102: d002 beq.n 801910a 8019104: 4a07 ldr r2, [pc, #28] @ (8019124 ) 8019106: 6a7b ldr r3, [r7, #36] @ 0x24 8019108: 6013 str r3, [r2, #0] done_socket(sock); return (err == ERR_OK ? short_size : -1); 801910a: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 801910e: 2b00 cmp r3, #0 8019110: d101 bne.n 8019116 8019112: 8dfb ldrh r3, [r7, #46] @ 0x2e 8019114: e001 b.n 801911a 8019116: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 801911a: 4618 mov r0, r3 801911c: 3738 adds r7, #56 @ 0x38 801911e: 46bd mov sp, r7 8019120: bd80 pop {r7, pc} 8019122: bf00 nop 8019124: 2402b260 .word 0x2402b260 8019128: 0802e5cc .word 0x0802e5cc 801912c: 0802e8ac .word 0x0802e8ac 8019130: 0802e620 .word 0x0802e620 08019134 : int lwip_socket(int domain, int type, int protocol) { 8019134: b580 push {r7, lr} 8019136: b086 sub sp, #24 8019138: af00 add r7, sp, #0 801913a: 60f8 str r0, [r7, #12] 801913c: 60b9 str r1, [r7, #8] 801913e: 607a str r2, [r7, #4] int i; LWIP_UNUSED_ARG(domain); /* @todo: check this */ /* create a netconn */ switch (type) { 8019140: 68bb ldr r3, [r7, #8] 8019142: 2b03 cmp r3, #3 8019144: d009 beq.n 801915a 8019146: 68bb ldr r3, [r7, #8] 8019148: 2b03 cmp r3, #3 801914a: dc23 bgt.n 8019194 801914c: 68bb ldr r3, [r7, #8] 801914e: 2b01 cmp r3, #1 8019150: d019 beq.n 8019186 8019152: 68bb ldr r3, [r7, #8] 8019154: 2b02 cmp r3, #2 8019156: d009 beq.n 801916c 8019158: e01c b.n 8019194 case SOCK_RAW: conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), 801915a: 687b ldr r3, [r7, #4] 801915c: b2db uxtb r3, r3 801915e: 4a22 ldr r2, [pc, #136] @ (80191e8 ) 8019160: 4619 mov r1, r3 8019162: 2040 movs r0, #64 @ 0x40 8019164: f7fc ff60 bl 8016028 8019168: 6178 str r0, [r7, #20] (u8_t)protocol, DEFAULT_SOCKET_EVENTCB); LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ", domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); break; 801916a: e019 b.n 80191a0 case SOCK_DGRAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, 801916c: 687b ldr r3, [r7, #4] 801916e: 2b88 cmp r3, #136 @ 0x88 8019170: d101 bne.n 8019176 8019172: 2321 movs r3, #33 @ 0x21 8019174: e000 b.n 8019178 8019176: 2320 movs r3, #32 8019178: 4a1b ldr r2, [pc, #108] @ (80191e8 ) 801917a: 2100 movs r1, #0 801917c: 4618 mov r0, r3 801917e: f7fc ff53 bl 8016028 8019182: 6178 str r0, [r7, #20] if (conn) { /* netconn layer enables pktinfo by default, sockets default to off */ conn->flags &= ~NETCONN_FLAG_PKTINFO; } #endif /* LWIP_NETBUF_RECVINFO */ break; 8019184: e00c b.n 80191a0 case SOCK_STREAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB); 8019186: 4a18 ldr r2, [pc, #96] @ (80191e8 ) 8019188: 2100 movs r1, #0 801918a: 2010 movs r0, #16 801918c: f7fc ff4c bl 8016028 8019190: 6178 str r0, [r7, #20] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); break; 8019192: e005 b.n 80191a0 default: LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", domain, type, protocol)); set_errno(EINVAL); 8019194: 4b15 ldr r3, [pc, #84] @ (80191ec ) 8019196: 2216 movs r2, #22 8019198: 601a str r2, [r3, #0] return -1; 801919a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801919e: e01e b.n 80191de } if (!conn) { 80191a0: 697b ldr r3, [r7, #20] 80191a2: 2b00 cmp r3, #0 80191a4: d105 bne.n 80191b2 LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); set_errno(ENOBUFS); 80191a6: 4b11 ldr r3, [pc, #68] @ (80191ec ) 80191a8: 2269 movs r2, #105 @ 0x69 80191aa: 601a str r2, [r3, #0] return -1; 80191ac: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80191b0: e015 b.n 80191de } i = alloc_socket(conn, 0); 80191b2: 2100 movs r1, #0 80191b4: 6978 ldr r0, [r7, #20] 80191b6: f7ff f9df bl 8018578 80191ba: 6138 str r0, [r7, #16] if (i == -1) { 80191bc: 693b ldr r3, [r7, #16] 80191be: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80191c2: d108 bne.n 80191d6 netconn_delete(conn); 80191c4: 6978 ldr r0, [r7, #20] 80191c6: f7fc ffcd bl 8016164 set_errno(ENFILE); 80191ca: 4b08 ldr r3, [pc, #32] @ (80191ec ) 80191cc: 2217 movs r2, #23 80191ce: 601a str r2, [r3, #0] return -1; 80191d0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80191d4: e003 b.n 80191de } conn->socket = i; 80191d6: 697b ldr r3, [r7, #20] 80191d8: 693a ldr r2, [r7, #16] 80191da: 619a str r2, [r3, #24] done_socket(&sockets[i - LWIP_SOCKET_OFFSET]); LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); set_errno(0); return i; 80191dc: 693b ldr r3, [r7, #16] } 80191de: 4618 mov r0, r3 80191e0: 3718 adds r7, #24 80191e2: 46bd mov sp, r7 80191e4: bd80 pop {r7, pc} 80191e6: bf00 nop 80191e8: 08019279 .word 0x08019279 80191ec: 2402b260 .word 0x2402b260 080191f0 : * Check whether event_callback should wake up a thread waiting in * lwip_poll. */ static int lwip_poll_should_wake(const struct lwip_select_cb *scb, int fd, int has_recvevent, int has_sendevent, int has_errevent) { 80191f0: b480 push {r7} 80191f2: b087 sub sp, #28 80191f4: af00 add r7, sp, #0 80191f6: 60f8 str r0, [r7, #12] 80191f8: 60b9 str r1, [r7, #8] 80191fa: 607a str r2, [r7, #4] 80191fc: 603b str r3, [r7, #0] nfds_t fdi; for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 80191fe: 2300 movs r3, #0 8019200: 617b str r3, [r7, #20] 8019202: e02c b.n 801925e const struct pollfd *pollfd = &scb->poll_fds[fdi]; 8019204: 68fb ldr r3, [r7, #12] 8019206: 695a ldr r2, [r3, #20] 8019208: 697b ldr r3, [r7, #20] 801920a: 00db lsls r3, r3, #3 801920c: 4413 add r3, r2 801920e: 613b str r3, [r7, #16] if (pollfd->fd == fd) { 8019210: 693b ldr r3, [r7, #16] 8019212: 681b ldr r3, [r3, #0] 8019214: 68ba ldr r2, [r7, #8] 8019216: 429a cmp r2, r3 8019218: d11e bne.n 8019258 /* Do not update pollfd->revents right here; that would be a data race because lwip_pollscan accesses revents without protecting. */ if (has_recvevent && (pollfd->events & POLLIN) != 0) { 801921a: 687b ldr r3, [r7, #4] 801921c: 2b00 cmp r3, #0 801921e: d009 beq.n 8019234 8019220: 693b ldr r3, [r7, #16] 8019222: f9b3 3004 ldrsh.w r3, [r3, #4] 8019226: b29b uxth r3, r3 8019228: f003 0301 and.w r3, r3, #1 801922c: 2b00 cmp r3, #0 801922e: d001 beq.n 8019234 return 1; 8019230: 2301 movs r3, #1 8019232: e01a b.n 801926a } if (has_sendevent && (pollfd->events & POLLOUT) != 0) { 8019234: 683b ldr r3, [r7, #0] 8019236: 2b00 cmp r3, #0 8019238: d009 beq.n 801924e 801923a: 693b ldr r3, [r7, #16] 801923c: f9b3 3004 ldrsh.w r3, [r3, #4] 8019240: b29b uxth r3, r3 8019242: f003 0302 and.w r3, r3, #2 8019246: 2b00 cmp r3, #0 8019248: d001 beq.n 801924e return 1; 801924a: 2301 movs r3, #1 801924c: e00d b.n 801926a } if (has_errevent) { 801924e: 6a3b ldr r3, [r7, #32] 8019250: 2b00 cmp r3, #0 8019252: d001 beq.n 8019258 /* POLLERR is output only. */ return 1; 8019254: 2301 movs r3, #1 8019256: e008 b.n 801926a for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 8019258: 697b ldr r3, [r7, #20] 801925a: 3301 adds r3, #1 801925c: 617b str r3, [r7, #20] 801925e: 68fb ldr r3, [r7, #12] 8019260: 699b ldr r3, [r3, #24] 8019262: 697a ldr r2, [r7, #20] 8019264: 429a cmp r2, r3 8019266: d3cd bcc.n 8019204 } } } return 0; 8019268: 2300 movs r3, #0 } 801926a: 4618 mov r0, r3 801926c: 371c adds r7, #28 801926e: 46bd mov sp, r7 8019270: f85d 7b04 ldr.w r7, [sp], #4 8019274: 4770 bx lr ... 08019278 : * NETCONN_EVT_ERROR * This requirement will be asserted in select_check_waiters() */ static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) { 8019278: b580 push {r7, lr} 801927a: b08a sub sp, #40 @ 0x28 801927c: af00 add r7, sp, #0 801927e: 6078 str r0, [r7, #4] 8019280: 460b mov r3, r1 8019282: 70fb strb r3, [r7, #3] 8019284: 4613 mov r3, r2 8019286: 803b strh r3, [r7, #0] SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(len); /* Get socket */ if (conn) { 8019288: 687b ldr r3, [r7, #4] 801928a: 2b00 cmp r3, #0 801928c: f000 80a4 beq.w 80193d8 s = conn->socket; 8019290: 687b ldr r3, [r7, #4] 8019292: 699b ldr r3, [r3, #24] 8019294: 627b str r3, [r7, #36] @ 0x24 if (s < 0) { 8019296: 6a7b ldr r3, [r7, #36] @ 0x24 8019298: 2b00 cmp r3, #0 801929a: da18 bge.n 80192ce /* Data comes in right away after an accept, even though * the server task might not have created a new socket yet. * Just count down (or up) if that's the case and we * will use the data later. Note that only receive events * can happen before the new socket is set up. */ SYS_ARCH_PROTECT(lev); 801929c: f00e f850 bl 8027340 80192a0: 61f8 str r0, [r7, #28] if (conn->socket < 0) { 80192a2: 687b ldr r3, [r7, #4] 80192a4: 699b ldr r3, [r3, #24] 80192a6: 2b00 cmp r3, #0 80192a8: da0b bge.n 80192c2 if (evt == NETCONN_EVT_RCVPLUS) { 80192aa: 78fb ldrb r3, [r7, #3] 80192ac: 2b00 cmp r3, #0 80192ae: d104 bne.n 80192ba /* conn->socket is -1 on initialization lwip_accept adjusts sock->recvevent if conn->socket < -1 */ conn->socket--; 80192b0: 687b ldr r3, [r7, #4] 80192b2: 699b ldr r3, [r3, #24] 80192b4: 1e5a subs r2, r3, #1 80192b6: 687b ldr r3, [r7, #4] 80192b8: 619a str r2, [r3, #24] } SYS_ARCH_UNPROTECT(lev); 80192ba: 69f8 ldr r0, [r7, #28] 80192bc: f00e f84e bl 802735c return; 80192c0: e08d b.n 80193de } s = conn->socket; 80192c2: 687b ldr r3, [r7, #4] 80192c4: 699b ldr r3, [r3, #24] 80192c6: 627b str r3, [r7, #36] @ 0x24 SYS_ARCH_UNPROTECT(lev); 80192c8: 69f8 ldr r0, [r7, #28] 80192ca: f00e f847 bl 802735c } sock = get_socket(s); 80192ce: 6a78 ldr r0, [r7, #36] @ 0x24 80192d0: f7ff f93a bl 8018548 80192d4: 61b8 str r0, [r7, #24] if (!sock) { 80192d6: 69bb ldr r3, [r7, #24] 80192d8: 2b00 cmp r3, #0 80192da: d07f beq.n 80193dc } } else { return; } check_waiters = 1; 80192dc: 2301 movs r3, #1 80192de: 623b str r3, [r7, #32] SYS_ARCH_PROTECT(lev); 80192e0: f00e f82e bl 8027340 80192e4: 61f8 str r0, [r7, #28] /* Set event as required */ switch (evt) { 80192e6: 78fb ldrb r3, [r7, #3] 80192e8: 2b04 cmp r3, #4 80192ea: d83e bhi.n 801936a 80192ec: a201 add r2, pc, #4 @ (adr r2, 80192f4 ) 80192ee: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80192f2: bf00 nop 80192f4: 08019309 .word 0x08019309 80192f8: 0801932b .word 0x0801932b 80192fc: 08019343 .word 0x08019343 8019300: 08019357 .word 0x08019357 8019304: 08019363 .word 0x08019363 case NETCONN_EVT_RCVPLUS: sock->rcvevent++; 8019308: 69bb ldr r3, [r7, #24] 801930a: f9b3 3008 ldrsh.w r3, [r3, #8] 801930e: b29b uxth r3, r3 8019310: 3301 adds r3, #1 8019312: b29b uxth r3, r3 8019314: b21a sxth r2, r3 8019316: 69bb ldr r3, [r7, #24] 8019318: 811a strh r2, [r3, #8] if (sock->rcvevent > 1) { 801931a: 69bb ldr r3, [r7, #24] 801931c: f9b3 3008 ldrsh.w r3, [r3, #8] 8019320: 2b01 cmp r3, #1 8019322: dd2a ble.n 801937a check_waiters = 0; 8019324: 2300 movs r3, #0 8019326: 623b str r3, [r7, #32] } break; 8019328: e027 b.n 801937a case NETCONN_EVT_RCVMINUS: sock->rcvevent--; 801932a: 69bb ldr r3, [r7, #24] 801932c: f9b3 3008 ldrsh.w r3, [r3, #8] 8019330: b29b uxth r3, r3 8019332: 3b01 subs r3, #1 8019334: b29b uxth r3, r3 8019336: b21a sxth r2, r3 8019338: 69bb ldr r3, [r7, #24] 801933a: 811a strh r2, [r3, #8] check_waiters = 0; 801933c: 2300 movs r3, #0 801933e: 623b str r3, [r7, #32] break; 8019340: e01c b.n 801937c case NETCONN_EVT_SENDPLUS: if (sock->sendevent) { 8019342: 69bb ldr r3, [r7, #24] 8019344: 895b ldrh r3, [r3, #10] 8019346: 2b00 cmp r3, #0 8019348: d001 beq.n 801934e check_waiters = 0; 801934a: 2300 movs r3, #0 801934c: 623b str r3, [r7, #32] } sock->sendevent = 1; 801934e: 69bb ldr r3, [r7, #24] 8019350: 2201 movs r2, #1 8019352: 815a strh r2, [r3, #10] break; 8019354: e012 b.n 801937c case NETCONN_EVT_SENDMINUS: sock->sendevent = 0; 8019356: 69bb ldr r3, [r7, #24] 8019358: 2200 movs r2, #0 801935a: 815a strh r2, [r3, #10] check_waiters = 0; 801935c: 2300 movs r3, #0 801935e: 623b str r3, [r7, #32] break; 8019360: e00c b.n 801937c case NETCONN_EVT_ERROR: sock->errevent = 1; 8019362: 69bb ldr r3, [r7, #24] 8019364: 2201 movs r2, #1 8019366: 819a strh r2, [r3, #12] break; 8019368: e008 b.n 801937c default: LWIP_ASSERT("unknown event", 0); 801936a: 4b1e ldr r3, [pc, #120] @ (80193e4 ) 801936c: f44f 621f mov.w r2, #2544 @ 0x9f0 8019370: 491d ldr r1, [pc, #116] @ (80193e8 ) 8019372: 481e ldr r0, [pc, #120] @ (80193ec ) 8019374: f011 fa7a bl 802a86c break; 8019378: e000 b.n 801937c break; 801937a: bf00 nop } if (sock->select_waiting && check_waiters) { 801937c: 69bb ldr r3, [r7, #24] 801937e: 7b9b ldrb r3, [r3, #14] 8019380: 2b00 cmp r3, #0 8019382: d025 beq.n 80193d0 8019384: 6a3b ldr r3, [r7, #32] 8019386: 2b00 cmp r3, #0 8019388: d022 beq.n 80193d0 /* Save which events are active */ int has_recvevent, has_sendevent, has_errevent; has_recvevent = sock->rcvevent > 0; 801938a: 69bb ldr r3, [r7, #24] 801938c: f9b3 3008 ldrsh.w r3, [r3, #8] 8019390: 2b00 cmp r3, #0 8019392: bfcc ite gt 8019394: 2301 movgt r3, #1 8019396: 2300 movle r3, #0 8019398: b2db uxtb r3, r3 801939a: 617b str r3, [r7, #20] has_sendevent = sock->sendevent != 0; 801939c: 69bb ldr r3, [r7, #24] 801939e: 895b ldrh r3, [r3, #10] 80193a0: 2b00 cmp r3, #0 80193a2: bf14 ite ne 80193a4: 2301 movne r3, #1 80193a6: 2300 moveq r3, #0 80193a8: b2db uxtb r3, r3 80193aa: 613b str r3, [r7, #16] has_errevent = sock->errevent != 0; 80193ac: 69bb ldr r3, [r7, #24] 80193ae: 899b ldrh r3, [r3, #12] 80193b0: 2b00 cmp r3, #0 80193b2: bf14 ite ne 80193b4: 2301 movne r3, #1 80193b6: 2300 moveq r3, #0 80193b8: b2db uxtb r3, r3 80193ba: 60fb str r3, [r7, #12] SYS_ARCH_UNPROTECT(lev); 80193bc: 69f8 ldr r0, [r7, #28] 80193be: f00d ffcd bl 802735c /* Check any select calls waiting on this socket */ select_check_waiters(s, has_recvevent, has_sendevent, has_errevent); 80193c2: 68fb ldr r3, [r7, #12] 80193c4: 693a ldr r2, [r7, #16] 80193c6: 6979 ldr r1, [r7, #20] 80193c8: 6a78 ldr r0, [r7, #36] @ 0x24 80193ca: f000 f811 bl 80193f0 if (sock->select_waiting && check_waiters) { 80193ce: e006 b.n 80193de } else { SYS_ARCH_UNPROTECT(lev); 80193d0: 69f8 ldr r0, [r7, #28] 80193d2: f00d ffc3 bl 802735c 80193d6: e002 b.n 80193de return; 80193d8: bf00 nop 80193da: e000 b.n 80193de return; 80193dc: bf00 nop } done_socket(sock); } 80193de: 3728 adds r7, #40 @ 0x28 80193e0: 46bd mov sp, r7 80193e2: bd80 pop {r7, pc} 80193e4: 0802e5cc .word 0x0802e5cc 80193e8: 0802e948 .word 0x0802e948 80193ec: 0802e620 .word 0x0802e620 080193f0 : * of the loop, thus creating a possibility where a thread could modify the * select_cb_list during our UNPROTECT/PROTECT. We use a generational counter to * detect this change and restart the list walk. The list is expected to be small */ static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent) { 80193f0: b580 push {r7, lr} 80193f2: b088 sub sp, #32 80193f4: af02 add r7, sp, #8 80193f6: 60f8 str r0, [r7, #12] 80193f8: 60b9 str r1, [r7, #8] 80193fa: 607a str r2, [r7, #4] 80193fc: 603b str r3, [r7, #0] #if !LWIP_TCPIP_CORE_LOCKING int last_select_cb_ctr; SYS_ARCH_DECL_PROTECT(lev); #endif /* !LWIP_TCPIP_CORE_LOCKING */ LWIP_ASSERT_CORE_LOCKED(); 80193fe: f7f7 fe0d bl 801101c SYS_ARCH_PROTECT(lev); again: /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; #endif /* !LWIP_TCPIP_CORE_LOCKING */ for (scb = select_cb_list; scb != NULL; scb = scb->next) { 8019402: 4b42 ldr r3, [pc, #264] @ (801950c ) 8019404: 681b ldr r3, [r3, #0] 8019406: 617b str r3, [r7, #20] 8019408: e078 b.n 80194fc if (scb->sem_signalled == 0) { 801940a: 697b ldr r3, [r7, #20] 801940c: 69db ldr r3, [r3, #28] 801940e: 2b00 cmp r3, #0 8019410: d171 bne.n 80194f6 /* semaphore not signalled yet */ int do_signal = 0; 8019412: 2300 movs r3, #0 8019414: 613b str r3, [r7, #16] #if LWIP_SOCKET_POLL if (scb->poll_fds != NULL) { 8019416: 697b ldr r3, [r7, #20] 8019418: 695b ldr r3, [r3, #20] 801941a: 2b00 cmp r3, #0 801941c: d009 beq.n 8019432 do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent); 801941e: 683b ldr r3, [r7, #0] 8019420: 9300 str r3, [sp, #0] 8019422: 687b ldr r3, [r7, #4] 8019424: 68ba ldr r2, [r7, #8] 8019426: 68f9 ldr r1, [r7, #12] 8019428: 6978 ldr r0, [r7, #20] 801942a: f7ff fee1 bl 80191f0 801942e: 6138 str r0, [r7, #16] 8019430: e056 b.n 80194e0 else #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */ #if LWIP_SOCKET_SELECT { /* Test this select call for our socket */ if (has_recvevent) { 8019432: 68bb ldr r3, [r7, #8] 8019434: 2b00 cmp r3, #0 8019436: d017 beq.n 8019468 if (scb->readset && FD_ISSET(s, scb->readset)) { 8019438: 697b ldr r3, [r7, #20] 801943a: 689b ldr r3, [r3, #8] 801943c: 2b00 cmp r3, #0 801943e: d013 beq.n 8019468 8019440: 697b ldr r3, [r7, #20] 8019442: 689a ldr r2, [r3, #8] 8019444: 68fb ldr r3, [r7, #12] 8019446: 2b00 cmp r3, #0 8019448: da00 bge.n 801944c 801944a: 331f adds r3, #31 801944c: 115b asrs r3, r3, #5 801944e: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8019452: 68fb ldr r3, [r7, #12] 8019454: f003 031f and.w r3, r3, #31 8019458: fa22 f303 lsr.w r3, r2, r3 801945c: f003 0301 and.w r3, r3, #1 8019460: 2b00 cmp r3, #0 8019462: d001 beq.n 8019468 do_signal = 1; 8019464: 2301 movs r3, #1 8019466: 613b str r3, [r7, #16] } } if (has_sendevent) { 8019468: 687b ldr r3, [r7, #4] 801946a: 2b00 cmp r3, #0 801946c: d01a beq.n 80194a4 if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { 801946e: 693b ldr r3, [r7, #16] 8019470: 2b00 cmp r3, #0 8019472: d117 bne.n 80194a4 8019474: 697b ldr r3, [r7, #20] 8019476: 68db ldr r3, [r3, #12] 8019478: 2b00 cmp r3, #0 801947a: d013 beq.n 80194a4 801947c: 697b ldr r3, [r7, #20] 801947e: 68da ldr r2, [r3, #12] 8019480: 68fb ldr r3, [r7, #12] 8019482: 2b00 cmp r3, #0 8019484: da00 bge.n 8019488 8019486: 331f adds r3, #31 8019488: 115b asrs r3, r3, #5 801948a: f852 2023 ldr.w r2, [r2, r3, lsl #2] 801948e: 68fb ldr r3, [r7, #12] 8019490: f003 031f and.w r3, r3, #31 8019494: fa22 f303 lsr.w r3, r2, r3 8019498: f003 0301 and.w r3, r3, #1 801949c: 2b00 cmp r3, #0 801949e: d001 beq.n 80194a4 do_signal = 1; 80194a0: 2301 movs r3, #1 80194a2: 613b str r3, [r7, #16] } } if (has_errevent) { 80194a4: 683b ldr r3, [r7, #0] 80194a6: 2b00 cmp r3, #0 80194a8: d01a beq.n 80194e0 if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { 80194aa: 693b ldr r3, [r7, #16] 80194ac: 2b00 cmp r3, #0 80194ae: d117 bne.n 80194e0 80194b0: 697b ldr r3, [r7, #20] 80194b2: 691b ldr r3, [r3, #16] 80194b4: 2b00 cmp r3, #0 80194b6: d013 beq.n 80194e0 80194b8: 697b ldr r3, [r7, #20] 80194ba: 691a ldr r2, [r3, #16] 80194bc: 68fb ldr r3, [r7, #12] 80194be: 2b00 cmp r3, #0 80194c0: da00 bge.n 80194c4 80194c2: 331f adds r3, #31 80194c4: 115b asrs r3, r3, #5 80194c6: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80194ca: 68fb ldr r3, [r7, #12] 80194cc: f003 031f and.w r3, r3, #31 80194d0: fa22 f303 lsr.w r3, r2, r3 80194d4: f003 0301 and.w r3, r3, #1 80194d8: 2b00 cmp r3, #0 80194da: d001 beq.n 80194e0 do_signal = 1; 80194dc: 2301 movs r3, #1 80194de: 613b str r3, [r7, #16] } } } #endif /* LWIP_SOCKET_SELECT */ if (do_signal) { 80194e0: 693b ldr r3, [r7, #16] 80194e2: 2b00 cmp r3, #0 80194e4: d007 beq.n 80194f6 scb->sem_signalled = 1; 80194e6: 697b ldr r3, [r7, #20] 80194e8: 2201 movs r2, #1 80194ea: 61da str r2, [r3, #28] /* For !LWIP_TCPIP_CORE_LOCKING, we don't call SYS_ARCH_UNPROTECT() before signaling the semaphore, as this might lead to the select thread taking itself off the list, invalidating the semaphore. */ sys_sem_signal(SELECT_SEM_PTR(scb->sem)); 80194ec: 697b ldr r3, [r7, #20] 80194ee: 3320 adds r3, #32 80194f0: 4618 mov r0, r3 80194f2: f00d fe8f bl 8027214 for (scb = select_cb_list; scb != NULL; scb = scb->next) { 80194f6: 697b ldr r3, [r7, #20] 80194f8: 681b ldr r3, [r3, #0] 80194fa: 617b str r3, [r7, #20] 80194fc: 697b ldr r3, [r7, #20] 80194fe: 2b00 cmp r3, #0 8019500: d183 bne.n 801940a /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; } SYS_ARCH_UNPROTECT(lev); #endif } 8019502: bf00 nop 8019504: bf00 nop 8019506: 3718 adds r7, #24 8019508: 46bd mov sp, r7 801950a: bd80 pop {r7, pc} 801950c: 24024404 .word 0x24024404 08019510 : return err; } int lwip_ioctl(int s, long cmd, void *argp) { 8019510: b580 push {r7, lr} 8019512: b08c sub sp, #48 @ 0x30 8019514: af00 add r7, sp, #0 8019516: 60f8 str r0, [r7, #12] 8019518: 60b9 str r1, [r7, #8] 801951a: 607a str r2, [r7, #4] struct lwip_sock *sock = get_socket(s); 801951c: 68f8 ldr r0, [r7, #12] 801951e: f7ff f813 bl 8018548 8019522: 6278 str r0, [r7, #36] @ 0x24 u8_t val; #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ if (!sock) { 8019524: 6a7b ldr r3, [r7, #36] @ 0x24 8019526: 2b00 cmp r3, #0 8019528: d102 bne.n 8019530 return -1; 801952a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801952e: e089 b.n 8019644 } switch (cmd) { 8019530: 68bb ldr r3, [r7, #8] 8019532: 4a46 ldr r2, [pc, #280] @ (801964c ) 8019534: 4293 cmp r3, r2 8019536: d048 beq.n 80195ca 8019538: 68bb ldr r3, [r7, #8] 801953a: 4a45 ldr r2, [pc, #276] @ (8019650 ) 801953c: 4293 cmp r3, r2 801953e: d176 bne.n 801962e #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE case FIONREAD: if (!argp) { 8019540: 687b ldr r3, [r7, #4] 8019542: 2b00 cmp r3, #0 8019544: d10a bne.n 801955c sock_set_errno(sock, EINVAL); 8019546: 2316 movs r3, #22 8019548: 61bb str r3, [r7, #24] 801954a: 69bb ldr r3, [r7, #24] 801954c: 2b00 cmp r3, #0 801954e: d002 beq.n 8019556 8019550: 4a40 ldr r2, [pc, #256] @ (8019654 ) 8019552: 69bb ldr r3, [r7, #24] 8019554: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801955a: e073 b.n 8019644 } #endif /* LWIP_FIONREAD_LINUXMODE */ #if LWIP_SO_RCVBUF /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ SYS_ARCH_GET(sock->conn->recv_avail, recv_avail); 801955c: f00d fef0 bl 8027340 8019560: 6238 str r0, [r7, #32] 8019562: 6a7b ldr r3, [r7, #36] @ 0x24 8019564: 681b ldr r3, [r3, #0] 8019566: 6a5b ldr r3, [r3, #36] @ 0x24 8019568: 62fb str r3, [r7, #44] @ 0x2c 801956a: 6a38 ldr r0, [r7, #32] 801956c: f00d fef6 bl 802735c if (recv_avail < 0) { 8019570: 6afb ldr r3, [r7, #44] @ 0x2c 8019572: 2b00 cmp r3, #0 8019574: da01 bge.n 801957a recv_avail = 0; 8019576: 2300 movs r3, #0 8019578: 62fb str r3, [r7, #44] @ 0x2c } /* Check if there is data left from the last recv operation. /maq 041215 */ if (sock->lastdata.netbuf) { 801957a: 6a7b ldr r3, [r7, #36] @ 0x24 801957c: 685b ldr r3, [r3, #4] 801957e: 2b00 cmp r3, #0 8019580: d016 beq.n 80195b0 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8019582: 6a7b ldr r3, [r7, #36] @ 0x24 8019584: 681b ldr r3, [r3, #0] 8019586: 781b ldrb r3, [r3, #0] 8019588: f003 03f0 and.w r3, r3, #240 @ 0xf0 801958c: 2b10 cmp r3, #16 801958e: d107 bne.n 80195a0 recv_avail += sock->lastdata.pbuf->tot_len; 8019590: 6a7b ldr r3, [r7, #36] @ 0x24 8019592: 685b ldr r3, [r3, #4] 8019594: 891b ldrh r3, [r3, #8] 8019596: 461a mov r2, r3 8019598: 6afb ldr r3, [r7, #44] @ 0x2c 801959a: 4413 add r3, r2 801959c: 62fb str r3, [r7, #44] @ 0x2c 801959e: e007 b.n 80195b0 } else { recv_avail += sock->lastdata.netbuf->p->tot_len; 80195a0: 6a7b ldr r3, [r7, #36] @ 0x24 80195a2: 685b ldr r3, [r3, #4] 80195a4: 681b ldr r3, [r3, #0] 80195a6: 891b ldrh r3, [r3, #8] 80195a8: 461a mov r2, r3 80195aa: 6afb ldr r3, [r7, #44] @ 0x2c 80195ac: 4413 add r3, r2 80195ae: 62fb str r3, [r7, #44] @ 0x2c } } *((int *)argp) = recv_avail; 80195b0: 687b ldr r3, [r7, #4] 80195b2: 6afa ldr r2, [r7, #44] @ 0x2c 80195b4: 601a str r2, [r3, #0] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t *)argp))); sock_set_errno(sock, 0); 80195b6: 2300 movs r3, #0 80195b8: 61fb str r3, [r7, #28] 80195ba: 69fb ldr r3, [r7, #28] 80195bc: 2b00 cmp r3, #0 80195be: d002 beq.n 80195c6 80195c0: 4a24 ldr r2, [pc, #144] @ (8019654 ) 80195c2: 69fb ldr r3, [r7, #28] 80195c4: 6013 str r3, [r2, #0] done_socket(sock); return 0; 80195c6: 2300 movs r3, #0 80195c8: e03c b.n 8019644 break; #endif /* LWIP_SO_RCVBUF */ #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ case (long)FIONBIO: val = 0; 80195ca: 2300 movs r3, #0 80195cc: f887 302b strb.w r3, [r7, #43] @ 0x2b if (argp && *(int *)argp) { 80195d0: 687b ldr r3, [r7, #4] 80195d2: 2b00 cmp r3, #0 80195d4: d006 beq.n 80195e4 80195d6: 687b ldr r3, [r7, #4] 80195d8: 681b ldr r3, [r3, #0] 80195da: 2b00 cmp r3, #0 80195dc: d002 beq.n 80195e4 val = 1; 80195de: 2301 movs r3, #1 80195e0: f887 302b strb.w r3, [r7, #43] @ 0x2b } netconn_set_nonblocking(sock->conn, val); 80195e4: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 80195e8: 2b00 cmp r3, #0 80195ea: d00b beq.n 8019604 80195ec: 6a7b ldr r3, [r7, #36] @ 0x24 80195ee: 681b ldr r3, [r3, #0] 80195f0: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 80195f4: 6a7b ldr r3, [r7, #36] @ 0x24 80195f6: 681b ldr r3, [r3, #0] 80195f8: f042 0202 orr.w r2, r2, #2 80195fc: b2d2 uxtb r2, r2 80195fe: f883 2028 strb.w r2, [r3, #40] @ 0x28 8019602: e00a b.n 801961a 8019604: 6a7b ldr r3, [r7, #36] @ 0x24 8019606: 681b ldr r3, [r3, #0] 8019608: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 801960c: 6a7b ldr r3, [r7, #36] @ 0x24 801960e: 681b ldr r3, [r3, #0] 8019610: f022 0202 bic.w r2, r2, #2 8019614: b2d2 uxtb r2, r2 8019616: f883 2028 strb.w r2, [r3, #40] @ 0x28 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); sock_set_errno(sock, 0); 801961a: 2300 movs r3, #0 801961c: 617b str r3, [r7, #20] 801961e: 697b ldr r3, [r7, #20] 8019620: 2b00 cmp r3, #0 8019622: d002 beq.n 801962a 8019624: 4a0b ldr r2, [pc, #44] @ (8019654 ) 8019626: 697b ldr r3, [r7, #20] 8019628: 6013 str r3, [r2, #0] done_socket(sock); return 0; 801962a: 2300 movs r3, #0 801962c: e00a b.n 8019644 default: break; 801962e: bf00 nop } /* switch (cmd) */ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, UNIMPL: 0x%lx, %p)\n", s, cmd, argp)); sock_set_errno(sock, ENOSYS); /* not yet implemented */ 8019630: 2326 movs r3, #38 @ 0x26 8019632: 613b str r3, [r7, #16] 8019634: 693b ldr r3, [r7, #16] 8019636: 2b00 cmp r3, #0 8019638: d002 beq.n 8019640 801963a: 4a06 ldr r2, [pc, #24] @ (8019654 ) 801963c: 693b ldr r3, [r7, #16] 801963e: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019640: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8019644: 4618 mov r0, r3 8019646: 3730 adds r7, #48 @ 0x30 8019648: 46bd mov sp, r7 801964a: bd80 pop {r7, pc} 801964c: 8004667e .word 0x8004667e 8019650: 4004667f .word 0x4004667f 8019654: 2402b260 .word 0x2402b260 08019658 : * @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) { 8019658: b580 push {r7, lr} 801965a: b084 sub sp, #16 801965c: af00 add r7, sp, #0 801965e: 6078 str r0, [r7, #4] 8019660: 6039 str r1, [r7, #0] u32_t sleeptime, res; again: LWIP_ASSERT_CORE_LOCKED(); 8019662: f7f7 fcdb bl 801101c sleeptime = sys_timeouts_sleeptime(); 8019666: f008 fb41 bl 8021cec 801966a: 60f8 str r0, [r7, #12] if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { 801966c: 68fb ldr r3, [r7, #12] 801966e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8019672: d109 bne.n 8019688 UNLOCK_TCPIP_CORE(); 8019674: f7f7 fcc4 bl 8011000 sys_arch_mbox_fetch(mbox, msg, 0); 8019678: 2200 movs r2, #0 801967a: 6839 ldr r1, [r7, #0] 801967c: 6878 ldr r0, [r7, #4] 801967e: f00d fd0d bl 802709c LOCK_TCPIP_CORE(); 8019682: f7f7 fcad bl 8010fe0 return; 8019686: e016 b.n 80196b6 } else if (sleeptime == 0) { 8019688: 68fb ldr r3, [r7, #12] 801968a: 2b00 cmp r3, #0 801968c: d102 bne.n 8019694 sys_check_timeouts(); 801968e: f008 faf1 bl 8021c74 /* We try again to fetch a message from the mbox. */ goto again; 8019692: e7e6 b.n 8019662 } UNLOCK_TCPIP_CORE(); 8019694: f7f7 fcb4 bl 8011000 res = sys_arch_mbox_fetch(mbox, msg, sleeptime); 8019698: 68fa ldr r2, [r7, #12] 801969a: 6839 ldr r1, [r7, #0] 801969c: 6878 ldr r0, [r7, #4] 801969e: f00d fcfd bl 802709c 80196a2: 60b8 str r0, [r7, #8] LOCK_TCPIP_CORE(); 80196a4: f7f7 fc9c bl 8010fe0 if (res == SYS_ARCH_TIMEOUT) { 80196a8: 68bb ldr r3, [r7, #8] 80196aa: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80196ae: d102 bne.n 80196b6 /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred before a message could be fetched. */ sys_check_timeouts(); 80196b0: f008 fae0 bl 8021c74 /* We try again to fetch a message from the mbox. */ goto again; 80196b4: e7d5 b.n 8019662 } } 80196b6: 3710 adds r7, #16 80196b8: 46bd mov sp, r7 80196ba: bd80 pop {r7, pc} 080196bc : * * @param arg unused argument */ static void tcpip_thread(void *arg) { 80196bc: b580 push {r7, lr} 80196be: b084 sub sp, #16 80196c0: af00 add r7, sp, #0 80196c2: 6078 str r0, [r7, #4] struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); LWIP_MARK_TCPIP_THREAD(); 80196c4: f7f7 fce6 bl 8011094 LOCK_TCPIP_CORE(); 80196c8: f7f7 fc8a bl 8010fe0 if (tcpip_init_done != NULL) { 80196cc: 4b0f ldr r3, [pc, #60] @ (801970c ) 80196ce: 681b ldr r3, [r3, #0] 80196d0: 2b00 cmp r3, #0 80196d2: d005 beq.n 80196e0 tcpip_init_done(tcpip_init_done_arg); 80196d4: 4b0d ldr r3, [pc, #52] @ (801970c ) 80196d6: 681b ldr r3, [r3, #0] 80196d8: 4a0d ldr r2, [pc, #52] @ (8019710 ) 80196da: 6812 ldr r2, [r2, #0] 80196dc: 4610 mov r0, r2 80196de: 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); 80196e0: f107 030c add.w r3, r7, #12 80196e4: 4619 mov r1, r3 80196e6: 480b ldr r0, [pc, #44] @ (8019714 ) 80196e8: f7ff ffb6 bl 8019658 if (msg == NULL) { 80196ec: 68fb ldr r3, [r7, #12] 80196ee: 2b00 cmp r3, #0 80196f0: d106 bne.n 8019700 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_ASSERT("tcpip_thread: invalid message", 0); 80196f2: 4b09 ldr r3, [pc, #36] @ (8019718 ) 80196f4: 2291 movs r2, #145 @ 0x91 80196f6: 4909 ldr r1, [pc, #36] @ (801971c ) 80196f8: 4809 ldr r0, [pc, #36] @ (8019720 ) 80196fa: f011 f8b7 bl 802a86c continue; 80196fe: e003 b.n 8019708 } tcpip_thread_handle_msg(msg); 8019700: 68fb ldr r3, [r7, #12] 8019702: 4618 mov r0, r3 8019704: f000 f80e bl 8019724 TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); 8019708: e7ea b.n 80196e0 801970a: bf00 nop 801970c: 24024408 .word 0x24024408 8019710: 2402440c .word 0x2402440c 8019714: 24024410 .word 0x24024410 8019718: 0802e99c .word 0x0802e99c 801971c: 0802e9cc .word 0x0802e9cc 8019720: 0802e9ec .word 0x0802e9ec 08019724 : /* 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) { 8019724: b580 push {r7, lr} 8019726: b082 sub sp, #8 8019728: af00 add r7, sp, #0 801972a: 6078 str r0, [r7, #4] switch (msg->type) { 801972c: 687b ldr r3, [r7, #4] 801972e: 781b ldrb r3, [r3, #0] 8019730: 2b02 cmp r3, #2 8019732: d026 beq.n 8019782 8019734: 2b02 cmp r3, #2 8019736: dc2b bgt.n 8019790 8019738: 2b00 cmp r3, #0 801973a: d002 beq.n 8019742 801973c: 2b01 cmp r3, #1 801973e: d015 beq.n 801976c 8019740: e026 b.n 8019790 #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) { 8019742: 687b ldr r3, [r7, #4] 8019744: 68db ldr r3, [r3, #12] 8019746: 687a ldr r2, [r7, #4] 8019748: 6850 ldr r0, [r2, #4] 801974a: 687a ldr r2, [r7, #4] 801974c: 6892 ldr r2, [r2, #8] 801974e: 4611 mov r1, r2 8019750: 4798 blx r3 8019752: 4603 mov r3, r0 8019754: 2b00 cmp r3, #0 8019756: d004 beq.n 8019762 pbuf_free(msg->msg.inp.p); 8019758: 687b ldr r3, [r7, #4] 801975a: 685b ldr r3, [r3, #4] 801975c: 4618 mov r0, r3 801975e: f001 fe0d bl 801b37c } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8019762: 6879 ldr r1, [r7, #4] 8019764: 2009 movs r0, #9 8019766: f000 ff1b bl 801a5a0 break; 801976a: e018 b.n 801979e 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); 801976c: 687b ldr r3, [r7, #4] 801976e: 685b ldr r3, [r3, #4] 8019770: 687a ldr r2, [r7, #4] 8019772: 6892 ldr r2, [r2, #8] 8019774: 4610 mov r0, r2 8019776: 4798 blx r3 memp_free(MEMP_TCPIP_MSG_API, msg); 8019778: 6879 ldr r1, [r7, #4] 801977a: 2008 movs r0, #8 801977c: f000 ff10 bl 801a5a0 break; 8019780: e00d b.n 801979e 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); 8019782: 687b ldr r3, [r7, #4] 8019784: 685b ldr r3, [r3, #4] 8019786: 687a ldr r2, [r7, #4] 8019788: 6892 ldr r2, [r2, #8] 801978a: 4610 mov r0, r2 801978c: 4798 blx r3 break; 801978e: e006 b.n 801979e default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); 8019790: 4b05 ldr r3, [pc, #20] @ (80197a8 ) 8019792: 22cf movs r2, #207 @ 0xcf 8019794: 4905 ldr r1, [pc, #20] @ (80197ac ) 8019796: 4806 ldr r0, [pc, #24] @ (80197b0 ) 8019798: f011 f868 bl 802a86c break; 801979c: bf00 nop } } 801979e: bf00 nop 80197a0: 3708 adds r7, #8 80197a2: 46bd mov sp, r7 80197a4: bd80 pop {r7, pc} 80197a6: bf00 nop 80197a8: 0802e99c .word 0x0802e99c 80197ac: 0802e9cc .word 0x0802e9cc 80197b0: 0802e9ec .word 0x0802e9ec 080197b4 : * @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) { 80197b4: b580 push {r7, lr} 80197b6: b086 sub sp, #24 80197b8: af00 add r7, sp, #0 80197ba: 60f8 str r0, [r7, #12] 80197bc: 60b9 str r1, [r7, #8] 80197be: 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)); 80197c0: 481a ldr r0, [pc, #104] @ (801982c ) 80197c2: f00d fcb3 bl 802712c 80197c6: 4603 mov r3, r0 80197c8: 2b00 cmp r3, #0 80197ca: d105 bne.n 80197d8 80197cc: 4b18 ldr r3, [pc, #96] @ (8019830 ) 80197ce: 22fc movs r2, #252 @ 0xfc 80197d0: 4918 ldr r1, [pc, #96] @ (8019834 ) 80197d2: 4819 ldr r0, [pc, #100] @ (8019838 ) 80197d4: f011 f84a bl 802a86c msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 80197d8: 2009 movs r0, #9 80197da: f000 fe6b bl 801a4b4 80197de: 6178 str r0, [r7, #20] if (msg == NULL) { 80197e0: 697b ldr r3, [r7, #20] 80197e2: 2b00 cmp r3, #0 80197e4: d102 bne.n 80197ec return ERR_MEM; 80197e6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80197ea: e01a b.n 8019822 } msg->type = TCPIP_MSG_INPKT; 80197ec: 697b ldr r3, [r7, #20] 80197ee: 2200 movs r2, #0 80197f0: 701a strb r2, [r3, #0] msg->msg.inp.p = p; 80197f2: 697b ldr r3, [r7, #20] 80197f4: 68fa ldr r2, [r7, #12] 80197f6: 605a str r2, [r3, #4] msg->msg.inp.netif = inp; 80197f8: 697b ldr r3, [r7, #20] 80197fa: 68ba ldr r2, [r7, #8] 80197fc: 609a str r2, [r3, #8] msg->msg.inp.input_fn = input_fn; 80197fe: 697b ldr r3, [r7, #20] 8019800: 687a ldr r2, [r7, #4] 8019802: 60da str r2, [r3, #12] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 8019804: 6979 ldr r1, [r7, #20] 8019806: 4809 ldr r0, [pc, #36] @ (801982c ) 8019808: f00d fc2e bl 8027068 801980c: 4603 mov r3, r0 801980e: 2b00 cmp r3, #0 8019810: d006 beq.n 8019820 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8019812: 6979 ldr r1, [r7, #20] 8019814: 2009 movs r0, #9 8019816: f000 fec3 bl 801a5a0 return ERR_MEM; 801981a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801981e: e000 b.n 8019822 } return ERR_OK; 8019820: 2300 movs r3, #0 #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 8019822: 4618 mov r0, r3 8019824: 3718 adds r7, #24 8019826: 46bd mov sp, r7 8019828: bd80 pop {r7, pc} 801982a: bf00 nop 801982c: 24024410 .word 0x24024410 8019830: 0802e99c .word 0x0802e99c 8019834: 0802ea14 .word 0x0802ea14 8019838: 0802e9ec .word 0x0802e9ec 0801983c : * 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) { 801983c: b580 push {r7, lr} 801983e: b082 sub sp, #8 8019840: af00 add r7, sp, #0 8019842: 6078 str r0, [r7, #4] 8019844: 6039 str r1, [r7, #0] #if LWIP_ETHERNET if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 8019846: 683b ldr r3, [r7, #0] 8019848: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801984c: f003 0318 and.w r3, r3, #24 8019850: 2b00 cmp r3, #0 8019852: d006 beq.n 8019862 return tcpip_inpkt(p, inp, ethernet_input); 8019854: 4a08 ldr r2, [pc, #32] @ (8019878 ) 8019856: 6839 ldr r1, [r7, #0] 8019858: 6878 ldr r0, [r7, #4] 801985a: f7ff ffab bl 80197b4 801985e: 4603 mov r3, r0 8019860: e005 b.n 801986e } else #endif /* LWIP_ETHERNET */ return tcpip_inpkt(p, inp, ip_input); 8019862: 4a06 ldr r2, [pc, #24] @ (801987c ) 8019864: 6839 ldr r1, [r7, #0] 8019866: 6878 ldr r0, [r7, #4] 8019868: f7ff ffa4 bl 80197b4 801986c: 4603 mov r3, r0 } 801986e: 4618 mov r0, r3 8019870: 3708 adds r7, #8 8019872: 46bd mov sp, r7 8019874: bd80 pop {r7, pc} 8019876: bf00 nop 8019878: 08026e5d .word 0x08026e5d 801987c: 08025985 .word 0x08025985 08019880 : * * @see tcpip_callback */ err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx) { 8019880: b580 push {r7, lr} 8019882: b084 sub sp, #16 8019884: af00 add r7, sp, #0 8019886: 6078 str r0, [r7, #4] 8019888: 6039 str r1, [r7, #0] struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 801988a: 4819 ldr r0, [pc, #100] @ (80198f0 ) 801988c: f00d fc4e bl 802712c 8019890: 4603 mov r3, r0 8019892: 2b00 cmp r3, #0 8019894: d106 bne.n 80198a4 8019896: 4b17 ldr r3, [pc, #92] @ (80198f4 ) 8019898: f240 125d movw r2, #349 @ 0x15d 801989c: 4916 ldr r1, [pc, #88] @ (80198f8 ) 801989e: 4817 ldr r0, [pc, #92] @ (80198fc ) 80198a0: f010 ffe4 bl 802a86c msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); 80198a4: 2008 movs r0, #8 80198a6: f000 fe05 bl 801a4b4 80198aa: 60f8 str r0, [r7, #12] if (msg == NULL) { 80198ac: 68fb ldr r3, [r7, #12] 80198ae: 2b00 cmp r3, #0 80198b0: d102 bne.n 80198b8 return ERR_MEM; 80198b2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80198b6: e017 b.n 80198e8 } msg->type = TCPIP_MSG_CALLBACK; 80198b8: 68fb ldr r3, [r7, #12] 80198ba: 2201 movs r2, #1 80198bc: 701a strb r2, [r3, #0] msg->msg.cb.function = function; 80198be: 68fb ldr r3, [r7, #12] 80198c0: 687a ldr r2, [r7, #4] 80198c2: 605a str r2, [r3, #4] msg->msg.cb.ctx = ctx; 80198c4: 68fb ldr r3, [r7, #12] 80198c6: 683a ldr r2, [r7, #0] 80198c8: 609a str r2, [r3, #8] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 80198ca: 68f9 ldr r1, [r7, #12] 80198cc: 4808 ldr r0, [pc, #32] @ (80198f0 ) 80198ce: f00d fbcb bl 8027068 80198d2: 4603 mov r3, r0 80198d4: 2b00 cmp r3, #0 80198d6: d006 beq.n 80198e6 memp_free(MEMP_TCPIP_MSG_API, msg); 80198d8: 68f9 ldr r1, [r7, #12] 80198da: 2008 movs r0, #8 80198dc: f000 fe60 bl 801a5a0 return ERR_MEM; 80198e0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80198e4: e000 b.n 80198e8 } return ERR_OK; 80198e6: 2300 movs r3, #0 } 80198e8: 4618 mov r0, r3 80198ea: 3710 adds r7, #16 80198ec: 46bd mov sp, r7 80198ee: bd80 pop {r7, pc} 80198f0: 24024410 .word 0x24024410 80198f4: 0802e99c .word 0x0802e99c 80198f8: 0802ea14 .word 0x0802ea14 80198fc: 0802e9ec .word 0x0802e9ec 08019900 : * @param sem semaphore to wait on * @return ERR_OK if the function was called, another err_t if not */ err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem) { 8019900: b580 push {r7, lr} 8019902: b084 sub sp, #16 8019904: af00 add r7, sp, #0 8019906: 60f8 str r0, [r7, #12] 8019908: 60b9 str r1, [r7, #8] 801990a: 607a str r2, [r7, #4] #if LWIP_TCPIP_CORE_LOCKING LWIP_UNUSED_ARG(sem); LOCK_TCPIP_CORE(); 801990c: f7f7 fb68 bl 8010fe0 fn(apimsg); 8019910: 68fb ldr r3, [r7, #12] 8019912: 68b8 ldr r0, [r7, #8] 8019914: 4798 blx r3 UNLOCK_TCPIP_CORE(); 8019916: f7f7 fb73 bl 8011000 return ERR_OK; 801991a: 2300 movs r3, #0 sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg)); sys_arch_sem_wait(sem, 0); TCPIP_MSG_VAR_FREE(msg); return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING */ } 801991c: 4618 mov r0, r3 801991e: 3710 adds r7, #16 8019920: 46bd mov sp, r7 8019922: bd80 pop {r7, pc} 08019924 : * @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) { 8019924: b580 push {r7, lr} 8019926: b084 sub sp, #16 8019928: af02 add r7, sp, #8 801992a: 6078 str r0, [r7, #4] 801992c: 6039 str r1, [r7, #0] lwip_init(); 801992e: f000 f92d bl 8019b8c tcpip_init_done = initfunc; 8019932: 4a17 ldr r2, [pc, #92] @ (8019990 ) 8019934: 687b ldr r3, [r7, #4] 8019936: 6013 str r3, [r2, #0] tcpip_init_done_arg = arg; 8019938: 4a16 ldr r2, [pc, #88] @ (8019994 ) 801993a: 683b ldr r3, [r7, #0] 801993c: 6013 str r3, [r2, #0] if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 801993e: 2106 movs r1, #6 8019940: 4815 ldr r0, [pc, #84] @ (8019998 ) 8019942: f00d fb65 bl 8027010 8019946: 4603 mov r3, r0 8019948: 2b00 cmp r3, #0 801994a: d006 beq.n 801995a LWIP_ASSERT("failed to create tcpip_thread mbox", 0); 801994c: 4b13 ldr r3, [pc, #76] @ (801999c ) 801994e: f240 2261 movw r2, #609 @ 0x261 8019952: 4913 ldr r1, [pc, #76] @ (80199a0 ) 8019954: 4813 ldr r0, [pc, #76] @ (80199a4 ) 8019956: f010 ff89 bl 802a86c } #if LWIP_TCPIP_CORE_LOCKING if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { 801995a: 4813 ldr r0, [pc, #76] @ (80199a8 ) 801995c: f00d fc9e bl 802729c 8019960: 4603 mov r3, r0 8019962: 2b00 cmp r3, #0 8019964: d006 beq.n 8019974 LWIP_ASSERT("failed to create lock_tcpip_core", 0); 8019966: 4b0d ldr r3, [pc, #52] @ (801999c ) 8019968: f240 2265 movw r2, #613 @ 0x265 801996c: 490f ldr r1, [pc, #60] @ (80199ac ) 801996e: 480d ldr r0, [pc, #52] @ (80199a4 ) 8019970: f010 ff7c bl 802a86c } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 8019974: 2330 movs r3, #48 @ 0x30 8019976: 9300 str r3, [sp, #0] 8019978: f44f 5380 mov.w r3, #4096 @ 0x1000 801997c: 2200 movs r2, #0 801997e: 490c ldr r1, [pc, #48] @ (80199b0 ) 8019980: 480c ldr r0, [pc, #48] @ (80199b4 ) 8019982: f00d fcbd bl 8027300 } 8019986: bf00 nop 8019988: 3708 adds r7, #8 801998a: 46bd mov sp, r7 801998c: bd80 pop {r7, pc} 801998e: bf00 nop 8019990: 24024408 .word 0x24024408 8019994: 2402440c .word 0x2402440c 8019998: 24024410 .word 0x24024410 801999c: 0802e99c .word 0x0802e99c 80199a0: 0802ea24 .word 0x0802ea24 80199a4: 0802e9ec .word 0x0802e9ec 80199a8: 24024414 .word 0x24024414 80199ac: 0802ea48 .word 0x0802ea48 80199b0: 080196bd .word 0x080196bd 80199b4: 0802ea6c .word 0x0802ea6c 080199b8 : * @param n u16_t in host byte order * @return n in network byte order */ u16_t lwip_htons(u16_t n) { 80199b8: b480 push {r7} 80199ba: b083 sub sp, #12 80199bc: af00 add r7, sp, #0 80199be: 4603 mov r3, r0 80199c0: 80fb strh r3, [r7, #6] return PP_HTONS(n); 80199c2: 88fb ldrh r3, [r7, #6] 80199c4: 021b lsls r3, r3, #8 80199c6: b21a sxth r2, r3 80199c8: 88fb ldrh r3, [r7, #6] 80199ca: 0a1b lsrs r3, r3, #8 80199cc: b29b uxth r3, r3 80199ce: b21b sxth r3, r3 80199d0: 4313 orrs r3, r2 80199d2: b21b sxth r3, r3 80199d4: b29b uxth r3, r3 } 80199d6: 4618 mov r0, r3 80199d8: 370c adds r7, #12 80199da: 46bd mov sp, r7 80199dc: f85d 7b04 ldr.w r7, [sp], #4 80199e0: 4770 bx lr 080199e2 : * @param n u32_t in host byte order * @return n in network byte order */ u32_t lwip_htonl(u32_t n) { 80199e2: b480 push {r7} 80199e4: b083 sub sp, #12 80199e6: af00 add r7, sp, #0 80199e8: 6078 str r0, [r7, #4] return PP_HTONL(n); 80199ea: 687b ldr r3, [r7, #4] 80199ec: 061a lsls r2, r3, #24 80199ee: 687b ldr r3, [r7, #4] 80199f0: 021b lsls r3, r3, #8 80199f2: f403 037f and.w r3, r3, #16711680 @ 0xff0000 80199f6: 431a orrs r2, r3 80199f8: 687b ldr r3, [r7, #4] 80199fa: 0a1b lsrs r3, r3, #8 80199fc: f403 437f and.w r3, r3, #65280 @ 0xff00 8019a00: 431a orrs r2, r3 8019a02: 687b ldr r3, [r7, #4] 8019a04: 0e1b lsrs r3, r3, #24 8019a06: 4313 orrs r3, r2 } 8019a08: 4618 mov r0, r3 8019a0a: 370c adds r7, #12 8019a0c: 46bd mov sp, r7 8019a0e: f85d 7b04 ldr.w r7, [sp], #4 8019a12: 4770 bx lr 08019a14 : * @param len length of data to be summed * @return host order (!) lwip checksum (non-inverted Internet sum) */ u16_t lwip_standard_chksum(const void *dataptr, int len) { 8019a14: b480 push {r7} 8019a16: b089 sub sp, #36 @ 0x24 8019a18: af00 add r7, sp, #0 8019a1a: 6078 str r0, [r7, #4] 8019a1c: 6039 str r1, [r7, #0] const u8_t *pb = (const u8_t *)dataptr; 8019a1e: 687b ldr r3, [r7, #4] 8019a20: 61fb str r3, [r7, #28] const u16_t *ps; u16_t t = 0; 8019a22: 2300 movs r3, #0 8019a24: 81fb strh r3, [r7, #14] u32_t sum = 0; 8019a26: 2300 movs r3, #0 8019a28: 617b str r3, [r7, #20] int odd = ((mem_ptr_t)pb & 1); 8019a2a: 69fb ldr r3, [r7, #28] 8019a2c: f003 0301 and.w r3, r3, #1 8019a30: 613b str r3, [r7, #16] /* Get aligned to u16_t */ if (odd && len > 0) { 8019a32: 693b ldr r3, [r7, #16] 8019a34: 2b00 cmp r3, #0 8019a36: d00d beq.n 8019a54 8019a38: 683b ldr r3, [r7, #0] 8019a3a: 2b00 cmp r3, #0 8019a3c: dd0a ble.n 8019a54 ((u8_t *)&t)[1] = *pb++; 8019a3e: 69fa ldr r2, [r7, #28] 8019a40: 1c53 adds r3, r2, #1 8019a42: 61fb str r3, [r7, #28] 8019a44: f107 030e add.w r3, r7, #14 8019a48: 3301 adds r3, #1 8019a4a: 7812 ldrb r2, [r2, #0] 8019a4c: 701a strb r2, [r3, #0] len--; 8019a4e: 683b ldr r3, [r7, #0] 8019a50: 3b01 subs r3, #1 8019a52: 603b str r3, [r7, #0] } /* Add the bulk of the data */ ps = (const u16_t *)(const void *)pb; 8019a54: 69fb ldr r3, [r7, #28] 8019a56: 61bb str r3, [r7, #24] while (len > 1) { 8019a58: e00a b.n 8019a70 sum += *ps++; 8019a5a: 69bb ldr r3, [r7, #24] 8019a5c: 1c9a adds r2, r3, #2 8019a5e: 61ba str r2, [r7, #24] 8019a60: 881b ldrh r3, [r3, #0] 8019a62: 461a mov r2, r3 8019a64: 697b ldr r3, [r7, #20] 8019a66: 4413 add r3, r2 8019a68: 617b str r3, [r7, #20] len -= 2; 8019a6a: 683b ldr r3, [r7, #0] 8019a6c: 3b02 subs r3, #2 8019a6e: 603b str r3, [r7, #0] while (len > 1) { 8019a70: 683b ldr r3, [r7, #0] 8019a72: 2b01 cmp r3, #1 8019a74: dcf1 bgt.n 8019a5a } /* Consume left-over byte, if any */ if (len > 0) { 8019a76: 683b ldr r3, [r7, #0] 8019a78: 2b00 cmp r3, #0 8019a7a: dd04 ble.n 8019a86 ((u8_t *)&t)[0] = *(const u8_t *)ps; 8019a7c: f107 030e add.w r3, r7, #14 8019a80: 69ba ldr r2, [r7, #24] 8019a82: 7812 ldrb r2, [r2, #0] 8019a84: 701a strb r2, [r3, #0] } /* Add end bytes */ sum += t; 8019a86: 89fb ldrh r3, [r7, #14] 8019a88: 461a mov r2, r3 8019a8a: 697b ldr r3, [r7, #20] 8019a8c: 4413 add r3, r2 8019a8e: 617b str r3, [r7, #20] /* Fold 32-bit sum to 16 bits calling this twice is probably faster than if statements... */ sum = FOLD_U32T(sum); 8019a90: 697b ldr r3, [r7, #20] 8019a92: 0c1a lsrs r2, r3, #16 8019a94: 697b ldr r3, [r7, #20] 8019a96: b29b uxth r3, r3 8019a98: 4413 add r3, r2 8019a9a: 617b str r3, [r7, #20] sum = FOLD_U32T(sum); 8019a9c: 697b ldr r3, [r7, #20] 8019a9e: 0c1a lsrs r2, r3, #16 8019aa0: 697b ldr r3, [r7, #20] 8019aa2: b29b uxth r3, r3 8019aa4: 4413 add r3, r2 8019aa6: 617b str r3, [r7, #20] /* Swap if alignment was odd */ if (odd) { 8019aa8: 693b ldr r3, [r7, #16] 8019aaa: 2b00 cmp r3, #0 8019aac: d007 beq.n 8019abe sum = SWAP_BYTES_IN_WORD(sum); 8019aae: 697b ldr r3, [r7, #20] 8019ab0: 021b lsls r3, r3, #8 8019ab2: b29a uxth r2, r3 8019ab4: 697b ldr r3, [r7, #20] 8019ab6: 0a1b lsrs r3, r3, #8 8019ab8: b2db uxtb r3, r3 8019aba: 4313 orrs r3, r2 8019abc: 617b str r3, [r7, #20] } return (u16_t)sum; 8019abe: 697b ldr r3, [r7, #20] 8019ac0: b29b uxth r3, r3 } 8019ac2: 4618 mov r0, r3 8019ac4: 3724 adds r7, #36 @ 0x24 8019ac6: 46bd mov sp, r7 8019ac8: f85d 7b04 ldr.w r7, [sp], #4 8019acc: 4770 bx lr 08019ace : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(const void *dataptr, u16_t len) { 8019ace: b580 push {r7, lr} 8019ad0: b082 sub sp, #8 8019ad2: af00 add r7, sp, #0 8019ad4: 6078 str r0, [r7, #4] 8019ad6: 460b mov r3, r1 8019ad8: 807b strh r3, [r7, #2] return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); 8019ada: 887b ldrh r3, [r7, #2] 8019adc: 4619 mov r1, r3 8019ade: 6878 ldr r0, [r7, #4] 8019ae0: f7ff ff98 bl 8019a14 8019ae4: 4603 mov r3, r0 8019ae6: 43db mvns r3, r3 8019ae8: b29b uxth r3, r3 } 8019aea: 4618 mov r0, r3 8019aec: 3708 adds r7, #8 8019aee: 46bd mov sp, r7 8019af0: bd80 pop {r7, pc} 08019af2 : * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 8019af2: b580 push {r7, lr} 8019af4: b086 sub sp, #24 8019af6: af00 add r7, sp, #0 8019af8: 6078 str r0, [r7, #4] u32_t acc; struct pbuf *q; int swapped = 0; 8019afa: 2300 movs r3, #0 8019afc: 60fb str r3, [r7, #12] acc = 0; 8019afe: 2300 movs r3, #0 8019b00: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8019b02: 687b ldr r3, [r7, #4] 8019b04: 613b str r3, [r7, #16] 8019b06: e02b b.n 8019b60 acc += LWIP_CHKSUM(q->payload, q->len); 8019b08: 693b ldr r3, [r7, #16] 8019b0a: 685a ldr r2, [r3, #4] 8019b0c: 693b ldr r3, [r7, #16] 8019b0e: 895b ldrh r3, [r3, #10] 8019b10: 4619 mov r1, r3 8019b12: 4610 mov r0, r2 8019b14: f7ff ff7e bl 8019a14 8019b18: 4603 mov r3, r0 8019b1a: 461a mov r2, r3 8019b1c: 697b ldr r3, [r7, #20] 8019b1e: 4413 add r3, r2 8019b20: 617b str r3, [r7, #20] acc = FOLD_U32T(acc); 8019b22: 697b ldr r3, [r7, #20] 8019b24: 0c1a lsrs r2, r3, #16 8019b26: 697b ldr r3, [r7, #20] 8019b28: b29b uxth r3, r3 8019b2a: 4413 add r3, r2 8019b2c: 617b str r3, [r7, #20] if (q->len % 2 != 0) { 8019b2e: 693b ldr r3, [r7, #16] 8019b30: 895b ldrh r3, [r3, #10] 8019b32: f003 0301 and.w r3, r3, #1 8019b36: b29b uxth r3, r3 8019b38: 2b00 cmp r3, #0 8019b3a: d00e beq.n 8019b5a swapped = !swapped; 8019b3c: 68fb ldr r3, [r7, #12] 8019b3e: 2b00 cmp r3, #0 8019b40: bf0c ite eq 8019b42: 2301 moveq r3, #1 8019b44: 2300 movne r3, #0 8019b46: b2db uxtb r3, r3 8019b48: 60fb str r3, [r7, #12] acc = SWAP_BYTES_IN_WORD(acc); 8019b4a: 697b ldr r3, [r7, #20] 8019b4c: 021b lsls r3, r3, #8 8019b4e: b29a uxth r2, r3 8019b50: 697b ldr r3, [r7, #20] 8019b52: 0a1b lsrs r3, r3, #8 8019b54: b2db uxtb r3, r3 8019b56: 4313 orrs r3, r2 8019b58: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8019b5a: 693b ldr r3, [r7, #16] 8019b5c: 681b ldr r3, [r3, #0] 8019b5e: 613b str r3, [r7, #16] 8019b60: 693b ldr r3, [r7, #16] 8019b62: 2b00 cmp r3, #0 8019b64: d1d0 bne.n 8019b08 } } if (swapped) { 8019b66: 68fb ldr r3, [r7, #12] 8019b68: 2b00 cmp r3, #0 8019b6a: d007 beq.n 8019b7c acc = SWAP_BYTES_IN_WORD(acc); 8019b6c: 697b ldr r3, [r7, #20] 8019b6e: 021b lsls r3, r3, #8 8019b70: b29a uxth r2, r3 8019b72: 697b ldr r3, [r7, #20] 8019b74: 0a1b lsrs r3, r3, #8 8019b76: b2db uxtb r3, r3 8019b78: 4313 orrs r3, r2 8019b7a: 617b str r3, [r7, #20] } return (u16_t)~(acc & 0xffffUL); 8019b7c: 697b ldr r3, [r7, #20] 8019b7e: b29b uxth r3, r3 8019b80: 43db mvns r3, r3 8019b82: b29b uxth r3, r3 } 8019b84: 4618 mov r0, r3 8019b86: 3718 adds r7, #24 8019b88: 46bd mov sp, r7 8019b8a: bd80 pop {r7, pc} 08019b8c : * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) { 8019b8c: b580 push {r7, lr} 8019b8e: b082 sub sp, #8 8019b90: af00 add r7, sp, #0 #ifndef LWIP_SKIP_CONST_CHECK int a = 0; 8019b92: 2300 movs r3, #0 8019b94: 607b str r3, [r7, #4] #endif /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 8019b96: f00d fb75 bl 8027284 #endif /* !NO_SYS */ mem_init(); 8019b9a: f000 f8d3 bl 8019d44 memp_init(); 8019b9e: f000 fc1b bl 801a3d8 pbuf_init(); netif_init(); 8019ba2: f000 fd27 bl 801a5f4 #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 8019ba6: f008 f8db bl 8021d60 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 8019baa: f001 fe91 bl 801b8d0 #if PPP_SUPPORT ppp_init(); #endif #if LWIP_TIMERS sys_timeouts_init(); 8019bae: f008 f817 bl 8021be0 #endif /* LWIP_TIMERS */ } 8019bb2: bf00 nop 8019bb4: 3708 adds r7, #8 8019bb6: 46bd mov sp, r7 8019bb8: bd80 pop {r7, pc} ... 08019bbc : #define mem_overflow_check_element(mem) #endif /* MEM_OVERFLOW_CHECK */ static struct mem * ptr_to_mem(mem_size_t ptr) { 8019bbc: b480 push {r7} 8019bbe: b083 sub sp, #12 8019bc0: af00 add r7, sp, #0 8019bc2: 6078 str r0, [r7, #4] return (struct mem *)(void *)&ram[ptr]; 8019bc4: 4b04 ldr r3, [pc, #16] @ (8019bd8 ) 8019bc6: 681a ldr r2, [r3, #0] 8019bc8: 687b ldr r3, [r7, #4] 8019bca: 4413 add r3, r2 } 8019bcc: 4618 mov r0, r3 8019bce: 370c adds r7, #12 8019bd0: 46bd mov sp, r7 8019bd2: f85d 7b04 ldr.w r7, [sp], #4 8019bd6: 4770 bx lr 8019bd8: 24024430 .word 0x24024430 08019bdc : static mem_size_t mem_to_ptr(void *mem) { 8019bdc: b480 push {r7} 8019bde: b083 sub sp, #12 8019be0: af00 add r7, sp, #0 8019be2: 6078 str r0, [r7, #4] return (mem_size_t)((u8_t *)mem - ram); 8019be4: 4b04 ldr r3, [pc, #16] @ (8019bf8 ) 8019be6: 681b ldr r3, [r3, #0] 8019be8: 687a ldr r2, [r7, #4] 8019bea: 1ad3 subs r3, r2, r3 } 8019bec: 4618 mov r0, r3 8019bee: 370c adds r7, #12 8019bf0: 46bd mov sp, r7 8019bf2: f85d 7b04 ldr.w r7, [sp], #4 8019bf6: 4770 bx lr 8019bf8: 24024430 .word 0x24024430 08019bfc : * This assumes access to the heap is protected by the calling function * already. */ static void plug_holes(struct mem *mem) { 8019bfc: b590 push {r4, r7, lr} 8019bfe: b085 sub sp, #20 8019c00: af00 add r7, sp, #0 8019c02: 6078 str r0, [r7, #4] struct mem *nmem; struct mem *pmem; LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 8019c04: 4b45 ldr r3, [pc, #276] @ (8019d1c ) 8019c06: 681b ldr r3, [r3, #0] 8019c08: 687a ldr r2, [r7, #4] 8019c0a: 429a cmp r2, r3 8019c0c: d206 bcs.n 8019c1c 8019c0e: 4b44 ldr r3, [pc, #272] @ (8019d20 ) 8019c10: f240 12df movw r2, #479 @ 0x1df 8019c14: 4943 ldr r1, [pc, #268] @ (8019d24 ) 8019c16: 4844 ldr r0, [pc, #272] @ (8019d28 ) 8019c18: f010 fe28 bl 802a86c LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 8019c1c: 4b43 ldr r3, [pc, #268] @ (8019d2c ) 8019c1e: 681b ldr r3, [r3, #0] 8019c20: 687a ldr r2, [r7, #4] 8019c22: 429a cmp r2, r3 8019c24: d306 bcc.n 8019c34 8019c26: 4b3e ldr r3, [pc, #248] @ (8019d20 ) 8019c28: f44f 72f0 mov.w r2, #480 @ 0x1e0 8019c2c: 4940 ldr r1, [pc, #256] @ (8019d30 ) 8019c2e: 483e ldr r0, [pc, #248] @ (8019d28 ) 8019c30: f010 fe1c bl 802a86c LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 8019c34: 687b ldr r3, [r7, #4] 8019c36: 7a1b ldrb r3, [r3, #8] 8019c38: 2b00 cmp r3, #0 8019c3a: d006 beq.n 8019c4a 8019c3c: 4b38 ldr r3, [pc, #224] @ (8019d20 ) 8019c3e: f240 12e1 movw r2, #481 @ 0x1e1 8019c42: 493c ldr r1, [pc, #240] @ (8019d34 ) 8019c44: 4838 ldr r0, [pc, #224] @ (8019d28 ) 8019c46: f010 fe11 bl 802a86c /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 8019c4a: 687b ldr r3, [r7, #4] 8019c4c: 681b ldr r3, [r3, #0] 8019c4e: 4a3a ldr r2, [pc, #232] @ (8019d38 ) 8019c50: 4293 cmp r3, r2 8019c52: d906 bls.n 8019c62 8019c54: 4b32 ldr r3, [pc, #200] @ (8019d20 ) 8019c56: f44f 72f2 mov.w r2, #484 @ 0x1e4 8019c5a: 4938 ldr r1, [pc, #224] @ (8019d3c ) 8019c5c: 4832 ldr r0, [pc, #200] @ (8019d28 ) 8019c5e: f010 fe05 bl 802a86c nmem = ptr_to_mem(mem->next); 8019c62: 687b ldr r3, [r7, #4] 8019c64: 681b ldr r3, [r3, #0] 8019c66: 4618 mov r0, r3 8019c68: f7ff ffa8 bl 8019bbc 8019c6c: 60f8 str r0, [r7, #12] if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 8019c6e: 687a ldr r2, [r7, #4] 8019c70: 68fb ldr r3, [r7, #12] 8019c72: 429a cmp r2, r3 8019c74: d024 beq.n 8019cc0 8019c76: 68fb ldr r3, [r7, #12] 8019c78: 7a1b ldrb r3, [r3, #8] 8019c7a: 2b00 cmp r3, #0 8019c7c: d120 bne.n 8019cc0 8019c7e: 4b2b ldr r3, [pc, #172] @ (8019d2c ) 8019c80: 681b ldr r3, [r3, #0] 8019c82: 68fa ldr r2, [r7, #12] 8019c84: 429a cmp r2, r3 8019c86: d01b beq.n 8019cc0 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 8019c88: 4b2d ldr r3, [pc, #180] @ (8019d40 ) 8019c8a: 681b ldr r3, [r3, #0] 8019c8c: 68fa ldr r2, [r7, #12] 8019c8e: 429a cmp r2, r3 8019c90: d102 bne.n 8019c98 lfree = mem; 8019c92: 4a2b ldr r2, [pc, #172] @ (8019d40 ) 8019c94: 687b ldr r3, [r7, #4] 8019c96: 6013 str r3, [r2, #0] } mem->next = nmem->next; 8019c98: 68fb ldr r3, [r7, #12] 8019c9a: 681a ldr r2, [r3, #0] 8019c9c: 687b ldr r3, [r7, #4] 8019c9e: 601a str r2, [r3, #0] if (nmem->next != MEM_SIZE_ALIGNED) { 8019ca0: 68fb ldr r3, [r7, #12] 8019ca2: 681b ldr r3, [r3, #0] 8019ca4: 4a24 ldr r2, [pc, #144] @ (8019d38 ) 8019ca6: 4293 cmp r3, r2 8019ca8: d00a beq.n 8019cc0 ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); 8019caa: 68fb ldr r3, [r7, #12] 8019cac: 681b ldr r3, [r3, #0] 8019cae: 4618 mov r0, r3 8019cb0: f7ff ff84 bl 8019bbc 8019cb4: 4604 mov r4, r0 8019cb6: 6878 ldr r0, [r7, #4] 8019cb8: f7ff ff90 bl 8019bdc 8019cbc: 4603 mov r3, r0 8019cbe: 6063 str r3, [r4, #4] } } /* plug hole backward */ pmem = ptr_to_mem(mem->prev); 8019cc0: 687b ldr r3, [r7, #4] 8019cc2: 685b ldr r3, [r3, #4] 8019cc4: 4618 mov r0, r3 8019cc6: f7ff ff79 bl 8019bbc 8019cca: 60b8 str r0, [r7, #8] if (pmem != mem && pmem->used == 0) { 8019ccc: 68ba ldr r2, [r7, #8] 8019cce: 687b ldr r3, [r7, #4] 8019cd0: 429a cmp r2, r3 8019cd2: d01f beq.n 8019d14 8019cd4: 68bb ldr r3, [r7, #8] 8019cd6: 7a1b ldrb r3, [r3, #8] 8019cd8: 2b00 cmp r3, #0 8019cda: d11b bne.n 8019d14 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 8019cdc: 4b18 ldr r3, [pc, #96] @ (8019d40 ) 8019cde: 681b ldr r3, [r3, #0] 8019ce0: 687a ldr r2, [r7, #4] 8019ce2: 429a cmp r2, r3 8019ce4: d102 bne.n 8019cec lfree = pmem; 8019ce6: 4a16 ldr r2, [pc, #88] @ (8019d40 ) 8019ce8: 68bb ldr r3, [r7, #8] 8019cea: 6013 str r3, [r2, #0] } pmem->next = mem->next; 8019cec: 687b ldr r3, [r7, #4] 8019cee: 681a ldr r2, [r3, #0] 8019cf0: 68bb ldr r3, [r7, #8] 8019cf2: 601a str r2, [r3, #0] if (mem->next != MEM_SIZE_ALIGNED) { 8019cf4: 687b ldr r3, [r7, #4] 8019cf6: 681b ldr r3, [r3, #0] 8019cf8: 4a0f ldr r2, [pc, #60] @ (8019d38 ) 8019cfa: 4293 cmp r3, r2 8019cfc: d00a beq.n 8019d14 ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); 8019cfe: 687b ldr r3, [r7, #4] 8019d00: 681b ldr r3, [r3, #0] 8019d02: 4618 mov r0, r3 8019d04: f7ff ff5a bl 8019bbc 8019d08: 4604 mov r4, r0 8019d0a: 68b8 ldr r0, [r7, #8] 8019d0c: f7ff ff66 bl 8019bdc 8019d10: 4603 mov r3, r0 8019d12: 6063 str r3, [r4, #4] } } } 8019d14: bf00 nop 8019d16: 3714 adds r7, #20 8019d18: 46bd mov sp, r7 8019d1a: bd90 pop {r4, r7, pc} 8019d1c: 24024430 .word 0x24024430 8019d20: 0802ea7c .word 0x0802ea7c 8019d24: 0802eaac .word 0x0802eaac 8019d28: 0802eac4 .word 0x0802eac4 8019d2c: 24024434 .word 0x24024434 8019d30: 0802eaec .word 0x0802eaec 8019d34: 0802eb08 .word 0x0802eb08 8019d38: 0001ffe8 .word 0x0001ffe8 8019d3c: 0802eb24 .word 0x0802eb24 8019d40: 2402443c .word 0x2402443c 08019d44 : /** * Zero the heap and initialize start, end and lowest-free */ void mem_init(void) { 8019d44: b580 push {r7, lr} 8019d46: b082 sub sp, #8 8019d48: 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); 8019d4a: 4b1b ldr r3, [pc, #108] @ (8019db8 ) 8019d4c: 4a1b ldr r2, [pc, #108] @ (8019dbc ) 8019d4e: 601a str r2, [r3, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; 8019d50: 4b19 ldr r3, [pc, #100] @ (8019db8 ) 8019d52: 681b ldr r3, [r3, #0] 8019d54: 607b str r3, [r7, #4] mem->next = MEM_SIZE_ALIGNED; 8019d56: 687b ldr r3, [r7, #4] 8019d58: 4a19 ldr r2, [pc, #100] @ (8019dc0 ) 8019d5a: 601a str r2, [r3, #0] mem->prev = 0; 8019d5c: 687b ldr r3, [r7, #4] 8019d5e: 2200 movs r2, #0 8019d60: 605a str r2, [r3, #4] mem->used = 0; 8019d62: 687b ldr r3, [r7, #4] 8019d64: 2200 movs r2, #0 8019d66: 721a strb r2, [r3, #8] /* initialize the end of the heap */ ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); 8019d68: 4815 ldr r0, [pc, #84] @ (8019dc0 ) 8019d6a: f7ff ff27 bl 8019bbc 8019d6e: 4603 mov r3, r0 8019d70: 4a14 ldr r2, [pc, #80] @ (8019dc4 ) 8019d72: 6013 str r3, [r2, #0] ram_end->used = 1; 8019d74: 4b13 ldr r3, [pc, #76] @ (8019dc4 ) 8019d76: 681b ldr r3, [r3, #0] 8019d78: 2201 movs r2, #1 8019d7a: 721a strb r2, [r3, #8] ram_end->next = MEM_SIZE_ALIGNED; 8019d7c: 4b11 ldr r3, [pc, #68] @ (8019dc4 ) 8019d7e: 681b ldr r3, [r3, #0] 8019d80: 4a0f ldr r2, [pc, #60] @ (8019dc0 ) 8019d82: 601a str r2, [r3, #0] ram_end->prev = MEM_SIZE_ALIGNED; 8019d84: 4b0f ldr r3, [pc, #60] @ (8019dc4 ) 8019d86: 681b ldr r3, [r3, #0] 8019d88: 4a0d ldr r2, [pc, #52] @ (8019dc0 ) 8019d8a: 605a str r2, [r3, #4] MEM_SANITY(); /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 8019d8c: 4b0a ldr r3, [pc, #40] @ (8019db8 ) 8019d8e: 681b ldr r3, [r3, #0] 8019d90: 4a0d ldr r2, [pc, #52] @ (8019dc8 ) 8019d92: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if (sys_mutex_new(&mem_mutex) != ERR_OK) { 8019d94: 480d ldr r0, [pc, #52] @ (8019dcc ) 8019d96: f00d fa81 bl 802729c 8019d9a: 4603 mov r3, r0 8019d9c: 2b00 cmp r3, #0 8019d9e: d006 beq.n 8019dae LWIP_ASSERT("failed to create mem_mutex", 0); 8019da0: 4b0b ldr r3, [pc, #44] @ (8019dd0 ) 8019da2: f240 221f movw r2, #543 @ 0x21f 8019da6: 490b ldr r1, [pc, #44] @ (8019dd4 ) 8019da8: 480b ldr r0, [pc, #44] @ (8019dd8 ) 8019daa: f010 fd5f bl 802a86c } } 8019dae: bf00 nop 8019db0: 3708 adds r7, #8 8019db2: 46bd mov sp, r7 8019db4: bd80 pop {r7, pc} 8019db6: bf00 nop 8019db8: 24024430 .word 0x24024430 8019dbc: 24020000 .word 0x24020000 8019dc0: 0001ffe8 .word 0x0001ffe8 8019dc4: 24024434 .word 0x24024434 8019dc8: 2402443c .word 0x2402443c 8019dcc: 24024438 .word 0x24024438 8019dd0: 0802ea7c .word 0x0802ea7c 8019dd4: 0802eb50 .word 0x0802eb50 8019dd8: 0802eac4 .word 0x0802eac4 08019ddc : /* Check if a struct mem is correctly linked. * If not, double-free is a possible reason. */ static int mem_link_valid(struct mem *mem) { 8019ddc: b580 push {r7, lr} 8019dde: b086 sub sp, #24 8019de0: af00 add r7, sp, #0 8019de2: 6078 str r0, [r7, #4] struct mem *nmem, *pmem; mem_size_t rmem_idx; rmem_idx = mem_to_ptr(mem); 8019de4: 6878 ldr r0, [r7, #4] 8019de6: f7ff fef9 bl 8019bdc 8019dea: 6178 str r0, [r7, #20] nmem = ptr_to_mem(mem->next); 8019dec: 687b ldr r3, [r7, #4] 8019dee: 681b ldr r3, [r3, #0] 8019df0: 4618 mov r0, r3 8019df2: f7ff fee3 bl 8019bbc 8019df6: 6138 str r0, [r7, #16] pmem = ptr_to_mem(mem->prev); 8019df8: 687b ldr r3, [r7, #4] 8019dfa: 685b ldr r3, [r3, #4] 8019dfc: 4618 mov r0, r3 8019dfe: f7ff fedd bl 8019bbc 8019e02: 60f8 str r0, [r7, #12] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8019e04: 687b ldr r3, [r7, #4] 8019e06: 681b ldr r3, [r3, #0] 8019e08: 4a11 ldr r2, [pc, #68] @ (8019e50 ) 8019e0a: 4293 cmp r3, r2 8019e0c: d818 bhi.n 8019e40 8019e0e: 687b ldr r3, [r7, #4] 8019e10: 685b ldr r3, [r3, #4] 8019e12: 4a0f ldr r2, [pc, #60] @ (8019e50 ) 8019e14: 4293 cmp r3, r2 8019e16: d813 bhi.n 8019e40 ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e18: 687b ldr r3, [r7, #4] 8019e1a: 685b ldr r3, [r3, #4] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8019e1c: 697a ldr r2, [r7, #20] 8019e1e: 429a cmp r2, r3 8019e20: d004 beq.n 8019e2c ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e22: 68fb ldr r3, [r7, #12] 8019e24: 681b ldr r3, [r3, #0] 8019e26: 697a ldr r2, [r7, #20] 8019e28: 429a cmp r2, r3 8019e2a: d109 bne.n 8019e40 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8019e2c: 4b09 ldr r3, [pc, #36] @ (8019e54 ) 8019e2e: 681b ldr r3, [r3, #0] ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e30: 693a ldr r2, [r7, #16] 8019e32: 429a cmp r2, r3 8019e34: d006 beq.n 8019e44 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8019e36: 693b ldr r3, [r7, #16] 8019e38: 685b ldr r3, [r3, #4] 8019e3a: 697a ldr r2, [r7, #20] 8019e3c: 429a cmp r2, r3 8019e3e: d001 beq.n 8019e44 return 0; 8019e40: 2300 movs r3, #0 8019e42: e000 b.n 8019e46 } return 1; 8019e44: 2301 movs r3, #1 } 8019e46: 4618 mov r0, r3 8019e48: 3718 adds r7, #24 8019e4a: 46bd mov sp, r7 8019e4c: bd80 pop {r7, pc} 8019e4e: bf00 nop 8019e50: 0001ffe8 .word 0x0001ffe8 8019e54: 24024434 .word 0x24024434 08019e58 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 8019e58: b580 push {r7, lr} 8019e5a: b088 sub sp, #32 8019e5c: af00 add r7, sp, #0 8019e5e: 6078 str r0, [r7, #4] struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 8019e60: 687b ldr r3, [r7, #4] 8019e62: 2b00 cmp r3, #0 8019e64: d070 beq.n 8019f48 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) { 8019e66: 687b ldr r3, [r7, #4] 8019e68: f003 0303 and.w r3, r3, #3 8019e6c: 2b00 cmp r3, #0 8019e6e: d00d beq.n 8019e8c LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); 8019e70: 4b37 ldr r3, [pc, #220] @ (8019f50 ) 8019e72: f240 2273 movw r2, #627 @ 0x273 8019e76: 4937 ldr r1, [pc, #220] @ (8019f54 ) 8019e78: 4837 ldr r0, [pc, #220] @ (8019f58 ) 8019e7a: f010 fcf7 bl 802a86c 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); 8019e7e: f00d fa5f bl 8027340 8019e82: 60f8 str r0, [r7, #12] 8019e84: 68f8 ldr r0, [r7, #12] 8019e86: f00d fa69 bl 802735c return; 8019e8a: e05e b.n 8019f4a } /* 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)); 8019e8c: 687b ldr r3, [r7, #4] 8019e8e: 3b0c subs r3, #12 8019e90: 61fb str r3, [r7, #28] if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { 8019e92: 4b32 ldr r3, [pc, #200] @ (8019f5c ) 8019e94: 681b ldr r3, [r3, #0] 8019e96: 69fa ldr r2, [r7, #28] 8019e98: 429a cmp r2, r3 8019e9a: d306 bcc.n 8019eaa 8019e9c: 687b ldr r3, [r7, #4] 8019e9e: f103 020c add.w r2, r3, #12 8019ea2: 4b2f ldr r3, [pc, #188] @ (8019f60 ) 8019ea4: 681b ldr r3, [r3, #0] 8019ea6: 429a cmp r2, r3 8019ea8: d90d bls.n 8019ec6 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); 8019eaa: 4b29 ldr r3, [pc, #164] @ (8019f50 ) 8019eac: f240 227f movw r2, #639 @ 0x27f 8019eb0: 492c ldr r1, [pc, #176] @ (8019f64 ) 8019eb2: 4829 ldr r0, [pc, #164] @ (8019f58 ) 8019eb4: f010 fcda bl 802a86c LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 8019eb8: f00d fa42 bl 8027340 8019ebc: 6138 str r0, [r7, #16] 8019ebe: 6938 ldr r0, [r7, #16] 8019ec0: f00d fa4c bl 802735c return; 8019ec4: e041 b.n 8019f4a } #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8019ec6: 4828 ldr r0, [pc, #160] @ (8019f68 ) 8019ec8: f00d f9fe bl 80272c8 /* mem has to be in a used state */ if (!mem->used) { 8019ecc: 69fb ldr r3, [r7, #28] 8019ece: 7a1b ldrb r3, [r3, #8] 8019ed0: 2b00 cmp r3, #0 8019ed2: d110 bne.n 8019ef6 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); 8019ed4: 4b1e ldr r3, [pc, #120] @ (8019f50 ) 8019ed6: f44f 7223 mov.w r2, #652 @ 0x28c 8019eda: 4924 ldr r1, [pc, #144] @ (8019f6c ) 8019edc: 481e ldr r0, [pc, #120] @ (8019f58 ) 8019ede: f010 fcc5 bl 802a86c LWIP_MEM_FREE_UNPROTECT(); 8019ee2: 4821 ldr r0, [pc, #132] @ (8019f68 ) 8019ee4: f00d f9ff bl 80272e6 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); 8019ee8: f00d fa2a bl 8027340 8019eec: 6178 str r0, [r7, #20] 8019eee: 6978 ldr r0, [r7, #20] 8019ef0: f00d fa34 bl 802735c return; 8019ef4: e029 b.n 8019f4a } if (!mem_link_valid(mem)) { 8019ef6: 69f8 ldr r0, [r7, #28] 8019ef8: f7ff ff70 bl 8019ddc 8019efc: 4603 mov r3, r0 8019efe: 2b00 cmp r3, #0 8019f00: d110 bne.n 8019f24 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); 8019f02: 4b13 ldr r3, [pc, #76] @ (8019f50 ) 8019f04: f240 2295 movw r2, #661 @ 0x295 8019f08: 4919 ldr r1, [pc, #100] @ (8019f70 ) 8019f0a: 4813 ldr r0, [pc, #76] @ (8019f58 ) 8019f0c: f010 fcae bl 802a86c LWIP_MEM_FREE_UNPROTECT(); 8019f10: 4815 ldr r0, [pc, #84] @ (8019f68 ) 8019f12: f00d f9e8 bl 80272e6 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); 8019f16: f00d fa13 bl 8027340 8019f1a: 61b8 str r0, [r7, #24] 8019f1c: 69b8 ldr r0, [r7, #24] 8019f1e: f00d fa1d bl 802735c return; 8019f22: e012 b.n 8019f4a } /* mem is now unused. */ mem->used = 0; 8019f24: 69fb ldr r3, [r7, #28] 8019f26: 2200 movs r2, #0 8019f28: 721a strb r2, [r3, #8] if (mem < lfree) { 8019f2a: 4b12 ldr r3, [pc, #72] @ (8019f74 ) 8019f2c: 681b ldr r3, [r3, #0] 8019f2e: 69fa ldr r2, [r7, #28] 8019f30: 429a cmp r2, r3 8019f32: d202 bcs.n 8019f3a /* the newly freed struct is now the lowest */ lfree = mem; 8019f34: 4a0f ldr r2, [pc, #60] @ (8019f74 ) 8019f36: 69fb ldr r3, [r7, #28] 8019f38: 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); 8019f3a: 69f8 ldr r0, [r7, #28] 8019f3c: f7ff fe5e bl 8019bfc 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(); 8019f40: 4809 ldr r0, [pc, #36] @ (8019f68 ) 8019f42: f00d f9d0 bl 80272e6 8019f46: e000 b.n 8019f4a return; 8019f48: bf00 nop } 8019f4a: 3720 adds r7, #32 8019f4c: 46bd mov sp, r7 8019f4e: bd80 pop {r7, pc} 8019f50: 0802ea7c .word 0x0802ea7c 8019f54: 0802eb6c .word 0x0802eb6c 8019f58: 0802eac4 .word 0x0802eac4 8019f5c: 24024430 .word 0x24024430 8019f60: 24024434 .word 0x24024434 8019f64: 0802eb90 .word 0x0802eb90 8019f68: 24024438 .word 0x24024438 8019f6c: 0802ebac .word 0x0802ebac 8019f70: 0802ebd4 .word 0x0802ebd4 8019f74: 2402443c .word 0x2402443c 08019f78 : * 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) { 8019f78: b580 push {r7, lr} 8019f7a: b08a sub sp, #40 @ 0x28 8019f7c: af00 add r7, sp, #0 8019f7e: 6078 str r0, [r7, #4] 8019f80: 6039 str r1, [r7, #0] /* 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); 8019f82: 683b ldr r3, [r7, #0] 8019f84: 3303 adds r3, #3 8019f86: f023 0303 bic.w r3, r3, #3 8019f8a: 627b str r3, [r7, #36] @ 0x24 if (newsize < MIN_SIZE_ALIGNED) { 8019f8c: 6a7b ldr r3, [r7, #36] @ 0x24 8019f8e: 2b0b cmp r3, #11 8019f90: d801 bhi.n 8019f96 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 8019f92: 230c movs r3, #12 8019f94: 627b str r3, [r7, #36] @ 0x24 } #if MEM_OVERFLOW_CHECK newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; #endif if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) { 8019f96: 6a7b ldr r3, [r7, #36] @ 0x24 8019f98: 4a6e ldr r2, [pc, #440] @ (801a154 ) 8019f9a: 4293 cmp r3, r2 8019f9c: d803 bhi.n 8019fa6 8019f9e: 6a7a ldr r2, [r7, #36] @ 0x24 8019fa0: 683b ldr r3, [r7, #0] 8019fa2: 429a cmp r2, r3 8019fa4: d201 bcs.n 8019faa return NULL; 8019fa6: 2300 movs r3, #0 8019fa8: e0d0 b.n 801a14c } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && 8019faa: 4b6b ldr r3, [pc, #428] @ (801a158 ) 8019fac: 681b ldr r3, [r3, #0] 8019fae: 687a ldr r2, [r7, #4] 8019fb0: 429a cmp r2, r3 8019fb2: d304 bcc.n 8019fbe 8019fb4: 4b69 ldr r3, [pc, #420] @ (801a15c ) 8019fb6: 681b ldr r3, [r3, #0] 8019fb8: 687a ldr r2, [r7, #4] 8019fba: 429a cmp r2, r3 8019fbc: d306 bcc.n 8019fcc 8019fbe: 4b68 ldr r3, [pc, #416] @ (801a160 ) 8019fc0: f240 22d1 movw r2, #721 @ 0x2d1 8019fc4: 4967 ldr r1, [pc, #412] @ (801a164 ) 8019fc6: 4868 ldr r0, [pc, #416] @ (801a168 ) 8019fc8: f010 fc50 bl 802a86c (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 8019fcc: 4b62 ldr r3, [pc, #392] @ (801a158 ) 8019fce: 681b ldr r3, [r3, #0] 8019fd0: 687a ldr r2, [r7, #4] 8019fd2: 429a cmp r2, r3 8019fd4: d304 bcc.n 8019fe0 8019fd6: 4b61 ldr r3, [pc, #388] @ (801a15c ) 8019fd8: 681b ldr r3, [r3, #0] 8019fda: 687a ldr r2, [r7, #4] 8019fdc: 429a cmp r2, r3 8019fde: d307 bcc.n 8019ff0 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 8019fe0: f00d f9ae bl 8027340 8019fe4: 60b8 str r0, [r7, #8] 8019fe6: 68b8 ldr r0, [r7, #8] 8019fe8: f00d f9b8 bl 802735c return rmem; 8019fec: 687b ldr r3, [r7, #4] 8019fee: e0ad b.n 801a14c } /* 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)); 8019ff0: 687b ldr r3, [r7, #4] 8019ff2: 3b0c subs r3, #12 8019ff4: 623b str r3, [r7, #32] #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* ... and its offset pointer */ ptr = mem_to_ptr(mem); 8019ff6: 6a38 ldr r0, [r7, #32] 8019ff8: f7ff fdf0 bl 8019bdc 8019ffc: 61f8 str r0, [r7, #28] size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); 8019ffe: 6a3b ldr r3, [r7, #32] 801a000: 681a ldr r2, [r3, #0] 801a002: 69fb ldr r3, [r7, #28] 801a004: 1ad3 subs r3, r2, r3 801a006: 3b0c subs r3, #12 801a008: 61bb str r3, [r7, #24] LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 801a00a: 6a7a ldr r2, [r7, #36] @ 0x24 801a00c: 69bb ldr r3, [r7, #24] 801a00e: 429a cmp r2, r3 801a010: d906 bls.n 801a020 801a012: 4b53 ldr r3, [pc, #332] @ (801a160 ) 801a014: f44f 7239 mov.w r2, #740 @ 0x2e4 801a018: 4954 ldr r1, [pc, #336] @ (801a16c ) 801a01a: 4853 ldr r0, [pc, #332] @ (801a168 ) 801a01c: f010 fc26 bl 802a86c if (newsize > size) { 801a020: 6a7a ldr r2, [r7, #36] @ 0x24 801a022: 69bb ldr r3, [r7, #24] 801a024: 429a cmp r2, r3 801a026: d901 bls.n 801a02c /* not supported */ return NULL; 801a028: 2300 movs r3, #0 801a02a: e08f b.n 801a14c } if (newsize == size) { 801a02c: 6a7a ldr r2, [r7, #36] @ 0x24 801a02e: 69bb ldr r3, [r7, #24] 801a030: 429a cmp r2, r3 801a032: d101 bne.n 801a038 /* No change in size, simply return */ return rmem; 801a034: 687b ldr r3, [r7, #4] 801a036: e089 b.n 801a14c } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 801a038: 484d ldr r0, [pc, #308] @ (801a170 ) 801a03a: f00d f945 bl 80272c8 mem2 = ptr_to_mem(mem->next); 801a03e: 6a3b ldr r3, [r7, #32] 801a040: 681b ldr r3, [r3, #0] 801a042: 4618 mov r0, r3 801a044: f7ff fdba bl 8019bbc 801a048: 6178 str r0, [r7, #20] if (mem2->used == 0) { 801a04a: 697b ldr r3, [r7, #20] 801a04c: 7a1b ldrb r3, [r3, #8] 801a04e: 2b00 cmp r3, #0 801a050: d13c bne.n 801a0cc /* 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); 801a052: 6a3b ldr r3, [r7, #32] 801a054: 681b ldr r3, [r3, #0] 801a056: 4a3f ldr r2, [pc, #252] @ (801a154 ) 801a058: 4293 cmp r3, r2 801a05a: d106 bne.n 801a06a 801a05c: 4b40 ldr r3, [pc, #256] @ (801a160 ) 801a05e: f240 22f5 movw r2, #757 @ 0x2f5 801a062: 4944 ldr r1, [pc, #272] @ (801a174 ) 801a064: 4840 ldr r0, [pc, #256] @ (801a168 ) 801a066: f010 fc01 bl 802a86c /* remember the old next pointer */ next = mem2->next; 801a06a: 697b ldr r3, [r7, #20] 801a06c: 681b ldr r3, [r3, #0] 801a06e: 60fb str r3, [r7, #12] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize); 801a070: 69fa ldr r2, [r7, #28] 801a072: 6a7b ldr r3, [r7, #36] @ 0x24 801a074: 4413 add r3, r2 801a076: 330c adds r3, #12 801a078: 613b str r3, [r7, #16] if (lfree == mem2) { 801a07a: 4b3f ldr r3, [pc, #252] @ (801a178 ) 801a07c: 681b ldr r3, [r3, #0] 801a07e: 697a ldr r2, [r7, #20] 801a080: 429a cmp r2, r3 801a082: d105 bne.n 801a090 lfree = ptr_to_mem(ptr2); 801a084: 6938 ldr r0, [r7, #16] 801a086: f7ff fd99 bl 8019bbc 801a08a: 4603 mov r3, r0 801a08c: 4a3a ldr r2, [pc, #232] @ (801a178 ) 801a08e: 6013 str r3, [r2, #0] } mem2 = ptr_to_mem(ptr2); 801a090: 6938 ldr r0, [r7, #16] 801a092: f7ff fd93 bl 8019bbc 801a096: 6178 str r0, [r7, #20] mem2->used = 0; 801a098: 697b ldr r3, [r7, #20] 801a09a: 2200 movs r2, #0 801a09c: 721a strb r2, [r3, #8] /* restore the next pointer */ mem2->next = next; 801a09e: 697b ldr r3, [r7, #20] 801a0a0: 68fa ldr r2, [r7, #12] 801a0a2: 601a str r2, [r3, #0] /* link it back to mem */ mem2->prev = ptr; 801a0a4: 697b ldr r3, [r7, #20] 801a0a6: 69fa ldr r2, [r7, #28] 801a0a8: 605a str r2, [r3, #4] /* link mem to it */ mem->next = ptr2; 801a0aa: 6a3b ldr r3, [r7, #32] 801a0ac: 693a ldr r2, [r7, #16] 801a0ae: 601a str 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) { 801a0b0: 697b ldr r3, [r7, #20] 801a0b2: 681b ldr r3, [r3, #0] 801a0b4: 4a27 ldr r2, [pc, #156] @ (801a154 ) 801a0b6: 4293 cmp r3, r2 801a0b8: d044 beq.n 801a144 ptr_to_mem(mem2->next)->prev = ptr2; 801a0ba: 697b ldr r3, [r7, #20] 801a0bc: 681b ldr r3, [r3, #0] 801a0be: 4618 mov r0, r3 801a0c0: f7ff fd7c bl 8019bbc 801a0c4: 4602 mov r2, r0 801a0c6: 693b ldr r3, [r7, #16] 801a0c8: 6053 str r3, [r2, #4] 801a0ca: e03b b.n 801a144 } 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) { 801a0cc: 6a7b ldr r3, [r7, #36] @ 0x24 801a0ce: 3318 adds r3, #24 801a0d0: 69ba ldr r2, [r7, #24] 801a0d2: 429a cmp r2, r3 801a0d4: d336 bcc.n 801a144 * 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); 801a0d6: 69fa ldr r2, [r7, #28] 801a0d8: 6a7b ldr r3, [r7, #36] @ 0x24 801a0da: 4413 add r3, r2 801a0dc: 330c adds r3, #12 801a0de: 613b str r3, [r7, #16] LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 801a0e0: 6a3b ldr r3, [r7, #32] 801a0e2: 681b ldr r3, [r3, #0] 801a0e4: 4a1b ldr r2, [pc, #108] @ (801a154 ) 801a0e6: 4293 cmp r3, r2 801a0e8: d106 bne.n 801a0f8 801a0ea: 4b1d ldr r3, [pc, #116] @ (801a160 ) 801a0ec: f240 3216 movw r2, #790 @ 0x316 801a0f0: 4920 ldr r1, [pc, #128] @ (801a174 ) 801a0f2: 481d ldr r0, [pc, #116] @ (801a168 ) 801a0f4: f010 fbba bl 802a86c mem2 = ptr_to_mem(ptr2); 801a0f8: 6938 ldr r0, [r7, #16] 801a0fa: f7ff fd5f bl 8019bbc 801a0fe: 6178 str r0, [r7, #20] if (mem2 < lfree) { 801a100: 4b1d ldr r3, [pc, #116] @ (801a178 ) 801a102: 681b ldr r3, [r3, #0] 801a104: 697a ldr r2, [r7, #20] 801a106: 429a cmp r2, r3 801a108: d202 bcs.n 801a110 lfree = mem2; 801a10a: 4a1b ldr r2, [pc, #108] @ (801a178 ) 801a10c: 697b ldr r3, [r7, #20] 801a10e: 6013 str r3, [r2, #0] } mem2->used = 0; 801a110: 697b ldr r3, [r7, #20] 801a112: 2200 movs r2, #0 801a114: 721a strb r2, [r3, #8] mem2->next = mem->next; 801a116: 6a3b ldr r3, [r7, #32] 801a118: 681a ldr r2, [r3, #0] 801a11a: 697b ldr r3, [r7, #20] 801a11c: 601a str r2, [r3, #0] mem2->prev = ptr; 801a11e: 697b ldr r3, [r7, #20] 801a120: 69fa ldr r2, [r7, #28] 801a122: 605a str r2, [r3, #4] mem->next = ptr2; 801a124: 6a3b ldr r3, [r7, #32] 801a126: 693a ldr r2, [r7, #16] 801a128: 601a str r2, [r3, #0] if (mem2->next != MEM_SIZE_ALIGNED) { 801a12a: 697b ldr r3, [r7, #20] 801a12c: 681b ldr r3, [r3, #0] 801a12e: 4a09 ldr r2, [pc, #36] @ (801a154 ) 801a130: 4293 cmp r3, r2 801a132: d007 beq.n 801a144 ptr_to_mem(mem2->next)->prev = ptr2; 801a134: 697b ldr r3, [r7, #20] 801a136: 681b ldr r3, [r3, #0] 801a138: 4618 mov r0, r3 801a13a: f7ff fd3f bl 8019bbc 801a13e: 4602 mov r2, r0 801a140: 693b ldr r3, [r7, #16] 801a142: 6053 str r3, [r2, #4] #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(); 801a144: 480a ldr r0, [pc, #40] @ (801a170 ) 801a146: f00d f8ce bl 80272e6 return rmem; 801a14a: 687b ldr r3, [r7, #4] } 801a14c: 4618 mov r0, r3 801a14e: 3728 adds r7, #40 @ 0x28 801a150: 46bd mov sp, r7 801a152: bd80 pop {r7, pc} 801a154: 0001ffe8 .word 0x0001ffe8 801a158: 24024430 .word 0x24024430 801a15c: 24024434 .word 0x24024434 801a160: 0802ea7c .word 0x0802ea7c 801a164: 0802ec08 .word 0x0802ec08 801a168: 0802eac4 .word 0x0802eac4 801a16c: 0802ec20 .word 0x0802ec20 801a170: 24024438 .word 0x24024438 801a174: 0802ec40 .word 0x0802ec40 801a178: 2402443c .word 0x2402443c 0801a17c : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size_in) { 801a17c: b580 push {r7, lr} 801a17e: b088 sub sp, #32 801a180: af00 add r7, sp, #0 801a182: 6078 str r0, [r7, #4] #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) { 801a184: 687b ldr r3, [r7, #4] 801a186: 2b00 cmp r3, #0 801a188: d101 bne.n 801a18e return NULL; 801a18a: 2300 movs r3, #0 801a18c: e0d9 b.n 801a342 } /* 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); 801a18e: 687b ldr r3, [r7, #4] 801a190: 3303 adds r3, #3 801a192: f023 0303 bic.w r3, r3, #3 801a196: 61bb str r3, [r7, #24] if (size < MIN_SIZE_ALIGNED) { 801a198: 69bb ldr r3, [r7, #24] 801a19a: 2b0b cmp r3, #11 801a19c: d801 bhi.n 801a1a2 /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 801a19e: 230c movs r3, #12 801a1a0: 61bb str r3, [r7, #24] } #if MEM_OVERFLOW_CHECK size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; #endif if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) { 801a1a2: 69bb ldr r3, [r7, #24] 801a1a4: 4a69 ldr r2, [pc, #420] @ (801a34c ) 801a1a6: 4293 cmp r3, r2 801a1a8: d803 bhi.n 801a1b2 801a1aa: 69ba ldr r2, [r7, #24] 801a1ac: 687b ldr r3, [r7, #4] 801a1ae: 429a cmp r2, r3 801a1b0: d201 bcs.n 801a1b6 return NULL; 801a1b2: 2300 movs r3, #0 801a1b4: e0c5 b.n 801a342 } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 801a1b6: 4866 ldr r0, [pc, #408] @ (801a350 ) 801a1b8: f00d f886 bl 80272c8 #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; 801a1bc: 4b65 ldr r3, [pc, #404] @ (801a354 ) 801a1be: 681b ldr r3, [r3, #0] 801a1c0: 4618 mov r0, r3 801a1c2: f7ff fd0b bl 8019bdc 801a1c6: 61f8 str r0, [r7, #28] 801a1c8: e0b0 b.n 801a32c ptr = ptr_to_mem(ptr)->next) { mem = ptr_to_mem(ptr); 801a1ca: 69f8 ldr r0, [r7, #28] 801a1cc: f7ff fcf6 bl 8019bbc 801a1d0: 6138 str r0, [r7, #16] local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 801a1d2: 693b ldr r3, [r7, #16] 801a1d4: 7a1b ldrb r3, [r3, #8] 801a1d6: 2b00 cmp r3, #0 801a1d8: f040 80a2 bne.w 801a320 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 801a1dc: 693b ldr r3, [r7, #16] 801a1de: 681a ldr r2, [r3, #0] 801a1e0: 69fb ldr r3, [r7, #28] 801a1e2: 1ad3 subs r3, r2, r3 801a1e4: 3b0c subs r3, #12 if ((!mem->used) && 801a1e6: 69ba ldr r2, [r7, #24] 801a1e8: 429a cmp r2, r3 801a1ea: f200 8099 bhi.w 801a320 /* 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)) { 801a1ee: 693b ldr r3, [r7, #16] 801a1f0: 681a ldr r2, [r3, #0] 801a1f2: 69fb ldr r3, [r7, #28] 801a1f4: 1ad3 subs r3, r2, r3 801a1f6: f1a3 020c sub.w r2, r3, #12 801a1fa: 69bb ldr r3, [r7, #24] 801a1fc: 3318 adds r3, #24 801a1fe: 429a cmp r2, r3 801a200: d331 bcc.n 801a266 * 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); 801a202: 69fa ldr r2, [r7, #28] 801a204: 69bb ldr r3, [r7, #24] 801a206: 4413 add r3, r2 801a208: 330c adds r3, #12 801a20a: 60fb str r3, [r7, #12] LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 801a20c: 68fb ldr r3, [r7, #12] 801a20e: 4a4f ldr r2, [pc, #316] @ (801a34c ) 801a210: 4293 cmp r3, r2 801a212: d106 bne.n 801a222 801a214: 4b50 ldr r3, [pc, #320] @ (801a358 ) 801a216: f240 3287 movw r2, #903 @ 0x387 801a21a: 4950 ldr r1, [pc, #320] @ (801a35c ) 801a21c: 4850 ldr r0, [pc, #320] @ (801a360 ) 801a21e: f010 fb25 bl 802a86c /* create mem2 struct */ mem2 = ptr_to_mem(ptr2); 801a222: 68f8 ldr r0, [r7, #12] 801a224: f7ff fcca bl 8019bbc 801a228: 60b8 str r0, [r7, #8] mem2->used = 0; 801a22a: 68bb ldr r3, [r7, #8] 801a22c: 2200 movs r2, #0 801a22e: 721a strb r2, [r3, #8] mem2->next = mem->next; 801a230: 693b ldr r3, [r7, #16] 801a232: 681a ldr r2, [r3, #0] 801a234: 68bb ldr r3, [r7, #8] 801a236: 601a str r2, [r3, #0] mem2->prev = ptr; 801a238: 68bb ldr r3, [r7, #8] 801a23a: 69fa ldr r2, [r7, #28] 801a23c: 605a str r2, [r3, #4] /* and insert it between mem and mem->next */ mem->next = ptr2; 801a23e: 693b ldr r3, [r7, #16] 801a240: 68fa ldr r2, [r7, #12] 801a242: 601a str r2, [r3, #0] mem->used = 1; 801a244: 693b ldr r3, [r7, #16] 801a246: 2201 movs r2, #1 801a248: 721a strb r2, [r3, #8] if (mem2->next != MEM_SIZE_ALIGNED) { 801a24a: 68bb ldr r3, [r7, #8] 801a24c: 681b ldr r3, [r3, #0] 801a24e: 4a3f ldr r2, [pc, #252] @ (801a34c ) 801a250: 4293 cmp r3, r2 801a252: d00b beq.n 801a26c ptr_to_mem(mem2->next)->prev = ptr2; 801a254: 68bb ldr r3, [r7, #8] 801a256: 681b ldr r3, [r3, #0] 801a258: 4618 mov r0, r3 801a25a: f7ff fcaf bl 8019bbc 801a25e: 4602 mov r2, r0 801a260: 68fb ldr r3, [r7, #12] 801a262: 6053 str r3, [r2, #4] 801a264: e002 b.n 801a26c * 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; 801a266: 693b ldr r3, [r7, #16] 801a268: 2201 movs r2, #1 801a26a: 721a strb r2, [r3, #8] 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) { 801a26c: 4b39 ldr r3, [pc, #228] @ (801a354 ) 801a26e: 681b ldr r3, [r3, #0] 801a270: 693a ldr r2, [r7, #16] 801a272: 429a cmp r2, r3 801a274: d127 bne.n 801a2c6 struct mem *cur = lfree; 801a276: 4b37 ldr r3, [pc, #220] @ (801a354 ) 801a278: 681b ldr r3, [r3, #0] 801a27a: 617b str r3, [r7, #20] /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 801a27c: e005 b.n 801a28a /* 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); 801a27e: 697b ldr r3, [r7, #20] 801a280: 681b ldr r3, [r3, #0] 801a282: 4618 mov r0, r3 801a284: f7ff fc9a bl 8019bbc 801a288: 6178 str r0, [r7, #20] while (cur->used && cur != ram_end) { 801a28a: 697b ldr r3, [r7, #20] 801a28c: 7a1b ldrb r3, [r3, #8] 801a28e: 2b00 cmp r3, #0 801a290: d004 beq.n 801a29c 801a292: 4b34 ldr r3, [pc, #208] @ (801a364 ) 801a294: 681b ldr r3, [r3, #0] 801a296: 697a ldr r2, [r7, #20] 801a298: 429a cmp r2, r3 801a29a: d1f0 bne.n 801a27e } lfree = cur; 801a29c: 4a2d ldr r2, [pc, #180] @ (801a354 ) 801a29e: 697b ldr r3, [r7, #20] 801a2a0: 6013 str r3, [r2, #0] LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); 801a2a2: 4b2c ldr r3, [pc, #176] @ (801a354 ) 801a2a4: 681a ldr r2, [r3, #0] 801a2a6: 4b2f ldr r3, [pc, #188] @ (801a364 ) 801a2a8: 681b ldr r3, [r3, #0] 801a2aa: 429a cmp r2, r3 801a2ac: d00b beq.n 801a2c6 801a2ae: 4b29 ldr r3, [pc, #164] @ (801a354 ) 801a2b0: 681b ldr r3, [r3, #0] 801a2b2: 7a1b ldrb r3, [r3, #8] 801a2b4: 2b00 cmp r3, #0 801a2b6: d006 beq.n 801a2c6 801a2b8: 4b27 ldr r3, [pc, #156] @ (801a358 ) 801a2ba: f240 32b5 movw r2, #949 @ 0x3b5 801a2be: 492a ldr r1, [pc, #168] @ (801a368 ) 801a2c0: 4827 ldr r0, [pc, #156] @ (801a360 ) 801a2c2: f010 fad3 bl 802a86c } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 801a2c6: 4822 ldr r0, [pc, #136] @ (801a350 ) 801a2c8: f00d f80d bl 80272e6 LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 801a2cc: 693a ldr r2, [r7, #16] 801a2ce: 69bb ldr r3, [r7, #24] 801a2d0: 4413 add r3, r2 801a2d2: 330c adds r3, #12 801a2d4: 4a23 ldr r2, [pc, #140] @ (801a364 ) 801a2d6: 6812 ldr r2, [r2, #0] 801a2d8: 4293 cmp r3, r2 801a2da: d906 bls.n 801a2ea 801a2dc: 4b1e ldr r3, [pc, #120] @ (801a358 ) 801a2de: f240 32b9 movw r2, #953 @ 0x3b9 801a2e2: 4922 ldr r1, [pc, #136] @ (801a36c ) 801a2e4: 481e ldr r0, [pc, #120] @ (801a360 ) 801a2e6: f010 fac1 bl 802a86c (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 801a2ea: 693b ldr r3, [r7, #16] 801a2ec: f003 0303 and.w r3, r3, #3 801a2f0: 2b00 cmp r3, #0 801a2f2: d006 beq.n 801a302 801a2f4: 4b18 ldr r3, [pc, #96] @ (801a358 ) 801a2f6: f240 32bb movw r2, #955 @ 0x3bb 801a2fa: 491d ldr r1, [pc, #116] @ (801a370 ) 801a2fc: 4818 ldr r0, [pc, #96] @ (801a360 ) 801a2fe: f010 fab5 bl 802a86c ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", 801a302: 693b ldr r3, [r7, #16] 801a304: f003 0303 and.w r3, r3, #3 801a308: 2b00 cmp r3, #0 801a30a: d006 beq.n 801a31a 801a30c: 4b12 ldr r3, [pc, #72] @ (801a358 ) 801a30e: f240 32bd movw r2, #957 @ 0x3bd 801a312: 4918 ldr r1, [pc, #96] @ (801a374 ) 801a314: 4812 ldr r0, [pc, #72] @ (801a360 ) 801a316: f010 faa9 bl 802a86c #if MEM_OVERFLOW_CHECK mem_overflow_init_element(mem, size_in); #endif MEM_SANITY(); return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; 801a31a: 693b ldr r3, [r7, #16] 801a31c: 330c adds r3, #12 801a31e: e010 b.n 801a342 ptr = ptr_to_mem(ptr)->next) { 801a320: 69f8 ldr r0, [r7, #28] 801a322: f7ff fc4b bl 8019bbc 801a326: 4603 mov r3, r0 801a328: 681b ldr r3, [r3, #0] 801a32a: 61fb str r3, [r7, #28] for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 801a32c: 69ba ldr r2, [r7, #24] 801a32e: 4b07 ldr r3, [pc, #28] @ (801a34c ) 801a330: 1a9b subs r3, r3, r2 801a332: 69fa ldr r2, [r7, #28] 801a334: 429a cmp r2, r3 801a336: f4ff af48 bcc.w 801a1ca /* 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); 801a33a: 4805 ldr r0, [pc, #20] @ (801a350 ) 801a33c: f00c ffd3 bl 80272e6 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; 801a340: 2300 movs r3, #0 } 801a342: 4618 mov r0, r3 801a344: 3720 adds r7, #32 801a346: 46bd mov sp, r7 801a348: bd80 pop {r7, pc} 801a34a: bf00 nop 801a34c: 0001ffe8 .word 0x0001ffe8 801a350: 24024438 .word 0x24024438 801a354: 2402443c .word 0x2402443c 801a358: 0802ea7c .word 0x0802ea7c 801a35c: 0802ec40 .word 0x0802ec40 801a360: 0802eac4 .word 0x0802eac4 801a364: 24024434 .word 0x24024434 801a368: 0802ec54 .word 0x0802ec54 801a36c: 0802ec70 .word 0x0802ec70 801a370: 0802eca0 .word 0x0802eca0 801a374: 0802ecd0 .word 0x0802ecd0 0801a378 : * * @param desc pool to initialize */ void memp_init_pool(const struct memp_desc *desc) { 801a378: b480 push {r7} 801a37a: b085 sub sp, #20 801a37c: af00 add r7, sp, #0 801a37e: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(desc); #else int i; struct memp *memp; *desc->tab = NULL; 801a380: 687b ldr r3, [r7, #4] 801a382: 68db ldr r3, [r3, #12] 801a384: 2200 movs r2, #0 801a386: 601a str r2, [r3, #0] memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); 801a388: 687b ldr r3, [r7, #4] 801a38a: 689b ldr r3, [r3, #8] 801a38c: 3303 adds r3, #3 801a38e: f023 0303 bic.w r3, r3, #3 801a392: 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) { 801a394: 2300 movs r3, #0 801a396: 60fb str r3, [r7, #12] 801a398: e011 b.n 801a3be memp->next = *desc->tab; 801a39a: 687b ldr r3, [r7, #4] 801a39c: 68db ldr r3, [r3, #12] 801a39e: 681a ldr r2, [r3, #0] 801a3a0: 68bb ldr r3, [r7, #8] 801a3a2: 601a str r2, [r3, #0] *desc->tab = memp; 801a3a4: 687b ldr r3, [r7, #4] 801a3a6: 68db ldr r3, [r3, #12] 801a3a8: 68ba ldr r2, [r7, #8] 801a3aa: 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 801a3ac: 687b ldr r3, [r7, #4] 801a3ae: 889b ldrh r3, [r3, #4] 801a3b0: 461a mov r2, r3 801a3b2: 68bb ldr r3, [r7, #8] 801a3b4: 4413 add r3, r2 801a3b6: 60bb str r3, [r7, #8] for (i = 0; i < desc->num; ++i) { 801a3b8: 68fb ldr r3, [r7, #12] 801a3ba: 3301 adds r3, #1 801a3bc: 60fb str r3, [r7, #12] 801a3be: 687b ldr r3, [r7, #4] 801a3c0: 88db ldrh r3, [r3, #6] 801a3c2: 461a mov r2, r3 801a3c4: 68fb ldr r3, [r7, #12] 801a3c6: 4293 cmp r3, r2 801a3c8: dbe7 blt.n 801a39a #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) */ } 801a3ca: bf00 nop 801a3cc: bf00 nop 801a3ce: 3714 adds r7, #20 801a3d0: 46bd mov sp, r7 801a3d2: f85d 7b04 ldr.w r7, [sp], #4 801a3d6: 4770 bx lr 0801a3d8 : * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 801a3d8: b580 push {r7, lr} 801a3da: b082 sub sp, #8 801a3dc: af00 add r7, sp, #0 u16_t i; /* for every pool: */ for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 801a3de: 2300 movs r3, #0 801a3e0: 80fb strh r3, [r7, #6] 801a3e2: e009 b.n 801a3f8 memp_init_pool(memp_pools[i]); 801a3e4: 88fb ldrh r3, [r7, #6] 801a3e6: 4a08 ldr r2, [pc, #32] @ (801a408 ) 801a3e8: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a3ec: 4618 mov r0, r3 801a3ee: f7ff ffc3 bl 801a378 for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 801a3f2: 88fb ldrh r3, [r7, #6] 801a3f4: 3301 adds r3, #1 801a3f6: 80fb strh r3, [r7, #6] 801a3f8: 88fb ldrh r3, [r7, #6] 801a3fa: 2b0c cmp r3, #12 801a3fc: d9f2 bls.n 801a3e4 #if MEMP_OVERFLOW_CHECK >= 2 /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ } 801a3fe: bf00 nop 801a400: bf00 nop 801a402: 3708 adds r7, #8 801a404: 46bd mov sp, r7 801a406: bd80 pop {r7, pc} 801a408: 08031bf4 .word 0x08031bf4 0801a40c : #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 { 801a40c: b580 push {r7, lr} 801a40e: b084 sub sp, #16 801a410: af00 add r7, sp, #0 801a412: 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); 801a414: f00c ff94 bl 8027340 801a418: 60f8 str r0, [r7, #12] memp = *desc->tab; 801a41a: 687b ldr r3, [r7, #4] 801a41c: 68db ldr r3, [r3, #12] 801a41e: 681b ldr r3, [r3, #0] 801a420: 60bb str r3, [r7, #8] #endif /* MEMP_MEM_MALLOC */ if (memp != NULL) { 801a422: 68bb ldr r3, [r7, #8] 801a424: 2b00 cmp r3, #0 801a426: d015 beq.n 801a454 #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; 801a428: 687b ldr r3, [r7, #4] 801a42a: 68db ldr r3, [r3, #12] 801a42c: 68ba ldr r2, [r7, #8] 801a42e: 6812 ldr r2, [r2, #0] 801a430: 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", 801a432: 68bb ldr r3, [r7, #8] 801a434: f003 0303 and.w r3, r3, #3 801a438: 2b00 cmp r3, #0 801a43a: d006 beq.n 801a44a 801a43c: 4b09 ldr r3, [pc, #36] @ (801a464 ) 801a43e: f44f 728c mov.w r2, #280 @ 0x118 801a442: 4909 ldr r1, [pc, #36] @ (801a468 ) 801a444: 4809 ldr r0, [pc, #36] @ (801a46c ) 801a446: f010 fa11 bl 802a86c desc->stats->used++; if (desc->stats->used > desc->stats->max) { desc->stats->max = desc->stats->used; } #endif SYS_ARCH_UNPROTECT(old_level); 801a44a: 68f8 ldr r0, [r7, #12] 801a44c: f00c ff86 bl 802735c /* cast through u8_t* to get rid of alignment warnings */ return ((u8_t *)memp + MEMP_SIZE); 801a450: 68bb ldr r3, [r7, #8] 801a452: e003 b.n 801a45c } else { #if MEMP_STATS desc->stats->err++; #endif SYS_ARCH_UNPROTECT(old_level); 801a454: 68f8 ldr r0, [r7, #12] 801a456: f00c ff81 bl 802735c LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } return NULL; 801a45a: 2300 movs r3, #0 } 801a45c: 4618 mov r0, r3 801a45e: 3710 adds r7, #16 801a460: 46bd mov sp, r7 801a462: bd80 pop {r7, pc} 801a464: 0802ed8c .word 0x0802ed8c 801a468: 0802edbc .word 0x0802edbc 801a46c: 0802ede0 .word 0x0802ede0 0801a470 : #if !MEMP_OVERFLOW_CHECK memp_malloc_pool(const struct memp_desc *desc) #else memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line) #endif { 801a470: b580 push {r7, lr} 801a472: b082 sub sp, #8 801a474: af00 add r7, sp, #0 801a476: 6078 str r0, [r7, #4] LWIP_ASSERT("invalid pool desc", desc != NULL); 801a478: 687b ldr r3, [r7, #4] 801a47a: 2b00 cmp r3, #0 801a47c: d106 bne.n 801a48c 801a47e: 4b0a ldr r3, [pc, #40] @ (801a4a8 ) 801a480: f44f 729e mov.w r2, #316 @ 0x13c 801a484: 4909 ldr r1, [pc, #36] @ (801a4ac ) 801a486: 480a ldr r0, [pc, #40] @ (801a4b0 ) 801a488: f010 f9f0 bl 802a86c if (desc == NULL) { 801a48c: 687b ldr r3, [r7, #4] 801a48e: 2b00 cmp r3, #0 801a490: d101 bne.n 801a496 return NULL; 801a492: 2300 movs r3, #0 801a494: e003 b.n 801a49e } #if !MEMP_OVERFLOW_CHECK return do_memp_malloc_pool(desc); 801a496: 6878 ldr r0, [r7, #4] 801a498: f7ff ffb8 bl 801a40c 801a49c: 4603 mov r3, r0 #else return do_memp_malloc_pool_fn(desc, file, line); #endif } 801a49e: 4618 mov r0, r3 801a4a0: 3708 adds r7, #8 801a4a2: 46bd mov sp, r7 801a4a4: bd80 pop {r7, pc} 801a4a6: bf00 nop 801a4a8: 0802ed8c .word 0x0802ed8c 801a4ac: 0802ee08 .word 0x0802ee08 801a4b0: 0802ede0 .word 0x0802ede0 0801a4b4 : #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char *file, const int line) #endif { 801a4b4: b580 push {r7, lr} 801a4b6: b084 sub sp, #16 801a4b8: af00 add r7, sp, #0 801a4ba: 4603 mov r3, r0 801a4bc: 71fb strb r3, [r7, #7] void *memp; LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 801a4be: 79fb ldrb r3, [r7, #7] 801a4c0: 2b0c cmp r3, #12 801a4c2: d908 bls.n 801a4d6 801a4c4: 4b0a ldr r3, [pc, #40] @ (801a4f0 ) 801a4c6: f240 1257 movw r2, #343 @ 0x157 801a4ca: 490a ldr r1, [pc, #40] @ (801a4f4 ) 801a4cc: 480a ldr r0, [pc, #40] @ (801a4f8 ) 801a4ce: f010 f9cd bl 802a86c 801a4d2: 2300 movs r3, #0 801a4d4: e008 b.n 801a4e8 #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]); 801a4d6: 79fb ldrb r3, [r7, #7] 801a4d8: 4a08 ldr r2, [pc, #32] @ (801a4fc ) 801a4da: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a4de: 4618 mov r0, r3 801a4e0: f7ff ff94 bl 801a40c 801a4e4: 60f8 str r0, [r7, #12] #else memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); #endif return memp; 801a4e6: 68fb ldr r3, [r7, #12] } 801a4e8: 4618 mov r0, r3 801a4ea: 3710 adds r7, #16 801a4ec: 46bd mov sp, r7 801a4ee: bd80 pop {r7, pc} 801a4f0: 0802ed8c .word 0x0802ed8c 801a4f4: 0802ee1c .word 0x0802ee1c 801a4f8: 0802ede0 .word 0x0802ede0 801a4fc: 08031bf4 .word 0x08031bf4 0801a500 : static void do_memp_free_pool(const struct memp_desc *desc, void *mem) { 801a500: b580 push {r7, lr} 801a502: b084 sub sp, #16 801a504: af00 add r7, sp, #0 801a506: 6078 str r0, [r7, #4] 801a508: 6039 str r1, [r7, #0] struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", 801a50a: 683b ldr r3, [r7, #0] 801a50c: f003 0303 and.w r3, r3, #3 801a510: 2b00 cmp r3, #0 801a512: d006 beq.n 801a522 801a514: 4b0d ldr r3, [pc, #52] @ (801a54c ) 801a516: f44f 72b6 mov.w r2, #364 @ 0x16c 801a51a: 490d ldr r1, [pc, #52] @ (801a550 ) 801a51c: 480d ldr r0, [pc, #52] @ (801a554 ) 801a51e: f010 f9a5 bl 802a86c ((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); 801a522: 683b ldr r3, [r7, #0] 801a524: 60fb str r3, [r7, #12] SYS_ARCH_PROTECT(old_level); 801a526: f00c ff0b bl 8027340 801a52a: 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; 801a52c: 687b ldr r3, [r7, #4] 801a52e: 68db ldr r3, [r3, #12] 801a530: 681a ldr r2, [r3, #0] 801a532: 68fb ldr r3, [r7, #12] 801a534: 601a str r2, [r3, #0] *desc->tab = memp; 801a536: 687b ldr r3, [r7, #4] 801a538: 68db ldr r3, [r3, #12] 801a53a: 68fa ldr r2, [r7, #12] 801a53c: 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); 801a53e: 68b8 ldr r0, [r7, #8] 801a540: f00c ff0c bl 802735c #endif /* !MEMP_MEM_MALLOC */ } 801a544: bf00 nop 801a546: 3710 adds r7, #16 801a548: 46bd mov sp, r7 801a54a: bd80 pop {r7, pc} 801a54c: 0802ed8c .word 0x0802ed8c 801a550: 0802ee3c .word 0x0802ee3c 801a554: 0802ede0 .word 0x0802ede0 0801a558 : * @param desc the pool where to put mem * @param mem the memp element to free */ void memp_free_pool(const struct memp_desc *desc, void *mem) { 801a558: b580 push {r7, lr} 801a55a: b082 sub sp, #8 801a55c: af00 add r7, sp, #0 801a55e: 6078 str r0, [r7, #4] 801a560: 6039 str r1, [r7, #0] LWIP_ASSERT("invalid pool desc", desc != NULL); 801a562: 687b ldr r3, [r7, #4] 801a564: 2b00 cmp r3, #0 801a566: d106 bne.n 801a576 801a568: 4b0a ldr r3, [pc, #40] @ (801a594 ) 801a56a: f240 1295 movw r2, #405 @ 0x195 801a56e: 490a ldr r1, [pc, #40] @ (801a598 ) 801a570: 480a ldr r0, [pc, #40] @ (801a59c ) 801a572: f010 f97b bl 802a86c if ((desc == NULL) || (mem == NULL)) { 801a576: 687b ldr r3, [r7, #4] 801a578: 2b00 cmp r3, #0 801a57a: d007 beq.n 801a58c 801a57c: 683b ldr r3, [r7, #0] 801a57e: 2b00 cmp r3, #0 801a580: d004 beq.n 801a58c return; } do_memp_free_pool(desc, mem); 801a582: 6839 ldr r1, [r7, #0] 801a584: 6878 ldr r0, [r7, #4] 801a586: f7ff ffbb bl 801a500 801a58a: e000 b.n 801a58e return; 801a58c: bf00 nop } 801a58e: 3708 adds r7, #8 801a590: 46bd mov sp, r7 801a592: bd80 pop {r7, pc} 801a594: 0802ed8c .word 0x0802ed8c 801a598: 0802ee08 .word 0x0802ee08 801a59c: 0802ede0 .word 0x0802ede0 0801a5a0 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 801a5a0: b580 push {r7, lr} 801a5a2: b082 sub sp, #8 801a5a4: af00 add r7, sp, #0 801a5a6: 4603 mov r3, r0 801a5a8: 6039 str r1, [r7, #0] 801a5aa: 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;); 801a5ac: 79fb ldrb r3, [r7, #7] 801a5ae: 2b0c cmp r3, #12 801a5b0: d907 bls.n 801a5c2 801a5b2: 4b0c ldr r3, [pc, #48] @ (801a5e4 ) 801a5b4: f44f 72d5 mov.w r2, #426 @ 0x1aa 801a5b8: 490b ldr r1, [pc, #44] @ (801a5e8 ) 801a5ba: 480c ldr r0, [pc, #48] @ (801a5ec ) 801a5bc: f010 f956 bl 802a86c 801a5c0: e00c b.n 801a5dc if (mem == NULL) { 801a5c2: 683b ldr r3, [r7, #0] 801a5c4: 2b00 cmp r3, #0 801a5c6: d008 beq.n 801a5da #ifdef LWIP_HOOK_MEMP_AVAILABLE old_first = *memp_pools[type]->tab; #endif do_memp_free_pool(memp_pools[type], mem); 801a5c8: 79fb ldrb r3, [r7, #7] 801a5ca: 4a09 ldr r2, [pc, #36] @ (801a5f0 ) 801a5cc: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a5d0: 6839 ldr r1, [r7, #0] 801a5d2: 4618 mov r0, r3 801a5d4: f7ff ff94 bl 801a500 801a5d8: e000 b.n 801a5dc return; 801a5da: bf00 nop #ifdef LWIP_HOOK_MEMP_AVAILABLE if (old_first == NULL) { LWIP_HOOK_MEMP_AVAILABLE(type); } #endif } 801a5dc: 3708 adds r7, #8 801a5de: 46bd mov sp, r7 801a5e0: bd80 pop {r7, pc} 801a5e2: bf00 nop 801a5e4: 0802ed8c .word 0x0802ed8c 801a5e8: 0802ee5c .word 0x0802ee5c 801a5ec: 0802ede0 .word 0x0802ede0 801a5f0: 08031bf4 .word 0x08031bf4 0801a5f4 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 801a5f4: b480 push {r7} 801a5f6: af00 add r7, sp, #0 netif_set_link_up(&loop_netif); netif_set_up(&loop_netif); #endif /* LWIP_HAVE_LOOPIF */ } 801a5f8: bf00 nop 801a5fa: 46bd mov sp, r7 801a5fc: f85d 7b04 ldr.w r7, [sp], #4 801a600: 4770 bx lr ... 0801a604 : 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) { 801a604: b580 push {r7, lr} 801a606: b086 sub sp, #24 801a608: af00 add r7, sp, #0 801a60a: 60f8 str r0, [r7, #12] 801a60c: 60b9 str r1, [r7, #8] 801a60e: 607a str r2, [r7, #4] 801a610: 603b str r3, [r7, #0] #if LWIP_IPV6 s8_t i; #endif LWIP_ASSERT_CORE_LOCKED(); 801a612: f7f6 fd03 bl 801101c LWIP_ASSERT("single netif already set", 0); return NULL; } #endif LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); 801a616: 68fb ldr r3, [r7, #12] 801a618: 2b00 cmp r3, #0 801a61a: d108 bne.n 801a62e 801a61c: 4b5b ldr r3, [pc, #364] @ (801a78c ) 801a61e: f240 1227 movw r2, #295 @ 0x127 801a622: 495b ldr r1, [pc, #364] @ (801a790 ) 801a624: 485b ldr r0, [pc, #364] @ (801a794 ) 801a626: f010 f921 bl 802a86c 801a62a: 2300 movs r3, #0 801a62c: e0a9 b.n 801a782 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 801a62e: 6a7b ldr r3, [r7, #36] @ 0x24 801a630: 2b00 cmp r3, #0 801a632: d108 bne.n 801a646 801a634: 4b55 ldr r3, [pc, #340] @ (801a78c ) 801a636: f44f 7294 mov.w r2, #296 @ 0x128 801a63a: 4957 ldr r1, [pc, #348] @ (801a798 ) 801a63c: 4855 ldr r0, [pc, #340] @ (801a794 ) 801a63e: f010 f915 bl 802a86c 801a642: 2300 movs r3, #0 801a644: e09d b.n 801a782 #if LWIP_IPV4 if (ipaddr == NULL) { 801a646: 68bb ldr r3, [r7, #8] 801a648: 2b00 cmp r3, #0 801a64a: d101 bne.n 801a650 ipaddr = ip_2_ip4(IP4_ADDR_ANY); 801a64c: 4b53 ldr r3, [pc, #332] @ (801a79c ) 801a64e: 60bb str r3, [r7, #8] } if (netmask == NULL) { 801a650: 687b ldr r3, [r7, #4] 801a652: 2b00 cmp r3, #0 801a654: d101 bne.n 801a65a netmask = ip_2_ip4(IP4_ADDR_ANY); 801a656: 4b51 ldr r3, [pc, #324] @ (801a79c ) 801a658: 607b str r3, [r7, #4] } if (gw == NULL) { 801a65a: 683b ldr r3, [r7, #0] 801a65c: 2b00 cmp r3, #0 801a65e: d101 bne.n 801a664 gw = ip_2_ip4(IP4_ADDR_ANY); 801a660: 4b4e ldr r3, [pc, #312] @ (801a79c ) 801a662: 603b str r3, [r7, #0] } /* reset new interface configuration state */ ip_addr_set_zero_ip4(&netif->ip_addr); 801a664: 68fb ldr r3, [r7, #12] 801a666: 2200 movs r2, #0 801a668: 605a str r2, [r3, #4] ip_addr_set_zero_ip4(&netif->netmask); 801a66a: 68fb ldr r3, [r7, #12] 801a66c: 2200 movs r2, #0 801a66e: 609a str r2, [r3, #8] ip_addr_set_zero_ip4(&netif->gw); 801a670: 68fb ldr r3, [r7, #12] 801a672: 2200 movs r2, #0 801a674: 60da str r2, [r3, #12] netif->output = netif_null_output_ip4; 801a676: 68fb ldr r3, [r7, #12] 801a678: 4a49 ldr r2, [pc, #292] @ (801a7a0 ) 801a67a: 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; 801a67c: 68fb ldr r3, [r7, #12] 801a67e: 2200 movs r2, #0 801a680: 851a strh r2, [r3, #40] @ 0x28 netif->flags = 0; 801a682: 68fb ldr r3, [r7, #12] 801a684: 2200 movs r2, #0 801a686: f883 2031 strb.w r2, [r3, #49] @ 0x31 #ifdef netif_get_client_data memset(netif->client_data, 0, sizeof(netif->client_data)); 801a68a: 68fb ldr r3, [r7, #12] 801a68c: 3324 adds r3, #36 @ 0x24 801a68e: 2204 movs r2, #4 801a690: 2100 movs r1, #0 801a692: 4618 mov r0, r3 801a694: f010 fa7c bl 802ab90 #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; 801a698: 68fb ldr r3, [r7, #12] 801a69a: 2200 movs r2, #0 801a69c: 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; 801a69e: 68fb ldr r3, [r7, #12] 801a6a0: 6a3a ldr r2, [r7, #32] 801a6a2: 621a str r2, [r3, #32] netif->num = netif_num; 801a6a4: 4b3f ldr r3, [pc, #252] @ (801a7a4 ) 801a6a6: 781a ldrb r2, [r3, #0] 801a6a8: 68fb ldr r3, [r7, #12] 801a6aa: f883 2034 strb.w r2, [r3, #52] @ 0x34 netif->input = input; 801a6ae: 68fb ldr r3, [r7, #12] 801a6b0: 6aba ldr r2, [r7, #40] @ 0x28 801a6b2: 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); 801a6b4: 683b ldr r3, [r7, #0] 801a6b6: 687a ldr r2, [r7, #4] 801a6b8: 68b9 ldr r1, [r7, #8] 801a6ba: 68f8 ldr r0, [r7, #12] 801a6bc: f000 f914 bl 801a8e8 #endif /* LWIP_IPV4 */ /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 801a6c0: 6a7b ldr r3, [r7, #36] @ 0x24 801a6c2: 68f8 ldr r0, [r7, #12] 801a6c4: 4798 blx r3 801a6c6: 4603 mov r3, r0 801a6c8: 2b00 cmp r3, #0 801a6ca: d001 beq.n 801a6d0 return NULL; 801a6cc: 2300 movs r3, #0 801a6ce: e058 b.n 801a782 */ { struct netif *netif2; int num_netifs; do { if (netif->num == 255) { 801a6d0: 68fb ldr r3, [r7, #12] 801a6d2: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a6d6: 2bff cmp r3, #255 @ 0xff 801a6d8: d103 bne.n 801a6e2 netif->num = 0; 801a6da: 68fb ldr r3, [r7, #12] 801a6dc: 2200 movs r2, #0 801a6de: f883 2034 strb.w r2, [r3, #52] @ 0x34 } num_netifs = 0; 801a6e2: 2300 movs r3, #0 801a6e4: 613b str r3, [r7, #16] for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 801a6e6: 4b30 ldr r3, [pc, #192] @ (801a7a8 ) 801a6e8: 681b ldr r3, [r3, #0] 801a6ea: 617b str r3, [r7, #20] 801a6ec: e02b b.n 801a746 LWIP_ASSERT("netif already added", netif2 != netif); 801a6ee: 697a ldr r2, [r7, #20] 801a6f0: 68fb ldr r3, [r7, #12] 801a6f2: 429a cmp r2, r3 801a6f4: d106 bne.n 801a704 801a6f6: 4b25 ldr r3, [pc, #148] @ (801a78c ) 801a6f8: f240 128b movw r2, #395 @ 0x18b 801a6fc: 492b ldr r1, [pc, #172] @ (801a7ac ) 801a6fe: 4825 ldr r0, [pc, #148] @ (801a794 ) 801a700: f010 f8b4 bl 802a86c num_netifs++; 801a704: 693b ldr r3, [r7, #16] 801a706: 3301 adds r3, #1 801a708: 613b str r3, [r7, #16] LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); 801a70a: 693b ldr r3, [r7, #16] 801a70c: 2bff cmp r3, #255 @ 0xff 801a70e: dd06 ble.n 801a71e 801a710: 4b1e ldr r3, [pc, #120] @ (801a78c ) 801a712: f240 128d movw r2, #397 @ 0x18d 801a716: 4926 ldr r1, [pc, #152] @ (801a7b0 ) 801a718: 481e ldr r0, [pc, #120] @ (801a794 ) 801a71a: f010 f8a7 bl 802a86c if (netif2->num == netif->num) { 801a71e: 697b ldr r3, [r7, #20] 801a720: f893 2034 ldrb.w r2, [r3, #52] @ 0x34 801a724: 68fb ldr r3, [r7, #12] 801a726: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a72a: 429a cmp r2, r3 801a72c: d108 bne.n 801a740 netif->num++; 801a72e: 68fb ldr r3, [r7, #12] 801a730: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a734: 3301 adds r3, #1 801a736: b2da uxtb r2, r3 801a738: 68fb ldr r3, [r7, #12] 801a73a: f883 2034 strb.w r2, [r3, #52] @ 0x34 break; 801a73e: e005 b.n 801a74c for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 801a740: 697b ldr r3, [r7, #20] 801a742: 681b ldr r3, [r3, #0] 801a744: 617b str r3, [r7, #20] 801a746: 697b ldr r3, [r7, #20] 801a748: 2b00 cmp r3, #0 801a74a: d1d0 bne.n 801a6ee } } } while (netif2 != NULL); 801a74c: 697b ldr r3, [r7, #20] 801a74e: 2b00 cmp r3, #0 801a750: d1be bne.n 801a6d0 } if (netif->num == 254) { 801a752: 68fb ldr r3, [r7, #12] 801a754: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a758: 2bfe cmp r3, #254 @ 0xfe 801a75a: d103 bne.n 801a764 netif_num = 0; 801a75c: 4b11 ldr r3, [pc, #68] @ (801a7a4 ) 801a75e: 2200 movs r2, #0 801a760: 701a strb r2, [r3, #0] 801a762: e006 b.n 801a772 } else { netif_num = (u8_t)(netif->num + 1); 801a764: 68fb ldr r3, [r7, #12] 801a766: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a76a: 3301 adds r3, #1 801a76c: b2da uxtb r2, r3 801a76e: 4b0d ldr r3, [pc, #52] @ (801a7a4 ) 801a770: 701a strb r2, [r3, #0] } /* add this netif to the list */ netif->next = netif_list; 801a772: 4b0d ldr r3, [pc, #52] @ (801a7a8 ) 801a774: 681a ldr r2, [r3, #0] 801a776: 68fb ldr r3, [r7, #12] 801a778: 601a str r2, [r3, #0] netif_list = netif; 801a77a: 4a0b ldr r2, [pc, #44] @ (801a7a8 ) 801a77c: 68fb ldr r3, [r7, #12] 801a77e: 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; 801a780: 68fb ldr r3, [r7, #12] } 801a782: 4618 mov r0, r3 801a784: 3718 adds r7, #24 801a786: 46bd mov sp, r7 801a788: bd80 pop {r7, pc} 801a78a: bf00 nop 801a78c: 0802ee78 .word 0x0802ee78 801a790: 0802ef0c .word 0x0802ef0c 801a794: 0802eec8 .word 0x0802eec8 801a798: 0802ef28 .word 0x0802ef28 801a79c: 08031c78 .word 0x08031c78 801a7a0: 0801abdf .word 0x0801abdf 801a7a4: 2402af64 .word 0x2402af64 801a7a8: 2402af5c .word 0x2402af5c 801a7ac: 0802ef4c .word 0x0802ef4c 801a7b0: 0802ef60 .word 0x0802ef60 0801a7b4 : static void netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { 801a7b4: b580 push {r7, lr} 801a7b6: b082 sub sp, #8 801a7b8: af00 add r7, sp, #0 801a7ba: 6078 str r0, [r7, #4] 801a7bc: 6039 str r1, [r7, #0] #if LWIP_TCP tcp_netif_ip_addr_changed(old_addr, new_addr); 801a7be: 6839 ldr r1, [r7, #0] 801a7c0: 6878 ldr r0, [r7, #4] 801a7c2: f002 fe6f bl 801d4a4 #endif /* LWIP_TCP */ #if LWIP_UDP udp_netif_ip_addr_changed(old_addr, new_addr); 801a7c6: 6839 ldr r1, [r7, #0] 801a7c8: 6878 ldr r0, [r7, #4] 801a7ca: f008 f82b bl 8022824 #endif /* LWIP_UDP */ #if LWIP_RAW raw_netif_ip_addr_changed(old_addr, new_addr); #endif /* LWIP_RAW */ } 801a7ce: bf00 nop 801a7d0: 3708 adds r7, #8 801a7d2: 46bd mov sp, r7 801a7d4: bd80 pop {r7, pc} ... 0801a7d8 : #if LWIP_IPV4 static int netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr) { 801a7d8: b580 push {r7, lr} 801a7da: b086 sub sp, #24 801a7dc: af00 add r7, sp, #0 801a7de: 60f8 str r0, [r7, #12] 801a7e0: 60b9 str r1, [r7, #8] 801a7e2: 607a str r2, [r7, #4] LWIP_ASSERT("invalid pointer", ipaddr != NULL); 801a7e4: 68bb ldr r3, [r7, #8] 801a7e6: 2b00 cmp r3, #0 801a7e8: d106 bne.n 801a7f8 801a7ea: 4b1d ldr r3, [pc, #116] @ (801a860 ) 801a7ec: f240 12cb movw r2, #459 @ 0x1cb 801a7f0: 491c ldr r1, [pc, #112] @ (801a864 ) 801a7f2: 481d ldr r0, [pc, #116] @ (801a868 ) 801a7f4: f010 f83a bl 802a86c LWIP_ASSERT("invalid pointer", old_addr != NULL); 801a7f8: 687b ldr r3, [r7, #4] 801a7fa: 2b00 cmp r3, #0 801a7fc: d106 bne.n 801a80c 801a7fe: 4b18 ldr r3, [pc, #96] @ (801a860 ) 801a800: f44f 72e6 mov.w r2, #460 @ 0x1cc 801a804: 4917 ldr r1, [pc, #92] @ (801a864 ) 801a806: 4818 ldr r0, [pc, #96] @ (801a868 ) 801a808: f010 f830 bl 802a86c /* address is actually being changed? */ if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { 801a80c: 68bb ldr r3, [r7, #8] 801a80e: 681a ldr r2, [r3, #0] 801a810: 68fb ldr r3, [r7, #12] 801a812: 3304 adds r3, #4 801a814: 681b ldr r3, [r3, #0] 801a816: 429a cmp r2, r3 801a818: d01c beq.n 801a854 ip_addr_t new_addr; *ip_2_ip4(&new_addr) = *ipaddr; 801a81a: 68bb ldr r3, [r7, #8] 801a81c: 681b ldr r3, [r3, #0] 801a81e: 617b str r3, [r7, #20] IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); 801a820: 68fb ldr r3, [r7, #12] 801a822: 3304 adds r3, #4 801a824: 681a ldr r2, [r3, #0] 801a826: 687b ldr r3, [r7, #4] 801a828: 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); 801a82a: f107 0314 add.w r3, r7, #20 801a82e: 4619 mov r1, r3 801a830: 6878 ldr r0, [r7, #4] 801a832: f7ff ffbf bl 801a7b4 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); 801a836: 68bb ldr r3, [r7, #8] 801a838: 2b00 cmp r3, #0 801a83a: d002 beq.n 801a842 801a83c: 68bb ldr r3, [r7, #8] 801a83e: 681b ldr r3, [r3, #0] 801a840: e000 b.n 801a844 801a842: 2300 movs r3, #0 801a844: 68fa ldr r2, [r7, #12] 801a846: 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); 801a848: 2101 movs r1, #1 801a84a: 68f8 ldr r0, [r7, #12] 801a84c: f000 f8d6 bl 801a9fc NETIF_STATUS_CALLBACK(netif); return 1; /* address changed */ 801a850: 2301 movs r3, #1 801a852: e000 b.n 801a856 } return 0; /* address unchanged */ 801a854: 2300 movs r3, #0 } 801a856: 4618 mov r0, r3 801a858: 3718 adds r7, #24 801a85a: 46bd mov sp, r7 801a85c: bd80 pop {r7, pc} 801a85e: bf00 nop 801a860: 0802ee78 .word 0x0802ee78 801a864: 0802ef90 .word 0x0802ef90 801a868: 0802eec8 .word 0x0802eec8 0801a86c : } } static int netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) { 801a86c: b480 push {r7} 801a86e: b085 sub sp, #20 801a870: af00 add r7, sp, #0 801a872: 60f8 str r0, [r7, #12] 801a874: 60b9 str r1, [r7, #8] 801a876: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { 801a878: 68bb ldr r3, [r7, #8] 801a87a: 681a ldr r2, [r3, #0] 801a87c: 68fb ldr r3, [r7, #12] 801a87e: 3308 adds r3, #8 801a880: 681b ldr r3, [r3, #0] 801a882: 429a cmp r2, r3 801a884: d00a beq.n 801a89c #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); 801a886: 68bb ldr r3, [r7, #8] 801a888: 2b00 cmp r3, #0 801a88a: d002 beq.n 801a892 801a88c: 68bb ldr r3, [r7, #8] 801a88e: 681b ldr r3, [r3, #0] 801a890: e000 b.n 801a894 801a892: 2300 movs r3, #0 801a894: 68fa ldr r2, [r7, #12] 801a896: 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 */ 801a898: 2301 movs r3, #1 801a89a: e000 b.n 801a89e } return 0; /* netmask unchanged */ 801a89c: 2300 movs r3, #0 } 801a89e: 4618 mov r0, r3 801a8a0: 3714 adds r7, #20 801a8a2: 46bd mov sp, r7 801a8a4: f85d 7b04 ldr.w r7, [sp], #4 801a8a8: 4770 bx lr 0801a8aa : } } static int netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) { 801a8aa: b480 push {r7} 801a8ac: b085 sub sp, #20 801a8ae: af00 add r7, sp, #0 801a8b0: 60f8 str r0, [r7, #12] 801a8b2: 60b9 str r1, [r7, #8] 801a8b4: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { 801a8b6: 68bb ldr r3, [r7, #8] 801a8b8: 681a ldr r2, [r3, #0] 801a8ba: 68fb ldr r3, [r7, #12] 801a8bc: 330c adds r3, #12 801a8be: 681b ldr r3, [r3, #0] 801a8c0: 429a cmp r2, r3 801a8c2: d00a beq.n 801a8da 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); 801a8c4: 68bb ldr r3, [r7, #8] 801a8c6: 2b00 cmp r3, #0 801a8c8: d002 beq.n 801a8d0 801a8ca: 68bb ldr r3, [r7, #8] 801a8cc: 681b ldr r3, [r3, #0] 801a8ce: e000 b.n 801a8d2 801a8d0: 2300 movs r3, #0 801a8d2: 68fa ldr r2, [r7, #12] 801a8d4: 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 */ 801a8d6: 2301 movs r3, #1 801a8d8: e000 b.n 801a8dc } return 0; /* gateway unchanged */ 801a8da: 2300 movs r3, #0 } 801a8dc: 4618 mov r0, r3 801a8de: 3714 adds r7, #20 801a8e0: 46bd mov sp, r7 801a8e2: f85d 7b04 ldr.w r7, [sp], #4 801a8e6: 4770 bx lr 0801a8e8 : * @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) { 801a8e8: b580 push {r7, lr} 801a8ea: b088 sub sp, #32 801a8ec: af00 add r7, sp, #0 801a8ee: 60f8 str r0, [r7, #12] 801a8f0: 60b9 str r1, [r7, #8] 801a8f2: 607a str r2, [r7, #4] 801a8f4: 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; 801a8f6: 2300 movs r3, #0 801a8f8: 61fb str r3, [r7, #28] ip_addr_t *old_gw = NULL; 801a8fa: 2300 movs r3, #0 801a8fc: 61bb str r3, [r7, #24] #endif ip_addr_t old_addr; int remove; LWIP_ASSERT_CORE_LOCKED(); 801a8fe: f7f6 fb8d bl 801101c /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 801a902: 68bb ldr r3, [r7, #8] 801a904: 2b00 cmp r3, #0 801a906: d101 bne.n 801a90c ipaddr = IP4_ADDR_ANY4; 801a908: 4b1c ldr r3, [pc, #112] @ (801a97c ) 801a90a: 60bb str r3, [r7, #8] } if (netmask == NULL) { 801a90c: 687b ldr r3, [r7, #4] 801a90e: 2b00 cmp r3, #0 801a910: d101 bne.n 801a916 netmask = IP4_ADDR_ANY4; 801a912: 4b1a ldr r3, [pc, #104] @ (801a97c ) 801a914: 607b str r3, [r7, #4] } if (gw == NULL) { 801a916: 683b ldr r3, [r7, #0] 801a918: 2b00 cmp r3, #0 801a91a: d101 bne.n 801a920 gw = IP4_ADDR_ANY4; 801a91c: 4b17 ldr r3, [pc, #92] @ (801a97c ) 801a91e: 603b str r3, [r7, #0] } remove = ip4_addr_isany(ipaddr); 801a920: 68bb ldr r3, [r7, #8] 801a922: 2b00 cmp r3, #0 801a924: d003 beq.n 801a92e 801a926: 68bb ldr r3, [r7, #8] 801a928: 681b ldr r3, [r3, #0] 801a92a: 2b00 cmp r3, #0 801a92c: d101 bne.n 801a932 801a92e: 2301 movs r3, #1 801a930: e000 b.n 801a934 801a932: 2300 movs r3, #0 801a934: 617b str r3, [r7, #20] if (remove) { 801a936: 697b ldr r3, [r7, #20] 801a938: 2b00 cmp r3, #0 801a93a: d006 beq.n 801a94a /* 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)) { 801a93c: f107 0310 add.w r3, r7, #16 801a940: 461a mov r2, r3 801a942: 68b9 ldr r1, [r7, #8] 801a944: 68f8 ldr r0, [r7, #12] 801a946: f7ff ff47 bl 801a7d8 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)) { 801a94a: 69fa ldr r2, [r7, #28] 801a94c: 6879 ldr r1, [r7, #4] 801a94e: 68f8 ldr r0, [r7, #12] 801a950: f7ff ff8c bl 801a86c #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)) { 801a954: 69ba ldr r2, [r7, #24] 801a956: 6839 ldr r1, [r7, #0] 801a958: 68f8 ldr r0, [r7, #12] 801a95a: f7ff ffa6 bl 801a8aa #if LWIP_NETIF_EXT_STATUS_CALLBACK change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED; cb_args.ipv4_changed.old_gw = old_gw; #endif } if (!remove) { 801a95e: 697b ldr r3, [r7, #20] 801a960: 2b00 cmp r3, #0 801a962: d106 bne.n 801a972 /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 801a964: f107 0310 add.w r3, r7, #16 801a968: 461a mov r2, r3 801a96a: 68b9 ldr r1, [r7, #8] 801a96c: 68f8 ldr r0, [r7, #12] 801a96e: f7ff ff33 bl 801a7d8 if (change_reason != LWIP_NSC_NONE) { change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED; netif_invoke_ext_callback(netif, change_reason, &cb_args); } #endif } 801a972: bf00 nop 801a974: 3720 adds r7, #32 801a976: 46bd mov sp, r7 801a978: bd80 pop {r7, pc} 801a97a: bf00 nop 801a97c: 08031c78 .word 0x08031c78 0801a980 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 801a980: b580 push {r7, lr} 801a982: b082 sub sp, #8 801a984: af00 add r7, sp, #0 801a986: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801a988: f7f6 fb48 bl 801101c mib2_remove_route_ip4(1, netif); } else { /* install default route */ mib2_add_route_ip4(1, netif); } netif_default = netif; 801a98c: 4a03 ldr r2, [pc, #12] @ (801a99c ) 801a98e: 687b ldr r3, [r7, #4] 801a990: 6013 str r3, [r2, #0] LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); } 801a992: bf00 nop 801a994: 3708 adds r7, #8 801a996: 46bd mov sp, r7 801a998: bd80 pop {r7, pc} 801a99a: bf00 nop 801a99c: 2402af60 .word 0x2402af60 0801a9a0 : * Bring an interface up, available for processing * traffic. */ void netif_set_up(struct netif *netif) { 801a9a0: b580 push {r7, lr} 801a9a2: b082 sub sp, #8 801a9a4: af00 add r7, sp, #0 801a9a6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801a9a8: f7f6 fb38 bl 801101c LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 801a9ac: 687b ldr r3, [r7, #4] 801a9ae: 2b00 cmp r3, #0 801a9b0: d107 bne.n 801a9c2 801a9b2: 4b0f ldr r3, [pc, #60] @ (801a9f0 ) 801a9b4: f44f 7254 mov.w r2, #848 @ 0x350 801a9b8: 490e ldr r1, [pc, #56] @ (801a9f4 ) 801a9ba: 480f ldr r0, [pc, #60] @ (801a9f8 ) 801a9bc: f00f ff56 bl 802a86c 801a9c0: e013 b.n 801a9ea if (!(netif->flags & NETIF_FLAG_UP)) { 801a9c2: 687b ldr r3, [r7, #4] 801a9c4: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801a9c8: f003 0301 and.w r3, r3, #1 801a9cc: 2b00 cmp r3, #0 801a9ce: d10c bne.n 801a9ea netif_set_flags(netif, NETIF_FLAG_UP); 801a9d0: 687b ldr r3, [r7, #4] 801a9d2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801a9d6: f043 0301 orr.w r3, r3, #1 801a9da: b2da uxtb r2, r3 801a9dc: 687b ldr r3, [r7, #4] 801a9de: 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); 801a9e2: 2103 movs r1, #3 801a9e4: 6878 ldr r0, [r7, #4] 801a9e6: f000 f809 bl 801a9fc #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ } } 801a9ea: 3708 adds r7, #8 801a9ec: 46bd mov sp, r7 801a9ee: bd80 pop {r7, pc} 801a9f0: 0802ee78 .word 0x0802ee78 801a9f4: 0802f000 .word 0x0802f000 801a9f8: 0802eec8 .word 0x0802eec8 0801a9fc : /** 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) { 801a9fc: b580 push {r7, lr} 801a9fe: b082 sub sp, #8 801aa00: af00 add r7, sp, #0 801aa02: 6078 str r0, [r7, #4] 801aa04: 460b mov r3, r1 801aa06: 70fb strb r3, [r7, #3] LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 801aa08: 687b ldr r3, [r7, #4] 801aa0a: 2b00 cmp r3, #0 801aa0c: d106 bne.n 801aa1c 801aa0e: 4b18 ldr r3, [pc, #96] @ (801aa70 ) 801aa10: f240 326d movw r2, #877 @ 0x36d 801aa14: 4917 ldr r1, [pc, #92] @ (801aa74 ) 801aa16: 4818 ldr r0, [pc, #96] @ (801aa78 ) 801aa18: f00f ff28 bl 802a86c /* Only send reports when both link and admin states are up */ if (!(netif->flags & NETIF_FLAG_LINK_UP) || 801aa1c: 687b ldr r3, [r7, #4] 801aa1e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa22: f003 0304 and.w r3, r3, #4 801aa26: 2b00 cmp r3, #0 801aa28: d01e beq.n 801aa68 !(netif->flags & NETIF_FLAG_UP)) { 801aa2a: 687b ldr r3, [r7, #4] 801aa2c: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa30: f003 0301 and.w r3, r3, #1 if (!(netif->flags & NETIF_FLAG_LINK_UP) || 801aa34: 2b00 cmp r3, #0 801aa36: d017 beq.n 801aa68 return; } #if LWIP_IPV4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && 801aa38: 78fb ldrb r3, [r7, #3] 801aa3a: f003 0301 and.w r3, r3, #1 801aa3e: 2b00 cmp r3, #0 801aa40: d013 beq.n 801aa6a !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 801aa42: 687b ldr r3, [r7, #4] 801aa44: 3304 adds r3, #4 801aa46: 681b ldr r3, [r3, #0] if ((report_type & NETIF_REPORT_TYPE_IPV4) && 801aa48: 2b00 cmp r3, #0 801aa4a: d00e beq.n 801aa6a #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 801aa4c: 687b ldr r3, [r7, #4] 801aa4e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa52: f003 0308 and.w r3, r3, #8 801aa56: 2b00 cmp r3, #0 801aa58: d007 beq.n 801aa6a etharp_gratuitous(netif); 801aa5a: 687b ldr r3, [r7, #4] 801aa5c: 3304 adds r3, #4 801aa5e: 4619 mov r1, r3 801aa60: 6878 ldr r0, [r7, #4] 801aa62: f00a fd2b bl 80254bc 801aa66: e000 b.n 801aa6a return; 801aa68: bf00 nop /* send mld memberships */ mld6_report_groups(netif); #endif /* LWIP_IPV6_MLD */ } #endif /* LWIP_IPV6 */ } 801aa6a: 3708 adds r7, #8 801aa6c: 46bd mov sp, r7 801aa6e: bd80 pop {r7, pc} 801aa70: 0802ee78 .word 0x0802ee78 801aa74: 0802f01c .word 0x0802f01c 801aa78: 0802eec8 .word 0x0802eec8 0801aa7c : * @ingroup netif * Bring an interface down, disabling any traffic processing. */ void netif_set_down(struct netif *netif) { 801aa7c: b580 push {r7, lr} 801aa7e: b082 sub sp, #8 801aa80: af00 add r7, sp, #0 801aa82: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801aa84: f7f6 faca bl 801101c LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 801aa88: 687b ldr r3, [r7, #4] 801aa8a: 2b00 cmp r3, #0 801aa8c: d107 bne.n 801aa9e 801aa8e: 4b12 ldr r3, [pc, #72] @ (801aad8 ) 801aa90: f240 329b movw r2, #923 @ 0x39b 801aa94: 4911 ldr r1, [pc, #68] @ (801aadc ) 801aa96: 4812 ldr r0, [pc, #72] @ (801aae0 ) 801aa98: f00f fee8 bl 802a86c 801aa9c: e019 b.n 801aad2 if (netif->flags & NETIF_FLAG_UP) { 801aa9e: 687b ldr r3, [r7, #4] 801aaa0: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aaa4: f003 0301 and.w r3, r3, #1 801aaa8: 2b00 cmp r3, #0 801aaaa: d012 beq.n 801aad2 args.status_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); } #endif netif_clear_flags(netif, NETIF_FLAG_UP); 801aaac: 687b ldr r3, [r7, #4] 801aaae: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aab2: f023 0301 bic.w r3, r3, #1 801aab6: b2da uxtb r2, r3 801aab8: 687b ldr r3, [r7, #4] 801aaba: 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) { 801aabe: 687b ldr r3, [r7, #4] 801aac0: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aac4: f003 0308 and.w r3, r3, #8 801aac8: 2b00 cmp r3, #0 801aaca: d002 beq.n 801aad2 etharp_cleanup_netif(netif); 801aacc: 6878 ldr r0, [r7, #4] 801aace: f00a f8ab bl 8024c28 nd6_cleanup_netif(netif); #endif /* LWIP_IPV6 */ NETIF_STATUS_CALLBACK(netif); } } 801aad2: 3708 adds r7, #8 801aad4: 46bd mov sp, r7 801aad6: bd80 pop {r7, pc} 801aad8: 0802ee78 .word 0x0802ee78 801aadc: 0802f040 .word 0x0802f040 801aae0: 0802eec8 .word 0x0802eec8 0801aae4 : * @ingroup netif * Called by a driver when its link goes up */ void netif_set_link_up(struct netif *netif) { 801aae4: b580 push {r7, lr} 801aae6: b082 sub sp, #8 801aae8: af00 add r7, sp, #0 801aaea: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801aaec: f7f6 fa96 bl 801101c LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 801aaf0: 687b ldr r3, [r7, #4] 801aaf2: 2b00 cmp r3, #0 801aaf4: d107 bne.n 801ab06 801aaf6: 4b15 ldr r3, [pc, #84] @ (801ab4c ) 801aaf8: f44f 7278 mov.w r2, #992 @ 0x3e0 801aafc: 4914 ldr r1, [pc, #80] @ (801ab50 ) 801aafe: 4815 ldr r0, [pc, #84] @ (801ab54 ) 801ab00: f00f feb4 bl 802a86c 801ab04: e01e b.n 801ab44 if (!(netif->flags & NETIF_FLAG_LINK_UP)) { 801ab06: 687b ldr r3, [r7, #4] 801ab08: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab0c: f003 0304 and.w r3, r3, #4 801ab10: 2b00 cmp r3, #0 801ab12: d117 bne.n 801ab44 netif_set_flags(netif, NETIF_FLAG_LINK_UP); 801ab14: 687b ldr r3, [r7, #4] 801ab16: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab1a: f043 0304 orr.w r3, r3, #4 801ab1e: b2da uxtb r2, r3 801ab20: 687b ldr r3, [r7, #4] 801ab22: f883 2031 strb.w r2, [r3, #49] @ 0x31 #if LWIP_DHCP dhcp_network_changed(netif); 801ab26: 6878 ldr r0, [r7, #4] 801ab28: f008 faaa bl 8023080 #if LWIP_AUTOIP autoip_network_changed(netif); #endif /* LWIP_AUTOIP */ netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 801ab2c: 2103 movs r1, #3 801ab2e: 6878 ldr r0, [r7, #4] 801ab30: f7ff ff64 bl 801a9fc #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ NETIF_LINK_CALLBACK(netif); 801ab34: 687b ldr r3, [r7, #4] 801ab36: 69db ldr r3, [r3, #28] 801ab38: 2b00 cmp r3, #0 801ab3a: d003 beq.n 801ab44 801ab3c: 687b ldr r3, [r7, #4] 801ab3e: 69db ldr r3, [r3, #28] 801ab40: 6878 ldr r0, [r7, #4] 801ab42: 4798 blx r3 args.link_changed.state = 1; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 801ab44: 3708 adds r7, #8 801ab46: 46bd mov sp, r7 801ab48: bd80 pop {r7, pc} 801ab4a: bf00 nop 801ab4c: 0802ee78 .word 0x0802ee78 801ab50: 0802f060 .word 0x0802f060 801ab54: 0802eec8 .word 0x0802eec8 0801ab58 : * @ingroup netif * Called by a driver when its link goes down */ void netif_set_link_down(struct netif *netif) { 801ab58: b580 push {r7, lr} 801ab5a: b082 sub sp, #8 801ab5c: af00 add r7, sp, #0 801ab5e: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801ab60: f7f6 fa5c bl 801101c LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 801ab64: 687b ldr r3, [r7, #4] 801ab66: 2b00 cmp r3, #0 801ab68: d107 bne.n 801ab7a 801ab6a: 4b11 ldr r3, [pc, #68] @ (801abb0 ) 801ab6c: f240 4206 movw r2, #1030 @ 0x406 801ab70: 4910 ldr r1, [pc, #64] @ (801abb4 ) 801ab72: 4811 ldr r0, [pc, #68] @ (801abb8 ) 801ab74: f00f fe7a bl 802a86c 801ab78: e017 b.n 801abaa if (netif->flags & NETIF_FLAG_LINK_UP) { 801ab7a: 687b ldr r3, [r7, #4] 801ab7c: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab80: f003 0304 and.w r3, r3, #4 801ab84: 2b00 cmp r3, #0 801ab86: d010 beq.n 801abaa netif_clear_flags(netif, NETIF_FLAG_LINK_UP); 801ab88: 687b ldr r3, [r7, #4] 801ab8a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab8e: f023 0304 bic.w r3, r3, #4 801ab92: b2da uxtb r2, r3 801ab94: 687b ldr r3, [r7, #4] 801ab96: f883 2031 strb.w r2, [r3, #49] @ 0x31 NETIF_LINK_CALLBACK(netif); 801ab9a: 687b ldr r3, [r7, #4] 801ab9c: 69db ldr r3, [r3, #28] 801ab9e: 2b00 cmp r3, #0 801aba0: d003 beq.n 801abaa 801aba2: 687b ldr r3, [r7, #4] 801aba4: 69db ldr r3, [r3, #28] 801aba6: 6878 ldr r0, [r7, #4] 801aba8: 4798 blx r3 args.link_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 801abaa: 3708 adds r7, #8 801abac: 46bd mov sp, r7 801abae: bd80 pop {r7, pc} 801abb0: 0802ee78 .word 0x0802ee78 801abb4: 0802f084 .word 0x0802f084 801abb8: 0802eec8 .word 0x0802eec8 0801abbc : * @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) { 801abbc: b580 push {r7, lr} 801abbe: b082 sub sp, #8 801abc0: af00 add r7, sp, #0 801abc2: 6078 str r0, [r7, #4] 801abc4: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801abc6: f7f6 fa29 bl 801101c if (netif) { 801abca: 687b ldr r3, [r7, #4] 801abcc: 2b00 cmp r3, #0 801abce: d002 beq.n 801abd6 netif->link_callback = link_callback; 801abd0: 687b ldr r3, [r7, #4] 801abd2: 683a ldr r2, [r7, #0] 801abd4: 61da str r2, [r3, #28] } } 801abd6: bf00 nop 801abd8: 3708 adds r7, #8 801abda: 46bd mov sp, r7 801abdc: bd80 pop {r7, pc} 0801abde : #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) { 801abde: b480 push {r7} 801abe0: b085 sub sp, #20 801abe2: af00 add r7, sp, #0 801abe4: 60f8 str r0, [r7, #12] 801abe6: 60b9 str r1, [r7, #8] 801abe8: 607a str r2, [r7, #4] LWIP_UNUSED_ARG(netif); LWIP_UNUSED_ARG(p); LWIP_UNUSED_ARG(ipaddr); return ERR_IF; 801abea: f06f 030b mvn.w r3, #11 } 801abee: 4618 mov r0, r3 801abf0: 3714 adds r7, #20 801abf2: 46bd mov sp, r7 801abf4: f85d 7b04 ldr.w r7, [sp], #4 801abf8: 4770 bx lr ... 0801abfc : * * @param idx index of netif to find */ struct netif * netif_get_by_index(u8_t idx) { 801abfc: b580 push {r7, lr} 801abfe: b084 sub sp, #16 801ac00: af00 add r7, sp, #0 801ac02: 4603 mov r3, r0 801ac04: 71fb strb r3, [r7, #7] struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 801ac06: f7f6 fa09 bl 801101c if (idx != NETIF_NO_INDEX) { 801ac0a: 79fb ldrb r3, [r7, #7] 801ac0c: 2b00 cmp r3, #0 801ac0e: d013 beq.n 801ac38 NETIF_FOREACH(netif) { 801ac10: 4b0c ldr r3, [pc, #48] @ (801ac44 ) 801ac12: 681b ldr r3, [r3, #0] 801ac14: 60fb str r3, [r7, #12] 801ac16: e00c b.n 801ac32 if (idx == netif_get_index(netif)) { 801ac18: 68fb ldr r3, [r7, #12] 801ac1a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801ac1e: 3301 adds r3, #1 801ac20: b2db uxtb r3, r3 801ac22: 79fa ldrb r2, [r7, #7] 801ac24: 429a cmp r2, r3 801ac26: d101 bne.n 801ac2c return netif; /* found! */ 801ac28: 68fb ldr r3, [r7, #12] 801ac2a: e006 b.n 801ac3a NETIF_FOREACH(netif) { 801ac2c: 68fb ldr r3, [r7, #12] 801ac2e: 681b ldr r3, [r3, #0] 801ac30: 60fb str r3, [r7, #12] 801ac32: 68fb ldr r3, [r7, #12] 801ac34: 2b00 cmp r3, #0 801ac36: d1ef bne.n 801ac18 } } } return NULL; 801ac38: 2300 movs r3, #0 } 801ac3a: 4618 mov r0, r3 801ac3c: 3710 adds r7, #16 801ac3e: 46bd mov sp, r7 801ac40: bd80 pop {r7, pc} 801ac42: bf00 nop 801ac44: 2402af5c .word 0x2402af5c 0801ac48 : #if !NO_SYS static #endif /* !NO_SYS */ void pbuf_free_ooseq(void) { 801ac48: b580 push {r7, lr} 801ac4a: b082 sub sp, #8 801ac4c: af00 add r7, sp, #0 struct tcp_pcb *pcb; SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); 801ac4e: f00c fb77 bl 8027340 801ac52: 6038 str r0, [r7, #0] 801ac54: 4b0d ldr r3, [pc, #52] @ (801ac8c ) 801ac56: 2200 movs r2, #0 801ac58: 701a strb r2, [r3, #0] 801ac5a: 6838 ldr r0, [r7, #0] 801ac5c: f00c fb7e bl 802735c for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 801ac60: 4b0b ldr r3, [pc, #44] @ (801ac90 ) 801ac62: 681b ldr r3, [r3, #0] 801ac64: 607b str r3, [r7, #4] 801ac66: e00a b.n 801ac7e if (pcb->ooseq != NULL) { 801ac68: 687b ldr r3, [r7, #4] 801ac6a: 6f5b ldr r3, [r3, #116] @ 0x74 801ac6c: 2b00 cmp r3, #0 801ac6e: d003 beq.n 801ac78 /** 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); 801ac70: 6878 ldr r0, [r7, #4] 801ac72: f002 fc55 bl 801d520 return; 801ac76: e005 b.n 801ac84 for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 801ac78: 687b ldr r3, [r7, #4] 801ac7a: 68db ldr r3, [r3, #12] 801ac7c: 607b str r3, [r7, #4] 801ac7e: 687b ldr r3, [r7, #4] 801ac80: 2b00 cmp r3, #0 801ac82: d1f1 bne.n 801ac68 } } } 801ac84: 3708 adds r7, #8 801ac86: 46bd mov sp, r7 801ac88: bd80 pop {r7, pc} 801ac8a: bf00 nop 801ac8c: 2402af65 .word 0x2402af65 801ac90: 2402af74 .word 0x2402af74 0801ac94 : /** * Just a callback function for tcpip_callback() that calls pbuf_free_ooseq(). */ static void pbuf_free_ooseq_callback(void *arg) { 801ac94: b580 push {r7, lr} 801ac96: b082 sub sp, #8 801ac98: af00 add r7, sp, #0 801ac9a: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); pbuf_free_ooseq(); 801ac9c: f7ff ffd4 bl 801ac48 } 801aca0: bf00 nop 801aca2: 3708 adds r7, #8 801aca4: 46bd mov sp, r7 801aca6: bd80 pop {r7, pc} 0801aca8 : #endif /* !NO_SYS */ /** Queue a call to pbuf_free_ooseq if not already queued. */ static void pbuf_pool_is_empty(void) { 801aca8: b580 push {r7, lr} 801acaa: b082 sub sp, #8 801acac: 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); 801acae: f00c fb47 bl 8027340 801acb2: 6078 str r0, [r7, #4] queued = pbuf_free_ooseq_pending; 801acb4: 4b0f ldr r3, [pc, #60] @ (801acf4 ) 801acb6: 781b ldrb r3, [r3, #0] 801acb8: 70fb strb r3, [r7, #3] pbuf_free_ooseq_pending = 1; 801acba: 4b0e ldr r3, [pc, #56] @ (801acf4 ) 801acbc: 2201 movs r2, #1 801acbe: 701a strb r2, [r3, #0] SYS_ARCH_UNPROTECT(old_level); 801acc0: 6878 ldr r0, [r7, #4] 801acc2: f00c fb4b bl 802735c if (!queued) { 801acc6: 78fb ldrb r3, [r7, #3] 801acc8: 2b00 cmp r3, #0 801acca: d10f bne.n 801acec /* queue a call to pbuf_free_ooseq if not already queued */ PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); 801accc: 2100 movs r1, #0 801acce: 480a ldr r0, [pc, #40] @ (801acf8 ) 801acd0: f7fe fdd6 bl 8019880 801acd4: 4603 mov r3, r0 801acd6: 2b00 cmp r3, #0 801acd8: d008 beq.n 801acec 801acda: f00c fb31 bl 8027340 801acde: 6078 str r0, [r7, #4] 801ace0: 4b04 ldr r3, [pc, #16] @ (801acf4 ) 801ace2: 2200 movs r2, #0 801ace4: 701a strb r2, [r3, #0] 801ace6: 6878 ldr r0, [r7, #4] 801ace8: f00c fb38 bl 802735c } #endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ } 801acec: bf00 nop 801acee: 3708 adds r7, #8 801acf0: 46bd mov sp, r7 801acf2: bd80 pop {r7, pc} 801acf4: 2402af65 .word 0x2402af65 801acf8: 0801ac95 .word 0x0801ac95 0801acfc : #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) { 801acfc: b480 push {r7} 801acfe: b085 sub sp, #20 801ad00: af00 add r7, sp, #0 801ad02: 60f8 str r0, [r7, #12] 801ad04: 60b9 str r1, [r7, #8] 801ad06: 4611 mov r1, r2 801ad08: 461a mov r2, r3 801ad0a: 460b mov r3, r1 801ad0c: 80fb strh r3, [r7, #6] 801ad0e: 4613 mov r3, r2 801ad10: 80bb strh r3, [r7, #4] p->next = NULL; 801ad12: 68fb ldr r3, [r7, #12] 801ad14: 2200 movs r2, #0 801ad16: 601a str r2, [r3, #0] p->payload = payload; 801ad18: 68fb ldr r3, [r7, #12] 801ad1a: 68ba ldr r2, [r7, #8] 801ad1c: 605a str r2, [r3, #4] p->tot_len = tot_len; 801ad1e: 68fb ldr r3, [r7, #12] 801ad20: 88fa ldrh r2, [r7, #6] 801ad22: 811a strh r2, [r3, #8] p->len = len; 801ad24: 68fb ldr r3, [r7, #12] 801ad26: 88ba ldrh r2, [r7, #4] 801ad28: 815a strh r2, [r3, #10] p->type_internal = (u8_t)type; 801ad2a: 8b3b ldrh r3, [r7, #24] 801ad2c: b2da uxtb r2, r3 801ad2e: 68fb ldr r3, [r7, #12] 801ad30: 731a strb r2, [r3, #12] p->flags = flags; 801ad32: 68fb ldr r3, [r7, #12] 801ad34: 7f3a ldrb r2, [r7, #28] 801ad36: 735a strb r2, [r3, #13] p->ref = 1; 801ad38: 68fb ldr r3, [r7, #12] 801ad3a: 2201 movs r2, #1 801ad3c: 739a strb r2, [r3, #14] p->if_idx = NETIF_NO_INDEX; 801ad3e: 68fb ldr r3, [r7, #12] 801ad40: 2200 movs r2, #0 801ad42: 73da strb r2, [r3, #15] } 801ad44: bf00 nop 801ad46: 3714 adds r7, #20 801ad48: 46bd mov sp, r7 801ad4a: f85d 7b04 ldr.w r7, [sp], #4 801ad4e: 4770 bx lr 0801ad50 : * @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) { 801ad50: b580 push {r7, lr} 801ad52: b08c sub sp, #48 @ 0x30 801ad54: af02 add r7, sp, #8 801ad56: 4603 mov r3, r0 801ad58: 71fb strb r3, [r7, #7] 801ad5a: 460b mov r3, r1 801ad5c: 80bb strh r3, [r7, #4] 801ad5e: 4613 mov r3, r2 801ad60: 807b strh r3, [r7, #2] struct pbuf *p; u16_t offset = (u16_t)layer; 801ad62: 79fb ldrb r3, [r7, #7] 801ad64: 847b strh r3, [r7, #34] @ 0x22 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); switch (type) { 801ad66: 887b ldrh r3, [r7, #2] 801ad68: f5b3 7f20 cmp.w r3, #640 @ 0x280 801ad6c: f000 8082 beq.w 801ae74 801ad70: f5b3 7f20 cmp.w r3, #640 @ 0x280 801ad74: f300 80c9 bgt.w 801af0a 801ad78: f5b3 7fc1 cmp.w r3, #386 @ 0x182 801ad7c: d010 beq.n 801ada0 801ad7e: f5b3 7fc1 cmp.w r3, #386 @ 0x182 801ad82: f300 80c2 bgt.w 801af0a 801ad86: 2b01 cmp r3, #1 801ad88: d002 beq.n 801ad90 801ad8a: 2b41 cmp r3, #65 @ 0x41 801ad8c: f040 80bd bne.w 801af0a case PBUF_REF: /* fall through */ case PBUF_ROM: p = pbuf_alloc_reference(NULL, length, type); 801ad90: 887a ldrh r2, [r7, #2] 801ad92: 88bb ldrh r3, [r7, #4] 801ad94: 4619 mov r1, r3 801ad96: 2000 movs r0, #0 801ad98: f000 f8d2 bl 801af40 801ad9c: 6278 str r0, [r7, #36] @ 0x24 break; 801ad9e: e0be b.n 801af1e case PBUF_POOL: { struct pbuf *q, *last; u16_t rem_len; /* remaining length */ p = NULL; 801ada0: 2300 movs r3, #0 801ada2: 627b str r3, [r7, #36] @ 0x24 last = NULL; 801ada4: 2300 movs r3, #0 801ada6: 61fb str r3, [r7, #28] rem_len = length; 801ada8: 88bb ldrh r3, [r7, #4] 801adaa: 837b strh r3, [r7, #26] do { u16_t qlen; q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 801adac: 200c movs r0, #12 801adae: f7ff fb81 bl 801a4b4 801adb2: 6138 str r0, [r7, #16] if (q == NULL) { 801adb4: 693b ldr r3, [r7, #16] 801adb6: 2b00 cmp r3, #0 801adb8: d109 bne.n 801adce PBUF_POOL_IS_EMPTY(); 801adba: f7ff ff75 bl 801aca8 /* free chain so far allocated */ if (p) { 801adbe: 6a7b ldr r3, [r7, #36] @ 0x24 801adc0: 2b00 cmp r3, #0 801adc2: d002 beq.n 801adca pbuf_free(p); 801adc4: 6a78 ldr r0, [r7, #36] @ 0x24 801adc6: f000 fad9 bl 801b37c } /* bail out unsuccessfully */ return NULL; 801adca: 2300 movs r3, #0 801adcc: e0a8 b.n 801af20 } qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); 801adce: 8c7b ldrh r3, [r7, #34] @ 0x22 801add0: 3303 adds r3, #3 801add2: b29b uxth r3, r3 801add4: f023 0303 bic.w r3, r3, #3 801add8: b29a uxth r2, r3 801adda: f240 53ec movw r3, #1516 @ 0x5ec 801adde: 1a9b subs r3, r3, r2 801ade0: b29b uxth r3, r3 801ade2: 8b7a ldrh r2, [r7, #26] 801ade4: 4293 cmp r3, r2 801ade6: bf28 it cs 801ade8: 4613 movcs r3, r2 801adea: 81fb strh r3, [r7, #14] pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), 801adec: 8c7b ldrh r3, [r7, #34] @ 0x22 801adee: 3310 adds r3, #16 801adf0: 693a ldr r2, [r7, #16] 801adf2: 4413 add r3, r2 801adf4: 3303 adds r3, #3 801adf6: f023 0303 bic.w r3, r3, #3 801adfa: 4618 mov r0, r3 801adfc: 89f9 ldrh r1, [r7, #14] 801adfe: 8b7a ldrh r2, [r7, #26] 801ae00: 2300 movs r3, #0 801ae02: 9301 str r3, [sp, #4] 801ae04: 887b ldrh r3, [r7, #2] 801ae06: 9300 str r3, [sp, #0] 801ae08: 460b mov r3, r1 801ae0a: 4601 mov r1, r0 801ae0c: 6938 ldr r0, [r7, #16] 801ae0e: f7ff ff75 bl 801acfc rem_len, qlen, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", 801ae12: 693b ldr r3, [r7, #16] 801ae14: 685b ldr r3, [r3, #4] 801ae16: f003 0303 and.w r3, r3, #3 801ae1a: 2b00 cmp r3, #0 801ae1c: d006 beq.n 801ae2c 801ae1e: 4b42 ldr r3, [pc, #264] @ (801af28 ) 801ae20: f44f 7280 mov.w r2, #256 @ 0x100 801ae24: 4941 ldr r1, [pc, #260] @ (801af2c ) 801ae26: 4842 ldr r0, [pc, #264] @ (801af30 ) 801ae28: f00f fd20 bl 802a86c ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", 801ae2c: 8c7b ldrh r3, [r7, #34] @ 0x22 801ae2e: 3303 adds r3, #3 801ae30: f023 0303 bic.w r3, r3, #3 801ae34: f240 52ec movw r2, #1516 @ 0x5ec 801ae38: 4293 cmp r3, r2 801ae3a: d106 bne.n 801ae4a 801ae3c: 4b3a ldr r3, [pc, #232] @ (801af28 ) 801ae3e: f44f 7281 mov.w r2, #258 @ 0x102 801ae42: 493c ldr r1, [pc, #240] @ (801af34 ) 801ae44: 483a ldr r0, [pc, #232] @ (801af30 ) 801ae46: f00f fd11 bl 802a86c (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); if (p == NULL) { 801ae4a: 6a7b ldr r3, [r7, #36] @ 0x24 801ae4c: 2b00 cmp r3, #0 801ae4e: d102 bne.n 801ae56 /* allocated head of pbuf chain (into p) */ p = q; 801ae50: 693b ldr r3, [r7, #16] 801ae52: 627b str r3, [r7, #36] @ 0x24 801ae54: e002 b.n 801ae5c } else { /* make previous pbuf point to this pbuf */ last->next = q; 801ae56: 69fb ldr r3, [r7, #28] 801ae58: 693a ldr r2, [r7, #16] 801ae5a: 601a str r2, [r3, #0] } last = q; 801ae5c: 693b ldr r3, [r7, #16] 801ae5e: 61fb str r3, [r7, #28] rem_len = (u16_t)(rem_len - qlen); 801ae60: 8b7a ldrh r2, [r7, #26] 801ae62: 89fb ldrh r3, [r7, #14] 801ae64: 1ad3 subs r3, r2, r3 801ae66: 837b strh r3, [r7, #26] offset = 0; 801ae68: 2300 movs r3, #0 801ae6a: 847b strh r3, [r7, #34] @ 0x22 } while (rem_len > 0); 801ae6c: 8b7b ldrh r3, [r7, #26] 801ae6e: 2b00 cmp r3, #0 801ae70: d19c bne.n 801adac break; 801ae72: e054 b.n 801af1e } case PBUF_RAM: { u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); 801ae74: 8c7b ldrh r3, [r7, #34] @ 0x22 801ae76: 3303 adds r3, #3 801ae78: b29b uxth r3, r3 801ae7a: f023 0303 bic.w r3, r3, #3 801ae7e: b29a uxth r2, r3 801ae80: 88bb ldrh r3, [r7, #4] 801ae82: 3303 adds r3, #3 801ae84: b29b uxth r3, r3 801ae86: f023 0303 bic.w r3, r3, #3 801ae8a: b29b uxth r3, r3 801ae8c: 4413 add r3, r2 801ae8e: 833b strh r3, [r7, #24] mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); 801ae90: 8b3b ldrh r3, [r7, #24] 801ae92: 3310 adds r3, #16 801ae94: 617b str r3, [r7, #20] /* bug #50040: Check for integer overflow when calculating alloc_len */ if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 801ae96: 8b3a ldrh r2, [r7, #24] 801ae98: 88bb ldrh r3, [r7, #4] 801ae9a: 3303 adds r3, #3 801ae9c: f023 0303 bic.w r3, r3, #3 801aea0: 429a cmp r2, r3 801aea2: d306 bcc.n 801aeb2 (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) { 801aea4: 88bb ldrh r3, [r7, #4] 801aea6: 3303 adds r3, #3 801aea8: f023 0303 bic.w r3, r3, #3 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 801aeac: 697a ldr r2, [r7, #20] 801aeae: 429a cmp r2, r3 801aeb0: d201 bcs.n 801aeb6 return NULL; 801aeb2: 2300 movs r3, #0 801aeb4: e034 b.n 801af20 } /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf *)mem_malloc(alloc_len); 801aeb6: 6978 ldr r0, [r7, #20] 801aeb8: f7ff f960 bl 801a17c 801aebc: 6278 str r0, [r7, #36] @ 0x24 if (p == NULL) { 801aebe: 6a7b ldr r3, [r7, #36] @ 0x24 801aec0: 2b00 cmp r3, #0 801aec2: d101 bne.n 801aec8 return NULL; 801aec4: 2300 movs r3, #0 801aec6: e02b b.n 801af20 } pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), 801aec8: 8c7b ldrh r3, [r7, #34] @ 0x22 801aeca: 3310 adds r3, #16 801aecc: 6a7a ldr r2, [r7, #36] @ 0x24 801aece: 4413 add r3, r2 801aed0: 3303 adds r3, #3 801aed2: f023 0303 bic.w r3, r3, #3 801aed6: 4618 mov r0, r3 801aed8: 88b9 ldrh r1, [r7, #4] 801aeda: 88ba ldrh r2, [r7, #4] 801aedc: 2300 movs r3, #0 801aede: 9301 str r3, [sp, #4] 801aee0: 887b ldrh r3, [r7, #2] 801aee2: 9300 str r3, [sp, #0] 801aee4: 460b mov r3, r1 801aee6: 4601 mov r1, r0 801aee8: 6a78 ldr r0, [r7, #36] @ 0x24 801aeea: f7ff ff07 bl 801acfc length, length, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", 801aeee: 6a7b ldr r3, [r7, #36] @ 0x24 801aef0: 685b ldr r3, [r3, #4] 801aef2: f003 0303 and.w r3, r3, #3 801aef6: 2b00 cmp r3, #0 801aef8: d010 beq.n 801af1c 801aefa: 4b0b ldr r3, [pc, #44] @ (801af28 ) 801aefc: f44f 7291 mov.w r2, #290 @ 0x122 801af00: 490d ldr r1, [pc, #52] @ (801af38 ) 801af02: 480b ldr r0, [pc, #44] @ (801af30 ) 801af04: f00f fcb2 bl 802a86c ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); break; 801af08: e008 b.n 801af1c } default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); 801af0a: 4b07 ldr r3, [pc, #28] @ (801af28 ) 801af0c: f240 1227 movw r2, #295 @ 0x127 801af10: 490a ldr r1, [pc, #40] @ (801af3c ) 801af12: 4807 ldr r0, [pc, #28] @ (801af30 ) 801af14: f00f fcaa bl 802a86c return NULL; 801af18: 2300 movs r3, #0 801af1a: e001 b.n 801af20 break; 801af1c: bf00 nop } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 801af1e: 6a7b ldr r3, [r7, #36] @ 0x24 } 801af20: 4618 mov r0, r3 801af22: 3728 adds r7, #40 @ 0x28 801af24: 46bd mov sp, r7 801af26: bd80 pop {r7, pc} 801af28: 0802f0a8 .word 0x0802f0a8 801af2c: 0802f0d8 .word 0x0802f0d8 801af30: 0802f108 .word 0x0802f108 801af34: 0802f130 .word 0x0802f130 801af38: 0802f164 .word 0x0802f164 801af3c: 0802f190 .word 0x0802f190 0801af40 : * * @return the allocated pbuf. */ struct pbuf * pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) { 801af40: b580 push {r7, lr} 801af42: b086 sub sp, #24 801af44: af02 add r7, sp, #8 801af46: 6078 str r0, [r7, #4] 801af48: 460b mov r3, r1 801af4a: 807b strh r3, [r7, #2] 801af4c: 4613 mov r3, r2 801af4e: 803b strh r3, [r7, #0] struct pbuf *p; LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 801af50: 883b ldrh r3, [r7, #0] 801af52: 2b41 cmp r3, #65 @ 0x41 801af54: d009 beq.n 801af6a 801af56: 883b ldrh r3, [r7, #0] 801af58: 2b01 cmp r3, #1 801af5a: d006 beq.n 801af6a 801af5c: 4b0f ldr r3, [pc, #60] @ (801af9c ) 801af5e: f44f 72a5 mov.w r2, #330 @ 0x14a 801af62: 490f ldr r1, [pc, #60] @ (801afa0 ) 801af64: 480f ldr r0, [pc, #60] @ (801afa4 ) 801af66: f00f fc81 bl 802a86c /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 801af6a: 200b movs r0, #11 801af6c: f7ff faa2 bl 801a4b4 801af70: 60f8 str r0, [r7, #12] if (p == NULL) { 801af72: 68fb ldr r3, [r7, #12] 801af74: 2b00 cmp r3, #0 801af76: d101 bne.n 801af7c 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; 801af78: 2300 movs r3, #0 801af7a: e00b b.n 801af94 } pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); 801af7c: 8879 ldrh r1, [r7, #2] 801af7e: 887a ldrh r2, [r7, #2] 801af80: 2300 movs r3, #0 801af82: 9301 str r3, [sp, #4] 801af84: 883b ldrh r3, [r7, #0] 801af86: 9300 str r3, [sp, #0] 801af88: 460b mov r3, r1 801af8a: 6879 ldr r1, [r7, #4] 801af8c: 68f8 ldr r0, [r7, #12] 801af8e: f7ff feb5 bl 801acfc return p; 801af92: 68fb ldr r3, [r7, #12] } 801af94: 4618 mov r0, r3 801af96: 3710 adds r7, #16 801af98: 46bd mov sp, r7 801af9a: bd80 pop {r7, pc} 801af9c: 0802f0a8 .word 0x0802f0a8 801afa0: 0802f1ac .word 0x0802f1ac 801afa4: 0802f108 .word 0x0802f108 0801afa8 : * 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) { 801afa8: b580 push {r7, lr} 801afaa: b088 sub sp, #32 801afac: af02 add r7, sp, #8 801afae: 607b str r3, [r7, #4] 801afb0: 4603 mov r3, r0 801afb2: 73fb strb r3, [r7, #15] 801afb4: 460b mov r3, r1 801afb6: 81bb strh r3, [r7, #12] 801afb8: 4613 mov r3, r2 801afba: 817b strh r3, [r7, #10] u16_t offset = (u16_t)l; 801afbc: 7bfb ldrb r3, [r7, #15] 801afbe: 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) { 801afc0: 8a7b ldrh r3, [r7, #18] 801afc2: 3303 adds r3, #3 801afc4: f023 0203 bic.w r2, r3, #3 801afc8: 89bb ldrh r3, [r7, #12] 801afca: 441a add r2, r3 801afcc: 8cbb ldrh r3, [r7, #36] @ 0x24 801afce: 429a cmp r2, r3 801afd0: d901 bls.n 801afd6 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); return NULL; 801afd2: 2300 movs r3, #0 801afd4: e018 b.n 801b008 } if (payload_mem != NULL) { 801afd6: 6a3b ldr r3, [r7, #32] 801afd8: 2b00 cmp r3, #0 801afda: d007 beq.n 801afec payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); 801afdc: 8a7b ldrh r3, [r7, #18] 801afde: 3303 adds r3, #3 801afe0: f023 0303 bic.w r3, r3, #3 801afe4: 6a3a ldr r2, [r7, #32] 801afe6: 4413 add r3, r2 801afe8: 617b str r3, [r7, #20] 801afea: e001 b.n 801aff0 } else { payload = NULL; 801afec: 2300 movs r3, #0 801afee: 617b str r3, [r7, #20] } pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); 801aff0: 6878 ldr r0, [r7, #4] 801aff2: 89b9 ldrh r1, [r7, #12] 801aff4: 89ba ldrh r2, [r7, #12] 801aff6: 2302 movs r3, #2 801aff8: 9301 str r3, [sp, #4] 801affa: 897b ldrh r3, [r7, #10] 801affc: 9300 str r3, [sp, #0] 801affe: 460b mov r3, r1 801b000: 6979 ldr r1, [r7, #20] 801b002: f7ff fe7b bl 801acfc return &p->pbuf; 801b006: 687b ldr r3, [r7, #4] } 801b008: 4618 mov r0, r3 801b00a: 3718 adds r7, #24 801b00c: 46bd mov sp, r7 801b00e: bd80 pop {r7, pc} 0801b010 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 801b010: b580 push {r7, lr} 801b012: b084 sub sp, #16 801b014: af00 add r7, sp, #0 801b016: 6078 str r0, [r7, #4] 801b018: 460b mov r3, r1 801b01a: 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); 801b01c: 687b ldr r3, [r7, #4] 801b01e: 2b00 cmp r3, #0 801b020: d106 bne.n 801b030 801b022: 4b39 ldr r3, [pc, #228] @ (801b108 ) 801b024: f44f 72cc mov.w r2, #408 @ 0x198 801b028: 4938 ldr r1, [pc, #224] @ (801b10c ) 801b02a: 4839 ldr r0, [pc, #228] @ (801b110 ) 801b02c: f00f fc1e bl 802a86c /* desired length larger than current length? */ if (new_len >= p->tot_len) { 801b030: 687b ldr r3, [r7, #4] 801b032: 891b ldrh r3, [r3, #8] 801b034: 887a ldrh r2, [r7, #2] 801b036: 429a cmp r2, r3 801b038: d261 bcs.n 801b0fe 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); 801b03a: 687b ldr r3, [r7, #4] 801b03c: 891a ldrh r2, [r3, #8] 801b03e: 887b ldrh r3, [r7, #2] 801b040: 1ad3 subs r3, r2, r3 801b042: 813b strh r3, [r7, #8] /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; 801b044: 887b ldrh r3, [r7, #2] 801b046: 817b strh r3, [r7, #10] q = p; 801b048: 687b ldr r3, [r7, #4] 801b04a: 60fb str r3, [r7, #12] /* should this pbuf be kept? */ while (rem_len > q->len) { 801b04c: e018 b.n 801b080 /* decrease remaining length by pbuf length */ rem_len = (u16_t)(rem_len - q->len); 801b04e: 68fb ldr r3, [r7, #12] 801b050: 895b ldrh r3, [r3, #10] 801b052: 897a ldrh r2, [r7, #10] 801b054: 1ad3 subs r3, r2, r3 801b056: 817b strh r3, [r7, #10] /* decrease total length indicator */ q->tot_len = (u16_t)(q->tot_len - shrink); 801b058: 68fb ldr r3, [r7, #12] 801b05a: 891a ldrh r2, [r3, #8] 801b05c: 893b ldrh r3, [r7, #8] 801b05e: 1ad3 subs r3, r2, r3 801b060: b29a uxth r2, r3 801b062: 68fb ldr r3, [r7, #12] 801b064: 811a strh r2, [r3, #8] /* proceed to next pbuf in chain */ q = q->next; 801b066: 68fb ldr r3, [r7, #12] 801b068: 681b ldr r3, [r3, #0] 801b06a: 60fb str r3, [r7, #12] LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); 801b06c: 68fb ldr r3, [r7, #12] 801b06e: 2b00 cmp r3, #0 801b070: d106 bne.n 801b080 801b072: 4b25 ldr r3, [pc, #148] @ (801b108 ) 801b074: f240 12af movw r2, #431 @ 0x1af 801b078: 4926 ldr r1, [pc, #152] @ (801b114 ) 801b07a: 4825 ldr r0, [pc, #148] @ (801b110 ) 801b07c: f00f fbf6 bl 802a86c while (rem_len > q->len) { 801b080: 68fb ldr r3, [r7, #12] 801b082: 895b ldrh r3, [r3, #10] 801b084: 897a ldrh r2, [r7, #10] 801b086: 429a cmp r2, r3 801b088: d8e1 bhi.n 801b04e /* 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) 801b08a: 68fb ldr r3, [r7, #12] 801b08c: 7b1b ldrb r3, [r3, #12] 801b08e: f003 030f and.w r3, r3, #15 801b092: 2b00 cmp r3, #0 801b094: d11f bne.n 801b0d6 801b096: 68fb ldr r3, [r7, #12] 801b098: 895b ldrh r3, [r3, #10] 801b09a: 897a ldrh r2, [r7, #10] 801b09c: 429a cmp r2, r3 801b09e: d01a beq.n 801b0d6 #if LWIP_SUPPORT_CUSTOM_PBUF && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) 801b0a0: 68fb ldr r3, [r7, #12] 801b0a2: 7b5b ldrb r3, [r3, #13] 801b0a4: f003 0302 and.w r3, r3, #2 801b0a8: 2b00 cmp r3, #0 801b0aa: d114 bne.n 801b0d6 #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)); 801b0ac: 68fb ldr r3, [r7, #12] 801b0ae: 685a ldr r2, [r3, #4] 801b0b0: 68fb ldr r3, [r7, #12] 801b0b2: 1ad2 subs r2, r2, r3 801b0b4: 897b ldrh r3, [r7, #10] 801b0b6: 4413 add r3, r2 801b0b8: 4619 mov r1, r3 801b0ba: 68f8 ldr r0, [r7, #12] 801b0bc: f7fe ff5c bl 8019f78 801b0c0: 60f8 str r0, [r7, #12] LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); 801b0c2: 68fb ldr r3, [r7, #12] 801b0c4: 2b00 cmp r3, #0 801b0c6: d106 bne.n 801b0d6 801b0c8: 4b0f ldr r3, [pc, #60] @ (801b108 ) 801b0ca: f240 12bd movw r2, #445 @ 0x1bd 801b0ce: 4912 ldr r1, [pc, #72] @ (801b118 ) 801b0d0: 480f ldr r0, [pc, #60] @ (801b110 ) 801b0d2: f00f fbcb bl 802a86c } /* adjust length fields for new last pbuf */ q->len = rem_len; 801b0d6: 68fb ldr r3, [r7, #12] 801b0d8: 897a ldrh r2, [r7, #10] 801b0da: 815a strh r2, [r3, #10] q->tot_len = q->len; 801b0dc: 68fb ldr r3, [r7, #12] 801b0de: 895a ldrh r2, [r3, #10] 801b0e0: 68fb ldr r3, [r7, #12] 801b0e2: 811a strh r2, [r3, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 801b0e4: 68fb ldr r3, [r7, #12] 801b0e6: 681b ldr r3, [r3, #0] 801b0e8: 2b00 cmp r3, #0 801b0ea: d004 beq.n 801b0f6 /* free remaining pbufs in chain */ pbuf_free(q->next); 801b0ec: 68fb ldr r3, [r7, #12] 801b0ee: 681b ldr r3, [r3, #0] 801b0f0: 4618 mov r0, r3 801b0f2: f000 f943 bl 801b37c } /* q is last packet in chain */ q->next = NULL; 801b0f6: 68fb ldr r3, [r7, #12] 801b0f8: 2200 movs r2, #0 801b0fa: 601a str r2, [r3, #0] 801b0fc: e000 b.n 801b100 return; 801b0fe: bf00 nop } 801b100: 3710 adds r7, #16 801b102: 46bd mov sp, r7 801b104: bd80 pop {r7, pc} 801b106: bf00 nop 801b108: 0802f0a8 .word 0x0802f0a8 801b10c: 0802f1c0 .word 0x0802f1c0 801b110: 0802f108 .word 0x0802f108 801b114: 0802f1d8 .word 0x0802f1d8 801b118: 0802f1f0 .word 0x0802f1f0 0801b11c : * @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) { 801b11c: b580 push {r7, lr} 801b11e: b086 sub sp, #24 801b120: af00 add r7, sp, #0 801b122: 60f8 str r0, [r7, #12] 801b124: 60b9 str r1, [r7, #8] 801b126: 4613 mov r3, r2 801b128: 71fb strb r3, [r7, #7] u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801b12a: 68fb ldr r3, [r7, #12] 801b12c: 2b00 cmp r3, #0 801b12e: d106 bne.n 801b13e 801b130: 4b2b ldr r3, [pc, #172] @ (801b1e0 ) 801b132: f240 12df movw r2, #479 @ 0x1df 801b136: 492b ldr r1, [pc, #172] @ (801b1e4 ) 801b138: 482b ldr r0, [pc, #172] @ (801b1e8 ) 801b13a: f00f fb97 bl 802a86c if ((p == NULL) || (header_size_increment > 0xFFFF)) { 801b13e: 68fb ldr r3, [r7, #12] 801b140: 2b00 cmp r3, #0 801b142: d003 beq.n 801b14c 801b144: 68bb ldr r3, [r7, #8] 801b146: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801b14a: d301 bcc.n 801b150 return 1; 801b14c: 2301 movs r3, #1 801b14e: e043 b.n 801b1d8 } if (header_size_increment == 0) { 801b150: 68bb ldr r3, [r7, #8] 801b152: 2b00 cmp r3, #0 801b154: d101 bne.n 801b15a return 0; 801b156: 2300 movs r3, #0 801b158: e03e b.n 801b1d8 } increment_magnitude = (u16_t)header_size_increment; 801b15a: 68bb ldr r3, [r7, #8] 801b15c: 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) { 801b15e: 68fb ldr r3, [r7, #12] 801b160: 891a ldrh r2, [r3, #8] 801b162: 8a7b ldrh r3, [r7, #18] 801b164: 4413 add r3, r2 801b166: b29b uxth r3, r3 801b168: 8a7a ldrh r2, [r7, #18] 801b16a: 429a cmp r2, r3 801b16c: d901 bls.n 801b172 return 1; 801b16e: 2301 movs r3, #1 801b170: e032 b.n 801b1d8 } type_internal = p->type_internal; 801b172: 68fb ldr r3, [r7, #12] 801b174: 7b1b ldrb r3, [r3, #12] 801b176: 823b strh r3, [r7, #16] /* pbuf types containing payloads? */ if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { 801b178: 8a3b ldrh r3, [r7, #16] 801b17a: f003 0380 and.w r3, r3, #128 @ 0x80 801b17e: 2b00 cmp r3, #0 801b180: d00c beq.n 801b19c /* set new payload pointer */ payload = (u8_t *)p->payload - header_size_increment; 801b182: 68fb ldr r3, [r7, #12] 801b184: 685a ldr r2, [r3, #4] 801b186: 68bb ldr r3, [r7, #8] 801b188: 425b negs r3, r3 801b18a: 4413 add r3, r2 801b18c: 617b str r3, [r7, #20] /* boundary check fails? */ if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 801b18e: 68fb ldr r3, [r7, #12] 801b190: 3310 adds r3, #16 801b192: 697a ldr r2, [r7, #20] 801b194: 429a cmp r2, r3 801b196: d20d bcs.n 801b1b4 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; 801b198: 2301 movs r3, #1 801b19a: e01d b.n 801b1d8 } /* pbuf types referring to external payloads? */ } else { /* hide a header in the payload? */ if (force) { 801b19c: 79fb ldrb r3, [r7, #7] 801b19e: 2b00 cmp r3, #0 801b1a0: d006 beq.n 801b1b0 payload = (u8_t *)p->payload - header_size_increment; 801b1a2: 68fb ldr r3, [r7, #12] 801b1a4: 685a ldr r2, [r3, #4] 801b1a6: 68bb ldr r3, [r7, #8] 801b1a8: 425b negs r3, r3 801b1aa: 4413 add r3, r2 801b1ac: 617b str r3, [r7, #20] 801b1ae: e001 b.n 801b1b4 } else { /* cannot expand payload to front (yet!) * bail out unsuccessfully */ return 1; 801b1b0: 2301 movs r3, #1 801b1b2: e011 b.n 801b1d8 } 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; 801b1b4: 68fb ldr r3, [r7, #12] 801b1b6: 697a ldr r2, [r7, #20] 801b1b8: 605a str r2, [r3, #4] p->len = (u16_t)(p->len + increment_magnitude); 801b1ba: 68fb ldr r3, [r7, #12] 801b1bc: 895a ldrh r2, [r3, #10] 801b1be: 8a7b ldrh r3, [r7, #18] 801b1c0: 4413 add r3, r2 801b1c2: b29a uxth r2, r3 801b1c4: 68fb ldr r3, [r7, #12] 801b1c6: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len + increment_magnitude); 801b1c8: 68fb ldr r3, [r7, #12] 801b1ca: 891a ldrh r2, [r3, #8] 801b1cc: 8a7b ldrh r3, [r7, #18] 801b1ce: 4413 add r3, r2 801b1d0: b29a uxth r2, r3 801b1d2: 68fb ldr r3, [r7, #12] 801b1d4: 811a strh r2, [r3, #8] return 0; 801b1d6: 2300 movs r3, #0 } 801b1d8: 4618 mov r0, r3 801b1da: 3718 adds r7, #24 801b1dc: 46bd mov sp, r7 801b1de: bd80 pop {r7, pc} 801b1e0: 0802f0a8 .word 0x0802f0a8 801b1e4: 0802f20c .word 0x0802f20c 801b1e8: 0802f108 .word 0x0802f108 0801b1ec : * @return non-zero on failure, zero on success. * */ u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment) { 801b1ec: b580 push {r7, lr} 801b1ee: b082 sub sp, #8 801b1f0: af00 add r7, sp, #0 801b1f2: 6078 str r0, [r7, #4] 801b1f4: 6039 str r1, [r7, #0] return pbuf_add_header_impl(p, header_size_increment, 0); 801b1f6: 2200 movs r2, #0 801b1f8: 6839 ldr r1, [r7, #0] 801b1fa: 6878 ldr r0, [r7, #4] 801b1fc: f7ff ff8e bl 801b11c 801b200: 4603 mov r3, r0 } 801b202: 4618 mov r0, r3 801b204: 3708 adds r7, #8 801b206: 46bd mov sp, r7 801b208: bd80 pop {r7, pc} ... 0801b20c : * @return non-zero on failure, zero on success. * */ u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) { 801b20c: b580 push {r7, lr} 801b20e: b084 sub sp, #16 801b210: af00 add r7, sp, #0 801b212: 6078 str r0, [r7, #4] 801b214: 6039 str r1, [r7, #0] void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801b216: 687b ldr r3, [r7, #4] 801b218: 2b00 cmp r3, #0 801b21a: d106 bne.n 801b22a 801b21c: 4b20 ldr r3, [pc, #128] @ (801b2a0 ) 801b21e: f240 224b movw r2, #587 @ 0x24b 801b222: 4920 ldr r1, [pc, #128] @ (801b2a4 ) 801b224: 4820 ldr r0, [pc, #128] @ (801b2a8 ) 801b226: f00f fb21 bl 802a86c if ((p == NULL) || (header_size_decrement > 0xFFFF)) { 801b22a: 687b ldr r3, [r7, #4] 801b22c: 2b00 cmp r3, #0 801b22e: d003 beq.n 801b238 801b230: 683b ldr r3, [r7, #0] 801b232: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801b236: d301 bcc.n 801b23c return 1; 801b238: 2301 movs r3, #1 801b23a: e02c b.n 801b296 } if (header_size_decrement == 0) { 801b23c: 683b ldr r3, [r7, #0] 801b23e: 2b00 cmp r3, #0 801b240: d101 bne.n 801b246 return 0; 801b242: 2300 movs r3, #0 801b244: e027 b.n 801b296 } increment_magnitude = (u16_t)header_size_decrement; 801b246: 683b ldr r3, [r7, #0] 801b248: 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;); 801b24a: 687b ldr r3, [r7, #4] 801b24c: 895b ldrh r3, [r3, #10] 801b24e: 89fa ldrh r2, [r7, #14] 801b250: 429a cmp r2, r3 801b252: d908 bls.n 801b266 801b254: 4b12 ldr r3, [pc, #72] @ (801b2a0 ) 801b256: f240 2255 movw r2, #597 @ 0x255 801b25a: 4914 ldr r1, [pc, #80] @ (801b2ac ) 801b25c: 4812 ldr r0, [pc, #72] @ (801b2a8 ) 801b25e: f00f fb05 bl 802a86c 801b262: 2301 movs r3, #1 801b264: e017 b.n 801b296 /* remember current payload pointer */ payload = p->payload; 801b266: 687b ldr r3, [r7, #4] 801b268: 685b ldr r3, [r3, #4] 801b26a: 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; 801b26c: 687b ldr r3, [r7, #4] 801b26e: 685a ldr r2, [r3, #4] 801b270: 683b ldr r3, [r7, #0] 801b272: 441a add r2, r3 801b274: 687b ldr r3, [r7, #4] 801b276: 605a str r2, [r3, #4] /* modify pbuf length fields */ p->len = (u16_t)(p->len - increment_magnitude); 801b278: 687b ldr r3, [r7, #4] 801b27a: 895a ldrh r2, [r3, #10] 801b27c: 89fb ldrh r3, [r7, #14] 801b27e: 1ad3 subs r3, r2, r3 801b280: b29a uxth r2, r3 801b282: 687b ldr r3, [r7, #4] 801b284: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len - increment_magnitude); 801b286: 687b ldr r3, [r7, #4] 801b288: 891a ldrh r2, [r3, #8] 801b28a: 89fb ldrh r3, [r7, #14] 801b28c: 1ad3 subs r3, r2, r3 801b28e: b29a uxth r2, r3 801b290: 687b ldr r3, [r7, #4] 801b292: 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; 801b294: 2300 movs r3, #0 } 801b296: 4618 mov r0, r3 801b298: 3710 adds r7, #16 801b29a: 46bd mov sp, r7 801b29c: bd80 pop {r7, pc} 801b29e: bf00 nop 801b2a0: 0802f0a8 .word 0x0802f0a8 801b2a4: 0802f20c .word 0x0802f20c 801b2a8: 0802f108 .word 0x0802f108 801b2ac: 0802f218 .word 0x0802f218 0801b2b0 : static u8_t pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) { 801b2b0: b580 push {r7, lr} 801b2b2: b082 sub sp, #8 801b2b4: af00 add r7, sp, #0 801b2b6: 6078 str r0, [r7, #4] 801b2b8: 460b mov r3, r1 801b2ba: 807b strh r3, [r7, #2] 801b2bc: 4613 mov r3, r2 801b2be: 707b strb r3, [r7, #1] if (header_size_increment < 0) { 801b2c0: f9b7 3002 ldrsh.w r3, [r7, #2] 801b2c4: 2b00 cmp r3, #0 801b2c6: da08 bge.n 801b2da return pbuf_remove_header(p, (size_t) - header_size_increment); 801b2c8: f9b7 3002 ldrsh.w r3, [r7, #2] 801b2cc: 425b negs r3, r3 801b2ce: 4619 mov r1, r3 801b2d0: 6878 ldr r0, [r7, #4] 801b2d2: f7ff ff9b bl 801b20c 801b2d6: 4603 mov r3, r0 801b2d8: e007 b.n 801b2ea } else { return pbuf_add_header_impl(p, (size_t)header_size_increment, force); 801b2da: f9b7 3002 ldrsh.w r3, [r7, #2] 801b2de: 787a ldrb r2, [r7, #1] 801b2e0: 4619 mov r1, r3 801b2e2: 6878 ldr r0, [r7, #4] 801b2e4: f7ff ff1a bl 801b11c 801b2e8: 4603 mov r3, r0 } } 801b2ea: 4618 mov r0, r3 801b2ec: 3708 adds r7, #8 801b2ee: 46bd mov sp, r7 801b2f0: bd80 pop {r7, pc} 0801b2f2 : * 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) { 801b2f2: b580 push {r7, lr} 801b2f4: b082 sub sp, #8 801b2f6: af00 add r7, sp, #0 801b2f8: 6078 str r0, [r7, #4] 801b2fa: 460b mov r3, r1 801b2fc: 807b strh r3, [r7, #2] return pbuf_header_impl(p, header_size_increment, 1); 801b2fe: f9b7 3002 ldrsh.w r3, [r7, #2] 801b302: 2201 movs r2, #1 801b304: 4619 mov r1, r3 801b306: 6878 ldr r0, [r7, #4] 801b308: f7ff ffd2 bl 801b2b0 801b30c: 4603 mov r3, r0 } 801b30e: 4618 mov r0, r3 801b310: 3708 adds r7, #8 801b312: 46bd mov sp, r7 801b314: bd80 pop {r7, pc} 0801b316 : * takes an u16_t not s16_t! * @return the new head pbuf */ struct pbuf * pbuf_free_header(struct pbuf *q, u16_t size) { 801b316: b580 push {r7, lr} 801b318: b086 sub sp, #24 801b31a: af00 add r7, sp, #0 801b31c: 6078 str r0, [r7, #4] 801b31e: 460b mov r3, r1 801b320: 807b strh r3, [r7, #2] struct pbuf *p = q; 801b322: 687b ldr r3, [r7, #4] 801b324: 617b str r3, [r7, #20] u16_t free_left = size; 801b326: 887b ldrh r3, [r7, #2] 801b328: 827b strh r3, [r7, #18] while (free_left && p) { 801b32a: e01c b.n 801b366 if (free_left >= p->len) { 801b32c: 697b ldr r3, [r7, #20] 801b32e: 895b ldrh r3, [r3, #10] 801b330: 8a7a ldrh r2, [r7, #18] 801b332: 429a cmp r2, r3 801b334: d310 bcc.n 801b358 struct pbuf *f = p; 801b336: 697b ldr r3, [r7, #20] 801b338: 60fb str r3, [r7, #12] free_left = (u16_t)(free_left - p->len); 801b33a: 697b ldr r3, [r7, #20] 801b33c: 895b ldrh r3, [r3, #10] 801b33e: 8a7a ldrh r2, [r7, #18] 801b340: 1ad3 subs r3, r2, r3 801b342: 827b strh r3, [r7, #18] p = p->next; 801b344: 697b ldr r3, [r7, #20] 801b346: 681b ldr r3, [r3, #0] 801b348: 617b str r3, [r7, #20] f->next = 0; 801b34a: 68fb ldr r3, [r7, #12] 801b34c: 2200 movs r2, #0 801b34e: 601a str r2, [r3, #0] pbuf_free(f); 801b350: 68f8 ldr r0, [r7, #12] 801b352: f000 f813 bl 801b37c 801b356: e006 b.n 801b366 } else { pbuf_remove_header(p, free_left); 801b358: 8a7b ldrh r3, [r7, #18] 801b35a: 4619 mov r1, r3 801b35c: 6978 ldr r0, [r7, #20] 801b35e: f7ff ff55 bl 801b20c free_left = 0; 801b362: 2300 movs r3, #0 801b364: 827b strh r3, [r7, #18] while (free_left && p) { 801b366: 8a7b ldrh r3, [r7, #18] 801b368: 2b00 cmp r3, #0 801b36a: d002 beq.n 801b372 801b36c: 697b ldr r3, [r7, #20] 801b36e: 2b00 cmp r3, #0 801b370: d1dc bne.n 801b32c } } return p; 801b372: 697b ldr r3, [r7, #20] } 801b374: 4618 mov r0, r3 801b376: 3718 adds r7, #24 801b378: 46bd mov sp, r7 801b37a: bd80 pop {r7, pc} 0801b37c : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 801b37c: b580 push {r7, lr} 801b37e: b088 sub sp, #32 801b380: af00 add r7, sp, #0 801b382: 6078 str r0, [r7, #4] u8_t alloc_src; struct pbuf *q; u8_t count; if (p == NULL) { 801b384: 687b ldr r3, [r7, #4] 801b386: 2b00 cmp r3, #0 801b388: d10b bne.n 801b3a2 LWIP_ASSERT("p != NULL", p != NULL); 801b38a: 687b ldr r3, [r7, #4] 801b38c: 2b00 cmp r3, #0 801b38e: d106 bne.n 801b39e 801b390: 4b3b ldr r3, [pc, #236] @ (801b480 ) 801b392: f44f 7237 mov.w r2, #732 @ 0x2dc 801b396: 493b ldr r1, [pc, #236] @ (801b484 ) 801b398: 483b ldr r0, [pc, #236] @ (801b488 ) 801b39a: f00f fa67 bl 802a86c /* 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; 801b39e: 2300 movs r3, #0 801b3a0: e069 b.n 801b476 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; count = 0; 801b3a2: 2300 movs r3, #0 801b3a4: 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) { 801b3a6: e062 b.n 801b46e 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); 801b3a8: f00b ffca bl 8027340 801b3ac: 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); 801b3ae: 687b ldr r3, [r7, #4] 801b3b0: 7b9b ldrb r3, [r3, #14] 801b3b2: 2b00 cmp r3, #0 801b3b4: d106 bne.n 801b3c4 801b3b6: 4b32 ldr r3, [pc, #200] @ (801b480 ) 801b3b8: f240 22f1 movw r2, #753 @ 0x2f1 801b3bc: 4933 ldr r1, [pc, #204] @ (801b48c ) 801b3be: 4832 ldr r0, [pc, #200] @ (801b488 ) 801b3c0: f00f fa54 bl 802a86c /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 801b3c4: 687b ldr r3, [r7, #4] 801b3c6: 7b9b ldrb r3, [r3, #14] 801b3c8: 3b01 subs r3, #1 801b3ca: b2da uxtb r2, r3 801b3cc: 687b ldr r3, [r7, #4] 801b3ce: 739a strb r2, [r3, #14] 801b3d0: 687b ldr r3, [r7, #4] 801b3d2: 7b9b ldrb r3, [r3, #14] 801b3d4: 75fb strb r3, [r7, #23] SYS_ARCH_UNPROTECT(old_level); 801b3d6: 69b8 ldr r0, [r7, #24] 801b3d8: f00b ffc0 bl 802735c /* this pbuf is no longer referenced to? */ if (ref == 0) { 801b3dc: 7dfb ldrb r3, [r7, #23] 801b3de: 2b00 cmp r3, #0 801b3e0: d143 bne.n 801b46a /* remember next pbuf in chain for next iteration */ q = p->next; 801b3e2: 687b ldr r3, [r7, #4] 801b3e4: 681b ldr r3, [r3, #0] 801b3e6: 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); 801b3e8: 687b ldr r3, [r7, #4] 801b3ea: 7b1b ldrb r3, [r3, #12] 801b3ec: f003 030f and.w r3, r3, #15 801b3f0: 73fb strb r3, [r7, #15] #if LWIP_SUPPORT_CUSTOM_PBUF /* is this a custom pbuf? */ if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { 801b3f2: 687b ldr r3, [r7, #4] 801b3f4: 7b5b ldrb r3, [r3, #13] 801b3f6: f003 0302 and.w r3, r3, #2 801b3fa: 2b00 cmp r3, #0 801b3fc: d011 beq.n 801b422 struct pbuf_custom *pc = (struct pbuf_custom *)p; 801b3fe: 687b ldr r3, [r7, #4] 801b400: 60bb str r3, [r7, #8] LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); 801b402: 68bb ldr r3, [r7, #8] 801b404: 691b ldr r3, [r3, #16] 801b406: 2b00 cmp r3, #0 801b408: d106 bne.n 801b418 801b40a: 4b1d ldr r3, [pc, #116] @ (801b480 ) 801b40c: f240 22ff movw r2, #767 @ 0x2ff 801b410: 491f ldr r1, [pc, #124] @ (801b490 ) 801b412: 481d ldr r0, [pc, #116] @ (801b488 ) 801b414: f00f fa2a bl 802a86c pc->custom_free_function(p); 801b418: 68bb ldr r3, [r7, #8] 801b41a: 691b ldr r3, [r3, #16] 801b41c: 6878 ldr r0, [r7, #4] 801b41e: 4798 blx r3 801b420: e01d b.n 801b45e } 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) { 801b422: 7bfb ldrb r3, [r7, #15] 801b424: 2b02 cmp r3, #2 801b426: d104 bne.n 801b432 memp_free(MEMP_PBUF_POOL, p); 801b428: 6879 ldr r1, [r7, #4] 801b42a: 200c movs r0, #12 801b42c: f7ff f8b8 bl 801a5a0 801b430: e015 b.n 801b45e /* is this a ROM or RAM referencing pbuf? */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { 801b432: 7bfb ldrb r3, [r7, #15] 801b434: 2b01 cmp r3, #1 801b436: d104 bne.n 801b442 memp_free(MEMP_PBUF, p); 801b438: 6879 ldr r1, [r7, #4] 801b43a: 200b movs r0, #11 801b43c: f7ff f8b0 bl 801a5a0 801b440: e00d b.n 801b45e /* type == PBUF_RAM */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { 801b442: 7bfb ldrb r3, [r7, #15] 801b444: 2b00 cmp r3, #0 801b446: d103 bne.n 801b450 mem_free(p); 801b448: 6878 ldr r0, [r7, #4] 801b44a: f7fe fd05 bl 8019e58 801b44e: e006 b.n 801b45e } else { /* @todo: support freeing other types */ LWIP_ASSERT("invalid pbuf type", 0); 801b450: 4b0b ldr r3, [pc, #44] @ (801b480 ) 801b452: f240 320f movw r2, #783 @ 0x30f 801b456: 490f ldr r1, [pc, #60] @ (801b494 ) 801b458: 480b ldr r0, [pc, #44] @ (801b488 ) 801b45a: f00f fa07 bl 802a86c } } count++; 801b45e: 7ffb ldrb r3, [r7, #31] 801b460: 3301 adds r3, #1 801b462: 77fb strb r3, [r7, #31] /* proceed to next pbuf */ p = q; 801b464: 693b ldr r3, [r7, #16] 801b466: 607b str r3, [r7, #4] 801b468: e001 b.n 801b46e /* 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; 801b46a: 2300 movs r3, #0 801b46c: 607b str r3, [r7, #4] while (p != NULL) { 801b46e: 687b ldr r3, [r7, #4] 801b470: 2b00 cmp r3, #0 801b472: d199 bne.n 801b3a8 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; 801b474: 7ffb ldrb r3, [r7, #31] } 801b476: 4618 mov r0, r3 801b478: 3720 adds r7, #32 801b47a: 46bd mov sp, r7 801b47c: bd80 pop {r7, pc} 801b47e: bf00 nop 801b480: 0802f0a8 .word 0x0802f0a8 801b484: 0802f20c .word 0x0802f20c 801b488: 0802f108 .word 0x0802f108 801b48c: 0802f238 .word 0x0802f238 801b490: 0802f250 .word 0x0802f250 801b494: 0802f274 .word 0x0802f274 0801b498 : * @param p first pbuf of chain * @return the number of pbufs in a chain */ u16_t pbuf_clen(const struct pbuf *p) { 801b498: b480 push {r7} 801b49a: b085 sub sp, #20 801b49c: af00 add r7, sp, #0 801b49e: 6078 str r0, [r7, #4] u16_t len; len = 0; 801b4a0: 2300 movs r3, #0 801b4a2: 81fb strh r3, [r7, #14] while (p != NULL) { 801b4a4: e005 b.n 801b4b2 ++len; 801b4a6: 89fb ldrh r3, [r7, #14] 801b4a8: 3301 adds r3, #1 801b4aa: 81fb strh r3, [r7, #14] p = p->next; 801b4ac: 687b ldr r3, [r7, #4] 801b4ae: 681b ldr r3, [r3, #0] 801b4b0: 607b str r3, [r7, #4] while (p != NULL) { 801b4b2: 687b ldr r3, [r7, #4] 801b4b4: 2b00 cmp r3, #0 801b4b6: d1f6 bne.n 801b4a6 } return len; 801b4b8: 89fb ldrh r3, [r7, #14] } 801b4ba: 4618 mov r0, r3 801b4bc: 3714 adds r7, #20 801b4be: 46bd mov sp, r7 801b4c0: f85d 7b04 ldr.w r7, [sp], #4 801b4c4: 4770 bx lr ... 0801b4c8 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 801b4c8: b580 push {r7, lr} 801b4ca: b084 sub sp, #16 801b4cc: af00 add r7, sp, #0 801b4ce: 6078 str r0, [r7, #4] /* pbuf given? */ if (p != NULL) { 801b4d0: 687b ldr r3, [r7, #4] 801b4d2: 2b00 cmp r3, #0 801b4d4: d016 beq.n 801b504 SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); 801b4d6: f00b ff33 bl 8027340 801b4da: 60f8 str r0, [r7, #12] 801b4dc: 687b ldr r3, [r7, #4] 801b4de: 7b9b ldrb r3, [r3, #14] 801b4e0: 3301 adds r3, #1 801b4e2: b2da uxtb r2, r3 801b4e4: 687b ldr r3, [r7, #4] 801b4e6: 739a strb r2, [r3, #14] 801b4e8: 68f8 ldr r0, [r7, #12] 801b4ea: f00b ff37 bl 802735c LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 801b4ee: 687b ldr r3, [r7, #4] 801b4f0: 7b9b ldrb r3, [r3, #14] 801b4f2: 2b00 cmp r3, #0 801b4f4: d106 bne.n 801b504 801b4f6: 4b05 ldr r3, [pc, #20] @ (801b50c ) 801b4f8: f240 3242 movw r2, #834 @ 0x342 801b4fc: 4904 ldr r1, [pc, #16] @ (801b510 ) 801b4fe: 4805 ldr r0, [pc, #20] @ (801b514 ) 801b500: f00f f9b4 bl 802a86c } } 801b504: bf00 nop 801b506: 3710 adds r7, #16 801b508: 46bd mov sp, r7 801b50a: bd80 pop {r7, pc} 801b50c: 0802f0a8 .word 0x0802f0a8 801b510: 0802f288 .word 0x0802f288 801b514: 0802f108 .word 0x0802f108 0801b518 : * * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 801b518: b580 push {r7, lr} 801b51a: b084 sub sp, #16 801b51c: af00 add r7, sp, #0 801b51e: 6078 str r0, [r7, #4] 801b520: 6039 str r1, [r7, #0] struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 801b522: 687b ldr r3, [r7, #4] 801b524: 2b00 cmp r3, #0 801b526: d002 beq.n 801b52e 801b528: 683b ldr r3, [r7, #0] 801b52a: 2b00 cmp r3, #0 801b52c: d107 bne.n 801b53e 801b52e: 4b20 ldr r3, [pc, #128] @ (801b5b0 ) 801b530: f240 3259 movw r2, #857 @ 0x359 801b534: 491f ldr r1, [pc, #124] @ (801b5b4 ) 801b536: 4820 ldr r0, [pc, #128] @ (801b5b8 ) 801b538: f00f f998 bl 802a86c 801b53c: e034 b.n 801b5a8 ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 801b53e: 687b ldr r3, [r7, #4] 801b540: 60fb str r3, [r7, #12] 801b542: e00a b.n 801b55a /* add total length of second chain to all totals of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801b544: 68fb ldr r3, [r7, #12] 801b546: 891a ldrh r2, [r3, #8] 801b548: 683b ldr r3, [r7, #0] 801b54a: 891b ldrh r3, [r3, #8] 801b54c: 4413 add r3, r2 801b54e: b29a uxth r2, r3 801b550: 68fb ldr r3, [r7, #12] 801b552: 811a strh r2, [r3, #8] for (p = h; p->next != NULL; p = p->next) { 801b554: 68fb ldr r3, [r7, #12] 801b556: 681b ldr r3, [r3, #0] 801b558: 60fb str r3, [r7, #12] 801b55a: 68fb ldr r3, [r7, #12] 801b55c: 681b ldr r3, [r3, #0] 801b55e: 2b00 cmp r3, #0 801b560: d1f0 bne.n 801b544 } /* { 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); 801b562: 68fb ldr r3, [r7, #12] 801b564: 891a ldrh r2, [r3, #8] 801b566: 68fb ldr r3, [r7, #12] 801b568: 895b ldrh r3, [r3, #10] 801b56a: 429a cmp r2, r3 801b56c: d006 beq.n 801b57c 801b56e: 4b10 ldr r3, [pc, #64] @ (801b5b0 ) 801b570: f240 3262 movw r2, #866 @ 0x362 801b574: 4911 ldr r1, [pc, #68] @ (801b5bc ) 801b576: 4810 ldr r0, [pc, #64] @ (801b5b8 ) 801b578: f00f f978 bl 802a86c LWIP_ASSERT("p->next == NULL", p->next == NULL); 801b57c: 68fb ldr r3, [r7, #12] 801b57e: 681b ldr r3, [r3, #0] 801b580: 2b00 cmp r3, #0 801b582: d006 beq.n 801b592 801b584: 4b0a ldr r3, [pc, #40] @ (801b5b0 ) 801b586: f240 3263 movw r2, #867 @ 0x363 801b58a: 490d ldr r1, [pc, #52] @ (801b5c0 ) 801b58c: 480a ldr r0, [pc, #40] @ (801b5b8 ) 801b58e: f00f f96d bl 802a86c /* add total length of second chain to last pbuf total of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801b592: 68fb ldr r3, [r7, #12] 801b594: 891a ldrh r2, [r3, #8] 801b596: 683b ldr r3, [r7, #0] 801b598: 891b ldrh r3, [r3, #8] 801b59a: 4413 add r3, r2 801b59c: b29a uxth r2, r3 801b59e: 68fb ldr r3, [r7, #12] 801b5a0: 811a strh r2, [r3, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 801b5a2: 68fb ldr r3, [r7, #12] 801b5a4: 683a ldr r2, [r7, #0] 801b5a6: 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. */ } 801b5a8: 3710 adds r7, #16 801b5aa: 46bd mov sp, r7 801b5ac: bd80 pop {r7, pc} 801b5ae: bf00 nop 801b5b0: 0802f0a8 .word 0x0802f0a8 801b5b4: 0802f29c .word 0x0802f29c 801b5b8: 0802f108 .word 0x0802f108 801b5bc: 0802f2d4 .word 0x0802f2d4 801b5c0: 0802f304 .word 0x0802f304 0801b5c4 : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 801b5c4: b580 push {r7, lr} 801b5c6: b082 sub sp, #8 801b5c8: af00 add r7, sp, #0 801b5ca: 6078 str r0, [r7, #4] 801b5cc: 6039 str r1, [r7, #0] pbuf_cat(h, t); 801b5ce: 6839 ldr r1, [r7, #0] 801b5d0: 6878 ldr r0, [r7, #4] 801b5d2: f7ff ffa1 bl 801b518 /* t is now referenced by h */ pbuf_ref(t); 801b5d6: 6838 ldr r0, [r7, #0] 801b5d8: f7ff ff76 bl 801b4c8 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 801b5dc: bf00 nop 801b5de: 3708 adds r7, #8 801b5e0: 46bd mov sp, r7 801b5e2: bd80 pop {r7, pc} 0801b5e4 : * 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) { 801b5e4: b580 push {r7, lr} 801b5e6: b086 sub sp, #24 801b5e8: af00 add r7, sp, #0 801b5ea: 6078 str r0, [r7, #4] 801b5ec: 6039 str r1, [r7, #0] size_t offset_to = 0, offset_from = 0, len; 801b5ee: 2300 movs r3, #0 801b5f0: 617b str r3, [r7, #20] 801b5f2: 2300 movs r3, #0 801b5f4: 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) && 801b5f6: 687b ldr r3, [r7, #4] 801b5f8: 2b00 cmp r3, #0 801b5fa: d008 beq.n 801b60e 801b5fc: 683b ldr r3, [r7, #0] 801b5fe: 2b00 cmp r3, #0 801b600: d005 beq.n 801b60e 801b602: 687b ldr r3, [r7, #4] 801b604: 891a ldrh r2, [r3, #8] 801b606: 683b ldr r3, [r7, #0] 801b608: 891b ldrh r3, [r3, #8] 801b60a: 429a cmp r2, r3 801b60c: d209 bcs.n 801b622 801b60e: 4b57 ldr r3, [pc, #348] @ (801b76c ) 801b610: f240 32c9 movw r2, #969 @ 0x3c9 801b614: 4956 ldr r1, [pc, #344] @ (801b770 ) 801b616: 4857 ldr r0, [pc, #348] @ (801b774 ) 801b618: f00f f928 bl 802a86c 801b61c: f06f 030f mvn.w r3, #15 801b620: e09f b.n 801b762 (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)) { 801b622: 687b ldr r3, [r7, #4] 801b624: 895b ldrh r3, [r3, #10] 801b626: 461a mov r2, r3 801b628: 697b ldr r3, [r7, #20] 801b62a: 1ad2 subs r2, r2, r3 801b62c: 683b ldr r3, [r7, #0] 801b62e: 895b ldrh r3, [r3, #10] 801b630: 4619 mov r1, r3 801b632: 693b ldr r3, [r7, #16] 801b634: 1acb subs r3, r1, r3 801b636: 429a cmp r2, r3 801b638: d306 bcc.n 801b648 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 801b63a: 683b ldr r3, [r7, #0] 801b63c: 895b ldrh r3, [r3, #10] 801b63e: 461a mov r2, r3 801b640: 693b ldr r3, [r7, #16] 801b642: 1ad3 subs r3, r2, r3 801b644: 60fb str r3, [r7, #12] 801b646: e005 b.n 801b654 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 801b648: 687b ldr r3, [r7, #4] 801b64a: 895b ldrh r3, [r3, #10] 801b64c: 461a mov r2, r3 801b64e: 697b ldr r3, [r7, #20] 801b650: 1ad3 subs r3, r2, r3 801b652: 60fb str r3, [r7, #12] } MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); 801b654: 687b ldr r3, [r7, #4] 801b656: 685a ldr r2, [r3, #4] 801b658: 697b ldr r3, [r7, #20] 801b65a: 18d0 adds r0, r2, r3 801b65c: 683b ldr r3, [r7, #0] 801b65e: 685a ldr r2, [r3, #4] 801b660: 693b ldr r3, [r7, #16] 801b662: 4413 add r3, r2 801b664: 68fa ldr r2, [r7, #12] 801b666: 4619 mov r1, r3 801b668: f00f fb89 bl 802ad7e offset_to += len; 801b66c: 697a ldr r2, [r7, #20] 801b66e: 68fb ldr r3, [r7, #12] 801b670: 4413 add r3, r2 801b672: 617b str r3, [r7, #20] offset_from += len; 801b674: 693a ldr r2, [r7, #16] 801b676: 68fb ldr r3, [r7, #12] 801b678: 4413 add r3, r2 801b67a: 613b str r3, [r7, #16] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 801b67c: 687b ldr r3, [r7, #4] 801b67e: 895b ldrh r3, [r3, #10] 801b680: 461a mov r2, r3 801b682: 697b ldr r3, [r7, #20] 801b684: 4293 cmp r3, r2 801b686: d906 bls.n 801b696 801b688: 4b38 ldr r3, [pc, #224] @ (801b76c ) 801b68a: f240 32d9 movw r2, #985 @ 0x3d9 801b68e: 493a ldr r1, [pc, #232] @ (801b778 ) 801b690: 4838 ldr r0, [pc, #224] @ (801b774 ) 801b692: f00f f8eb bl 802a86c LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 801b696: 683b ldr r3, [r7, #0] 801b698: 895b ldrh r3, [r3, #10] 801b69a: 461a mov r2, r3 801b69c: 693b ldr r3, [r7, #16] 801b69e: 4293 cmp r3, r2 801b6a0: d906 bls.n 801b6b0 801b6a2: 4b32 ldr r3, [pc, #200] @ (801b76c ) 801b6a4: f240 32da movw r2, #986 @ 0x3da 801b6a8: 4934 ldr r1, [pc, #208] @ (801b77c ) 801b6aa: 4832 ldr r0, [pc, #200] @ (801b774 ) 801b6ac: f00f f8de bl 802a86c if (offset_from >= p_from->len) { 801b6b0: 683b ldr r3, [r7, #0] 801b6b2: 895b ldrh r3, [r3, #10] 801b6b4: 461a mov r2, r3 801b6b6: 693b ldr r3, [r7, #16] 801b6b8: 4293 cmp r3, r2 801b6ba: d304 bcc.n 801b6c6 /* on to next p_from (if any) */ offset_from = 0; 801b6bc: 2300 movs r3, #0 801b6be: 613b str r3, [r7, #16] p_from = p_from->next; 801b6c0: 683b ldr r3, [r7, #0] 801b6c2: 681b ldr r3, [r3, #0] 801b6c4: 603b str r3, [r7, #0] } if (offset_to == p_to->len) { 801b6c6: 687b ldr r3, [r7, #4] 801b6c8: 895b ldrh r3, [r3, #10] 801b6ca: 461a mov r2, r3 801b6cc: 697b ldr r3, [r7, #20] 801b6ce: 4293 cmp r3, r2 801b6d0: d114 bne.n 801b6fc /* on to next p_to (if any) */ offset_to = 0; 801b6d2: 2300 movs r3, #0 801b6d4: 617b str r3, [r7, #20] p_to = p_to->next; 801b6d6: 687b ldr r3, [r7, #4] 801b6d8: 681b ldr r3, [r3, #0] 801b6da: 607b str r3, [r7, #4] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 801b6dc: 687b ldr r3, [r7, #4] 801b6de: 2b00 cmp r3, #0 801b6e0: d10c bne.n 801b6fc 801b6e2: 683b ldr r3, [r7, #0] 801b6e4: 2b00 cmp r3, #0 801b6e6: d009 beq.n 801b6fc 801b6e8: 4b20 ldr r3, [pc, #128] @ (801b76c ) 801b6ea: f44f 7279 mov.w r2, #996 @ 0x3e4 801b6ee: 4924 ldr r1, [pc, #144] @ (801b780 ) 801b6f0: 4820 ldr r0, [pc, #128] @ (801b774 ) 801b6f2: f00f f8bb bl 802a86c 801b6f6: f06f 030f mvn.w r3, #15 801b6fa: e032 b.n 801b762 } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { 801b6fc: 683b ldr r3, [r7, #0] 801b6fe: 2b00 cmp r3, #0 801b700: d013 beq.n 801b72a 801b702: 683b ldr r3, [r7, #0] 801b704: 895a ldrh r2, [r3, #10] 801b706: 683b ldr r3, [r7, #0] 801b708: 891b ldrh r3, [r3, #8] 801b70a: 429a cmp r2, r3 801b70c: d10d bne.n 801b72a /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801b70e: 683b ldr r3, [r7, #0] 801b710: 681b ldr r3, [r3, #0] 801b712: 2b00 cmp r3, #0 801b714: d009 beq.n 801b72a 801b716: 4b15 ldr r3, [pc, #84] @ (801b76c ) 801b718: f240 32e9 movw r2, #1001 @ 0x3e9 801b71c: 4919 ldr r1, [pc, #100] @ (801b784 ) 801b71e: 4815 ldr r0, [pc, #84] @ (801b774 ) 801b720: f00f f8a4 bl 802a86c 801b724: f06f 0305 mvn.w r3, #5 801b728: e01b b.n 801b762 (p_from->next == NULL), return ERR_VAL;); } if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { 801b72a: 687b ldr r3, [r7, #4] 801b72c: 2b00 cmp r3, #0 801b72e: d013 beq.n 801b758 801b730: 687b ldr r3, [r7, #4] 801b732: 895a ldrh r2, [r3, #10] 801b734: 687b ldr r3, [r7, #4] 801b736: 891b ldrh r3, [r3, #8] 801b738: 429a cmp r2, r3 801b73a: d10d bne.n 801b758 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801b73c: 687b ldr r3, [r7, #4] 801b73e: 681b ldr r3, [r3, #0] 801b740: 2b00 cmp r3, #0 801b742: d009 beq.n 801b758 801b744: 4b09 ldr r3, [pc, #36] @ (801b76c ) 801b746: f240 32ee movw r2, #1006 @ 0x3ee 801b74a: 490e ldr r1, [pc, #56] @ (801b784 ) 801b74c: 4809 ldr r0, [pc, #36] @ (801b774 ) 801b74e: f00f f88d bl 802a86c 801b752: f06f 0305 mvn.w r3, #5 801b756: e004 b.n 801b762 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 801b758: 683b ldr r3, [r7, #0] 801b75a: 2b00 cmp r3, #0 801b75c: f47f af61 bne.w 801b622 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 801b760: 2300 movs r3, #0 } 801b762: 4618 mov r0, r3 801b764: 3718 adds r7, #24 801b766: 46bd mov sp, r7 801b768: bd80 pop {r7, pc} 801b76a: bf00 nop 801b76c: 0802f0a8 .word 0x0802f0a8 801b770: 0802f350 .word 0x0802f350 801b774: 0802f108 .word 0x0802f108 801b778: 0802f380 .word 0x0802f380 801b77c: 0802f398 .word 0x0802f398 801b780: 0802f3b4 .word 0x0802f3b4 801b784: 0802f3c4 .word 0x0802f3c4 0801b788 : * @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) { 801b788: b580 push {r7, lr} 801b78a: b088 sub sp, #32 801b78c: af00 add r7, sp, #0 801b78e: 60f8 str r0, [r7, #12] 801b790: 60b9 str r1, [r7, #8] 801b792: 4611 mov r1, r2 801b794: 461a mov r2, r3 801b796: 460b mov r3, r1 801b798: 80fb strh r3, [r7, #6] 801b79a: 4613 mov r3, r2 801b79c: 80bb strh r3, [r7, #4] const struct pbuf *p; u16_t left = 0; 801b79e: 2300 movs r3, #0 801b7a0: 837b strh r3, [r7, #26] u16_t buf_copy_len; u16_t copied_total = 0; 801b7a2: 2300 movs r3, #0 801b7a4: 82fb strh r3, [r7, #22] LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 801b7a6: 68fb ldr r3, [r7, #12] 801b7a8: 2b00 cmp r3, #0 801b7aa: d108 bne.n 801b7be 801b7ac: 4b2b ldr r3, [pc, #172] @ (801b85c ) 801b7ae: f240 420a movw r2, #1034 @ 0x40a 801b7b2: 492b ldr r1, [pc, #172] @ (801b860 ) 801b7b4: 482b ldr r0, [pc, #172] @ (801b864 ) 801b7b6: f00f f859 bl 802a86c 801b7ba: 2300 movs r3, #0 801b7bc: e04a b.n 801b854 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 801b7be: 68bb ldr r3, [r7, #8] 801b7c0: 2b00 cmp r3, #0 801b7c2: d108 bne.n 801b7d6 801b7c4: 4b25 ldr r3, [pc, #148] @ (801b85c ) 801b7c6: f240 420b movw r2, #1035 @ 0x40b 801b7ca: 4927 ldr r1, [pc, #156] @ (801b868 ) 801b7cc: 4825 ldr r0, [pc, #148] @ (801b864 ) 801b7ce: f00f f84d bl 802a86c 801b7d2: 2300 movs r3, #0 801b7d4: e03e b.n 801b854 /* 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) { 801b7d6: 68fb ldr r3, [r7, #12] 801b7d8: 61fb str r3, [r7, #28] 801b7da: e034 b.n 801b846 if ((offset != 0) && (offset >= p->len)) { 801b7dc: 88bb ldrh r3, [r7, #4] 801b7de: 2b00 cmp r3, #0 801b7e0: d00a beq.n 801b7f8 801b7e2: 69fb ldr r3, [r7, #28] 801b7e4: 895b ldrh r3, [r3, #10] 801b7e6: 88ba ldrh r2, [r7, #4] 801b7e8: 429a cmp r2, r3 801b7ea: d305 bcc.n 801b7f8 /* don't copy from this buffer -> on to the next */ offset = (u16_t)(offset - p->len); 801b7ec: 69fb ldr r3, [r7, #28] 801b7ee: 895b ldrh r3, [r3, #10] 801b7f0: 88ba ldrh r2, [r7, #4] 801b7f2: 1ad3 subs r3, r2, r3 801b7f4: 80bb strh r3, [r7, #4] 801b7f6: e023 b.n 801b840 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = (u16_t)(p->len - offset); 801b7f8: 69fb ldr r3, [r7, #28] 801b7fa: 895a ldrh r2, [r3, #10] 801b7fc: 88bb ldrh r3, [r7, #4] 801b7fe: 1ad3 subs r3, r2, r3 801b800: 833b strh r3, [r7, #24] if (buf_copy_len > len) { 801b802: 8b3a ldrh r2, [r7, #24] 801b804: 88fb ldrh r3, [r7, #6] 801b806: 429a cmp r2, r3 801b808: d901 bls.n 801b80e buf_copy_len = len; 801b80a: 88fb ldrh r3, [r7, #6] 801b80c: 833b strh r3, [r7, #24] } /* copy the necessary parts of the buffer */ MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); 801b80e: 8b7b ldrh r3, [r7, #26] 801b810: 68ba ldr r2, [r7, #8] 801b812: 18d0 adds r0, r2, r3 801b814: 69fb ldr r3, [r7, #28] 801b816: 685a ldr r2, [r3, #4] 801b818: 88bb ldrh r3, [r7, #4] 801b81a: 4413 add r3, r2 801b81c: 8b3a ldrh r2, [r7, #24] 801b81e: 4619 mov r1, r3 801b820: f00f faad bl 802ad7e copied_total = (u16_t)(copied_total + buf_copy_len); 801b824: 8afa ldrh r2, [r7, #22] 801b826: 8b3b ldrh r3, [r7, #24] 801b828: 4413 add r3, r2 801b82a: 82fb strh r3, [r7, #22] left = (u16_t)(left + buf_copy_len); 801b82c: 8b7a ldrh r2, [r7, #26] 801b82e: 8b3b ldrh r3, [r7, #24] 801b830: 4413 add r3, r2 801b832: 837b strh r3, [r7, #26] len = (u16_t)(len - buf_copy_len); 801b834: 88fa ldrh r2, [r7, #6] 801b836: 8b3b ldrh r3, [r7, #24] 801b838: 1ad3 subs r3, r2, r3 801b83a: 80fb strh r3, [r7, #6] offset = 0; 801b83c: 2300 movs r3, #0 801b83e: 80bb strh r3, [r7, #4] for (p = buf; len != 0 && p != NULL; p = p->next) { 801b840: 69fb ldr r3, [r7, #28] 801b842: 681b ldr r3, [r3, #0] 801b844: 61fb str r3, [r7, #28] 801b846: 88fb ldrh r3, [r7, #6] 801b848: 2b00 cmp r3, #0 801b84a: d002 beq.n 801b852 801b84c: 69fb ldr r3, [r7, #28] 801b84e: 2b00 cmp r3, #0 801b850: d1c4 bne.n 801b7dc } } return copied_total; 801b852: 8afb ldrh r3, [r7, #22] } 801b854: 4618 mov r0, r3 801b856: 3720 adds r7, #32 801b858: 46bd mov sp, r7 801b85a: bd80 pop {r7, pc} 801b85c: 0802f0a8 .word 0x0802f0a8 801b860: 0802f3f0 .word 0x0802f3f0 801b864: 0802f108 .word 0x0802f108 801b868: 0802f410 .word 0x0802f410 0801b86c : * * @return a new pbuf or NULL if allocation fails */ struct pbuf * pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) { 801b86c: b580 push {r7, lr} 801b86e: b084 sub sp, #16 801b870: af00 add r7, sp, #0 801b872: 4603 mov r3, r0 801b874: 603a str r2, [r7, #0] 801b876: 71fb strb r3, [r7, #7] 801b878: 460b mov r3, r1 801b87a: 80bb strh r3, [r7, #4] struct pbuf *q; err_t err; q = pbuf_alloc(layer, p->tot_len, type); 801b87c: 683b ldr r3, [r7, #0] 801b87e: 8919 ldrh r1, [r3, #8] 801b880: 88ba ldrh r2, [r7, #4] 801b882: 79fb ldrb r3, [r7, #7] 801b884: 4618 mov r0, r3 801b886: f7ff fa63 bl 801ad50 801b88a: 60f8 str r0, [r7, #12] if (q == NULL) { 801b88c: 68fb ldr r3, [r7, #12] 801b88e: 2b00 cmp r3, #0 801b890: d101 bne.n 801b896 return NULL; 801b892: 2300 movs r3, #0 801b894: e011 b.n 801b8ba } err = pbuf_copy(q, p); 801b896: 6839 ldr r1, [r7, #0] 801b898: 68f8 ldr r0, [r7, #12] 801b89a: f7ff fea3 bl 801b5e4 801b89e: 4603 mov r3, r0 801b8a0: 72fb strb r3, [r7, #11] LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 801b8a2: f997 300b ldrsb.w r3, [r7, #11] 801b8a6: 2b00 cmp r3, #0 801b8a8: d006 beq.n 801b8b8 801b8aa: 4b06 ldr r3, [pc, #24] @ (801b8c4 ) 801b8ac: f240 5224 movw r2, #1316 @ 0x524 801b8b0: 4905 ldr r1, [pc, #20] @ (801b8c8 ) 801b8b2: 4806 ldr r0, [pc, #24] @ (801b8cc ) 801b8b4: f00e ffda bl 802a86c return q; 801b8b8: 68fb ldr r3, [r7, #12] } 801b8ba: 4618 mov r0, r3 801b8bc: 3710 adds r7, #16 801b8be: 46bd mov sp, r7 801b8c0: bd80 pop {r7, pc} 801b8c2: bf00 nop 801b8c4: 0802f0a8 .word 0x0802f0a8 801b8c8: 0802f51c .word 0x0802f51c 801b8cc: 0802f108 .word 0x0802f108 0801b8d0 : /** * Initialize this module. */ void tcp_init(void) { 801b8d0: b580 push {r7, lr} 801b8d2: af00 add r7, sp, #0 #ifdef LWIP_RAND tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 801b8d4: f00d fca0 bl 8029218 801b8d8: 4603 mov r3, r0 801b8da: b29b uxth r3, r3 801b8dc: f3c3 030d ubfx r3, r3, #0, #14 801b8e0: b29b uxth r3, r3 801b8e2: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 801b8e6: b29a uxth r2, r3 801b8e8: 4b01 ldr r3, [pc, #4] @ (801b8f0 ) 801b8ea: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 801b8ec: bf00 nop 801b8ee: bd80 pop {r7, pc} 801b8f0: 2400004c .word 0x2400004c 0801b8f4 : /** Free a tcp pcb */ void tcp_free(struct tcp_pcb *pcb) { 801b8f4: b580 push {r7, lr} 801b8f6: b082 sub sp, #8 801b8f8: af00 add r7, sp, #0 801b8fa: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 801b8fc: 687b ldr r3, [r7, #4] 801b8fe: 7d1b ldrb r3, [r3, #20] 801b900: 2b01 cmp r3, #1 801b902: d105 bne.n 801b910 801b904: 4b06 ldr r3, [pc, #24] @ (801b920 ) 801b906: 22d4 movs r2, #212 @ 0xd4 801b908: 4906 ldr r1, [pc, #24] @ (801b924 ) 801b90a: 4807 ldr r0, [pc, #28] @ (801b928 ) 801b90c: f00e ffae bl 802a86c #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB, pcb); 801b910: 6879 ldr r1, [r7, #4] 801b912: 2001 movs r0, #1 801b914: f7fe fe44 bl 801a5a0 } 801b918: bf00 nop 801b91a: 3708 adds r7, #8 801b91c: 46bd mov sp, r7 801b91e: bd80 pop {r7, pc} 801b920: 0802f5a8 .word 0x0802f5a8 801b924: 0802f5d8 .word 0x0802f5d8 801b928: 0802f5ec .word 0x0802f5ec 0801b92c : /** Free a tcp listen pcb */ static void tcp_free_listen(struct tcp_pcb *pcb) { 801b92c: b580 push {r7, lr} 801b92e: b082 sub sp, #8 801b930: af00 add r7, sp, #0 801b932: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 801b934: 687b ldr r3, [r7, #4] 801b936: 7d1b ldrb r3, [r3, #20] 801b938: 2b01 cmp r3, #1 801b93a: d105 bne.n 801b948 801b93c: 4b06 ldr r3, [pc, #24] @ (801b958 ) 801b93e: 22df movs r2, #223 @ 0xdf 801b940: 4906 ldr r1, [pc, #24] @ (801b95c ) 801b942: 4807 ldr r0, [pc, #28] @ (801b960 ) 801b944: f00e ff92 bl 802a86c #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB_LISTEN, pcb); 801b948: 6879 ldr r1, [r7, #4] 801b94a: 2002 movs r0, #2 801b94c: f7fe fe28 bl 801a5a0 } 801b950: bf00 nop 801b952: 3708 adds r7, #8 801b954: 46bd mov sp, r7 801b956: bd80 pop {r7, pc} 801b958: 0802f5a8 .word 0x0802f5a8 801b95c: 0802f614 .word 0x0802f614 801b960: 0802f5ec .word 0x0802f5ec 0801b964 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 801b964: b580 push {r7, lr} 801b966: af00 add r7, sp, #0 /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 801b968: f001 f86a bl 801ca40 if (++tcp_timer & 1) { 801b96c: 4b07 ldr r3, [pc, #28] @ (801b98c ) 801b96e: 781b ldrb r3, [r3, #0] 801b970: 3301 adds r3, #1 801b972: b2da uxtb r2, r3 801b974: 4b05 ldr r3, [pc, #20] @ (801b98c ) 801b976: 701a strb r2, [r3, #0] 801b978: 4b04 ldr r3, [pc, #16] @ (801b98c ) 801b97a: 781b ldrb r3, [r3, #0] 801b97c: f003 0301 and.w r3, r3, #1 801b980: 2b00 cmp r3, #0 801b982: d001 beq.n 801b988 /* Call tcp_slowtmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 801b984: f000 fd1a bl 801c3bc } } 801b988: bf00 nop 801b98a: bd80 pop {r7, pc} 801b98c: 2402af7d .word 0x2402af7d 0801b990 : /** 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) { 801b990: b580 push {r7, lr} 801b992: b084 sub sp, #16 801b994: af00 add r7, sp, #0 801b996: 6078 str r0, [r7, #4] 801b998: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); 801b99a: 683b ldr r3, [r7, #0] 801b99c: 2b00 cmp r3, #0 801b99e: d105 bne.n 801b9ac 801b9a0: 4b0d ldr r3, [pc, #52] @ (801b9d8 ) 801b9a2: 22ff movs r2, #255 @ 0xff 801b9a4: 490d ldr r1, [pc, #52] @ (801b9dc ) 801b9a6: 480e ldr r0, [pc, #56] @ (801b9e0 ) 801b9a8: f00e ff60 bl 802a86c for (pcb = list; pcb != NULL; pcb = pcb->next) { 801b9ac: 687b ldr r3, [r7, #4] 801b9ae: 60fb str r3, [r7, #12] 801b9b0: e00a b.n 801b9c8 if (pcb->listener == lpcb) { 801b9b2: 68fb ldr r3, [r7, #12] 801b9b4: 6fdb ldr r3, [r3, #124] @ 0x7c 801b9b6: 683a ldr r2, [r7, #0] 801b9b8: 429a cmp r2, r3 801b9ba: d102 bne.n 801b9c2 pcb->listener = NULL; 801b9bc: 68fb ldr r3, [r7, #12] 801b9be: 2200 movs r2, #0 801b9c0: 67da str r2, [r3, #124] @ 0x7c for (pcb = list; pcb != NULL; pcb = pcb->next) { 801b9c2: 68fb ldr r3, [r7, #12] 801b9c4: 68db ldr r3, [r3, #12] 801b9c6: 60fb str r3, [r7, #12] 801b9c8: 68fb ldr r3, [r7, #12] 801b9ca: 2b00 cmp r3, #0 801b9cc: d1f1 bne.n 801b9b2 } } } 801b9ce: bf00 nop 801b9d0: bf00 nop 801b9d2: 3710 adds r7, #16 801b9d4: 46bd mov sp, r7 801b9d6: bd80 pop {r7, pc} 801b9d8: 0802f5a8 .word 0x0802f5a8 801b9dc: 0802f630 .word 0x0802f630 801b9e0: 0802f5ec .word 0x0802f5ec 0801b9e4 : /** 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) { 801b9e4: b580 push {r7, lr} 801b9e6: b084 sub sp, #16 801b9e8: af00 add r7, sp, #0 801b9ea: 6078 str r0, [r7, #4] #if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG size_t i; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801b9ec: 687b ldr r3, [r7, #4] 801b9ee: 2b00 cmp r3, #0 801b9f0: d106 bne.n 801ba00 801b9f2: 4b14 ldr r3, [pc, #80] @ (801ba44 ) 801b9f4: f240 1211 movw r2, #273 @ 0x111 801b9f8: 4913 ldr r1, [pc, #76] @ (801ba48 ) 801b9fa: 4814 ldr r0, [pc, #80] @ (801ba4c ) 801b9fc: f00e ff36 bl 802a86c LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 801ba00: 687b ldr r3, [r7, #4] 801ba02: 7d1b ldrb r3, [r3, #20] 801ba04: 2b01 cmp r3, #1 801ba06: d006 beq.n 801ba16 801ba08: 4b0e ldr r3, [pc, #56] @ (801ba44 ) 801ba0a: f44f 7289 mov.w r2, #274 @ 0x112 801ba0e: 4910 ldr r1, [pc, #64] @ (801ba50 ) 801ba10: 480e ldr r0, [pc, #56] @ (801ba4c ) 801ba12: f00e ff2b bl 802a86c for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ba16: 2301 movs r3, #1 801ba18: 60fb str r3, [r7, #12] 801ba1a: e00b b.n 801ba34 tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); 801ba1c: 4a0d ldr r2, [pc, #52] @ (801ba54 ) 801ba1e: 68fb ldr r3, [r7, #12] 801ba20: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801ba24: 681b ldr r3, [r3, #0] 801ba26: 6879 ldr r1, [r7, #4] 801ba28: 4618 mov r0, r3 801ba2a: f7ff ffb1 bl 801b990 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ba2e: 68fb ldr r3, [r7, #12] 801ba30: 3301 adds r3, #1 801ba32: 60fb str r3, [r7, #12] 801ba34: 68fb ldr r3, [r7, #12] 801ba36: 2b03 cmp r3, #3 801ba38: d9f0 bls.n 801ba1c } #endif LWIP_UNUSED_ARG(pcb); } 801ba3a: bf00 nop 801ba3c: bf00 nop 801ba3e: 3710 adds r7, #16 801ba40: 46bd mov sp, r7 801ba42: bd80 pop {r7, pc} 801ba44: 0802f5a8 .word 0x0802f5a8 801ba48: 0802f658 .word 0x0802f658 801ba4c: 0802f5ec .word 0x0802f5ec 801ba50: 0802f664 .word 0x0802f664 801ba54: 08031c40 .word 0x08031c40 0801ba58 : * @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) { 801ba58: b5b0 push {r4, r5, r7, lr} 801ba5a: b088 sub sp, #32 801ba5c: af04 add r7, sp, #16 801ba5e: 6078 str r0, [r7, #4] 801ba60: 460b mov r3, r1 801ba62: 70fb strb r3, [r7, #3] LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 801ba64: 687b ldr r3, [r7, #4] 801ba66: 2b00 cmp r3, #0 801ba68: d106 bne.n 801ba78 801ba6a: 4b63 ldr r3, [pc, #396] @ (801bbf8 ) 801ba6c: f44f 72af mov.w r2, #350 @ 0x15e 801ba70: 4962 ldr r1, [pc, #392] @ (801bbfc ) 801ba72: 4863 ldr r0, [pc, #396] @ (801bc00 ) 801ba74: f00e fefa bl 802a86c if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 801ba78: 78fb ldrb r3, [r7, #3] 801ba7a: 2b00 cmp r3, #0 801ba7c: d067 beq.n 801bb4e 801ba7e: 687b ldr r3, [r7, #4] 801ba80: 7d1b ldrb r3, [r3, #20] 801ba82: 2b04 cmp r3, #4 801ba84: d003 beq.n 801ba8e 801ba86: 687b ldr r3, [r7, #4] 801ba88: 7d1b ldrb r3, [r3, #20] 801ba8a: 2b07 cmp r3, #7 801ba8c: d15f bne.n 801bb4e if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 801ba8e: 687b ldr r3, [r7, #4] 801ba90: 6f9b ldr r3, [r3, #120] @ 0x78 801ba92: 2b00 cmp r3, #0 801ba94: d105 bne.n 801baa2 801ba96: 687b ldr r3, [r7, #4] 801ba98: 8d1b ldrh r3, [r3, #40] @ 0x28 801ba9a: f241 62d0 movw r2, #5840 @ 0x16d0 801ba9e: 4293 cmp r3, r2 801baa0: d055 beq.n 801bb4e /* 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); 801baa2: 687b ldr r3, [r7, #4] 801baa4: 8b5b ldrh r3, [r3, #26] 801baa6: f003 0310 and.w r3, r3, #16 801baaa: 2b00 cmp r3, #0 801baac: d106 bne.n 801babc 801baae: 4b52 ldr r3, [pc, #328] @ (801bbf8 ) 801bab0: f44f 72b2 mov.w r2, #356 @ 0x164 801bab4: 4953 ldr r1, [pc, #332] @ (801bc04 ) 801bab6: 4852 ldr r0, [pc, #328] @ (801bc00 ) 801bab8: f00e fed8 bl 802a86c /* 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, 801babc: 687b ldr r3, [r7, #4] 801babe: 6d18 ldr r0, [r3, #80] @ 0x50 801bac0: 687b ldr r3, [r7, #4] 801bac2: 6a5c ldr r4, [r3, #36] @ 0x24 801bac4: 687d ldr r5, [r7, #4] 801bac6: 687b ldr r3, [r7, #4] 801bac8: 3304 adds r3, #4 801baca: 687a ldr r2, [r7, #4] 801bacc: 8ad2 ldrh r2, [r2, #22] 801bace: 6879 ldr r1, [r7, #4] 801bad0: 8b09 ldrh r1, [r1, #24] 801bad2: 9102 str r1, [sp, #8] 801bad4: 9201 str r2, [sp, #4] 801bad6: 9300 str r3, [sp, #0] 801bad8: 462b mov r3, r5 801bada: 4622 mov r2, r4 801badc: 4601 mov r1, r0 801bade: 6878 ldr r0, [r7, #4] 801bae0: f005 fdfa bl 80216d8 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 801bae4: 6878 ldr r0, [r7, #4] 801bae6: f001 fb67 bl 801d1b8 TCP_RMV_ACTIVE(pcb); 801baea: 4b47 ldr r3, [pc, #284] @ (801bc08 ) 801baec: 681b ldr r3, [r3, #0] 801baee: 687a ldr r2, [r7, #4] 801baf0: 429a cmp r2, r3 801baf2: d105 bne.n 801bb00 801baf4: 4b44 ldr r3, [pc, #272] @ (801bc08 ) 801baf6: 681b ldr r3, [r3, #0] 801baf8: 68db ldr r3, [r3, #12] 801bafa: 4a43 ldr r2, [pc, #268] @ (801bc08 ) 801bafc: 6013 str r3, [r2, #0] 801bafe: e013 b.n 801bb28 801bb00: 4b41 ldr r3, [pc, #260] @ (801bc08 ) 801bb02: 681b ldr r3, [r3, #0] 801bb04: 60fb str r3, [r7, #12] 801bb06: e00c b.n 801bb22 801bb08: 68fb ldr r3, [r7, #12] 801bb0a: 68db ldr r3, [r3, #12] 801bb0c: 687a ldr r2, [r7, #4] 801bb0e: 429a cmp r2, r3 801bb10: d104 bne.n 801bb1c 801bb12: 687b ldr r3, [r7, #4] 801bb14: 68da ldr r2, [r3, #12] 801bb16: 68fb ldr r3, [r7, #12] 801bb18: 60da str r2, [r3, #12] 801bb1a: e005 b.n 801bb28 801bb1c: 68fb ldr r3, [r7, #12] 801bb1e: 68db ldr r3, [r3, #12] 801bb20: 60fb str r3, [r7, #12] 801bb22: 68fb ldr r3, [r7, #12] 801bb24: 2b00 cmp r3, #0 801bb26: d1ef bne.n 801bb08 801bb28: 687b ldr r3, [r7, #4] 801bb2a: 2200 movs r2, #0 801bb2c: 60da str r2, [r3, #12] 801bb2e: 4b37 ldr r3, [pc, #220] @ (801bc0c ) 801bb30: 2201 movs r2, #1 801bb32: 701a strb r2, [r3, #0] /* Deallocate the pcb since we already sent a RST for it */ if (tcp_input_pcb == pcb) { 801bb34: 4b36 ldr r3, [pc, #216] @ (801bc10 ) 801bb36: 681b ldr r3, [r3, #0] 801bb38: 687a ldr r2, [r7, #4] 801bb3a: 429a cmp r2, r3 801bb3c: d102 bne.n 801bb44 /* prevent using a deallocated pcb: free it from tcp_input later */ tcp_trigger_input_pcb_close(); 801bb3e: f003 ffff bl 801fb40 801bb42: e002 b.n 801bb4a } else { tcp_free(pcb); 801bb44: 6878 ldr r0, [r7, #4] 801bb46: f7ff fed5 bl 801b8f4 } return ERR_OK; 801bb4a: 2300 movs r3, #0 801bb4c: e050 b.n 801bbf0 } } /* - 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) { 801bb4e: 687b ldr r3, [r7, #4] 801bb50: 7d1b ldrb r3, [r3, #20] 801bb52: 2b02 cmp r3, #2 801bb54: d03b beq.n 801bbce 801bb56: 2b02 cmp r3, #2 801bb58: dc44 bgt.n 801bbe4 801bb5a: 2b00 cmp r3, #0 801bb5c: d002 beq.n 801bb64 801bb5e: 2b01 cmp r3, #1 801bb60: d02a beq.n 801bbb8 801bb62: e03f b.n 801bbe4 * 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) { 801bb64: 687b ldr r3, [r7, #4] 801bb66: 8adb ldrh r3, [r3, #22] 801bb68: 2b00 cmp r3, #0 801bb6a: d021 beq.n 801bbb0 TCP_RMV(&tcp_bound_pcbs, pcb); 801bb6c: 4b29 ldr r3, [pc, #164] @ (801bc14 ) 801bb6e: 681b ldr r3, [r3, #0] 801bb70: 687a ldr r2, [r7, #4] 801bb72: 429a cmp r2, r3 801bb74: d105 bne.n 801bb82 801bb76: 4b27 ldr r3, [pc, #156] @ (801bc14 ) 801bb78: 681b ldr r3, [r3, #0] 801bb7a: 68db ldr r3, [r3, #12] 801bb7c: 4a25 ldr r2, [pc, #148] @ (801bc14 ) 801bb7e: 6013 str r3, [r2, #0] 801bb80: e013 b.n 801bbaa 801bb82: 4b24 ldr r3, [pc, #144] @ (801bc14 ) 801bb84: 681b ldr r3, [r3, #0] 801bb86: 60bb str r3, [r7, #8] 801bb88: e00c b.n 801bba4 801bb8a: 68bb ldr r3, [r7, #8] 801bb8c: 68db ldr r3, [r3, #12] 801bb8e: 687a ldr r2, [r7, #4] 801bb90: 429a cmp r2, r3 801bb92: d104 bne.n 801bb9e 801bb94: 687b ldr r3, [r7, #4] 801bb96: 68da ldr r2, [r3, #12] 801bb98: 68bb ldr r3, [r7, #8] 801bb9a: 60da str r2, [r3, #12] 801bb9c: e005 b.n 801bbaa 801bb9e: 68bb ldr r3, [r7, #8] 801bba0: 68db ldr r3, [r3, #12] 801bba2: 60bb str r3, [r7, #8] 801bba4: 68bb ldr r3, [r7, #8] 801bba6: 2b00 cmp r3, #0 801bba8: d1ef bne.n 801bb8a 801bbaa: 687b ldr r3, [r7, #4] 801bbac: 2200 movs r2, #0 801bbae: 60da str r2, [r3, #12] } tcp_free(pcb); 801bbb0: 6878 ldr r0, [r7, #4] 801bbb2: f7ff fe9f bl 801b8f4 break; 801bbb6: e01a b.n 801bbee case LISTEN: tcp_listen_closed(pcb); 801bbb8: 6878 ldr r0, [r7, #4] 801bbba: f7ff ff13 bl 801b9e4 tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 801bbbe: 6879 ldr r1, [r7, #4] 801bbc0: 4815 ldr r0, [pc, #84] @ (801bc18 ) 801bbc2: f001 fb49 bl 801d258 tcp_free_listen(pcb); 801bbc6: 6878 ldr r0, [r7, #4] 801bbc8: f7ff feb0 bl 801b92c break; 801bbcc: e00f b.n 801bbee case SYN_SENT: TCP_PCB_REMOVE_ACTIVE(pcb); 801bbce: 6879 ldr r1, [r7, #4] 801bbd0: 480d ldr r0, [pc, #52] @ (801bc08 ) 801bbd2: f001 fb41 bl 801d258 801bbd6: 4b0d ldr r3, [pc, #52] @ (801bc0c ) 801bbd8: 2201 movs r2, #1 801bbda: 701a strb r2, [r3, #0] tcp_free(pcb); 801bbdc: 6878 ldr r0, [r7, #4] 801bbde: f7ff fe89 bl 801b8f4 MIB2_STATS_INC(mib2.tcpattemptfails); break; 801bbe2: e004 b.n 801bbee default: return tcp_close_shutdown_fin(pcb); 801bbe4: 6878 ldr r0, [r7, #4] 801bbe6: f000 f819 bl 801bc1c 801bbea: 4603 mov r3, r0 801bbec: e000 b.n 801bbf0 } return ERR_OK; 801bbee: 2300 movs r3, #0 } 801bbf0: 4618 mov r0, r3 801bbf2: 3710 adds r7, #16 801bbf4: 46bd mov sp, r7 801bbf6: bdb0 pop {r4, r5, r7, pc} 801bbf8: 0802f5a8 .word 0x0802f5a8 801bbfc: 0802f67c .word 0x0802f67c 801bc00: 0802f5ec .word 0x0802f5ec 801bc04: 0802f69c .word 0x0802f69c 801bc08: 2402af74 .word 0x2402af74 801bc0c: 2402af7c .word 0x2402af7c 801bc10: 2402afb8 .word 0x2402afb8 801bc14: 2402af6c .word 0x2402af6c 801bc18: 2402af70 .word 0x2402af70 0801bc1c : static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb) { 801bc1c: b580 push {r7, lr} 801bc1e: b084 sub sp, #16 801bc20: af00 add r7, sp, #0 801bc22: 6078 str r0, [r7, #4] err_t err; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801bc24: 687b ldr r3, [r7, #4] 801bc26: 2b00 cmp r3, #0 801bc28: d106 bne.n 801bc38 801bc2a: 4b2e ldr r3, [pc, #184] @ (801bce4 ) 801bc2c: f44f 72ce mov.w r2, #412 @ 0x19c 801bc30: 492d ldr r1, [pc, #180] @ (801bce8 ) 801bc32: 482e ldr r0, [pc, #184] @ (801bcec ) 801bc34: f00e fe1a bl 802a86c switch (pcb->state) { 801bc38: 687b ldr r3, [r7, #4] 801bc3a: 7d1b ldrb r3, [r3, #20] 801bc3c: 2b07 cmp r3, #7 801bc3e: d020 beq.n 801bc82 801bc40: 2b07 cmp r3, #7 801bc42: dc2b bgt.n 801bc9c 801bc44: 2b03 cmp r3, #3 801bc46: d002 beq.n 801bc4e 801bc48: 2b04 cmp r3, #4 801bc4a: d00d beq.n 801bc68 801bc4c: e026 b.n 801bc9c case SYN_RCVD: err = tcp_send_fin(pcb); 801bc4e: 6878 ldr r0, [r7, #4] 801bc50: f004 fe42 bl 80208d8 801bc54: 4603 mov r3, r0 801bc56: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bc58: f997 300f ldrsb.w r3, [r7, #15] 801bc5c: 2b00 cmp r3, #0 801bc5e: d11f bne.n 801bca0 tcp_backlog_accepted(pcb); MIB2_STATS_INC(mib2.tcpattemptfails); pcb->state = FIN_WAIT_1; 801bc60: 687b ldr r3, [r7, #4] 801bc62: 2205 movs r2, #5 801bc64: 751a strb r2, [r3, #20] } break; 801bc66: e01b b.n 801bca0 case ESTABLISHED: err = tcp_send_fin(pcb); 801bc68: 6878 ldr r0, [r7, #4] 801bc6a: f004 fe35 bl 80208d8 801bc6e: 4603 mov r3, r0 801bc70: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bc72: f997 300f ldrsb.w r3, [r7, #15] 801bc76: 2b00 cmp r3, #0 801bc78: d114 bne.n 801bca4 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = FIN_WAIT_1; 801bc7a: 687b ldr r3, [r7, #4] 801bc7c: 2205 movs r2, #5 801bc7e: 751a strb r2, [r3, #20] } break; 801bc80: e010 b.n 801bca4 case CLOSE_WAIT: err = tcp_send_fin(pcb); 801bc82: 6878 ldr r0, [r7, #4] 801bc84: f004 fe28 bl 80208d8 801bc88: 4603 mov r3, r0 801bc8a: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bc8c: f997 300f ldrsb.w r3, [r7, #15] 801bc90: 2b00 cmp r3, #0 801bc92: d109 bne.n 801bca8 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = LAST_ACK; 801bc94: 687b ldr r3, [r7, #4] 801bc96: 2209 movs r2, #9 801bc98: 751a strb r2, [r3, #20] } break; 801bc9a: e005 b.n 801bca8 default: /* Has already been closed, do nothing. */ return ERR_OK; 801bc9c: 2300 movs r3, #0 801bc9e: e01c b.n 801bcda break; 801bca0: bf00 nop 801bca2: e002 b.n 801bcaa break; 801bca4: bf00 nop 801bca6: e000 b.n 801bcaa break; 801bca8: bf00 nop } if (err == ERR_OK) { 801bcaa: f997 300f ldrsb.w r3, [r7, #15] 801bcae: 2b00 cmp r3, #0 801bcb0: d103 bne.n 801bcba /* 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); 801bcb2: 6878 ldr r0, [r7, #4] 801bcb4: f004 ff4e bl 8020b54 801bcb8: e00d b.n 801bcd6 } else if (err == ERR_MEM) { 801bcba: f997 300f ldrsb.w r3, [r7, #15] 801bcbe: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801bcc2: d108 bne.n 801bcd6 /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ tcp_set_flags(pcb, TF_CLOSEPEND); 801bcc4: 687b ldr r3, [r7, #4] 801bcc6: 8b5b ldrh r3, [r3, #26] 801bcc8: f043 0308 orr.w r3, r3, #8 801bccc: b29a uxth r2, r3 801bcce: 687b ldr r3, [r7, #4] 801bcd0: 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; 801bcd2: 2300 movs r3, #0 801bcd4: e001 b.n 801bcda } return err; 801bcd6: f997 300f ldrsb.w r3, [r7, #15] } 801bcda: 4618 mov r0, r3 801bcdc: 3710 adds r7, #16 801bcde: 46bd mov sp, r7 801bce0: bd80 pop {r7, pc} 801bce2: bf00 nop 801bce4: 0802f5a8 .word 0x0802f5a8 801bce8: 0802f658 .word 0x0802f658 801bcec: 0802f5ec .word 0x0802f5ec 0801bcf0 : * @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) { 801bcf0: b580 push {r7, lr} 801bcf2: b082 sub sp, #8 801bcf4: af00 add r7, sp, #0 801bcf6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801bcf8: f7f5 f990 bl 801101c LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 801bcfc: 687b ldr r3, [r7, #4] 801bcfe: 2b00 cmp r3, #0 801bd00: d109 bne.n 801bd16 801bd02: 4b0f ldr r3, [pc, #60] @ (801bd40 ) 801bd04: f44f 72f4 mov.w r2, #488 @ 0x1e8 801bd08: 490e ldr r1, [pc, #56] @ (801bd44 ) 801bd0a: 480f ldr r0, [pc, #60] @ (801bd48 ) 801bd0c: f00e fdae bl 802a86c 801bd10: f06f 030f mvn.w r3, #15 801bd14: e00f b.n 801bd36 LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); if (pcb->state != LISTEN) { 801bd16: 687b ldr r3, [r7, #4] 801bd18: 7d1b ldrb r3, [r3, #20] 801bd1a: 2b01 cmp r3, #1 801bd1c: d006 beq.n 801bd2c /* Set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801bd1e: 687b ldr r3, [r7, #4] 801bd20: 8b5b ldrh r3, [r3, #26] 801bd22: f043 0310 orr.w r3, r3, #16 801bd26: b29a uxth r2, r3 801bd28: 687b ldr r3, [r7, #4] 801bd2a: 835a strh r2, [r3, #26] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 801bd2c: 2101 movs r1, #1 801bd2e: 6878 ldr r0, [r7, #4] 801bd30: f7ff fe92 bl 801ba58 801bd34: 4603 mov r3, r0 } 801bd36: 4618 mov r0, r3 801bd38: 3708 adds r7, #8 801bd3a: 46bd mov sp, r7 801bd3c: bd80 pop {r7, pc} 801bd3e: bf00 nop 801bd40: 0802f5a8 .word 0x0802f5a8 801bd44: 0802f6b8 .word 0x0802f6b8 801bd48: 0802f5ec .word 0x0802f5ec 0801bd4c : * @return ERR_OK if shutdown succeeded (or the PCB has already been shut down) * another err_t on error. */ err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) { 801bd4c: b580 push {r7, lr} 801bd4e: b084 sub sp, #16 801bd50: af00 add r7, sp, #0 801bd52: 60f8 str r0, [r7, #12] 801bd54: 60b9 str r1, [r7, #8] 801bd56: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801bd58: f7f5 f960 bl 801101c LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); 801bd5c: 68fb ldr r3, [r7, #12] 801bd5e: 2b00 cmp r3, #0 801bd60: d109 bne.n 801bd76 801bd62: 4b26 ldr r3, [pc, #152] @ (801bdfc ) 801bd64: f240 2207 movw r2, #519 @ 0x207 801bd68: 4925 ldr r1, [pc, #148] @ (801be00 ) 801bd6a: 4826 ldr r0, [pc, #152] @ (801be04 ) 801bd6c: f00e fd7e bl 802a86c 801bd70: f06f 030f mvn.w r3, #15 801bd74: e03d b.n 801bdf2 if (pcb->state == LISTEN) { 801bd76: 68fb ldr r3, [r7, #12] 801bd78: 7d1b ldrb r3, [r3, #20] 801bd7a: 2b01 cmp r3, #1 801bd7c: d102 bne.n 801bd84 return ERR_CONN; 801bd7e: f06f 030a mvn.w r3, #10 801bd82: e036 b.n 801bdf2 } if (shut_rx) { 801bd84: 68bb ldr r3, [r7, #8] 801bd86: 2b00 cmp r3, #0 801bd88: d01b beq.n 801bdc2 /* shut down the receive side: set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801bd8a: 68fb ldr r3, [r7, #12] 801bd8c: 8b5b ldrh r3, [r3, #26] 801bd8e: f043 0310 orr.w r3, r3, #16 801bd92: b29a uxth r2, r3 801bd94: 68fb ldr r3, [r7, #12] 801bd96: 835a strh r2, [r3, #26] if (shut_tx) { 801bd98: 687b ldr r3, [r7, #4] 801bd9a: 2b00 cmp r3, #0 801bd9c: d005 beq.n 801bdaa /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); 801bd9e: 2101 movs r1, #1 801bda0: 68f8 ldr r0, [r7, #12] 801bda2: f7ff fe59 bl 801ba58 801bda6: 4603 mov r3, r0 801bda8: e023 b.n 801bdf2 } /* ... and free buffered data */ if (pcb->refused_data != NULL) { 801bdaa: 68fb ldr r3, [r7, #12] 801bdac: 6f9b ldr r3, [r3, #120] @ 0x78 801bdae: 2b00 cmp r3, #0 801bdb0: d007 beq.n 801bdc2 pbuf_free(pcb->refused_data); 801bdb2: 68fb ldr r3, [r7, #12] 801bdb4: 6f9b ldr r3, [r3, #120] @ 0x78 801bdb6: 4618 mov r0, r3 801bdb8: f7ff fae0 bl 801b37c pcb->refused_data = NULL; 801bdbc: 68fb ldr r3, [r7, #12] 801bdbe: 2200 movs r2, #0 801bdc0: 679a str r2, [r3, #120] @ 0x78 } } if (shut_tx) { 801bdc2: 687b ldr r3, [r7, #4] 801bdc4: 2b00 cmp r3, #0 801bdc6: d013 beq.n 801bdf0 /* This can't happen twice since if it succeeds, the pcb's state is changed. Only close in these states as the others directly deallocate the PCB */ switch (pcb->state) { 801bdc8: 68fb ldr r3, [r7, #12] 801bdca: 7d1b ldrb r3, [r3, #20] 801bdcc: 2b04 cmp r3, #4 801bdce: dc02 bgt.n 801bdd6 801bdd0: 2b03 cmp r3, #3 801bdd2: da02 bge.n 801bdda 801bdd4: e009 b.n 801bdea 801bdd6: 2b07 cmp r3, #7 801bdd8: d107 bne.n 801bdea case SYN_RCVD: case ESTABLISHED: case CLOSE_WAIT: return tcp_close_shutdown(pcb, (u8_t)shut_rx); 801bdda: 68bb ldr r3, [r7, #8] 801bddc: b2db uxtb r3, r3 801bdde: 4619 mov r1, r3 801bde0: 68f8 ldr r0, [r7, #12] 801bde2: f7ff fe39 bl 801ba58 801bde6: 4603 mov r3, r0 801bde8: e003 b.n 801bdf2 default: /* Not (yet?) connected, cannot shutdown the TX side as that would bring us into CLOSED state, where the PCB is deallocated. */ return ERR_CONN; 801bdea: f06f 030a mvn.w r3, #10 801bdee: e000 b.n 801bdf2 } } return ERR_OK; 801bdf0: 2300 movs r3, #0 } 801bdf2: 4618 mov r0, r3 801bdf4: 3710 adds r7, #16 801bdf6: 46bd mov sp, r7 801bdf8: bd80 pop {r7, pc} 801bdfa: bf00 nop 801bdfc: 0802f5a8 .word 0x0802f5a8 801be00: 0802f6d0 .word 0x0802f6d0 801be04: 0802f5ec .word 0x0802f5ec 0801be08 : * @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) { 801be08: b580 push {r7, lr} 801be0a: b08e sub sp, #56 @ 0x38 801be0c: af04 add r7, sp, #16 801be0e: 6078 str r0, [r7, #4] 801be10: 6039 str r1, [r7, #0] #if LWIP_CALLBACK_API tcp_err_fn errf; #endif /* LWIP_CALLBACK_API */ void *errf_arg; LWIP_ASSERT_CORE_LOCKED(); 801be12: f7f5 f903 bl 801101c LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); 801be16: 687b ldr r3, [r7, #4] 801be18: 2b00 cmp r3, #0 801be1a: d107 bne.n 801be2c 801be1c: 4b52 ldr r3, [pc, #328] @ (801bf68 ) 801be1e: f240 223d movw r2, #573 @ 0x23d 801be22: 4952 ldr r1, [pc, #328] @ (801bf6c ) 801be24: 4852 ldr r0, [pc, #328] @ (801bf70 ) 801be26: f00e fd21 bl 802a86c 801be2a: e099 b.n 801bf60 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 801be2c: 687b ldr r3, [r7, #4] 801be2e: 7d1b ldrb r3, [r3, #20] 801be30: 2b01 cmp r3, #1 801be32: d106 bne.n 801be42 801be34: 4b4c ldr r3, [pc, #304] @ (801bf68 ) 801be36: f44f 7210 mov.w r2, #576 @ 0x240 801be3a: 494e ldr r1, [pc, #312] @ (801bf74 ) 801be3c: 484c ldr r0, [pc, #304] @ (801bf70 ) 801be3e: f00e fd15 bl 802a86c 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) { 801be42: 687b ldr r3, [r7, #4] 801be44: 7d1b ldrb r3, [r3, #20] 801be46: 2b0a cmp r3, #10 801be48: d107 bne.n 801be5a tcp_pcb_remove(&tcp_tw_pcbs, pcb); 801be4a: 6879 ldr r1, [r7, #4] 801be4c: 484a ldr r0, [pc, #296] @ (801bf78 ) 801be4e: f001 fa03 bl 801d258 tcp_free(pcb); 801be52: 6878 ldr r0, [r7, #4] 801be54: f7ff fd4e bl 801b8f4 801be58: e082 b.n 801bf60 } else { int send_rst = 0; 801be5a: 2300 movs r3, #0 801be5c: 627b str r3, [r7, #36] @ 0x24 u16_t local_port = 0; 801be5e: 2300 movs r3, #0 801be60: 847b strh r3, [r7, #34] @ 0x22 enum tcp_state last_state; seqno = pcb->snd_nxt; 801be62: 687b ldr r3, [r7, #4] 801be64: 6d1b ldr r3, [r3, #80] @ 0x50 801be66: 61bb str r3, [r7, #24] ackno = pcb->rcv_nxt; 801be68: 687b ldr r3, [r7, #4] 801be6a: 6a5b ldr r3, [r3, #36] @ 0x24 801be6c: 617b str r3, [r7, #20] #if LWIP_CALLBACK_API errf = pcb->errf; 801be6e: 687b ldr r3, [r7, #4] 801be70: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801be74: 613b str r3, [r7, #16] #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 801be76: 687b ldr r3, [r7, #4] 801be78: 691b ldr r3, [r3, #16] 801be7a: 60fb str r3, [r7, #12] if (pcb->state == CLOSED) { 801be7c: 687b ldr r3, [r7, #4] 801be7e: 7d1b ldrb r3, [r3, #20] 801be80: 2b00 cmp r3, #0 801be82: d126 bne.n 801bed2 if (pcb->local_port != 0) { 801be84: 687b ldr r3, [r7, #4] 801be86: 8adb ldrh r3, [r3, #22] 801be88: 2b00 cmp r3, #0 801be8a: d02e beq.n 801beea /* bound, not yet opened */ TCP_RMV(&tcp_bound_pcbs, pcb); 801be8c: 4b3b ldr r3, [pc, #236] @ (801bf7c ) 801be8e: 681b ldr r3, [r3, #0] 801be90: 687a ldr r2, [r7, #4] 801be92: 429a cmp r2, r3 801be94: d105 bne.n 801bea2 801be96: 4b39 ldr r3, [pc, #228] @ (801bf7c ) 801be98: 681b ldr r3, [r3, #0] 801be9a: 68db ldr r3, [r3, #12] 801be9c: 4a37 ldr r2, [pc, #220] @ (801bf7c ) 801be9e: 6013 str r3, [r2, #0] 801bea0: e013 b.n 801beca 801bea2: 4b36 ldr r3, [pc, #216] @ (801bf7c ) 801bea4: 681b ldr r3, [r3, #0] 801bea6: 61fb str r3, [r7, #28] 801bea8: e00c b.n 801bec4 801beaa: 69fb ldr r3, [r7, #28] 801beac: 68db ldr r3, [r3, #12] 801beae: 687a ldr r2, [r7, #4] 801beb0: 429a cmp r2, r3 801beb2: d104 bne.n 801bebe 801beb4: 687b ldr r3, [r7, #4] 801beb6: 68da ldr r2, [r3, #12] 801beb8: 69fb ldr r3, [r7, #28] 801beba: 60da str r2, [r3, #12] 801bebc: e005 b.n 801beca 801bebe: 69fb ldr r3, [r7, #28] 801bec0: 68db ldr r3, [r3, #12] 801bec2: 61fb str r3, [r7, #28] 801bec4: 69fb ldr r3, [r7, #28] 801bec6: 2b00 cmp r3, #0 801bec8: d1ef bne.n 801beaa 801beca: 687b ldr r3, [r7, #4] 801becc: 2200 movs r2, #0 801bece: 60da str r2, [r3, #12] 801bed0: e00b b.n 801beea } } else { send_rst = reset; 801bed2: 683b ldr r3, [r7, #0] 801bed4: 627b str r3, [r7, #36] @ 0x24 local_port = pcb->local_port; 801bed6: 687b ldr r3, [r7, #4] 801bed8: 8adb ldrh r3, [r3, #22] 801beda: 847b strh r3, [r7, #34] @ 0x22 TCP_PCB_REMOVE_ACTIVE(pcb); 801bedc: 6879 ldr r1, [r7, #4] 801bede: 4828 ldr r0, [pc, #160] @ (801bf80 ) 801bee0: f001 f9ba bl 801d258 801bee4: 4b27 ldr r3, [pc, #156] @ (801bf84 ) 801bee6: 2201 movs r2, #1 801bee8: 701a strb r2, [r3, #0] } if (pcb->unacked != NULL) { 801beea: 687b ldr r3, [r7, #4] 801beec: 6f1b ldr r3, [r3, #112] @ 0x70 801beee: 2b00 cmp r3, #0 801bef0: d004 beq.n 801befc tcp_segs_free(pcb->unacked); 801bef2: 687b ldr r3, [r7, #4] 801bef4: 6f1b ldr r3, [r3, #112] @ 0x70 801bef6: 4618 mov r0, r3 801bef8: f000 fe84 bl 801cc04 } if (pcb->unsent != NULL) { 801befc: 687b ldr r3, [r7, #4] 801befe: 6edb ldr r3, [r3, #108] @ 0x6c 801bf00: 2b00 cmp r3, #0 801bf02: d004 beq.n 801bf0e tcp_segs_free(pcb->unsent); 801bf04: 687b ldr r3, [r7, #4] 801bf06: 6edb ldr r3, [r3, #108] @ 0x6c 801bf08: 4618 mov r0, r3 801bf0a: f000 fe7b bl 801cc04 } #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { 801bf0e: 687b ldr r3, [r7, #4] 801bf10: 6f5b ldr r3, [r3, #116] @ 0x74 801bf12: 2b00 cmp r3, #0 801bf14: d004 beq.n 801bf20 tcp_segs_free(pcb->ooseq); 801bf16: 687b ldr r3, [r7, #4] 801bf18: 6f5b ldr r3, [r3, #116] @ 0x74 801bf1a: 4618 mov r0, r3 801bf1c: f000 fe72 bl 801cc04 } #endif /* TCP_QUEUE_OOSEQ */ tcp_backlog_accepted(pcb); if (send_rst) { 801bf20: 6a7b ldr r3, [r7, #36] @ 0x24 801bf22: 2b00 cmp r3, #0 801bf24: d00e beq.n 801bf44 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); 801bf26: 6879 ldr r1, [r7, #4] 801bf28: 687b ldr r3, [r7, #4] 801bf2a: 3304 adds r3, #4 801bf2c: 687a ldr r2, [r7, #4] 801bf2e: 8b12 ldrh r2, [r2, #24] 801bf30: 9202 str r2, [sp, #8] 801bf32: 8c7a ldrh r2, [r7, #34] @ 0x22 801bf34: 9201 str r2, [sp, #4] 801bf36: 9300 str r3, [sp, #0] 801bf38: 460b mov r3, r1 801bf3a: 697a ldr r2, [r7, #20] 801bf3c: 69b9 ldr r1, [r7, #24] 801bf3e: 6878 ldr r0, [r7, #4] 801bf40: f005 fbca bl 80216d8 } last_state = pcb->state; 801bf44: 687b ldr r3, [r7, #4] 801bf46: 7d1b ldrb r3, [r3, #20] 801bf48: 72fb strb r3, [r7, #11] tcp_free(pcb); 801bf4a: 6878 ldr r0, [r7, #4] 801bf4c: f7ff fcd2 bl 801b8f4 TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); 801bf50: 693b ldr r3, [r7, #16] 801bf52: 2b00 cmp r3, #0 801bf54: d004 beq.n 801bf60 801bf56: 693b ldr r3, [r7, #16] 801bf58: f06f 010c mvn.w r1, #12 801bf5c: 68f8 ldr r0, [r7, #12] 801bf5e: 4798 blx r3 } } 801bf60: 3728 adds r7, #40 @ 0x28 801bf62: 46bd mov sp, r7 801bf64: bd80 pop {r7, pc} 801bf66: bf00 nop 801bf68: 0802f5a8 .word 0x0802f5a8 801bf6c: 0802f6ec .word 0x0802f6ec 801bf70: 0802f5ec .word 0x0802f5ec 801bf74: 0802f708 .word 0x0802f708 801bf78: 2402af78 .word 0x2402af78 801bf7c: 2402af6c .word 0x2402af6c 801bf80: 2402af74 .word 0x2402af74 801bf84: 2402af7c .word 0x2402af7c 0801bf88 : * * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { 801bf88: b580 push {r7, lr} 801bf8a: b082 sub sp, #8 801bf8c: af00 add r7, sp, #0 801bf8e: 6078 str r0, [r7, #4] tcp_abandon(pcb, 1); 801bf90: 2101 movs r1, #1 801bf92: 6878 ldr r0, [r7, #4] 801bf94: f7ff ff38 bl 801be08 } 801bf98: bf00 nop 801bf9a: 3708 adds r7, #8 801bf9c: 46bd mov sp, r7 801bf9e: bd80 pop {r7, pc} 0801bfa0 : * 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) { 801bfa0: b580 push {r7, lr} 801bfa2: b084 sub sp, #16 801bfa4: af00 add r7, sp, #0 801bfa6: 6078 str r0, [r7, #4] u32_t new_right_edge; LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 801bfa8: 687b ldr r3, [r7, #4] 801bfaa: 2b00 cmp r3, #0 801bfac: d106 bne.n 801bfbc 801bfae: 4b25 ldr r3, [pc, #148] @ (801c044 ) 801bfb0: f240 32a6 movw r2, #934 @ 0x3a6 801bfb4: 4924 ldr r1, [pc, #144] @ (801c048 ) 801bfb6: 4825 ldr r0, [pc, #148] @ (801c04c ) 801bfb8: f00e fc58 bl 802a86c new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 801bfbc: 687b ldr r3, [r7, #4] 801bfbe: 6a5b ldr r3, [r3, #36] @ 0x24 801bfc0: 687a ldr r2, [r7, #4] 801bfc2: 8d12 ldrh r2, [r2, #40] @ 0x28 801bfc4: 4413 add r3, r2 801bfc6: 60fb str r3, [r7, #12] if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 801bfc8: 687b ldr r3, [r7, #4] 801bfca: 6adb ldr r3, [r3, #44] @ 0x2c 801bfcc: 687a ldr r2, [r7, #4] 801bfce: 8e52 ldrh r2, [r2, #50] @ 0x32 801bfd0: f640 3168 movw r1, #2920 @ 0xb68 801bfd4: 428a cmp r2, r1 801bfd6: bf28 it cs 801bfd8: 460a movcs r2, r1 801bfda: b292 uxth r2, r2 801bfdc: 4413 add r3, r2 801bfde: 68fa ldr r2, [r7, #12] 801bfe0: 1ad3 subs r3, r2, r3 801bfe2: 2b00 cmp r3, #0 801bfe4: db08 blt.n 801bff8 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 801bfe6: 687b ldr r3, [r7, #4] 801bfe8: 8d1a ldrh r2, [r3, #40] @ 0x28 801bfea: 687b ldr r3, [r7, #4] 801bfec: 855a strh r2, [r3, #42] @ 0x2a return new_right_edge - pcb->rcv_ann_right_edge; 801bfee: 687b ldr r3, [r7, #4] 801bff0: 6adb ldr r3, [r3, #44] @ 0x2c 801bff2: 68fa ldr r2, [r7, #12] 801bff4: 1ad3 subs r3, r2, r3 801bff6: e020 b.n 801c03a } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 801bff8: 687b ldr r3, [r7, #4] 801bffa: 6a5a ldr r2, [r3, #36] @ 0x24 801bffc: 687b ldr r3, [r7, #4] 801bffe: 6adb ldr r3, [r3, #44] @ 0x2c 801c000: 1ad3 subs r3, r2, r3 801c002: 2b00 cmp r3, #0 801c004: dd03 ble.n 801c00e /* 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; 801c006: 687b ldr r3, [r7, #4] 801c008: 2200 movs r2, #0 801c00a: 855a strh r2, [r3, #42] @ 0x2a 801c00c: e014 b.n 801c038 } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 801c00e: 687b ldr r3, [r7, #4] 801c010: 6ada ldr r2, [r3, #44] @ 0x2c 801c012: 687b ldr r3, [r7, #4] 801c014: 6a5b ldr r3, [r3, #36] @ 0x24 801c016: 1ad3 subs r3, r2, r3 801c018: 60bb str r3, [r7, #8] #if !LWIP_WND_SCALE LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 801c01a: 68bb ldr r3, [r7, #8] 801c01c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801c020: d306 bcc.n 801c030 801c022: 4b08 ldr r3, [pc, #32] @ (801c044 ) 801c024: f240 32b6 movw r2, #950 @ 0x3b6 801c028: 4909 ldr r1, [pc, #36] @ (801c050 ) 801c02a: 4808 ldr r0, [pc, #32] @ (801c04c ) 801c02c: f00e fc1e bl 802a86c #endif pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; 801c030: 68bb ldr r3, [r7, #8] 801c032: b29a uxth r2, r3 801c034: 687b ldr r3, [r7, #4] 801c036: 855a strh r2, [r3, #42] @ 0x2a } return 0; 801c038: 2300 movs r3, #0 } } 801c03a: 4618 mov r0, r3 801c03c: 3710 adds r7, #16 801c03e: 46bd mov sp, r7 801c040: bd80 pop {r7, pc} 801c042: bf00 nop 801c044: 0802f5a8 .word 0x0802f5a8 801c048: 0802f804 .word 0x0802f804 801c04c: 0802f5ec .word 0x0802f5ec 801c050: 0802f828 .word 0x0802f828 0801c054 : * @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) { 801c054: b580 push {r7, lr} 801c056: b084 sub sp, #16 801c058: af00 add r7, sp, #0 801c05a: 6078 str r0, [r7, #4] 801c05c: 460b mov r3, r1 801c05e: 807b strh r3, [r7, #2] u32_t wnd_inflation; tcpwnd_size_t rcv_wnd; LWIP_ASSERT_CORE_LOCKED(); 801c060: f7f4 ffdc bl 801101c LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); 801c064: 687b ldr r3, [r7, #4] 801c066: 2b00 cmp r3, #0 801c068: d107 bne.n 801c07a 801c06a: 4b20 ldr r3, [pc, #128] @ (801c0ec ) 801c06c: f240 32cf movw r2, #975 @ 0x3cf 801c070: 491f ldr r1, [pc, #124] @ (801c0f0 ) 801c072: 4820 ldr r0, [pc, #128] @ (801c0f4 ) 801c074: f00e fbfa bl 802a86c 801c078: e034 b.n 801c0e4 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 801c07a: 687b ldr r3, [r7, #4] 801c07c: 7d1b ldrb r3, [r3, #20] 801c07e: 2b01 cmp r3, #1 801c080: d106 bne.n 801c090 801c082: 4b1a ldr r3, [pc, #104] @ (801c0ec ) 801c084: f240 32d2 movw r2, #978 @ 0x3d2 801c088: 491b ldr r1, [pc, #108] @ (801c0f8 ) 801c08a: 481a ldr r0, [pc, #104] @ (801c0f4 ) 801c08c: f00e fbee bl 802a86c pcb->state != LISTEN); rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); 801c090: 687b ldr r3, [r7, #4] 801c092: 8d1a ldrh r2, [r3, #40] @ 0x28 801c094: 887b ldrh r3, [r7, #2] 801c096: 4413 add r3, r2 801c098: 81fb strh r3, [r7, #14] if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { 801c09a: 89fb ldrh r3, [r7, #14] 801c09c: f241 62d0 movw r2, #5840 @ 0x16d0 801c0a0: 4293 cmp r3, r2 801c0a2: d804 bhi.n 801c0ae 801c0a4: 687b ldr r3, [r7, #4] 801c0a6: 8d1b ldrh r3, [r3, #40] @ 0x28 801c0a8: 89fa ldrh r2, [r7, #14] 801c0aa: 429a cmp r2, r3 801c0ac: d204 bcs.n 801c0b8 /* 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); 801c0ae: 687b ldr r3, [r7, #4] 801c0b0: f241 62d0 movw r2, #5840 @ 0x16d0 801c0b4: 851a strh r2, [r3, #40] @ 0x28 801c0b6: e002 b.n 801c0be } else { pcb->rcv_wnd = rcv_wnd; 801c0b8: 687b ldr r3, [r7, #4] 801c0ba: 89fa ldrh r2, [r7, #14] 801c0bc: 851a strh r2, [r3, #40] @ 0x28 } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 801c0be: 6878 ldr r0, [r7, #4] 801c0c0: f7ff ff6e bl 801bfa0 801c0c4: 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) { 801c0c6: 68bb ldr r3, [r7, #8] 801c0c8: f240 52b3 movw r2, #1459 @ 0x5b3 801c0cc: 4293 cmp r3, r2 801c0ce: d909 bls.n 801c0e4 tcp_ack_now(pcb); 801c0d0: 687b ldr r3, [r7, #4] 801c0d2: 8b5b ldrh r3, [r3, #26] 801c0d4: f043 0302 orr.w r3, r3, #2 801c0d8: b29a uxth r2, r3 801c0da: 687b ldr r3, [r7, #4] 801c0dc: 835a strh r2, [r3, #26] tcp_output(pcb); 801c0de: 6878 ldr r0, [r7, #4] 801c0e0: f004 fd38 bl 8020b54 } 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))); } 801c0e4: 3710 adds r7, #16 801c0e6: 46bd mov sp, r7 801c0e8: bd80 pop {r7, pc} 801c0ea: bf00 nop 801c0ec: 0802f5a8 .word 0x0802f5a8 801c0f0: 0802f844 .word 0x0802f844 801c0f4: 0802f5ec .word 0x0802f5ec 801c0f8: 0802f85c .word 0x0802f85c 0801c0fc : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 801c0fc: b480 push {r7} 801c0fe: b083 sub sp, #12 801c100: af00 add r7, sp, #0 u8_t i; u16_t n = 0; 801c102: 2300 movs r3, #0 801c104: 80bb strh r3, [r7, #4] struct tcp_pcb *pcb; again: tcp_port++; 801c106: 4b1e ldr r3, [pc, #120] @ (801c180 ) 801c108: 881b ldrh r3, [r3, #0] 801c10a: 3301 adds r3, #1 801c10c: b29a uxth r2, r3 801c10e: 4b1c ldr r3, [pc, #112] @ (801c180 ) 801c110: 801a strh r2, [r3, #0] if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { 801c112: 4b1b ldr r3, [pc, #108] @ (801c180 ) 801c114: 881b ldrh r3, [r3, #0] 801c116: f64f 72ff movw r2, #65535 @ 0xffff 801c11a: 4293 cmp r3, r2 801c11c: d103 bne.n 801c126 tcp_port = TCP_LOCAL_PORT_RANGE_START; 801c11e: 4b18 ldr r3, [pc, #96] @ (801c180 ) 801c120: f44f 4240 mov.w r2, #49152 @ 0xc000 801c124: 801a strh r2, [r3, #0] } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801c126: 2300 movs r3, #0 801c128: 71fb strb r3, [r7, #7] 801c12a: e01e b.n 801c16a for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801c12c: 79fb ldrb r3, [r7, #7] 801c12e: 4a15 ldr r2, [pc, #84] @ (801c184 ) 801c130: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801c134: 681b ldr r3, [r3, #0] 801c136: 603b str r3, [r7, #0] 801c138: e011 b.n 801c15e if (pcb->local_port == tcp_port) { 801c13a: 683b ldr r3, [r7, #0] 801c13c: 8ada ldrh r2, [r3, #22] 801c13e: 4b10 ldr r3, [pc, #64] @ (801c180 ) 801c140: 881b ldrh r3, [r3, #0] 801c142: 429a cmp r2, r3 801c144: d108 bne.n 801c158 n++; 801c146: 88bb ldrh r3, [r7, #4] 801c148: 3301 adds r3, #1 801c14a: 80bb strh r3, [r7, #4] if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 801c14c: 88bb ldrh r3, [r7, #4] 801c14e: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 801c152: d3d8 bcc.n 801c106 return 0; 801c154: 2300 movs r3, #0 801c156: e00d b.n 801c174 for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801c158: 683b ldr r3, [r7, #0] 801c15a: 68db ldr r3, [r3, #12] 801c15c: 603b str r3, [r7, #0] 801c15e: 683b ldr r3, [r7, #0] 801c160: 2b00 cmp r3, #0 801c162: d1ea bne.n 801c13a for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801c164: 79fb ldrb r3, [r7, #7] 801c166: 3301 adds r3, #1 801c168: 71fb strb r3, [r7, #7] 801c16a: 79fb ldrb r3, [r7, #7] 801c16c: 2b03 cmp r3, #3 801c16e: d9dd bls.n 801c12c } goto again; } } } return tcp_port; 801c170: 4b03 ldr r3, [pc, #12] @ (801c180 ) 801c172: 881b ldrh r3, [r3, #0] } 801c174: 4618 mov r0, r3 801c176: 370c adds r7, #12 801c178: 46bd mov sp, r7 801c17a: f85d 7b04 ldr.w r7, [sp], #4 801c17e: 4770 bx lr 801c180: 2400004c .word 0x2400004c 801c184: 08031c40 .word 0x08031c40 0801c188 : * other err_t values if connect request couldn't be sent */ err_t tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected) { 801c188: b580 push {r7, lr} 801c18a: b08a sub sp, #40 @ 0x28 801c18c: af00 add r7, sp, #0 801c18e: 60f8 str r0, [r7, #12] 801c190: 60b9 str r1, [r7, #8] 801c192: 603b str r3, [r7, #0] 801c194: 4613 mov r3, r2 801c196: 80fb strh r3, [r7, #6] struct netif *netif = NULL; 801c198: 2300 movs r3, #0 801c19a: 627b str r3, [r7, #36] @ 0x24 err_t ret; u32_t iss; u16_t old_local_port; LWIP_ASSERT_CORE_LOCKED(); 801c19c: f7f4 ff3e bl 801101c LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 801c1a0: 68fb ldr r3, [r7, #12] 801c1a2: 2b00 cmp r3, #0 801c1a4: d109 bne.n 801c1ba 801c1a6: 4b7d ldr r3, [pc, #500] @ (801c39c ) 801c1a8: f240 4235 movw r2, #1077 @ 0x435 801c1ac: 497c ldr r1, [pc, #496] @ (801c3a0 ) 801c1ae: 487d ldr r0, [pc, #500] @ (801c3a4 ) 801c1b0: f00e fb5c bl 802a86c 801c1b4: f06f 030f mvn.w r3, #15 801c1b8: e0ec b.n 801c394 LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 801c1ba: 68bb ldr r3, [r7, #8] 801c1bc: 2b00 cmp r3, #0 801c1be: d109 bne.n 801c1d4 801c1c0: 4b76 ldr r3, [pc, #472] @ (801c39c ) 801c1c2: f240 4236 movw r2, #1078 @ 0x436 801c1c6: 4978 ldr r1, [pc, #480] @ (801c3a8 ) 801c1c8: 4876 ldr r0, [pc, #472] @ (801c3a4 ) 801c1ca: f00e fb4f bl 802a86c 801c1ce: f06f 030f mvn.w r3, #15 801c1d2: e0df b.n 801c394 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 801c1d4: 68fb ldr r3, [r7, #12] 801c1d6: 7d1b ldrb r3, [r3, #20] 801c1d8: 2b00 cmp r3, #0 801c1da: d009 beq.n 801c1f0 801c1dc: 4b6f ldr r3, [pc, #444] @ (801c39c ) 801c1de: f44f 6287 mov.w r2, #1080 @ 0x438 801c1e2: 4972 ldr r1, [pc, #456] @ (801c3ac ) 801c1e4: 486f ldr r0, [pc, #444] @ (801c3a4 ) 801c1e6: f00e fb41 bl 802a86c 801c1ea: f06f 0309 mvn.w r3, #9 801c1ee: e0d1 b.n 801c394 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); ip_addr_set(&pcb->remote_ip, ipaddr); 801c1f0: 68bb ldr r3, [r7, #8] 801c1f2: 2b00 cmp r3, #0 801c1f4: d002 beq.n 801c1fc 801c1f6: 68bb ldr r3, [r7, #8] 801c1f8: 681b ldr r3, [r3, #0] 801c1fa: e000 b.n 801c1fe 801c1fc: 2300 movs r3, #0 801c1fe: 68fa ldr r2, [r7, #12] 801c200: 6053 str r3, [r2, #4] pcb->remote_port = port; 801c202: 68fb ldr r3, [r7, #12] 801c204: 88fa ldrh r2, [r7, #6] 801c206: 831a strh r2, [r3, #24] if (pcb->netif_idx != NETIF_NO_INDEX) { 801c208: 68fb ldr r3, [r7, #12] 801c20a: 7a1b ldrb r3, [r3, #8] 801c20c: 2b00 cmp r3, #0 801c20e: d006 beq.n 801c21e netif = netif_get_by_index(pcb->netif_idx); 801c210: 68fb ldr r3, [r7, #12] 801c212: 7a1b ldrb r3, [r3, #8] 801c214: 4618 mov r0, r3 801c216: f7fe fcf1 bl 801abfc 801c21a: 6278 str r0, [r7, #36] @ 0x24 801c21c: e005 b.n 801c22a } else { /* check if we have a route to the remote host */ netif = ip_route(&pcb->local_ip, &pcb->remote_ip); 801c21e: 68fb ldr r3, [r7, #12] 801c220: 3304 adds r3, #4 801c222: 4618 mov r0, r3 801c224: f009 fb14 bl 8025850 801c228: 6278 str r0, [r7, #36] @ 0x24 } if (netif == NULL) { 801c22a: 6a7b ldr r3, [r7, #36] @ 0x24 801c22c: 2b00 cmp r3, #0 801c22e: d102 bne.n 801c236 /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; 801c230: f06f 0303 mvn.w r3, #3 801c234: e0ae b.n 801c394 } /* check if local IP has been assigned to pcb, if not, get one */ if (ip_addr_isany(&pcb->local_ip)) { 801c236: 68fb ldr r3, [r7, #12] 801c238: 2b00 cmp r3, #0 801c23a: d003 beq.n 801c244 801c23c: 68fb ldr r3, [r7, #12] 801c23e: 681b ldr r3, [r3, #0] 801c240: 2b00 cmp r3, #0 801c242: d111 bne.n 801c268 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, ipaddr); 801c244: 6a7b ldr r3, [r7, #36] @ 0x24 801c246: 2b00 cmp r3, #0 801c248: d002 beq.n 801c250 801c24a: 6a7b ldr r3, [r7, #36] @ 0x24 801c24c: 3304 adds r3, #4 801c24e: e000 b.n 801c252 801c250: 2300 movs r3, #0 801c252: 61fb str r3, [r7, #28] if (local_ip == NULL) { 801c254: 69fb ldr r3, [r7, #28] 801c256: 2b00 cmp r3, #0 801c258: d102 bne.n 801c260 return ERR_RTE; 801c25a: f06f 0303 mvn.w r3, #3 801c25e: e099 b.n 801c394 } ip_addr_copy(pcb->local_ip, *local_ip); 801c260: 69fb ldr r3, [r7, #28] 801c262: 681a ldr r2, [r3, #0] 801c264: 68fb ldr r3, [r7, #12] 801c266: 601a str r2, [r3, #0] ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST)) { ip6_addr_assign_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNICAST, netif); } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ old_local_port = pcb->local_port; 801c268: 68fb ldr r3, [r7, #12] 801c26a: 8adb ldrh r3, [r3, #22] 801c26c: 837b strh r3, [r7, #26] if (pcb->local_port == 0) { 801c26e: 68fb ldr r3, [r7, #12] 801c270: 8adb ldrh r3, [r3, #22] 801c272: 2b00 cmp r3, #0 801c274: d10c bne.n 801c290 pcb->local_port = tcp_new_port(); 801c276: f7ff ff41 bl 801c0fc 801c27a: 4603 mov r3, r0 801c27c: 461a mov r2, r3 801c27e: 68fb ldr r3, [r7, #12] 801c280: 82da strh r2, [r3, #22] if (pcb->local_port == 0) { 801c282: 68fb ldr r3, [r7, #12] 801c284: 8adb ldrh r3, [r3, #22] 801c286: 2b00 cmp r3, #0 801c288: d102 bne.n 801c290 return ERR_BUF; 801c28a: f06f 0301 mvn.w r3, #1 801c28e: e081 b.n 801c394 } } #endif /* SO_REUSE */ } iss = tcp_next_iss(pcb); 801c290: 68f8 ldr r0, [r7, #12] 801c292: f001 f875 bl 801d380 801c296: 6178 str r0, [r7, #20] pcb->rcv_nxt = 0; 801c298: 68fb ldr r3, [r7, #12] 801c29a: 2200 movs r2, #0 801c29c: 625a str r2, [r3, #36] @ 0x24 pcb->snd_nxt = iss; 801c29e: 68fb ldr r3, [r7, #12] 801c2a0: 697a ldr r2, [r7, #20] 801c2a2: 651a str r2, [r3, #80] @ 0x50 pcb->lastack = iss - 1; 801c2a4: 697b ldr r3, [r7, #20] 801c2a6: 1e5a subs r2, r3, #1 801c2a8: 68fb ldr r3, [r7, #12] 801c2aa: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wl2 = iss - 1; 801c2ac: 697b ldr r3, [r7, #20] 801c2ae: 1e5a subs r2, r3, #1 801c2b0: 68fb ldr r3, [r7, #12] 801c2b2: 659a str r2, [r3, #88] @ 0x58 pcb->snd_lbb = iss - 1; 801c2b4: 697b ldr r3, [r7, #20] 801c2b6: 1e5a subs r2, r3, #1 801c2b8: 68fb ldr r3, [r7, #12] 801c2ba: 65da str r2, [r3, #92] @ 0x5c /* 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); 801c2bc: 68fb ldr r3, [r7, #12] 801c2be: f241 62d0 movw r2, #5840 @ 0x16d0 801c2c2: 855a strh r2, [r3, #42] @ 0x2a 801c2c4: 68fb ldr r3, [r7, #12] 801c2c6: 8d5a ldrh r2, [r3, #42] @ 0x2a 801c2c8: 68fb ldr r3, [r7, #12] 801c2ca: 851a strh r2, [r3, #40] @ 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801c2cc: 68fb ldr r3, [r7, #12] 801c2ce: 6a5a ldr r2, [r3, #36] @ 0x24 801c2d0: 68fb ldr r3, [r7, #12] 801c2d2: 62da str r2, [r3, #44] @ 0x2c pcb->snd_wnd = TCP_WND; 801c2d4: 68fb ldr r3, [r7, #12] 801c2d6: f241 62d0 movw r2, #5840 @ 0x16d0 801c2da: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 /* 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; 801c2de: 68fb ldr r3, [r7, #12] 801c2e0: f44f 7206 mov.w r2, #536 @ 0x218 801c2e4: 865a strh r2, [r3, #50] @ 0x32 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip); 801c2e6: 68fb ldr r3, [r7, #12] 801c2e8: 8e58 ldrh r0, [r3, #50] @ 0x32 801c2ea: 68fb ldr r3, [r7, #12] 801c2ec: 3304 adds r3, #4 801c2ee: 461a mov r2, r3 801c2f0: 6a79 ldr r1, [r7, #36] @ 0x24 801c2f2: f001 f86b bl 801d3cc 801c2f6: 4603 mov r3, r0 801c2f8: 461a mov r2, r3 801c2fa: 68fb ldr r3, [r7, #12] 801c2fc: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 801c2fe: 68fb ldr r3, [r7, #12] 801c300: 2201 movs r2, #1 801c302: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 #if LWIP_CALLBACK_API pcb->connected = connected; 801c306: 68fb ldr r3, [r7, #12] 801c308: 683a ldr r2, [r7, #0] 801c30a: f8c3 2088 str.w r2, [r3, #136] @ 0x88 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(connected); #endif /* LWIP_CALLBACK_API */ /* Send a SYN together with the MSS option. */ ret = tcp_enqueue_flags(pcb, TCP_SYN); 801c30e: 2102 movs r1, #2 801c310: 68f8 ldr r0, [r7, #12] 801c312: f004 fb31 bl 8020978 801c316: 4603 mov r3, r0 801c318: 74fb strb r3, [r7, #19] if (ret == ERR_OK) { 801c31a: f997 3013 ldrsb.w r3, [r7, #19] 801c31e: 2b00 cmp r3, #0 801c320: d136 bne.n 801c390 /* SYN segment was enqueued, changed the pcbs state now */ pcb->state = SYN_SENT; 801c322: 68fb ldr r3, [r7, #12] 801c324: 2202 movs r2, #2 801c326: 751a strb r2, [r3, #20] if (old_local_port != 0) { 801c328: 8b7b ldrh r3, [r7, #26] 801c32a: 2b00 cmp r3, #0 801c32c: d021 beq.n 801c372 TCP_RMV(&tcp_bound_pcbs, pcb); 801c32e: 4b20 ldr r3, [pc, #128] @ (801c3b0 ) 801c330: 681b ldr r3, [r3, #0] 801c332: 68fa ldr r2, [r7, #12] 801c334: 429a cmp r2, r3 801c336: d105 bne.n 801c344 801c338: 4b1d ldr r3, [pc, #116] @ (801c3b0 ) 801c33a: 681b ldr r3, [r3, #0] 801c33c: 68db ldr r3, [r3, #12] 801c33e: 4a1c ldr r2, [pc, #112] @ (801c3b0 ) 801c340: 6013 str r3, [r2, #0] 801c342: e013 b.n 801c36c 801c344: 4b1a ldr r3, [pc, #104] @ (801c3b0 ) 801c346: 681b ldr r3, [r3, #0] 801c348: 623b str r3, [r7, #32] 801c34a: e00c b.n 801c366 801c34c: 6a3b ldr r3, [r7, #32] 801c34e: 68db ldr r3, [r3, #12] 801c350: 68fa ldr r2, [r7, #12] 801c352: 429a cmp r2, r3 801c354: d104 bne.n 801c360 801c356: 68fb ldr r3, [r7, #12] 801c358: 68da ldr r2, [r3, #12] 801c35a: 6a3b ldr r3, [r7, #32] 801c35c: 60da str r2, [r3, #12] 801c35e: e005 b.n 801c36c 801c360: 6a3b ldr r3, [r7, #32] 801c362: 68db ldr r3, [r3, #12] 801c364: 623b str r3, [r7, #32] 801c366: 6a3b ldr r3, [r7, #32] 801c368: 2b00 cmp r3, #0 801c36a: d1ef bne.n 801c34c 801c36c: 68fb ldr r3, [r7, #12] 801c36e: 2200 movs r2, #0 801c370: 60da str r2, [r3, #12] } TCP_REG_ACTIVE(pcb); 801c372: 4b10 ldr r3, [pc, #64] @ (801c3b4 ) 801c374: 681a ldr r2, [r3, #0] 801c376: 68fb ldr r3, [r7, #12] 801c378: 60da str r2, [r3, #12] 801c37a: 4a0e ldr r2, [pc, #56] @ (801c3b4 ) 801c37c: 68fb ldr r3, [r7, #12] 801c37e: 6013 str r3, [r2, #0] 801c380: f005 fb6c bl 8021a5c 801c384: 4b0c ldr r3, [pc, #48] @ (801c3b8 ) 801c386: 2201 movs r2, #1 801c388: 701a strb r2, [r3, #0] MIB2_STATS_INC(mib2.tcpactiveopens); tcp_output(pcb); 801c38a: 68f8 ldr r0, [r7, #12] 801c38c: f004 fbe2 bl 8020b54 } return ret; 801c390: f997 3013 ldrsb.w r3, [r7, #19] } 801c394: 4618 mov r0, r3 801c396: 3728 adds r7, #40 @ 0x28 801c398: 46bd mov sp, r7 801c39a: bd80 pop {r7, pc} 801c39c: 0802f5a8 .word 0x0802f5a8 801c3a0: 0802f884 .word 0x0802f884 801c3a4: 0802f5ec .word 0x0802f5ec 801c3a8: 0802f8a0 .word 0x0802f8a0 801c3ac: 0802f8bc .word 0x0802f8bc 801c3b0: 2402af6c .word 0x2402af6c 801c3b4: 2402af74 .word 0x2402af74 801c3b8: 2402af7c .word 0x2402af7c 0801c3bc : * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 801c3bc: b5b0 push {r4, r5, r7, lr} 801c3be: b090 sub sp, #64 @ 0x40 801c3c0: 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; 801c3c2: 2300 movs r3, #0 801c3c4: f887 3025 strb.w r3, [r7, #37] @ 0x25 ++tcp_ticks; 801c3c8: 4b95 ldr r3, [pc, #596] @ (801c620 ) 801c3ca: 681b ldr r3, [r3, #0] 801c3cc: 3301 adds r3, #1 801c3ce: 4a94 ldr r2, [pc, #592] @ (801c620 ) 801c3d0: 6013 str r3, [r2, #0] ++tcp_timer_ctr; 801c3d2: 4b94 ldr r3, [pc, #592] @ (801c624 ) 801c3d4: 781b ldrb r3, [r3, #0] 801c3d6: 3301 adds r3, #1 801c3d8: b2da uxtb r2, r3 801c3da: 4b92 ldr r3, [pc, #584] @ (801c624 ) 801c3dc: 701a strb r2, [r3, #0] 801c3de: e000 b.n 801c3e2 prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); if (tcp_active_pcbs_changed) { goto tcp_slowtmr_start; 801c3e0: bf00 nop prev = NULL; 801c3e2: 2300 movs r3, #0 801c3e4: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_active_pcbs; 801c3e6: 4b90 ldr r3, [pc, #576] @ (801c628 ) 801c3e8: 681b ldr r3, [r3, #0] 801c3ea: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801c3ec: e29d b.n 801c92a LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 801c3ee: 6afb ldr r3, [r7, #44] @ 0x2c 801c3f0: 7d1b ldrb r3, [r3, #20] 801c3f2: 2b00 cmp r3, #0 801c3f4: d106 bne.n 801c404 801c3f6: 4b8d ldr r3, [pc, #564] @ (801c62c ) 801c3f8: f240 42be movw r2, #1214 @ 0x4be 801c3fc: 498c ldr r1, [pc, #560] @ (801c630 ) 801c3fe: 488d ldr r0, [pc, #564] @ (801c634 ) 801c400: f00e fa34 bl 802a86c LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 801c404: 6afb ldr r3, [r7, #44] @ 0x2c 801c406: 7d1b ldrb r3, [r3, #20] 801c408: 2b01 cmp r3, #1 801c40a: d106 bne.n 801c41a 801c40c: 4b87 ldr r3, [pc, #540] @ (801c62c ) 801c40e: f240 42bf movw r2, #1215 @ 0x4bf 801c412: 4989 ldr r1, [pc, #548] @ (801c638 ) 801c414: 4887 ldr r0, [pc, #540] @ (801c634 ) 801c416: f00e fa29 bl 802a86c LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 801c41a: 6afb ldr r3, [r7, #44] @ 0x2c 801c41c: 7d1b ldrb r3, [r3, #20] 801c41e: 2b0a cmp r3, #10 801c420: d106 bne.n 801c430 801c422: 4b82 ldr r3, [pc, #520] @ (801c62c ) 801c424: f44f 6298 mov.w r2, #1216 @ 0x4c0 801c428: 4984 ldr r1, [pc, #528] @ (801c63c ) 801c42a: 4882 ldr r0, [pc, #520] @ (801c634 ) 801c42c: f00e fa1e bl 802a86c if (pcb->last_timer == tcp_timer_ctr) { 801c430: 6afb ldr r3, [r7, #44] @ 0x2c 801c432: 7f9a ldrb r2, [r3, #30] 801c434: 4b7b ldr r3, [pc, #492] @ (801c624 ) 801c436: 781b ldrb r3, [r3, #0] 801c438: 429a cmp r2, r3 801c43a: d105 bne.n 801c448 prev = pcb; 801c43c: 6afb ldr r3, [r7, #44] @ 0x2c 801c43e: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801c440: 6afb ldr r3, [r7, #44] @ 0x2c 801c442: 68db ldr r3, [r3, #12] 801c444: 62fb str r3, [r7, #44] @ 0x2c continue; 801c446: e270 b.n 801c92a pcb->last_timer = tcp_timer_ctr; 801c448: 4b76 ldr r3, [pc, #472] @ (801c624 ) 801c44a: 781a ldrb r2, [r3, #0] 801c44c: 6afb ldr r3, [r7, #44] @ 0x2c 801c44e: 779a strb r2, [r3, #30] pcb_remove = 0; 801c450: 2300 movs r3, #0 801c452: f887 3027 strb.w r3, [r7, #39] @ 0x27 pcb_reset = 0; 801c456: 2300 movs r3, #0 801c458: f887 3026 strb.w r3, [r7, #38] @ 0x26 if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 801c45c: 6afb ldr r3, [r7, #44] @ 0x2c 801c45e: 7d1b ldrb r3, [r3, #20] 801c460: 2b02 cmp r3, #2 801c462: d10a bne.n 801c47a 801c464: 6afb ldr r3, [r7, #44] @ 0x2c 801c466: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c46a: 2b05 cmp r3, #5 801c46c: d905 bls.n 801c47a ++pcb_remove; 801c46e: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c472: 3301 adds r3, #1 801c474: f887 3027 strb.w r3, [r7, #39] @ 0x27 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); 801c478: e11e b.n 801c6b8 } else if (pcb->nrtx >= TCP_MAXRTX) { 801c47a: 6afb ldr r3, [r7, #44] @ 0x2c 801c47c: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c480: 2b0b cmp r3, #11 801c482: d905 bls.n 801c490 ++pcb_remove; 801c484: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c488: 3301 adds r3, #1 801c48a: f887 3027 strb.w r3, [r7, #39] @ 0x27 801c48e: e113 b.n 801c6b8 if (pcb->persist_backoff > 0) { 801c490: 6afb ldr r3, [r7, #44] @ 0x2c 801c492: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c496: 2b00 cmp r3, #0 801c498: d075 beq.n 801c586 LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); 801c49a: 6afb ldr r3, [r7, #44] @ 0x2c 801c49c: 6f1b ldr r3, [r3, #112] @ 0x70 801c49e: 2b00 cmp r3, #0 801c4a0: d006 beq.n 801c4b0 801c4a2: 4b62 ldr r3, [pc, #392] @ (801c62c ) 801c4a4: f240 42d4 movw r2, #1236 @ 0x4d4 801c4a8: 4965 ldr r1, [pc, #404] @ (801c640 ) 801c4aa: 4862 ldr r0, [pc, #392] @ (801c634 ) 801c4ac: f00e f9de bl 802a86c LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 801c4b0: 6afb ldr r3, [r7, #44] @ 0x2c 801c4b2: 6edb ldr r3, [r3, #108] @ 0x6c 801c4b4: 2b00 cmp r3, #0 801c4b6: d106 bne.n 801c4c6 801c4b8: 4b5c ldr r3, [pc, #368] @ (801c62c ) 801c4ba: f240 42d5 movw r2, #1237 @ 0x4d5 801c4be: 4961 ldr r1, [pc, #388] @ (801c644 ) 801c4c0: 485c ldr r0, [pc, #368] @ (801c634 ) 801c4c2: f00e f9d3 bl 802a86c if (pcb->persist_probe >= TCP_MAXRTX) { 801c4c6: 6afb ldr r3, [r7, #44] @ 0x2c 801c4c8: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 801c4cc: 2b0b cmp r3, #11 801c4ce: d905 bls.n 801c4dc ++pcb_remove; /* max probes reached */ 801c4d0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c4d4: 3301 adds r3, #1 801c4d6: f887 3027 strb.w r3, [r7, #39] @ 0x27 801c4da: e0ed b.n 801c6b8 u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; 801c4dc: 6afb ldr r3, [r7, #44] @ 0x2c 801c4de: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c4e2: 3b01 subs r3, #1 801c4e4: 4a58 ldr r2, [pc, #352] @ (801c648 ) 801c4e6: 5cd3 ldrb r3, [r2, r3] 801c4e8: 747b strb r3, [r7, #17] if (pcb->persist_cnt < backoff_cnt) { 801c4ea: 6afb ldr r3, [r7, #44] @ 0x2c 801c4ec: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c4f0: 7c7a ldrb r2, [r7, #17] 801c4f2: 429a cmp r2, r3 801c4f4: d907 bls.n 801c506 pcb->persist_cnt++; 801c4f6: 6afb ldr r3, [r7, #44] @ 0x2c 801c4f8: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c4fc: 3301 adds r3, #1 801c4fe: b2da uxtb r2, r3 801c500: 6afb ldr r3, [r7, #44] @ 0x2c 801c502: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_cnt >= backoff_cnt) { 801c506: 6afb ldr r3, [r7, #44] @ 0x2c 801c508: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c50c: 7c7a ldrb r2, [r7, #17] 801c50e: 429a cmp r2, r3 801c510: f200 80d2 bhi.w 801c6b8 int next_slot = 1; /* increment timer to next slot */ 801c514: 2301 movs r3, #1 801c516: 623b str r3, [r7, #32] if (pcb->snd_wnd == 0) { 801c518: 6afb ldr r3, [r7, #44] @ 0x2c 801c51a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801c51e: 2b00 cmp r3, #0 801c520: d108 bne.n 801c534 if (tcp_zero_window_probe(pcb) != ERR_OK) { 801c522: 6af8 ldr r0, [r7, #44] @ 0x2c 801c524: f005 f9cc bl 80218c0 801c528: 4603 mov r3, r0 801c52a: 2b00 cmp r3, #0 801c52c: d014 beq.n 801c558 next_slot = 0; /* try probe again with current slot */ 801c52e: 2300 movs r3, #0 801c530: 623b str r3, [r7, #32] 801c532: e011 b.n 801c558 if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) { 801c534: 6afb ldr r3, [r7, #44] @ 0x2c 801c536: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801c53a: 4619 mov r1, r3 801c53c: 6af8 ldr r0, [r7, #44] @ 0x2c 801c53e: f004 f87f bl 8020640 801c542: 4603 mov r3, r0 801c544: 2b00 cmp r3, #0 801c546: d107 bne.n 801c558 if (tcp_output(pcb) == ERR_OK) { 801c548: 6af8 ldr r0, [r7, #44] @ 0x2c 801c54a: f004 fb03 bl 8020b54 801c54e: 4603 mov r3, r0 801c550: 2b00 cmp r3, #0 801c552: d101 bne.n 801c558 next_slot = 0; 801c554: 2300 movs r3, #0 801c556: 623b str r3, [r7, #32] if (next_slot) { 801c558: 6a3b ldr r3, [r7, #32] 801c55a: 2b00 cmp r3, #0 801c55c: f000 80ac beq.w 801c6b8 pcb->persist_cnt = 0; 801c560: 6afb ldr r3, [r7, #44] @ 0x2c 801c562: 2200 movs r2, #0 801c564: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 801c568: 6afb ldr r3, [r7, #44] @ 0x2c 801c56a: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c56e: 2b06 cmp r3, #6 801c570: f200 80a2 bhi.w 801c6b8 pcb->persist_backoff++; 801c574: 6afb ldr r3, [r7, #44] @ 0x2c 801c576: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c57a: 3301 adds r3, #1 801c57c: b2da uxtb r2, r3 801c57e: 6afb ldr r3, [r7, #44] @ 0x2c 801c580: f883 2099 strb.w r2, [r3, #153] @ 0x99 801c584: e098 b.n 801c6b8 if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { 801c586: 6afb ldr r3, [r7, #44] @ 0x2c 801c588: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c58c: 2b00 cmp r3, #0 801c58e: db0f blt.n 801c5b0 801c590: 6afb ldr r3, [r7, #44] @ 0x2c 801c592: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c596: f647 72ff movw r2, #32767 @ 0x7fff 801c59a: 4293 cmp r3, r2 801c59c: d008 beq.n 801c5b0 ++pcb->rtime; 801c59e: 6afb ldr r3, [r7, #44] @ 0x2c 801c5a0: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c5a4: b29b uxth r3, r3 801c5a6: 3301 adds r3, #1 801c5a8: b29b uxth r3, r3 801c5aa: b21a sxth r2, r3 801c5ac: 6afb ldr r3, [r7, #44] @ 0x2c 801c5ae: 861a strh r2, [r3, #48] @ 0x30 if (pcb->rtime >= pcb->rto) { 801c5b0: 6afb ldr r3, [r7, #44] @ 0x2c 801c5b2: f9b3 2030 ldrsh.w r2, [r3, #48] @ 0x30 801c5b6: 6afb ldr r3, [r7, #44] @ 0x2c 801c5b8: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801c5bc: 429a cmp r2, r3 801c5be: db7b blt.n 801c6b8 if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) { 801c5c0: 6af8 ldr r0, [r7, #44] @ 0x2c 801c5c2: f004 fdbf bl 8021144 801c5c6: 4603 mov r3, r0 801c5c8: 2b00 cmp r3, #0 801c5ca: d007 beq.n 801c5dc 801c5cc: 6afb ldr r3, [r7, #44] @ 0x2c 801c5ce: 6f1b ldr r3, [r3, #112] @ 0x70 801c5d0: 2b00 cmp r3, #0 801c5d2: d171 bne.n 801c6b8 801c5d4: 6afb ldr r3, [r7, #44] @ 0x2c 801c5d6: 6edb ldr r3, [r3, #108] @ 0x6c 801c5d8: 2b00 cmp r3, #0 801c5da: d06d beq.n 801c6b8 if (pcb->state != SYN_SENT) { 801c5dc: 6afb ldr r3, [r7, #44] @ 0x2c 801c5de: 7d1b ldrb r3, [r3, #20] 801c5e0: 2b02 cmp r3, #2 801c5e2: d03a beq.n 801c65a u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); 801c5e4: 6afb ldr r3, [r7, #44] @ 0x2c 801c5e6: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c5ea: 2b0c cmp r3, #12 801c5ec: bf28 it cs 801c5ee: 230c movcs r3, #12 801c5f0: 76fb strb r3, [r7, #27] int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; 801c5f2: 6afb ldr r3, [r7, #44] @ 0x2c 801c5f4: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801c5f8: 10db asrs r3, r3, #3 801c5fa: b21b sxth r3, r3 801c5fc: 461a mov r2, r3 801c5fe: 6afb ldr r3, [r7, #44] @ 0x2c 801c600: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801c604: 4413 add r3, r2 801c606: 7efa ldrb r2, [r7, #27] 801c608: 4910 ldr r1, [pc, #64] @ (801c64c ) 801c60a: 5c8a ldrb r2, [r1, r2] 801c60c: 4093 lsls r3, r2 801c60e: 617b str r3, [r7, #20] pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 801c610: 697b ldr r3, [r7, #20] 801c612: f647 72fe movw r2, #32766 @ 0x7ffe 801c616: 4293 cmp r3, r2 801c618: dc1a bgt.n 801c650 801c61a: 697b ldr r3, [r7, #20] 801c61c: b21a sxth r2, r3 801c61e: e019 b.n 801c654 801c620: 2402af68 .word 0x2402af68 801c624: 2402af7e .word 0x2402af7e 801c628: 2402af74 .word 0x2402af74 801c62c: 0802f5a8 .word 0x0802f5a8 801c630: 0802f8ec .word 0x0802f8ec 801c634: 0802f5ec .word 0x0802f5ec 801c638: 0802f918 .word 0x0802f918 801c63c: 0802f944 .word 0x0802f944 801c640: 0802f974 .word 0x0802f974 801c644: 0802f9a8 .word 0x0802f9a8 801c648: 08031c38 .word 0x08031c38 801c64c: 08031c28 .word 0x08031c28 801c650: f647 72ff movw r2, #32767 @ 0x7fff 801c654: 6afb ldr r3, [r7, #44] @ 0x2c 801c656: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->rtime = 0; 801c65a: 6afb ldr r3, [r7, #44] @ 0x2c 801c65c: 2200 movs r2, #0 801c65e: 861a strh r2, [r3, #48] @ 0x30 eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 801c660: 6afb ldr r3, [r7, #44] @ 0x2c 801c662: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801c666: 6afb ldr r3, [r7, #44] @ 0x2c 801c668: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801c66c: 4293 cmp r3, r2 801c66e: bf28 it cs 801c670: 4613 movcs r3, r2 801c672: 827b strh r3, [r7, #18] pcb->ssthresh = eff_wnd >> 1; 801c674: 8a7b ldrh r3, [r7, #18] 801c676: 085b lsrs r3, r3, #1 801c678: b29a uxth r2, r3 801c67a: 6afb ldr r3, [r7, #44] @ 0x2c 801c67c: f8a3 204a strh.w r2, [r3, #74] @ 0x4a if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { 801c680: 6afb ldr r3, [r7, #44] @ 0x2c 801c682: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801c686: 6afb ldr r3, [r7, #44] @ 0x2c 801c688: 8e5b ldrh r3, [r3, #50] @ 0x32 801c68a: 005b lsls r3, r3, #1 801c68c: b29b uxth r3, r3 801c68e: 429a cmp r2, r3 801c690: d206 bcs.n 801c6a0 pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); 801c692: 6afb ldr r3, [r7, #44] @ 0x2c 801c694: 8e5b ldrh r3, [r3, #50] @ 0x32 801c696: 005b lsls r3, r3, #1 801c698: b29a uxth r2, r3 801c69a: 6afb ldr r3, [r7, #44] @ 0x2c 801c69c: f8a3 204a strh.w r2, [r3, #74] @ 0x4a pcb->cwnd = pcb->mss; 801c6a0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6a2: 8e5a ldrh r2, [r3, #50] @ 0x32 801c6a4: 6afb ldr r3, [r7, #44] @ 0x2c 801c6a6: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801c6aa: 6afb ldr r3, [r7, #44] @ 0x2c 801c6ac: 2200 movs r2, #0 801c6ae: f8a3 206a strh.w r2, [r3, #106] @ 0x6a tcp_rexmit_rto_commit(pcb); 801c6b2: 6af8 ldr r0, [r7, #44] @ 0x2c 801c6b4: f004 fdc0 bl 8021238 if (pcb->state == FIN_WAIT_2) { 801c6b8: 6afb ldr r3, [r7, #44] @ 0x2c 801c6ba: 7d1b ldrb r3, [r3, #20] 801c6bc: 2b06 cmp r3, #6 801c6be: d111 bne.n 801c6e4 if (pcb->flags & TF_RXCLOSED) { 801c6c0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6c2: 8b5b ldrh r3, [r3, #26] 801c6c4: f003 0310 and.w r3, r3, #16 801c6c8: 2b00 cmp r3, #0 801c6ca: d00b beq.n 801c6e4 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c6cc: 4b9c ldr r3, [pc, #624] @ (801c940 ) 801c6ce: 681a ldr r2, [r3, #0] 801c6d0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6d2: 6a1b ldr r3, [r3, #32] 801c6d4: 1ad3 subs r3, r2, r3 801c6d6: 2b28 cmp r3, #40 @ 0x28 801c6d8: d904 bls.n 801c6e4 ++pcb_remove; 801c6da: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c6de: 3301 adds r3, #1 801c6e0: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (ip_get_option(pcb, SOF_KEEPALIVE) && 801c6e4: 6afb ldr r3, [r7, #44] @ 0x2c 801c6e6: 7a5b ldrb r3, [r3, #9] 801c6e8: f003 0308 and.w r3, r3, #8 801c6ec: 2b00 cmp r3, #0 801c6ee: d04a beq.n 801c786 ((pcb->state == ESTABLISHED) || 801c6f0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6f2: 7d1b ldrb r3, [r3, #20] if (ip_get_option(pcb, SOF_KEEPALIVE) && 801c6f4: 2b04 cmp r3, #4 801c6f6: d003 beq.n 801c700 (pcb->state == CLOSE_WAIT))) { 801c6f8: 6afb ldr r3, [r7, #44] @ 0x2c 801c6fa: 7d1b ldrb r3, [r3, #20] ((pcb->state == ESTABLISHED) || 801c6fc: 2b07 cmp r3, #7 801c6fe: d142 bne.n 801c786 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c700: 4b8f ldr r3, [pc, #572] @ (801c940 ) 801c702: 681a ldr r2, [r3, #0] 801c704: 6afb ldr r3, [r7, #44] @ 0x2c 801c706: 6a1b ldr r3, [r3, #32] 801c708: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { 801c70a: 6afb ldr r3, [r7, #44] @ 0x2c 801c70c: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801c710: 4b8c ldr r3, [pc, #560] @ (801c944 ) 801c712: 440b add r3, r1 801c714: 498c ldr r1, [pc, #560] @ (801c948 ) 801c716: fba1 1303 umull r1, r3, r1, r3 801c71a: 095b lsrs r3, r3, #5 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c71c: 429a cmp r2, r3 801c71e: d90a bls.n 801c736 ++pcb_remove; 801c720: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c724: 3301 adds r3, #1 801c726: f887 3027 strb.w r3, [r7, #39] @ 0x27 ++pcb_reset; 801c72a: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801c72e: 3301 adds r3, #1 801c730: f887 3026 strb.w r3, [r7, #38] @ 0x26 801c734: e027 b.n 801c786 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801c736: 4b82 ldr r3, [pc, #520] @ (801c940 ) 801c738: 681a ldr r2, [r3, #0] 801c73a: 6afb ldr r3, [r7, #44] @ 0x2c 801c73c: 6a1b ldr r3, [r3, #32] 801c73e: 1ad2 subs r2, r2, r3 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 801c740: 6afb ldr r3, [r7, #44] @ 0x2c 801c742: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801c746: 6afb ldr r3, [r7, #44] @ 0x2c 801c748: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801c74c: 4618 mov r0, r3 801c74e: 4b7f ldr r3, [pc, #508] @ (801c94c ) 801c750: fb00 f303 mul.w r3, r0, r3 801c754: 440b add r3, r1 / TCP_SLOW_INTERVAL) { 801c756: 497c ldr r1, [pc, #496] @ (801c948 ) 801c758: fba1 1303 umull r1, r3, r1, r3 801c75c: 095b lsrs r3, r3, #5 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801c75e: 429a cmp r2, r3 801c760: d911 bls.n 801c786 err = tcp_keepalive(pcb); 801c762: 6af8 ldr r0, [r7, #44] @ 0x2c 801c764: f005 f86c bl 8021840 801c768: 4603 mov r3, r0 801c76a: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err == ERR_OK) { 801c76e: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801c772: 2b00 cmp r3, #0 801c774: d107 bne.n 801c786 pcb->keep_cnt_sent++; 801c776: 6afb ldr r3, [r7, #44] @ 0x2c 801c778: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801c77c: 3301 adds r3, #1 801c77e: b2da uxtb r2, r3 801c780: 6afb ldr r3, [r7, #44] @ 0x2c 801c782: f883 209b strb.w r2, [r3, #155] @ 0x9b if (pcb->ooseq != NULL && 801c786: 6afb ldr r3, [r7, #44] @ 0x2c 801c788: 6f5b ldr r3, [r3, #116] @ 0x74 801c78a: 2b00 cmp r3, #0 801c78c: d011 beq.n 801c7b2 (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { 801c78e: 4b6c ldr r3, [pc, #432] @ (801c940 ) 801c790: 681a ldr r2, [r3, #0] 801c792: 6afb ldr r3, [r7, #44] @ 0x2c 801c794: 6a1b ldr r3, [r3, #32] 801c796: 1ad2 subs r2, r2, r3 801c798: 6afb ldr r3, [r7, #44] @ 0x2c 801c79a: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801c79e: 4619 mov r1, r3 801c7a0: 460b mov r3, r1 801c7a2: 005b lsls r3, r3, #1 801c7a4: 440b add r3, r1 801c7a6: 005b lsls r3, r3, #1 if (pcb->ooseq != NULL && 801c7a8: 429a cmp r2, r3 801c7aa: d302 bcc.n 801c7b2 tcp_free_ooseq(pcb); 801c7ac: 6af8 ldr r0, [r7, #44] @ 0x2c 801c7ae: f000 feb7 bl 801d520 if (pcb->state == SYN_RCVD) { 801c7b2: 6afb ldr r3, [r7, #44] @ 0x2c 801c7b4: 7d1b ldrb r3, [r3, #20] 801c7b6: 2b03 cmp r3, #3 801c7b8: d10b bne.n 801c7d2 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c7ba: 4b61 ldr r3, [pc, #388] @ (801c940 ) 801c7bc: 681a ldr r2, [r3, #0] 801c7be: 6afb ldr r3, [r7, #44] @ 0x2c 801c7c0: 6a1b ldr r3, [r3, #32] 801c7c2: 1ad3 subs r3, r2, r3 801c7c4: 2b28 cmp r3, #40 @ 0x28 801c7c6: d904 bls.n 801c7d2 ++pcb_remove; 801c7c8: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c7cc: 3301 adds r3, #1 801c7ce: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb->state == LAST_ACK) { 801c7d2: 6afb ldr r3, [r7, #44] @ 0x2c 801c7d4: 7d1b ldrb r3, [r3, #20] 801c7d6: 2b09 cmp r3, #9 801c7d8: d10b bne.n 801c7f2 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 801c7da: 4b59 ldr r3, [pc, #356] @ (801c940 ) 801c7dc: 681a ldr r2, [r3, #0] 801c7de: 6afb ldr r3, [r7, #44] @ 0x2c 801c7e0: 6a1b ldr r3, [r3, #32] 801c7e2: 1ad3 subs r3, r2, r3 801c7e4: 2bf0 cmp r3, #240 @ 0xf0 801c7e6: d904 bls.n 801c7f2 ++pcb_remove; 801c7e8: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c7ec: 3301 adds r3, #1 801c7ee: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb_remove) { 801c7f2: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c7f6: 2b00 cmp r3, #0 801c7f8: d060 beq.n 801c8bc tcp_err_fn err_fn = pcb->errf; 801c7fa: 6afb ldr r3, [r7, #44] @ 0x2c 801c7fc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801c800: 60fb str r3, [r7, #12] tcp_pcb_purge(pcb); 801c802: 6af8 ldr r0, [r7, #44] @ 0x2c 801c804: f000 fcd8 bl 801d1b8 if (prev != NULL) { 801c808: 6abb ldr r3, [r7, #40] @ 0x28 801c80a: 2b00 cmp r3, #0 801c80c: d010 beq.n 801c830 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 801c80e: 4b50 ldr r3, [pc, #320] @ (801c950 ) 801c810: 681b ldr r3, [r3, #0] 801c812: 6afa ldr r2, [r7, #44] @ 0x2c 801c814: 429a cmp r2, r3 801c816: d106 bne.n 801c826 801c818: 4b4e ldr r3, [pc, #312] @ (801c954 ) 801c81a: f240 526d movw r2, #1389 @ 0x56d 801c81e: 494e ldr r1, [pc, #312] @ (801c958 ) 801c820: 484e ldr r0, [pc, #312] @ (801c95c ) 801c822: f00e f823 bl 802a86c prev->next = pcb->next; 801c826: 6afb ldr r3, [r7, #44] @ 0x2c 801c828: 68da ldr r2, [r3, #12] 801c82a: 6abb ldr r3, [r7, #40] @ 0x28 801c82c: 60da str r2, [r3, #12] 801c82e: e00f b.n 801c850 LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); 801c830: 4b47 ldr r3, [pc, #284] @ (801c950 ) 801c832: 681b ldr r3, [r3, #0] 801c834: 6afa ldr r2, [r7, #44] @ 0x2c 801c836: 429a cmp r2, r3 801c838: d006 beq.n 801c848 801c83a: 4b46 ldr r3, [pc, #280] @ (801c954 ) 801c83c: f240 5271 movw r2, #1393 @ 0x571 801c840: 4947 ldr r1, [pc, #284] @ (801c960 ) 801c842: 4846 ldr r0, [pc, #280] @ (801c95c ) 801c844: f00e f812 bl 802a86c tcp_active_pcbs = pcb->next; 801c848: 6afb ldr r3, [r7, #44] @ 0x2c 801c84a: 68db ldr r3, [r3, #12] 801c84c: 4a40 ldr r2, [pc, #256] @ (801c950 ) 801c84e: 6013 str r3, [r2, #0] if (pcb_reset) { 801c850: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801c854: 2b00 cmp r3, #0 801c856: d013 beq.n 801c880 tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 801c858: 6afb ldr r3, [r7, #44] @ 0x2c 801c85a: 6d18 ldr r0, [r3, #80] @ 0x50 801c85c: 6afb ldr r3, [r7, #44] @ 0x2c 801c85e: 6a5c ldr r4, [r3, #36] @ 0x24 801c860: 6afd ldr r5, [r7, #44] @ 0x2c 801c862: 6afb ldr r3, [r7, #44] @ 0x2c 801c864: 3304 adds r3, #4 801c866: 6afa ldr r2, [r7, #44] @ 0x2c 801c868: 8ad2 ldrh r2, [r2, #22] 801c86a: 6af9 ldr r1, [r7, #44] @ 0x2c 801c86c: 8b09 ldrh r1, [r1, #24] 801c86e: 9102 str r1, [sp, #8] 801c870: 9201 str r2, [sp, #4] 801c872: 9300 str r3, [sp, #0] 801c874: 462b mov r3, r5 801c876: 4622 mov r2, r4 801c878: 4601 mov r1, r0 801c87a: 6af8 ldr r0, [r7, #44] @ 0x2c 801c87c: f004 ff2c bl 80216d8 err_arg = pcb->callback_arg; 801c880: 6afb ldr r3, [r7, #44] @ 0x2c 801c882: 691b ldr r3, [r3, #16] 801c884: 60bb str r3, [r7, #8] last_state = pcb->state; 801c886: 6afb ldr r3, [r7, #44] @ 0x2c 801c888: 7d1b ldrb r3, [r3, #20] 801c88a: 71fb strb r3, [r7, #7] pcb2 = pcb; 801c88c: 6afb ldr r3, [r7, #44] @ 0x2c 801c88e: 603b str r3, [r7, #0] pcb = pcb->next; 801c890: 6afb ldr r3, [r7, #44] @ 0x2c 801c892: 68db ldr r3, [r3, #12] 801c894: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801c896: 6838 ldr r0, [r7, #0] 801c898: f7ff f82c bl 801b8f4 tcp_active_pcbs_changed = 0; 801c89c: 4b31 ldr r3, [pc, #196] @ (801c964 ) 801c89e: 2200 movs r2, #0 801c8a0: 701a strb r2, [r3, #0] TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); 801c8a2: 68fb ldr r3, [r7, #12] 801c8a4: 2b00 cmp r3, #0 801c8a6: d004 beq.n 801c8b2 801c8a8: 68fb ldr r3, [r7, #12] 801c8aa: f06f 010c mvn.w r1, #12 801c8ae: 68b8 ldr r0, [r7, #8] 801c8b0: 4798 blx r3 if (tcp_active_pcbs_changed) { 801c8b2: 4b2c ldr r3, [pc, #176] @ (801c964 ) 801c8b4: 781b ldrb r3, [r3, #0] 801c8b6: 2b00 cmp r3, #0 801c8b8: d037 beq.n 801c92a goto tcp_slowtmr_start; 801c8ba: e592 b.n 801c3e2 prev = pcb; 801c8bc: 6afb ldr r3, [r7, #44] @ 0x2c 801c8be: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801c8c0: 6afb ldr r3, [r7, #44] @ 0x2c 801c8c2: 68db ldr r3, [r3, #12] 801c8c4: 62fb str r3, [r7, #44] @ 0x2c ++prev->polltmr; 801c8c6: 6abb ldr r3, [r7, #40] @ 0x28 801c8c8: 7f1b ldrb r3, [r3, #28] 801c8ca: 3301 adds r3, #1 801c8cc: b2da uxtb r2, r3 801c8ce: 6abb ldr r3, [r7, #40] @ 0x28 801c8d0: 771a strb r2, [r3, #28] if (prev->polltmr >= prev->pollinterval) { 801c8d2: 6abb ldr r3, [r7, #40] @ 0x28 801c8d4: 7f1a ldrb r2, [r3, #28] 801c8d6: 6abb ldr r3, [r7, #40] @ 0x28 801c8d8: 7f5b ldrb r3, [r3, #29] 801c8da: 429a cmp r2, r3 801c8dc: d325 bcc.n 801c92a prev->polltmr = 0; 801c8de: 6abb ldr r3, [r7, #40] @ 0x28 801c8e0: 2200 movs r2, #0 801c8e2: 771a strb r2, [r3, #28] tcp_active_pcbs_changed = 0; 801c8e4: 4b1f ldr r3, [pc, #124] @ (801c964 ) 801c8e6: 2200 movs r2, #0 801c8e8: 701a strb r2, [r3, #0] TCP_EVENT_POLL(prev, err); 801c8ea: 6abb ldr r3, [r7, #40] @ 0x28 801c8ec: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801c8f0: 2b00 cmp r3, #0 801c8f2: d00b beq.n 801c90c 801c8f4: 6abb ldr r3, [r7, #40] @ 0x28 801c8f6: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801c8fa: 6aba ldr r2, [r7, #40] @ 0x28 801c8fc: 6912 ldr r2, [r2, #16] 801c8fe: 6ab9 ldr r1, [r7, #40] @ 0x28 801c900: 4610 mov r0, r2 801c902: 4798 blx r3 801c904: 4603 mov r3, r0 801c906: f887 3025 strb.w r3, [r7, #37] @ 0x25 801c90a: e002 b.n 801c912 801c90c: 2300 movs r3, #0 801c90e: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (tcp_active_pcbs_changed) { 801c912: 4b14 ldr r3, [pc, #80] @ (801c964 ) 801c914: 781b ldrb r3, [r3, #0] 801c916: 2b00 cmp r3, #0 801c918: f47f ad62 bne.w 801c3e0 } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 801c91c: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801c920: 2b00 cmp r3, #0 801c922: d102 bne.n 801c92a tcp_output(prev); 801c924: 6ab8 ldr r0, [r7, #40] @ 0x28 801c926: f004 f915 bl 8020b54 while (pcb != NULL) { 801c92a: 6afb ldr r3, [r7, #44] @ 0x2c 801c92c: 2b00 cmp r3, #0 801c92e: f47f ad5e bne.w 801c3ee } } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; 801c932: 2300 movs r3, #0 801c934: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_tw_pcbs; 801c936: 4b0c ldr r3, [pc, #48] @ (801c968 ) 801c938: 681b ldr r3, [r3, #0] 801c93a: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801c93c: e069 b.n 801ca12 801c93e: bf00 nop 801c940: 2402af68 .word 0x2402af68 801c944: 000a4cb8 .word 0x000a4cb8 801c948: 10624dd3 .word 0x10624dd3 801c94c: 000124f8 .word 0x000124f8 801c950: 2402af74 .word 0x2402af74 801c954: 0802f5a8 .word 0x0802f5a8 801c958: 0802f9e0 .word 0x0802f9e0 801c95c: 0802f5ec .word 0x0802f5ec 801c960: 0802fa0c .word 0x0802fa0c 801c964: 2402af7c .word 0x2402af7c 801c968: 2402af78 .word 0x2402af78 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801c96c: 6afb ldr r3, [r7, #44] @ 0x2c 801c96e: 7d1b ldrb r3, [r3, #20] 801c970: 2b0a cmp r3, #10 801c972: d006 beq.n 801c982 801c974: 4b2b ldr r3, [pc, #172] @ (801ca24 ) 801c976: f240 52a1 movw r2, #1441 @ 0x5a1 801c97a: 492b ldr r1, [pc, #172] @ (801ca28 ) 801c97c: 482b ldr r0, [pc, #172] @ (801ca2c ) 801c97e: f00d ff75 bl 802a86c pcb_remove = 0; 801c982: 2300 movs r3, #0 801c984: 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) { 801c988: 4b29 ldr r3, [pc, #164] @ (801ca30 ) 801c98a: 681a ldr r2, [r3, #0] 801c98c: 6afb ldr r3, [r7, #44] @ 0x2c 801c98e: 6a1b ldr r3, [r3, #32] 801c990: 1ad3 subs r3, r2, r3 801c992: 2bf0 cmp r3, #240 @ 0xf0 801c994: d904 bls.n 801c9a0 ++pcb_remove; 801c996: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c99a: 3301 adds r3, #1 801c99c: f887 3027 strb.w r3, [r7, #39] @ 0x27 } /* If the PCB should be removed, do it. */ if (pcb_remove) { 801c9a0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c9a4: 2b00 cmp r3, #0 801c9a6: d02f beq.n 801ca08 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 801c9a8: 6af8 ldr r0, [r7, #44] @ 0x2c 801c9aa: f000 fc05 bl 801d1b8 /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 801c9ae: 6abb ldr r3, [r7, #40] @ 0x28 801c9b0: 2b00 cmp r3, #0 801c9b2: d010 beq.n 801c9d6 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 801c9b4: 4b1f ldr r3, [pc, #124] @ (801ca34 ) 801c9b6: 681b ldr r3, [r3, #0] 801c9b8: 6afa ldr r2, [r7, #44] @ 0x2c 801c9ba: 429a cmp r2, r3 801c9bc: d106 bne.n 801c9cc 801c9be: 4b19 ldr r3, [pc, #100] @ (801ca24 ) 801c9c0: f240 52af movw r2, #1455 @ 0x5af 801c9c4: 491c ldr r1, [pc, #112] @ (801ca38 ) 801c9c6: 4819 ldr r0, [pc, #100] @ (801ca2c ) 801c9c8: f00d ff50 bl 802a86c prev->next = pcb->next; 801c9cc: 6afb ldr r3, [r7, #44] @ 0x2c 801c9ce: 68da ldr r2, [r3, #12] 801c9d0: 6abb ldr r3, [r7, #40] @ 0x28 801c9d2: 60da str r2, [r3, #12] 801c9d4: e00f b.n 801c9f6 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); 801c9d6: 4b17 ldr r3, [pc, #92] @ (801ca34 ) 801c9d8: 681b ldr r3, [r3, #0] 801c9da: 6afa ldr r2, [r7, #44] @ 0x2c 801c9dc: 429a cmp r2, r3 801c9de: d006 beq.n 801c9ee 801c9e0: 4b10 ldr r3, [pc, #64] @ (801ca24 ) 801c9e2: f240 52b3 movw r2, #1459 @ 0x5b3 801c9e6: 4915 ldr r1, [pc, #84] @ (801ca3c ) 801c9e8: 4810 ldr r0, [pc, #64] @ (801ca2c ) 801c9ea: f00d ff3f bl 802a86c tcp_tw_pcbs = pcb->next; 801c9ee: 6afb ldr r3, [r7, #44] @ 0x2c 801c9f0: 68db ldr r3, [r3, #12] 801c9f2: 4a10 ldr r2, [pc, #64] @ (801ca34 ) 801c9f4: 6013 str r3, [r2, #0] } pcb2 = pcb; 801c9f6: 6afb ldr r3, [r7, #44] @ 0x2c 801c9f8: 61fb str r3, [r7, #28] pcb = pcb->next; 801c9fa: 6afb ldr r3, [r7, #44] @ 0x2c 801c9fc: 68db ldr r3, [r3, #12] 801c9fe: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801ca00: 69f8 ldr r0, [r7, #28] 801ca02: f7fe ff77 bl 801b8f4 801ca06: e004 b.n 801ca12 } else { prev = pcb; 801ca08: 6afb ldr r3, [r7, #44] @ 0x2c 801ca0a: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801ca0c: 6afb ldr r3, [r7, #44] @ 0x2c 801ca0e: 68db ldr r3, [r3, #12] 801ca10: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801ca12: 6afb ldr r3, [r7, #44] @ 0x2c 801ca14: 2b00 cmp r3, #0 801ca16: d1a9 bne.n 801c96c } } } 801ca18: bf00 nop 801ca1a: bf00 nop 801ca1c: 3730 adds r7, #48 @ 0x30 801ca1e: 46bd mov sp, r7 801ca20: bdb0 pop {r4, r5, r7, pc} 801ca22: bf00 nop 801ca24: 0802f5a8 .word 0x0802f5a8 801ca28: 0802fa38 .word 0x0802fa38 801ca2c: 0802f5ec .word 0x0802f5ec 801ca30: 2402af68 .word 0x2402af68 801ca34: 2402af78 .word 0x2402af78 801ca38: 0802fa68 .word 0x0802fa68 801ca3c: 0802fa90 .word 0x0802fa90 0801ca40 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 801ca40: b580 push {r7, lr} 801ca42: b082 sub sp, #8 801ca44: af00 add r7, sp, #0 struct tcp_pcb *pcb; ++tcp_timer_ctr; 801ca46: 4b2d ldr r3, [pc, #180] @ (801cafc ) 801ca48: 781b ldrb r3, [r3, #0] 801ca4a: 3301 adds r3, #1 801ca4c: b2da uxtb r2, r3 801ca4e: 4b2b ldr r3, [pc, #172] @ (801cafc ) 801ca50: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; 801ca52: 4b2b ldr r3, [pc, #172] @ (801cb00 ) 801ca54: 681b ldr r3, [r3, #0] 801ca56: 607b str r3, [r7, #4] while (pcb != NULL) { 801ca58: e048 b.n 801caec if (pcb->last_timer != tcp_timer_ctr) { 801ca5a: 687b ldr r3, [r7, #4] 801ca5c: 7f9a ldrb r2, [r3, #30] 801ca5e: 4b27 ldr r3, [pc, #156] @ (801cafc ) 801ca60: 781b ldrb r3, [r3, #0] 801ca62: 429a cmp r2, r3 801ca64: d03f beq.n 801cae6 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 801ca66: 4b25 ldr r3, [pc, #148] @ (801cafc ) 801ca68: 781a ldrb r2, [r3, #0] 801ca6a: 687b ldr r3, [r7, #4] 801ca6c: 779a strb r2, [r3, #30] /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 801ca6e: 687b ldr r3, [r7, #4] 801ca70: 8b5b ldrh r3, [r3, #26] 801ca72: f003 0301 and.w r3, r3, #1 801ca76: 2b00 cmp r3, #0 801ca78: d010 beq.n 801ca9c LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 801ca7a: 687b ldr r3, [r7, #4] 801ca7c: 8b5b ldrh r3, [r3, #26] 801ca7e: f043 0302 orr.w r3, r3, #2 801ca82: b29a uxth r2, r3 801ca84: 687b ldr r3, [r7, #4] 801ca86: 835a strh r2, [r3, #26] tcp_output(pcb); 801ca88: 6878 ldr r0, [r7, #4] 801ca8a: f004 f863 bl 8020b54 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 801ca8e: 687b ldr r3, [r7, #4] 801ca90: 8b5b ldrh r3, [r3, #26] 801ca92: f023 0303 bic.w r3, r3, #3 801ca96: b29a uxth r2, r3 801ca98: 687b ldr r3, [r7, #4] 801ca9a: 835a strh r2, [r3, #26] } /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801ca9c: 687b ldr r3, [r7, #4] 801ca9e: 8b5b ldrh r3, [r3, #26] 801caa0: f003 0308 and.w r3, r3, #8 801caa4: 2b00 cmp r3, #0 801caa6: d009 beq.n 801cabc LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801caa8: 687b ldr r3, [r7, #4] 801caaa: 8b5b ldrh r3, [r3, #26] 801caac: f023 0308 bic.w r3, r3, #8 801cab0: b29a uxth r2, r3 801cab2: 687b ldr r3, [r7, #4] 801cab4: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801cab6: 6878 ldr r0, [r7, #4] 801cab8: f7ff f8b0 bl 801bc1c } next = pcb->next; 801cabc: 687b ldr r3, [r7, #4] 801cabe: 68db ldr r3, [r3, #12] 801cac0: 603b str r3, [r7, #0] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801cac2: 687b ldr r3, [r7, #4] 801cac4: 6f9b ldr r3, [r3, #120] @ 0x78 801cac6: 2b00 cmp r3, #0 801cac8: d00a beq.n 801cae0 tcp_active_pcbs_changed = 0; 801caca: 4b0e ldr r3, [pc, #56] @ (801cb04 ) 801cacc: 2200 movs r2, #0 801cace: 701a strb r2, [r3, #0] tcp_process_refused_data(pcb); 801cad0: 6878 ldr r0, [r7, #4] 801cad2: f000 f819 bl 801cb08 if (tcp_active_pcbs_changed) { 801cad6: 4b0b ldr r3, [pc, #44] @ (801cb04 ) 801cad8: 781b ldrb r3, [r3, #0] 801cada: 2b00 cmp r3, #0 801cadc: d000 beq.n 801cae0 /* application callback has changed the pcb list: restart the loop */ goto tcp_fasttmr_start; 801cade: e7b8 b.n 801ca52 } } pcb = next; 801cae0: 683b ldr r3, [r7, #0] 801cae2: 607b str r3, [r7, #4] 801cae4: e002 b.n 801caec } else { pcb = pcb->next; 801cae6: 687b ldr r3, [r7, #4] 801cae8: 68db ldr r3, [r3, #12] 801caea: 607b str r3, [r7, #4] while (pcb != NULL) { 801caec: 687b ldr r3, [r7, #4] 801caee: 2b00 cmp r3, #0 801caf0: d1b3 bne.n 801ca5a } } } 801caf2: bf00 nop 801caf4: bf00 nop 801caf6: 3708 adds r7, #8 801caf8: 46bd mov sp, r7 801cafa: bd80 pop {r7, pc} 801cafc: 2402af7e .word 0x2402af7e 801cb00: 2402af74 .word 0x2402af74 801cb04: 2402af7c .word 0x2402af7c 0801cb08 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 801cb08: b590 push {r4, r7, lr} 801cb0a: b085 sub sp, #20 801cb0c: af00 add r7, sp, #0 801cb0e: 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); 801cb10: 687b ldr r3, [r7, #4] 801cb12: 2b00 cmp r3, #0 801cb14: d109 bne.n 801cb2a 801cb16: 4b38 ldr r3, [pc, #224] @ (801cbf8 ) 801cb18: f240 6209 movw r2, #1545 @ 0x609 801cb1c: 4937 ldr r1, [pc, #220] @ (801cbfc ) 801cb1e: 4838 ldr r0, [pc, #224] @ (801cc00 ) 801cb20: f00d fea4 bl 802a86c 801cb24: f06f 030f mvn.w r3, #15 801cb28: e061 b.n 801cbee #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; 801cb2a: 687b ldr r3, [r7, #4] 801cb2c: 6f9b ldr r3, [r3, #120] @ 0x78 801cb2e: 7b5b ldrb r3, [r3, #13] 801cb30: 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; 801cb32: 687b ldr r3, [r7, #4] 801cb34: 6f9b ldr r3, [r3, #120] @ 0x78 801cb36: 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; 801cb38: 687b ldr r3, [r7, #4] 801cb3a: 2200 movs r2, #0 801cb3c: 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); 801cb3e: 687b ldr r3, [r7, #4] 801cb40: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cb44: 2b00 cmp r3, #0 801cb46: d00b beq.n 801cb60 801cb48: 687b ldr r3, [r7, #4] 801cb4a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801cb4e: 687b ldr r3, [r7, #4] 801cb50: 6918 ldr r0, [r3, #16] 801cb52: 2300 movs r3, #0 801cb54: 68ba ldr r2, [r7, #8] 801cb56: 6879 ldr r1, [r7, #4] 801cb58: 47a0 blx r4 801cb5a: 4603 mov r3, r0 801cb5c: 73fb strb r3, [r7, #15] 801cb5e: e007 b.n 801cb70 801cb60: 2300 movs r3, #0 801cb62: 68ba ldr r2, [r7, #8] 801cb64: 6879 ldr r1, [r7, #4] 801cb66: 2000 movs r0, #0 801cb68: f000 f8a6 bl 801ccb8 801cb6c: 4603 mov r3, r0 801cb6e: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801cb70: f997 300f ldrsb.w r3, [r7, #15] 801cb74: 2b00 cmp r3, #0 801cb76: d12b bne.n 801cbd0 /* did refused_data include a FIN? */ if ((refused_flags & PBUF_FLAG_TCP_FIN) 801cb78: 7bbb ldrb r3, [r7, #14] 801cb7a: f003 0320 and.w r3, r3, #32 801cb7e: 2b00 cmp r3, #0 801cb80: d034 beq.n 801cbec && (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)) { 801cb82: 687b ldr r3, [r7, #4] 801cb84: 8d1b ldrh r3, [r3, #40] @ 0x28 801cb86: f241 62d0 movw r2, #5840 @ 0x16d0 801cb8a: 4293 cmp r3, r2 801cb8c: d005 beq.n 801cb9a pcb->rcv_wnd++; 801cb8e: 687b ldr r3, [r7, #4] 801cb90: 8d1b ldrh r3, [r3, #40] @ 0x28 801cb92: 3301 adds r3, #1 801cb94: b29a uxth r2, r3 801cb96: 687b ldr r3, [r7, #4] 801cb98: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801cb9a: 687b ldr r3, [r7, #4] 801cb9c: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cba0: 2b00 cmp r3, #0 801cba2: d00b beq.n 801cbbc 801cba4: 687b ldr r3, [r7, #4] 801cba6: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801cbaa: 687b ldr r3, [r7, #4] 801cbac: 6918 ldr r0, [r3, #16] 801cbae: 2300 movs r3, #0 801cbb0: 2200 movs r2, #0 801cbb2: 6879 ldr r1, [r7, #4] 801cbb4: 47a0 blx r4 801cbb6: 4603 mov r3, r0 801cbb8: 73fb strb r3, [r7, #15] 801cbba: e001 b.n 801cbc0 801cbbc: 2300 movs r3, #0 801cbbe: 73fb strb r3, [r7, #15] if (err == ERR_ABRT) { 801cbc0: f997 300f ldrsb.w r3, [r7, #15] 801cbc4: f113 0f0d cmn.w r3, #13 801cbc8: d110 bne.n 801cbec return ERR_ABRT; 801cbca: f06f 030c mvn.w r3, #12 801cbce: e00e b.n 801cbee } } } else if (err == ERR_ABRT) { 801cbd0: f997 300f ldrsb.w r3, [r7, #15] 801cbd4: f113 0f0d cmn.w r3, #13 801cbd8: d102 bne.n 801cbe0 /* 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; 801cbda: f06f 030c mvn.w r3, #12 801cbde: e006 b.n 801cbee #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; 801cbe0: 687b ldr r3, [r7, #4] 801cbe2: 68ba ldr r2, [r7, #8] 801cbe4: 679a str r2, [r3, #120] @ 0x78 return ERR_INPROGRESS; 801cbe6: f06f 0304 mvn.w r3, #4 801cbea: e000 b.n 801cbee } } return ERR_OK; 801cbec: 2300 movs r3, #0 } 801cbee: 4618 mov r0, r3 801cbf0: 3714 adds r7, #20 801cbf2: 46bd mov sp, r7 801cbf4: bd90 pop {r4, r7, pc} 801cbf6: bf00 nop 801cbf8: 0802f5a8 .word 0x0802f5a8 801cbfc: 0802fab8 .word 0x0802fab8 801cc00: 0802f5ec .word 0x0802f5ec 0801cc04 : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 801cc04: b580 push {r7, lr} 801cc06: b084 sub sp, #16 801cc08: af00 add r7, sp, #0 801cc0a: 6078 str r0, [r7, #4] while (seg != NULL) { 801cc0c: e007 b.n 801cc1e struct tcp_seg *next = seg->next; 801cc0e: 687b ldr r3, [r7, #4] 801cc10: 681b ldr r3, [r3, #0] 801cc12: 60fb str r3, [r7, #12] tcp_seg_free(seg); 801cc14: 6878 ldr r0, [r7, #4] 801cc16: f000 f80a bl 801cc2e seg = next; 801cc1a: 68fb ldr r3, [r7, #12] 801cc1c: 607b str r3, [r7, #4] while (seg != NULL) { 801cc1e: 687b ldr r3, [r7, #4] 801cc20: 2b00 cmp r3, #0 801cc22: d1f4 bne.n 801cc0e } } 801cc24: bf00 nop 801cc26: bf00 nop 801cc28: 3710 adds r7, #16 801cc2a: 46bd mov sp, r7 801cc2c: bd80 pop {r7, pc} 0801cc2e : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 801cc2e: b580 push {r7, lr} 801cc30: b082 sub sp, #8 801cc32: af00 add r7, sp, #0 801cc34: 6078 str r0, [r7, #4] if (seg != NULL) { 801cc36: 687b ldr r3, [r7, #4] 801cc38: 2b00 cmp r3, #0 801cc3a: d00c beq.n 801cc56 if (seg->p != NULL) { 801cc3c: 687b ldr r3, [r7, #4] 801cc3e: 685b ldr r3, [r3, #4] 801cc40: 2b00 cmp r3, #0 801cc42: d004 beq.n 801cc4e pbuf_free(seg->p); 801cc44: 687b ldr r3, [r7, #4] 801cc46: 685b ldr r3, [r3, #4] 801cc48: 4618 mov r0, r3 801cc4a: f7fe fb97 bl 801b37c #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 801cc4e: 6879 ldr r1, [r7, #4] 801cc50: 2003 movs r0, #3 801cc52: f7fd fca5 bl 801a5a0 } } 801cc56: bf00 nop 801cc58: 3708 adds r7, #8 801cc5a: 46bd mov sp, r7 801cc5c: bd80 pop {r7, pc} ... 0801cc60 : * @param seg the old tcp_seg * @return a copy of seg */ struct tcp_seg * tcp_seg_copy(struct tcp_seg *seg) { 801cc60: b580 push {r7, lr} 801cc62: b084 sub sp, #16 801cc64: af00 add r7, sp, #0 801cc66: 6078 str r0, [r7, #4] struct tcp_seg *cseg; LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 801cc68: 687b ldr r3, [r7, #4] 801cc6a: 2b00 cmp r3, #0 801cc6c: d106 bne.n 801cc7c 801cc6e: 4b0f ldr r3, [pc, #60] @ (801ccac ) 801cc70: f240 6282 movw r2, #1666 @ 0x682 801cc74: 490e ldr r1, [pc, #56] @ (801ccb0 ) 801cc76: 480f ldr r0, [pc, #60] @ (801ccb4 ) 801cc78: f00d fdf8 bl 802a86c cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); 801cc7c: 2003 movs r0, #3 801cc7e: f7fd fc19 bl 801a4b4 801cc82: 60f8 str r0, [r7, #12] if (cseg == NULL) { 801cc84: 68fb ldr r3, [r7, #12] 801cc86: 2b00 cmp r3, #0 801cc88: d101 bne.n 801cc8e return NULL; 801cc8a: 2300 movs r3, #0 801cc8c: e00a b.n 801cca4 } SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); 801cc8e: 2214 movs r2, #20 801cc90: 6879 ldr r1, [r7, #4] 801cc92: 68f8 ldr r0, [r7, #12] 801cc94: f00e f873 bl 802ad7e pbuf_ref(cseg->p); 801cc98: 68fb ldr r3, [r7, #12] 801cc9a: 685b ldr r3, [r3, #4] 801cc9c: 4618 mov r0, r3 801cc9e: f7fe fc13 bl 801b4c8 return cseg; 801cca2: 68fb ldr r3, [r7, #12] } 801cca4: 4618 mov r0, r3 801cca6: 3710 adds r7, #16 801cca8: 46bd mov sp, r7 801ccaa: bd80 pop {r7, pc} 801ccac: 0802f5a8 .word 0x0802f5a8 801ccb0: 0802fafc .word 0x0802fafc 801ccb4: 0802f5ec .word 0x0802f5ec 0801ccb8 : * 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) { 801ccb8: b580 push {r7, lr} 801ccba: b084 sub sp, #16 801ccbc: af00 add r7, sp, #0 801ccbe: 60f8 str r0, [r7, #12] 801ccc0: 60b9 str r1, [r7, #8] 801ccc2: 607a str r2, [r7, #4] 801ccc4: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(arg); LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 801ccc6: 68bb ldr r3, [r7, #8] 801ccc8: 2b00 cmp r3, #0 801ccca: d109 bne.n 801cce0 801cccc: 4b12 ldr r3, [pc, #72] @ (801cd18 ) 801ccce: f44f 62d3 mov.w r2, #1688 @ 0x698 801ccd2: 4912 ldr r1, [pc, #72] @ (801cd1c ) 801ccd4: 4812 ldr r0, [pc, #72] @ (801cd20 ) 801ccd6: f00d fdc9 bl 802a86c 801ccda: f06f 030f mvn.w r3, #15 801ccde: e016 b.n 801cd0e if (p != NULL) { 801cce0: 687b ldr r3, [r7, #4] 801cce2: 2b00 cmp r3, #0 801cce4: d009 beq.n 801ccfa tcp_recved(pcb, p->tot_len); 801cce6: 687b ldr r3, [r7, #4] 801cce8: 891b ldrh r3, [r3, #8] 801ccea: 4619 mov r1, r3 801ccec: 68b8 ldr r0, [r7, #8] 801ccee: f7ff f9b1 bl 801c054 pbuf_free(p); 801ccf2: 6878 ldr r0, [r7, #4] 801ccf4: f7fe fb42 bl 801b37c 801ccf8: e008 b.n 801cd0c } else if (err == ERR_OK) { 801ccfa: f997 3003 ldrsb.w r3, [r7, #3] 801ccfe: 2b00 cmp r3, #0 801cd00: d104 bne.n 801cd0c return tcp_close(pcb); 801cd02: 68b8 ldr r0, [r7, #8] 801cd04: f7fe fff4 bl 801bcf0 801cd08: 4603 mov r3, r0 801cd0a: e000 b.n 801cd0e } return ERR_OK; 801cd0c: 2300 movs r3, #0 } 801cd0e: 4618 mov r0, r3 801cd10: 3710 adds r7, #16 801cd12: 46bd mov sp, r7 801cd14: bd80 pop {r7, pc} 801cd16: bf00 nop 801cd18: 0802f5a8 .word 0x0802f5a8 801cd1c: 0802fb18 .word 0x0802fb18 801cd20: 0802f5ec .word 0x0802f5ec 0801cd24 : * * @param prio minimum priority */ static void tcp_kill_prio(u8_t prio) { 801cd24: b580 push {r7, lr} 801cd26: b086 sub sp, #24 801cd28: af00 add r7, sp, #0 801cd2a: 4603 mov r3, r0 801cd2c: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 801cd2e: f997 3007 ldrsb.w r3, [r7, #7] 801cd32: 2b00 cmp r3, #0 801cd34: db01 blt.n 801cd3a 801cd36: 79fb ldrb r3, [r7, #7] 801cd38: e000 b.n 801cd3c 801cd3a: 237f movs r3, #127 @ 0x7f 801cd3c: 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) { 801cd3e: 7afb ldrb r3, [r7, #11] 801cd40: 2b00 cmp r3, #0 801cd42: d034 beq.n 801cdae /* 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--; 801cd44: 7afb ldrb r3, [r7, #11] 801cd46: 3b01 subs r3, #1 801cd48: 72fb strb r3, [r7, #11] inactivity = 0; 801cd4a: 2300 movs r3, #0 801cd4c: 60fb str r3, [r7, #12] inactive = NULL; 801cd4e: 2300 movs r3, #0 801cd50: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801cd52: 4b19 ldr r3, [pc, #100] @ (801cdb8 ) 801cd54: 681b ldr r3, [r3, #0] 801cd56: 617b str r3, [r7, #20] 801cd58: e01f b.n 801cd9a /* lower prio is always a kill candidate */ if ((pcb->prio < mprio) || 801cd5a: 697b ldr r3, [r7, #20] 801cd5c: 7d5b ldrb r3, [r3, #21] 801cd5e: 7afa ldrb r2, [r7, #11] 801cd60: 429a cmp r2, r3 801cd62: d80c bhi.n 801cd7e /* longer inactivity is also a kill candidate */ ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801cd64: 697b ldr r3, [r7, #20] 801cd66: 7d5b ldrb r3, [r3, #21] if ((pcb->prio < mprio) || 801cd68: 7afa ldrb r2, [r7, #11] 801cd6a: 429a cmp r2, r3 801cd6c: d112 bne.n 801cd94 ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801cd6e: 4b13 ldr r3, [pc, #76] @ (801cdbc ) 801cd70: 681a ldr r2, [r3, #0] 801cd72: 697b ldr r3, [r7, #20] 801cd74: 6a1b ldr r3, [r3, #32] 801cd76: 1ad3 subs r3, r2, r3 801cd78: 68fa ldr r2, [r7, #12] 801cd7a: 429a cmp r2, r3 801cd7c: d80a bhi.n 801cd94 inactivity = tcp_ticks - pcb->tmr; 801cd7e: 4b0f ldr r3, [pc, #60] @ (801cdbc ) 801cd80: 681a ldr r2, [r3, #0] 801cd82: 697b ldr r3, [r7, #20] 801cd84: 6a1b ldr r3, [r3, #32] 801cd86: 1ad3 subs r3, r2, r3 801cd88: 60fb str r3, [r7, #12] inactive = pcb; 801cd8a: 697b ldr r3, [r7, #20] 801cd8c: 613b str r3, [r7, #16] mprio = pcb->prio; 801cd8e: 697b ldr r3, [r7, #20] 801cd90: 7d5b ldrb r3, [r3, #21] 801cd92: 72fb strb r3, [r7, #11] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801cd94: 697b ldr r3, [r7, #20] 801cd96: 68db ldr r3, [r3, #12] 801cd98: 617b str r3, [r7, #20] 801cd9a: 697b ldr r3, [r7, #20] 801cd9c: 2b00 cmp r3, #0 801cd9e: d1dc bne.n 801cd5a } } if (inactive != NULL) { 801cda0: 693b ldr r3, [r7, #16] 801cda2: 2b00 cmp r3, #0 801cda4: d004 beq.n 801cdb0 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801cda6: 6938 ldr r0, [r7, #16] 801cda8: f7ff f8ee bl 801bf88 801cdac: e000 b.n 801cdb0 return; 801cdae: bf00 nop } } 801cdb0: 3718 adds r7, #24 801cdb2: 46bd mov sp, r7 801cdb4: bd80 pop {r7, pc} 801cdb6: bf00 nop 801cdb8: 2402af74 .word 0x2402af74 801cdbc: 2402af68 .word 0x2402af68 0801cdc0 : * 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) { 801cdc0: b580 push {r7, lr} 801cdc2: b086 sub sp, #24 801cdc4: af00 add r7, sp, #0 801cdc6: 4603 mov r3, r0 801cdc8: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 801cdca: 79fb ldrb r3, [r7, #7] 801cdcc: 2b08 cmp r3, #8 801cdce: d009 beq.n 801cde4 801cdd0: 79fb ldrb r3, [r7, #7] 801cdd2: 2b09 cmp r3, #9 801cdd4: d006 beq.n 801cde4 801cdd6: 4b1a ldr r3, [pc, #104] @ (801ce40 ) 801cdd8: f240 62dd movw r2, #1757 @ 0x6dd 801cddc: 4919 ldr r1, [pc, #100] @ (801ce44 ) 801cdde: 481a ldr r0, [pc, #104] @ (801ce48 ) 801cde0: f00d fd44 bl 802a86c inactivity = 0; 801cde4: 2300 movs r3, #0 801cde6: 60fb str r3, [r7, #12] inactive = NULL; 801cde8: 2300 movs r3, #0 801cdea: 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) { 801cdec: 4b17 ldr r3, [pc, #92] @ (801ce4c ) 801cdee: 681b ldr r3, [r3, #0] 801cdf0: 617b str r3, [r7, #20] 801cdf2: e017 b.n 801ce24 if (pcb->state == state) { 801cdf4: 697b ldr r3, [r7, #20] 801cdf6: 7d1b ldrb r3, [r3, #20] 801cdf8: 79fa ldrb r2, [r7, #7] 801cdfa: 429a cmp r2, r3 801cdfc: d10f bne.n 801ce1e if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801cdfe: 4b14 ldr r3, [pc, #80] @ (801ce50 ) 801ce00: 681a ldr r2, [r3, #0] 801ce02: 697b ldr r3, [r7, #20] 801ce04: 6a1b ldr r3, [r3, #32] 801ce06: 1ad3 subs r3, r2, r3 801ce08: 68fa ldr r2, [r7, #12] 801ce0a: 429a cmp r2, r3 801ce0c: d807 bhi.n 801ce1e inactivity = tcp_ticks - pcb->tmr; 801ce0e: 4b10 ldr r3, [pc, #64] @ (801ce50 ) 801ce10: 681a ldr r2, [r3, #0] 801ce12: 697b ldr r3, [r7, #20] 801ce14: 6a1b ldr r3, [r3, #32] 801ce16: 1ad3 subs r3, r2, r3 801ce18: 60fb str r3, [r7, #12] inactive = pcb; 801ce1a: 697b ldr r3, [r7, #20] 801ce1c: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801ce1e: 697b ldr r3, [r7, #20] 801ce20: 68db ldr r3, [r3, #12] 801ce22: 617b str r3, [r7, #20] 801ce24: 697b ldr r3, [r7, #20] 801ce26: 2b00 cmp r3, #0 801ce28: d1e4 bne.n 801cdf4 } } } if (inactive != NULL) { 801ce2a: 693b ldr r3, [r7, #16] 801ce2c: 2b00 cmp r3, #0 801ce2e: d003 beq.n 801ce38 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); 801ce30: 2100 movs r1, #0 801ce32: 6938 ldr r0, [r7, #16] 801ce34: f7fe ffe8 bl 801be08 } } 801ce38: bf00 nop 801ce3a: 3718 adds r7, #24 801ce3c: 46bd mov sp, r7 801ce3e: bd80 pop {r7, pc} 801ce40: 0802f5a8 .word 0x0802f5a8 801ce44: 0802fb34 .word 0x0802fb34 801ce48: 0802f5ec .word 0x0802f5ec 801ce4c: 2402af74 .word 0x2402af74 801ce50: 2402af68 .word 0x2402af68 0801ce54 : * 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) { 801ce54: b580 push {r7, lr} 801ce56: b084 sub sp, #16 801ce58: af00 add r7, sp, #0 struct tcp_pcb *pcb, *inactive; u32_t inactivity; inactivity = 0; 801ce5a: 2300 movs r3, #0 801ce5c: 607b str r3, [r7, #4] inactive = NULL; 801ce5e: 2300 movs r3, #0 801ce60: 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) { 801ce62: 4b12 ldr r3, [pc, #72] @ (801ceac ) 801ce64: 681b ldr r3, [r3, #0] 801ce66: 60fb str r3, [r7, #12] 801ce68: e012 b.n 801ce90 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801ce6a: 4b11 ldr r3, [pc, #68] @ (801ceb0 ) 801ce6c: 681a ldr r2, [r3, #0] 801ce6e: 68fb ldr r3, [r7, #12] 801ce70: 6a1b ldr r3, [r3, #32] 801ce72: 1ad3 subs r3, r2, r3 801ce74: 687a ldr r2, [r7, #4] 801ce76: 429a cmp r2, r3 801ce78: d807 bhi.n 801ce8a inactivity = tcp_ticks - pcb->tmr; 801ce7a: 4b0d ldr r3, [pc, #52] @ (801ceb0 ) 801ce7c: 681a ldr r2, [r3, #0] 801ce7e: 68fb ldr r3, [r7, #12] 801ce80: 6a1b ldr r3, [r3, #32] 801ce82: 1ad3 subs r3, r2, r3 801ce84: 607b str r3, [r7, #4] inactive = pcb; 801ce86: 68fb ldr r3, [r7, #12] 801ce88: 60bb str r3, [r7, #8] for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801ce8a: 68fb ldr r3, [r7, #12] 801ce8c: 68db ldr r3, [r3, #12] 801ce8e: 60fb str r3, [r7, #12] 801ce90: 68fb ldr r3, [r7, #12] 801ce92: 2b00 cmp r3, #0 801ce94: d1e9 bne.n 801ce6a } } if (inactive != NULL) { 801ce96: 68bb ldr r3, [r7, #8] 801ce98: 2b00 cmp r3, #0 801ce9a: d002 beq.n 801cea2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801ce9c: 68b8 ldr r0, [r7, #8] 801ce9e: f7ff f873 bl 801bf88 } } 801cea2: bf00 nop 801cea4: 3710 adds r7, #16 801cea6: 46bd mov sp, r7 801cea8: bd80 pop {r7, pc} 801ceaa: bf00 nop 801ceac: 2402af78 .word 0x2402af78 801ceb0: 2402af68 .word 0x2402af68 0801ceb4 : * 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) { 801ceb4: b580 push {r7, lr} 801ceb6: b082 sub sp, #8 801ceb8: af00 add r7, sp, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 801ceba: 4b10 ldr r3, [pc, #64] @ (801cefc ) 801cebc: 681b ldr r3, [r3, #0] 801cebe: 607b str r3, [r7, #4] while (pcb != NULL) { 801cec0: e014 b.n 801ceec struct tcp_pcb *next = pcb->next; 801cec2: 687b ldr r3, [r7, #4] 801cec4: 68db ldr r3, [r3, #12] 801cec6: 603b str r3, [r7, #0] /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801cec8: 687b ldr r3, [r7, #4] 801ceca: 8b5b ldrh r3, [r3, #26] 801cecc: f003 0308 and.w r3, r3, #8 801ced0: 2b00 cmp r3, #0 801ced2: d009 beq.n 801cee8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801ced4: 687b ldr r3, [r7, #4] 801ced6: 8b5b ldrh r3, [r3, #26] 801ced8: f023 0308 bic.w r3, r3, #8 801cedc: b29a uxth r2, r3 801cede: 687b ldr r3, [r7, #4] 801cee0: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801cee2: 6878 ldr r0, [r7, #4] 801cee4: f7fe fe9a bl 801bc1c } pcb = next; 801cee8: 683b ldr r3, [r7, #0] 801ceea: 607b str r3, [r7, #4] while (pcb != NULL) { 801ceec: 687b ldr r3, [r7, #4] 801ceee: 2b00 cmp r3, #0 801cef0: d1e7 bne.n 801cec2 } } 801cef2: bf00 nop 801cef4: bf00 nop 801cef6: 3708 adds r7, #8 801cef8: 46bd mov sp, r7 801cefa: bd80 pop {r7, pc} 801cefc: 2402af74 .word 0x2402af74 0801cf00 : * @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) { 801cf00: b580 push {r7, lr} 801cf02: b084 sub sp, #16 801cf04: af00 add r7, sp, #0 801cf06: 4603 mov r3, r0 801cf08: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 801cf0a: f7f4 f887 bl 801101c pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf0e: 2001 movs r0, #1 801cf10: f7fd fad0 bl 801a4b4 801cf14: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf16: 68fb ldr r3, [r7, #12] 801cf18: 2b00 cmp r3, #0 801cf1a: d126 bne.n 801cf6a /* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */ tcp_handle_closepend(); 801cf1c: f7ff ffca bl 801ceb4 /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); 801cf20: f7ff ff98 bl 801ce54 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf24: 2001 movs r0, #1 801cf26: f7fd fac5 bl 801a4b4 801cf2a: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf2c: 68fb ldr r3, [r7, #12] 801cf2e: 2b00 cmp r3, #0 801cf30: d11b bne.n 801cf6a /* 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); 801cf32: 2009 movs r0, #9 801cf34: f7ff ff44 bl 801cdc0 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf38: 2001 movs r0, #1 801cf3a: f7fd fabb bl 801a4b4 801cf3e: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf40: 68fb ldr r3, [r7, #12] 801cf42: 2b00 cmp r3, #0 801cf44: d111 bne.n 801cf6a /* Try killing oldest connection in CLOSING. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); tcp_kill_state(CLOSING); 801cf46: 2008 movs r0, #8 801cf48: f7ff ff3a bl 801cdc0 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf4c: 2001 movs r0, #1 801cf4e: f7fd fab1 bl 801a4b4 801cf52: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf54: 68fb ldr r3, [r7, #12] 801cf56: 2b00 cmp r3, #0 801cf58: d107 bne.n 801cf6a /* 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); 801cf5a: 79fb ldrb r3, [r7, #7] 801cf5c: 4618 mov r0, r3 801cf5e: f7ff fee1 bl 801cd24 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf62: 2001 movs r0, #1 801cf64: f7fd faa6 bl 801a4b4 801cf68: 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) { 801cf6a: 68fb ldr r3, [r7, #12] 801cf6c: 2b00 cmp r3, #0 801cf6e: d03f beq.n 801cff0 /* zero out the whole pcb, so there is no need to initialize members to zero */ memset(pcb, 0, sizeof(struct tcp_pcb)); 801cf70: 229c movs r2, #156 @ 0x9c 801cf72: 2100 movs r1, #0 801cf74: 68f8 ldr r0, [r7, #12] 801cf76: f00d fe0b bl 802ab90 pcb->prio = prio; 801cf7a: 68fb ldr r3, [r7, #12] 801cf7c: 79fa ldrb r2, [r7, #7] 801cf7e: 755a strb r2, [r3, #21] pcb->snd_buf = TCP_SND_BUF; 801cf80: 68fb ldr r3, [r7, #12] 801cf82: f241 62d0 movw r2, #5840 @ 0x16d0 801cf86: 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); 801cf8a: 68fb ldr r3, [r7, #12] 801cf8c: f241 62d0 movw r2, #5840 @ 0x16d0 801cf90: 855a strh r2, [r3, #42] @ 0x2a 801cf92: 68fb ldr r3, [r7, #12] 801cf94: 8d5a ldrh r2, [r3, #42] @ 0x2a 801cf96: 68fb ldr r3, [r7, #12] 801cf98: 851a strh r2, [r3, #40] @ 0x28 pcb->ttl = TCP_TTL; 801cf9a: 68fb ldr r3, [r7, #12] 801cf9c: 22ff movs r2, #255 @ 0xff 801cf9e: 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; 801cfa0: 68fb ldr r3, [r7, #12] 801cfa2: f44f 7206 mov.w r2, #536 @ 0x218 801cfa6: 865a strh r2, [r3, #50] @ 0x32 pcb->rto = 3000 / TCP_SLOW_INTERVAL; 801cfa8: 68fb ldr r3, [r7, #12] 801cfaa: 2206 movs r2, #6 801cfac: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->sv = 3000 / TCP_SLOW_INTERVAL; 801cfb0: 68fb ldr r3, [r7, #12] 801cfb2: 2206 movs r2, #6 801cfb4: 87da strh r2, [r3, #62] @ 0x3e pcb->rtime = -1; 801cfb6: 68fb ldr r3, [r7, #12] 801cfb8: f64f 72ff movw r2, #65535 @ 0xffff 801cfbc: 861a strh r2, [r3, #48] @ 0x30 pcb->cwnd = 1; 801cfbe: 68fb ldr r3, [r7, #12] 801cfc0: 2201 movs r2, #1 801cfc2: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->tmr = tcp_ticks; 801cfc6: 4b0d ldr r3, [pc, #52] @ (801cffc ) 801cfc8: 681a ldr r2, [r3, #0] 801cfca: 68fb ldr r3, [r7, #12] 801cfcc: 621a str r2, [r3, #32] pcb->last_timer = tcp_timer_ctr; 801cfce: 4b0c ldr r3, [pc, #48] @ (801d000 ) 801cfd0: 781a ldrb r2, [r3, #0] 801cfd2: 68fb ldr r3, [r7, #12] 801cfd4: 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; 801cfd6: 68fb ldr r3, [r7, #12] 801cfd8: f241 62d0 movw r2, #5840 @ 0x16d0 801cfdc: f8a3 204a strh.w r2, [r3, #74] @ 0x4a #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 801cfe0: 68fb ldr r3, [r7, #12] 801cfe2: 4a08 ldr r2, [pc, #32] @ (801d004 ) 801cfe4: f8c3 2084 str.w r2, [r3, #132] @ 0x84 #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 801cfe8: 68fb ldr r3, [r7, #12] 801cfea: 4a07 ldr r2, [pc, #28] @ (801d008 ) 801cfec: 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; 801cff0: 68fb ldr r3, [r7, #12] } 801cff2: 4618 mov r0, r3 801cff4: 3710 adds r7, #16 801cff6: 46bd mov sp, r7 801cff8: bd80 pop {r7, pc} 801cffa: bf00 nop 801cffc: 2402af68 .word 0x2402af68 801d000: 2402af7e .word 0x2402af7e 801d004: 0801ccb9 .word 0x0801ccb9 801d008: 006ddd00 .word 0x006ddd00 0801d00c : * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new_ip_type(u8_t type) { 801d00c: b580 push {r7, lr} 801d00e: b084 sub sp, #16 801d010: af00 add r7, sp, #0 801d012: 4603 mov r3, r0 801d014: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; pcb = tcp_alloc(TCP_PRIO_NORMAL); 801d016: 2040 movs r0, #64 @ 0x40 801d018: f7ff ff72 bl 801cf00 801d01c: 60f8 str r0, [r7, #12] IP_SET_TYPE_VAL(pcb->remote_ip, type); } #else LWIP_UNUSED_ARG(type); #endif /* LWIP_IPV4 && LWIP_IPV6 */ return pcb; 801d01e: 68fb ldr r3, [r7, #12] } 801d020: 4618 mov r0, r3 801d022: 3710 adds r7, #16 801d024: 46bd mov sp, r7 801d026: bd80 pop {r7, pc} 0801d028 : * @param pcb tcp_pcb to set the callback argument * @param arg void pointer argument to pass to callback functions */ void tcp_arg(struct tcp_pcb *pcb, void *arg) { 801d028: b580 push {r7, lr} 801d02a: b082 sub sp, #8 801d02c: af00 add r7, sp, #0 801d02e: 6078 str r0, [r7, #4] 801d030: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d032: f7f3 fff3 bl 801101c /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { 801d036: 687b ldr r3, [r7, #4] 801d038: 2b00 cmp r3, #0 801d03a: d002 beq.n 801d042 pcb->callback_arg = arg; 801d03c: 687b ldr r3, [r7, #4] 801d03e: 683a ldr r2, [r7, #0] 801d040: 611a str r2, [r3, #16] } } 801d042: bf00 nop 801d044: 3708 adds r7, #8 801d046: 46bd mov sp, r7 801d048: bd80 pop {r7, pc} ... 0801d04c : * @param pcb tcp_pcb to set the recv callback * @param recv callback function to call for this pcb when data is received */ void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { 801d04c: b580 push {r7, lr} 801d04e: b082 sub sp, #8 801d050: af00 add r7, sp, #0 801d052: 6078 str r0, [r7, #4] 801d054: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d056: f7f3 ffe1 bl 801101c if (pcb != NULL) { 801d05a: 687b ldr r3, [r7, #4] 801d05c: 2b00 cmp r3, #0 801d05e: d00e beq.n 801d07e LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 801d060: 687b ldr r3, [r7, #4] 801d062: 7d1b ldrb r3, [r3, #20] 801d064: 2b01 cmp r3, #1 801d066: d106 bne.n 801d076 801d068: 4b07 ldr r3, [pc, #28] @ (801d088 ) 801d06a: f240 72df movw r2, #2015 @ 0x7df 801d06e: 4907 ldr r1, [pc, #28] @ (801d08c ) 801d070: 4807 ldr r0, [pc, #28] @ (801d090 ) 801d072: f00d fbfb bl 802a86c pcb->recv = recv; 801d076: 687b ldr r3, [r7, #4] 801d078: 683a ldr r2, [r7, #0] 801d07a: f8c3 2084 str.w r2, [r3, #132] @ 0x84 } } 801d07e: bf00 nop 801d080: 3708 adds r7, #8 801d082: 46bd mov sp, r7 801d084: bd80 pop {r7, pc} 801d086: bf00 nop 801d088: 0802f5a8 .word 0x0802f5a8 801d08c: 0802fb44 .word 0x0802fb44 801d090: 0802f5ec .word 0x0802f5ec 0801d094 : * @param pcb tcp_pcb to set the sent callback * @param sent callback function to call for this pcb when data is successfully sent */ void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { 801d094: b580 push {r7, lr} 801d096: b082 sub sp, #8 801d098: af00 add r7, sp, #0 801d09a: 6078 str r0, [r7, #4] 801d09c: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d09e: f7f3 ffbd bl 801101c if (pcb != NULL) { 801d0a2: 687b ldr r3, [r7, #4] 801d0a4: 2b00 cmp r3, #0 801d0a6: d00e beq.n 801d0c6 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 801d0a8: 687b ldr r3, [r7, #4] 801d0aa: 7d1b ldrb r3, [r3, #20] 801d0ac: 2b01 cmp r3, #1 801d0ae: d106 bne.n 801d0be 801d0b0: 4b07 ldr r3, [pc, #28] @ (801d0d0 ) 801d0b2: f240 72f3 movw r2, #2035 @ 0x7f3 801d0b6: 4907 ldr r1, [pc, #28] @ (801d0d4 ) 801d0b8: 4807 ldr r0, [pc, #28] @ (801d0d8 ) 801d0ba: f00d fbd7 bl 802a86c pcb->sent = sent; 801d0be: 687b ldr r3, [r7, #4] 801d0c0: 683a ldr r2, [r7, #0] 801d0c2: f8c3 2080 str.w r2, [r3, #128] @ 0x80 } } 801d0c6: bf00 nop 801d0c8: 3708 adds r7, #8 801d0ca: 46bd mov sp, r7 801d0cc: bd80 pop {r7, pc} 801d0ce: bf00 nop 801d0d0: 0802f5a8 .word 0x0802f5a8 801d0d4: 0802fb6c .word 0x0802fb6c 801d0d8: 0802f5ec .word 0x0802f5ec 0801d0dc : * @param err callback function to call for this pcb when a fatal error * has occurred on the connection */ void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { 801d0dc: b580 push {r7, lr} 801d0de: b082 sub sp, #8 801d0e0: af00 add r7, sp, #0 801d0e2: 6078 str r0, [r7, #4] 801d0e4: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d0e6: f7f3 ff99 bl 801101c if (pcb != NULL) { 801d0ea: 687b ldr r3, [r7, #4] 801d0ec: 2b00 cmp r3, #0 801d0ee: d00e beq.n 801d10e LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 801d0f0: 687b ldr r3, [r7, #4] 801d0f2: 7d1b ldrb r3, [r3, #20] 801d0f4: 2b01 cmp r3, #1 801d0f6: d106 bne.n 801d106 801d0f8: 4b07 ldr r3, [pc, #28] @ (801d118 ) 801d0fa: f640 020d movw r2, #2061 @ 0x80d 801d0fe: 4907 ldr r1, [pc, #28] @ (801d11c ) 801d100: 4807 ldr r0, [pc, #28] @ (801d120 ) 801d102: f00d fbb3 bl 802a86c pcb->errf = err; 801d106: 687b ldr r3, [r7, #4] 801d108: 683a ldr r2, [r7, #0] 801d10a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } 801d10e: bf00 nop 801d110: 3708 adds r7, #8 801d112: 46bd mov sp, r7 801d114: bd80 pop {r7, pc} 801d116: bf00 nop 801d118: 0802f5a8 .word 0x0802f5a8 801d11c: 0802fb94 .word 0x0802fb94 801d120: 0802f5ec .word 0x0802f5ec 0801d124 : * @param accept callback function to call for this pcb when LISTENing * connection has been connected to another host */ void tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) { 801d124: b580 push {r7, lr} 801d126: b084 sub sp, #16 801d128: af00 add r7, sp, #0 801d12a: 6078 str r0, [r7, #4] 801d12c: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d12e: f7f3 ff75 bl 801101c if ((pcb != NULL) && (pcb->state == LISTEN)) { 801d132: 687b ldr r3, [r7, #4] 801d134: 2b00 cmp r3, #0 801d136: d008 beq.n 801d14a 801d138: 687b ldr r3, [r7, #4] 801d13a: 7d1b ldrb r3, [r3, #20] 801d13c: 2b01 cmp r3, #1 801d13e: d104 bne.n 801d14a struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb; 801d140: 687b ldr r3, [r7, #4] 801d142: 60fb str r3, [r7, #12] lpcb->accept = accept; 801d144: 68fb ldr r3, [r7, #12] 801d146: 683a ldr r2, [r7, #0] 801d148: 619a str r2, [r3, #24] } } 801d14a: bf00 nop 801d14c: 3710 adds r7, #16 801d14e: 46bd mov sp, r7 801d150: bd80 pop {r7, pc} ... 0801d154 : * the application may use the polling functionality to call tcp_write() * again when the connection has been idle for a while. */ void tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) { 801d154: b580 push {r7, lr} 801d156: b084 sub sp, #16 801d158: af00 add r7, sp, #0 801d15a: 60f8 str r0, [r7, #12] 801d15c: 60b9 str r1, [r7, #8] 801d15e: 4613 mov r3, r2 801d160: 71fb strb r3, [r7, #7] LWIP_ASSERT_CORE_LOCKED(); 801d162: f7f3 ff5b bl 801101c LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); 801d166: 68fb ldr r3, [r7, #12] 801d168: 2b00 cmp r3, #0 801d16a: d107 bne.n 801d17c 801d16c: 4b0e ldr r3, [pc, #56] @ (801d1a8 ) 801d16e: f640 023d movw r2, #2109 @ 0x83d 801d172: 490e ldr r1, [pc, #56] @ (801d1ac ) 801d174: 480e ldr r0, [pc, #56] @ (801d1b0 ) 801d176: f00d fb79 bl 802a86c 801d17a: e011 b.n 801d1a0 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); 801d17c: 68fb ldr r3, [r7, #12] 801d17e: 7d1b ldrb r3, [r3, #20] 801d180: 2b01 cmp r3, #1 801d182: d106 bne.n 801d192 801d184: 4b08 ldr r3, [pc, #32] @ (801d1a8 ) 801d186: f640 023e movw r2, #2110 @ 0x83e 801d18a: 490a ldr r1, [pc, #40] @ (801d1b4 ) 801d18c: 4808 ldr r0, [pc, #32] @ (801d1b0 ) 801d18e: f00d fb6d bl 802a86c #if LWIP_CALLBACK_API pcb->poll = poll; 801d192: 68fb ldr r3, [r7, #12] 801d194: 68ba ldr r2, [r7, #8] 801d196: f8c3 208c str.w r2, [r3, #140] @ 0x8c #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 801d19a: 68fb ldr r3, [r7, #12] 801d19c: 79fa ldrb r2, [r7, #7] 801d19e: 775a strb r2, [r3, #29] } 801d1a0: 3710 adds r7, #16 801d1a2: 46bd mov sp, r7 801d1a4: bd80 pop {r7, pc} 801d1a6: bf00 nop 801d1a8: 0802f5a8 .word 0x0802f5a8 801d1ac: 0802fbbc .word 0x0802fbbc 801d1b0: 0802f5ec .word 0x0802f5ec 801d1b4: 0802fbd4 .word 0x0802fbd4 0801d1b8 : * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 801d1b8: b580 push {r7, lr} 801d1ba: b082 sub sp, #8 801d1bc: af00 add r7, sp, #0 801d1be: 6078 str r0, [r7, #4] LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 801d1c0: 687b ldr r3, [r7, #4] 801d1c2: 2b00 cmp r3, #0 801d1c4: d107 bne.n 801d1d6 801d1c6: 4b21 ldr r3, [pc, #132] @ (801d24c ) 801d1c8: f640 0251 movw r2, #2129 @ 0x851 801d1cc: 4920 ldr r1, [pc, #128] @ (801d250 ) 801d1ce: 4821 ldr r0, [pc, #132] @ (801d254 ) 801d1d0: f00d fb4c bl 802a86c 801d1d4: e037 b.n 801d246 if (pcb->state != CLOSED && 801d1d6: 687b ldr r3, [r7, #4] 801d1d8: 7d1b ldrb r3, [r3, #20] 801d1da: 2b00 cmp r3, #0 801d1dc: d033 beq.n 801d246 pcb->state != TIME_WAIT && 801d1de: 687b ldr r3, [r7, #4] 801d1e0: 7d1b ldrb r3, [r3, #20] if (pcb->state != CLOSED && 801d1e2: 2b0a cmp r3, #10 801d1e4: d02f beq.n 801d246 pcb->state != LISTEN) { 801d1e6: 687b ldr r3, [r7, #4] 801d1e8: 7d1b ldrb r3, [r3, #20] pcb->state != TIME_WAIT && 801d1ea: 2b01 cmp r3, #1 801d1ec: d02b beq.n 801d246 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); tcp_backlog_accepted(pcb); if (pcb->refused_data != NULL) { 801d1ee: 687b ldr r3, [r7, #4] 801d1f0: 6f9b ldr r3, [r3, #120] @ 0x78 801d1f2: 2b00 cmp r3, #0 801d1f4: d007 beq.n 801d206 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 801d1f6: 687b ldr r3, [r7, #4] 801d1f8: 6f9b ldr r3, [r3, #120] @ 0x78 801d1fa: 4618 mov r0, r3 801d1fc: f7fe f8be bl 801b37c pcb->refused_data = NULL; 801d200: 687b ldr r3, [r7, #4] 801d202: 2200 movs r2, #0 801d204: 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) { 801d206: 687b ldr r3, [r7, #4] 801d208: 6f5b ldr r3, [r3, #116] @ 0x74 801d20a: 2b00 cmp r3, #0 801d20c: d002 beq.n 801d214 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); tcp_free_ooseq(pcb); 801d20e: 6878 ldr r0, [r7, #4] 801d210: f000 f986 bl 801d520 } #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 801d214: 687b ldr r3, [r7, #4] 801d216: f64f 72ff movw r2, #65535 @ 0xffff 801d21a: 861a strh r2, [r3, #48] @ 0x30 tcp_segs_free(pcb->unsent); 801d21c: 687b ldr r3, [r7, #4] 801d21e: 6edb ldr r3, [r3, #108] @ 0x6c 801d220: 4618 mov r0, r3 801d222: f7ff fcef bl 801cc04 tcp_segs_free(pcb->unacked); 801d226: 687b ldr r3, [r7, #4] 801d228: 6f1b ldr r3, [r3, #112] @ 0x70 801d22a: 4618 mov r0, r3 801d22c: f7ff fcea bl 801cc04 pcb->unacked = pcb->unsent = NULL; 801d230: 687b ldr r3, [r7, #4] 801d232: 2200 movs r2, #0 801d234: 66da str r2, [r3, #108] @ 0x6c 801d236: 687b ldr r3, [r7, #4] 801d238: 6eda ldr r2, [r3, #108] @ 0x6c 801d23a: 687b ldr r3, [r7, #4] 801d23c: 671a str r2, [r3, #112] @ 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 801d23e: 687b ldr r3, [r7, #4] 801d240: 2200 movs r2, #0 801d242: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 #endif /* TCP_OVERSIZE */ } } 801d246: 3708 adds r7, #8 801d248: 46bd mov sp, r7 801d24a: bd80 pop {r7, pc} 801d24c: 0802f5a8 .word 0x0802f5a8 801d250: 0802fbf4 .word 0x0802fbf4 801d254: 0802f5ec .word 0x0802f5ec 0801d258 : * @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) { 801d258: b580 push {r7, lr} 801d25a: b084 sub sp, #16 801d25c: af00 add r7, sp, #0 801d25e: 6078 str r0, [r7, #4] 801d260: 6039 str r1, [r7, #0] LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 801d262: 683b ldr r3, [r7, #0] 801d264: 2b00 cmp r3, #0 801d266: d106 bne.n 801d276 801d268: 4b3e ldr r3, [pc, #248] @ (801d364 ) 801d26a: f640 0283 movw r2, #2179 @ 0x883 801d26e: 493e ldr r1, [pc, #248] @ (801d368 ) 801d270: 483e ldr r0, [pc, #248] @ (801d36c ) 801d272: f00d fafb bl 802a86c LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 801d276: 687b ldr r3, [r7, #4] 801d278: 2b00 cmp r3, #0 801d27a: d106 bne.n 801d28a 801d27c: 4b39 ldr r3, [pc, #228] @ (801d364 ) 801d27e: f640 0284 movw r2, #2180 @ 0x884 801d282: 493b ldr r1, [pc, #236] @ (801d370 ) 801d284: 4839 ldr r0, [pc, #228] @ (801d36c ) 801d286: f00d faf1 bl 802a86c TCP_RMV(pcblist, pcb); 801d28a: 687b ldr r3, [r7, #4] 801d28c: 681b ldr r3, [r3, #0] 801d28e: 683a ldr r2, [r7, #0] 801d290: 429a cmp r2, r3 801d292: d105 bne.n 801d2a0 801d294: 687b ldr r3, [r7, #4] 801d296: 681b ldr r3, [r3, #0] 801d298: 68da ldr r2, [r3, #12] 801d29a: 687b ldr r3, [r7, #4] 801d29c: 601a str r2, [r3, #0] 801d29e: e013 b.n 801d2c8 801d2a0: 687b ldr r3, [r7, #4] 801d2a2: 681b ldr r3, [r3, #0] 801d2a4: 60fb str r3, [r7, #12] 801d2a6: e00c b.n 801d2c2 801d2a8: 68fb ldr r3, [r7, #12] 801d2aa: 68db ldr r3, [r3, #12] 801d2ac: 683a ldr r2, [r7, #0] 801d2ae: 429a cmp r2, r3 801d2b0: d104 bne.n 801d2bc 801d2b2: 683b ldr r3, [r7, #0] 801d2b4: 68da ldr r2, [r3, #12] 801d2b6: 68fb ldr r3, [r7, #12] 801d2b8: 60da str r2, [r3, #12] 801d2ba: e005 b.n 801d2c8 801d2bc: 68fb ldr r3, [r7, #12] 801d2be: 68db ldr r3, [r3, #12] 801d2c0: 60fb str r3, [r7, #12] 801d2c2: 68fb ldr r3, [r7, #12] 801d2c4: 2b00 cmp r3, #0 801d2c6: d1ef bne.n 801d2a8 801d2c8: 683b ldr r3, [r7, #0] 801d2ca: 2200 movs r2, #0 801d2cc: 60da str r2, [r3, #12] tcp_pcb_purge(pcb); 801d2ce: 6838 ldr r0, [r7, #0] 801d2d0: f7ff ff72 bl 801d1b8 /* if there is an outstanding delayed ACKs, send it */ if ((pcb->state != TIME_WAIT) && 801d2d4: 683b ldr r3, [r7, #0] 801d2d6: 7d1b ldrb r3, [r3, #20] 801d2d8: 2b0a cmp r3, #10 801d2da: d013 beq.n 801d304 (pcb->state != LISTEN) && 801d2dc: 683b ldr r3, [r7, #0] 801d2de: 7d1b ldrb r3, [r3, #20] if ((pcb->state != TIME_WAIT) && 801d2e0: 2b01 cmp r3, #1 801d2e2: d00f beq.n 801d304 (pcb->flags & TF_ACK_DELAY)) { 801d2e4: 683b ldr r3, [r7, #0] 801d2e6: 8b5b ldrh r3, [r3, #26] 801d2e8: f003 0301 and.w r3, r3, #1 (pcb->state != LISTEN) && 801d2ec: 2b00 cmp r3, #0 801d2ee: d009 beq.n 801d304 tcp_ack_now(pcb); 801d2f0: 683b ldr r3, [r7, #0] 801d2f2: 8b5b ldrh r3, [r3, #26] 801d2f4: f043 0302 orr.w r3, r3, #2 801d2f8: b29a uxth r2, r3 801d2fa: 683b ldr r3, [r7, #0] 801d2fc: 835a strh r2, [r3, #26] tcp_output(pcb); 801d2fe: 6838 ldr r0, [r7, #0] 801d300: f003 fc28 bl 8020b54 } if (pcb->state != LISTEN) { 801d304: 683b ldr r3, [r7, #0] 801d306: 7d1b ldrb r3, [r3, #20] 801d308: 2b01 cmp r3, #1 801d30a: d020 beq.n 801d34e LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); 801d30c: 683b ldr r3, [r7, #0] 801d30e: 6edb ldr r3, [r3, #108] @ 0x6c 801d310: 2b00 cmp r3, #0 801d312: d006 beq.n 801d322 801d314: 4b13 ldr r3, [pc, #76] @ (801d364 ) 801d316: f640 0293 movw r2, #2195 @ 0x893 801d31a: 4916 ldr r1, [pc, #88] @ (801d374 ) 801d31c: 4813 ldr r0, [pc, #76] @ (801d36c ) 801d31e: f00d faa5 bl 802a86c LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); 801d322: 683b ldr r3, [r7, #0] 801d324: 6f1b ldr r3, [r3, #112] @ 0x70 801d326: 2b00 cmp r3, #0 801d328: d006 beq.n 801d338 801d32a: 4b0e ldr r3, [pc, #56] @ (801d364 ) 801d32c: f640 0294 movw r2, #2196 @ 0x894 801d330: 4911 ldr r1, [pc, #68] @ (801d378 ) 801d332: 480e ldr r0, [pc, #56] @ (801d36c ) 801d334: f00d fa9a bl 802a86c #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); 801d338: 683b ldr r3, [r7, #0] 801d33a: 6f5b ldr r3, [r3, #116] @ 0x74 801d33c: 2b00 cmp r3, #0 801d33e: d006 beq.n 801d34e 801d340: 4b08 ldr r3, [pc, #32] @ (801d364 ) 801d342: f640 0296 movw r2, #2198 @ 0x896 801d346: 490d ldr r1, [pc, #52] @ (801d37c ) 801d348: 4808 ldr r0, [pc, #32] @ (801d36c ) 801d34a: f00d fa8f bl 802a86c #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 801d34e: 683b ldr r3, [r7, #0] 801d350: 2200 movs r2, #0 801d352: 751a strb r2, [r3, #20] /* reset the local port to prevent the pcb from being 'bound' */ pcb->local_port = 0; 801d354: 683b ldr r3, [r7, #0] 801d356: 2200 movs r2, #0 801d358: 82da strh r2, [r3, #22] LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); } 801d35a: bf00 nop 801d35c: 3710 adds r7, #16 801d35e: 46bd mov sp, r7 801d360: bd80 pop {r7, pc} 801d362: bf00 nop 801d364: 0802f5a8 .word 0x0802f5a8 801d368: 0802fc10 .word 0x0802fc10 801d36c: 0802f5ec .word 0x0802f5ec 801d370: 0802fc2c .word 0x0802fc2c 801d374: 0802fc4c .word 0x0802fc4c 801d378: 0802fc64 .word 0x0802fc64 801d37c: 0802fc80 .word 0x0802fc80 0801d380 : * * @return u32_t pseudo random sequence number */ u32_t tcp_next_iss(struct tcp_pcb *pcb) { 801d380: b580 push {r7, lr} 801d382: b082 sub sp, #8 801d384: af00 add r7, sp, #0 801d386: 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); 801d388: 687b ldr r3, [r7, #4] 801d38a: 2b00 cmp r3, #0 801d38c: d106 bne.n 801d39c 801d38e: 4b0a ldr r3, [pc, #40] @ (801d3b8 ) 801d390: f640 02af movw r2, #2223 @ 0x8af 801d394: 4909 ldr r1, [pc, #36] @ (801d3bc ) 801d396: 480a ldr r0, [pc, #40] @ (801d3c0 ) 801d398: f00d fa68 bl 802a86c LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ 801d39c: 4b09 ldr r3, [pc, #36] @ (801d3c4 ) 801d39e: 681a ldr r2, [r3, #0] 801d3a0: 4b09 ldr r3, [pc, #36] @ (801d3c8 ) 801d3a2: 681b ldr r3, [r3, #0] 801d3a4: 4413 add r3, r2 801d3a6: 4a07 ldr r2, [pc, #28] @ (801d3c4 ) 801d3a8: 6013 str r3, [r2, #0] return iss; 801d3aa: 4b06 ldr r3, [pc, #24] @ (801d3c4 ) 801d3ac: 681b ldr r3, [r3, #0] #endif /* LWIP_HOOK_TCP_ISN */ } 801d3ae: 4618 mov r0, r3 801d3b0: 3708 adds r7, #8 801d3b2: 46bd mov sp, r7 801d3b4: bd80 pop {r7, pc} 801d3b6: bf00 nop 801d3b8: 0802f5a8 .word 0x0802f5a8 801d3bc: 0802fc98 .word 0x0802fc98 801d3c0: 0802f5ec .word 0x0802f5ec 801d3c4: 24000050 .word 0x24000050 801d3c8: 2402af68 .word 0x2402af68 0801d3cc : * 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) { 801d3cc: b580 push {r7, lr} 801d3ce: b086 sub sp, #24 801d3d0: af00 add r7, sp, #0 801d3d2: 4603 mov r3, r0 801d3d4: 60b9 str r1, [r7, #8] 801d3d6: 607a str r2, [r7, #4] 801d3d8: 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); 801d3da: 687b ldr r3, [r7, #4] 801d3dc: 2b00 cmp r3, #0 801d3de: d106 bne.n 801d3ee 801d3e0: 4b14 ldr r3, [pc, #80] @ (801d434 ) 801d3e2: f640 02c5 movw r2, #2245 @ 0x8c5 801d3e6: 4914 ldr r1, [pc, #80] @ (801d438 ) 801d3e8: 4814 ldr r0, [pc, #80] @ (801d43c ) 801d3ea: f00d fa3f bl 802a86c else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { if (outif == NULL) { 801d3ee: 68bb ldr r3, [r7, #8] 801d3f0: 2b00 cmp r3, #0 801d3f2: d101 bne.n 801d3f8 return sendmss; 801d3f4: 89fb ldrh r3, [r7, #14] 801d3f6: e019 b.n 801d42c } mtu = outif->mtu; 801d3f8: 68bb ldr r3, [r7, #8] 801d3fa: 8d1b ldrh r3, [r3, #40] @ 0x28 801d3fc: 82fb strh r3, [r7, #22] } #endif /* LWIP_IPV4 */ if (mtu != 0) { 801d3fe: 8afb ldrh r3, [r7, #22] 801d400: 2b00 cmp r3, #0 801d402: d012 beq.n 801d42a else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { offset = IP_HLEN + TCP_HLEN; 801d404: 2328 movs r3, #40 @ 0x28 801d406: 82bb strh r3, [r7, #20] } #endif /* LWIP_IPV4 */ mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 801d408: 8afa ldrh r2, [r7, #22] 801d40a: 8abb ldrh r3, [r7, #20] 801d40c: 429a cmp r2, r3 801d40e: d904 bls.n 801d41a 801d410: 8afa ldrh r2, [r7, #22] 801d412: 8abb ldrh r3, [r7, #20] 801d414: 1ad3 subs r3, r2, r3 801d416: b29b uxth r3, r3 801d418: e000 b.n 801d41c 801d41a: 2300 movs r3, #0 801d41c: 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); 801d41e: 8a7a ldrh r2, [r7, #18] 801d420: 89fb ldrh r3, [r7, #14] 801d422: 4293 cmp r3, r2 801d424: bf28 it cs 801d426: 4613 movcs r3, r2 801d428: 81fb strh r3, [r7, #14] } return sendmss; 801d42a: 89fb ldrh r3, [r7, #14] } 801d42c: 4618 mov r0, r3 801d42e: 3718 adds r7, #24 801d430: 46bd mov sp, r7 801d432: bd80 pop {r7, pc} 801d434: 0802f5a8 .word 0x0802f5a8 801d438: 0802fcb4 .word 0x0802fcb4 801d43c: 0802f5ec .word 0x0802f5ec 0801d440 : #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) { 801d440: b580 push {r7, lr} 801d442: b084 sub sp, #16 801d444: af00 add r7, sp, #0 801d446: 6078 str r0, [r7, #4] 801d448: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; pcb = pcb_list; 801d44a: 683b ldr r3, [r7, #0] 801d44c: 60fb str r3, [r7, #12] LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); 801d44e: 687b ldr r3, [r7, #4] 801d450: 2b00 cmp r3, #0 801d452: d119 bne.n 801d488 801d454: 4b10 ldr r3, [pc, #64] @ (801d498 ) 801d456: f44f 6210 mov.w r2, #2304 @ 0x900 801d45a: 4910 ldr r1, [pc, #64] @ (801d49c ) 801d45c: 4810 ldr r0, [pc, #64] @ (801d4a0 ) 801d45e: f00d fa05 bl 802a86c while (pcb != NULL) { 801d462: e011 b.n 801d488 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&pcb->local_ip, old_addr) 801d464: 68fb ldr r3, [r7, #12] 801d466: 681a ldr r2, [r3, #0] 801d468: 687b ldr r3, [r7, #4] 801d46a: 681b ldr r3, [r3, #0] 801d46c: 429a cmp r2, r3 801d46e: d108 bne.n 801d482 /* 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; 801d470: 68fb ldr r3, [r7, #12] 801d472: 68db ldr r3, [r3, #12] 801d474: 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); 801d476: 68f8 ldr r0, [r7, #12] 801d478: f7fe fd86 bl 801bf88 pcb = next; 801d47c: 68bb ldr r3, [r7, #8] 801d47e: 60fb str r3, [r7, #12] 801d480: e002 b.n 801d488 } else { pcb = pcb->next; 801d482: 68fb ldr r3, [r7, #12] 801d484: 68db ldr r3, [r3, #12] 801d486: 60fb str r3, [r7, #12] while (pcb != NULL) { 801d488: 68fb ldr r3, [r7, #12] 801d48a: 2b00 cmp r3, #0 801d48c: d1ea bne.n 801d464 } } } 801d48e: bf00 nop 801d490: bf00 nop 801d492: 3710 adds r7, #16 801d494: 46bd mov sp, r7 801d496: bd80 pop {r7, pc} 801d498: 0802f5a8 .word 0x0802f5a8 801d49c: 0802fcdc .word 0x0802fcdc 801d4a0: 0802f5ec .word 0x0802f5ec 0801d4a4 : * @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) { 801d4a4: b580 push {r7, lr} 801d4a6: b084 sub sp, #16 801d4a8: af00 add r7, sp, #0 801d4aa: 6078 str r0, [r7, #4] 801d4ac: 6039 str r1, [r7, #0] struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { 801d4ae: 687b ldr r3, [r7, #4] 801d4b0: 2b00 cmp r3, #0 801d4b2: d02a beq.n 801d50a 801d4b4: 687b ldr r3, [r7, #4] 801d4b6: 681b ldr r3, [r3, #0] 801d4b8: 2b00 cmp r3, #0 801d4ba: d026 beq.n 801d50a tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); 801d4bc: 4b15 ldr r3, [pc, #84] @ (801d514 ) 801d4be: 681b ldr r3, [r3, #0] 801d4c0: 4619 mov r1, r3 801d4c2: 6878 ldr r0, [r7, #4] 801d4c4: f7ff ffbc bl 801d440 tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); 801d4c8: 4b13 ldr r3, [pc, #76] @ (801d518 ) 801d4ca: 681b ldr r3, [r3, #0] 801d4cc: 4619 mov r1, r3 801d4ce: 6878 ldr r0, [r7, #4] 801d4d0: f7ff ffb6 bl 801d440 if (!ip_addr_isany(new_addr)) { 801d4d4: 683b ldr r3, [r7, #0] 801d4d6: 2b00 cmp r3, #0 801d4d8: d017 beq.n 801d50a 801d4da: 683b ldr r3, [r7, #0] 801d4dc: 681b ldr r3, [r3, #0] 801d4de: 2b00 cmp r3, #0 801d4e0: d013 beq.n 801d50a /* PCB bound to current local interface address? */ for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d4e2: 4b0e ldr r3, [pc, #56] @ (801d51c ) 801d4e4: 681b ldr r3, [r3, #0] 801d4e6: 60fb str r3, [r7, #12] 801d4e8: e00c b.n 801d504 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { 801d4ea: 68fb ldr r3, [r7, #12] 801d4ec: 681a ldr r2, [r3, #0] 801d4ee: 687b ldr r3, [r7, #4] 801d4f0: 681b ldr r3, [r3, #0] 801d4f2: 429a cmp r2, r3 801d4f4: d103 bne.n 801d4fe /* 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); 801d4f6: 683b ldr r3, [r7, #0] 801d4f8: 681a ldr r2, [r3, #0] 801d4fa: 68fb ldr r3, [r7, #12] 801d4fc: 601a str r2, [r3, #0] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d4fe: 68fb ldr r3, [r7, #12] 801d500: 68db ldr r3, [r3, #12] 801d502: 60fb str r3, [r7, #12] 801d504: 68fb ldr r3, [r7, #12] 801d506: 2b00 cmp r3, #0 801d508: d1ef bne.n 801d4ea } } } } } 801d50a: bf00 nop 801d50c: 3710 adds r7, #16 801d50e: 46bd mov sp, r7 801d510: bd80 pop {r7, pc} 801d512: bf00 nop 801d514: 2402af74 .word 0x2402af74 801d518: 2402af6c .word 0x2402af6c 801d51c: 2402af70 .word 0x2402af70 0801d520 : #if TCP_QUEUE_OOSEQ /* Free all ooseq pbufs (and possibly reset SACK state) */ void tcp_free_ooseq(struct tcp_pcb *pcb) { 801d520: b580 push {r7, lr} 801d522: b082 sub sp, #8 801d524: af00 add r7, sp, #0 801d526: 6078 str r0, [r7, #4] if (pcb->ooseq) { 801d528: 687b ldr r3, [r7, #4] 801d52a: 6f5b ldr r3, [r3, #116] @ 0x74 801d52c: 2b00 cmp r3, #0 801d52e: d007 beq.n 801d540 tcp_segs_free(pcb->ooseq); 801d530: 687b ldr r3, [r7, #4] 801d532: 6f5b ldr r3, [r3, #116] @ 0x74 801d534: 4618 mov r0, r3 801d536: f7ff fb65 bl 801cc04 pcb->ooseq = NULL; 801d53a: 687b ldr r3, [r7, #4] 801d53c: 2200 movs r2, #0 801d53e: 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 */ } } 801d540: bf00 nop 801d542: 3708 adds r7, #8 801d544: 46bd mov sp, r7 801d546: bd80 pop {r7, pc} 0801d548 : * @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) { 801d548: b590 push {r4, r7, lr} 801d54a: b08d sub sp, #52 @ 0x34 801d54c: af04 add r7, sp, #16 801d54e: 6078 str r0, [r7, #4] 801d550: 6039 str r1, [r7, #0] #endif /* SO_REUSE */ u8_t hdrlen_bytes; err_t err; LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 801d552: f7f3 fd63 bl 801101c LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); 801d556: 687b ldr r3, [r7, #4] 801d558: 2b00 cmp r3, #0 801d55a: d105 bne.n 801d568 801d55c: 4b9b ldr r3, [pc, #620] @ (801d7cc ) 801d55e: 2283 movs r2, #131 @ 0x83 801d560: 499b ldr r1, [pc, #620] @ (801d7d0 ) 801d562: 489c ldr r0, [pc, #624] @ (801d7d4 ) 801d564: f00d f982 bl 802a86c PERF_START; TCP_STATS_INC(tcp.recv); MIB2_STATS_INC(mib2.tcpinsegs); tcphdr = (struct tcp_hdr *)p->payload; 801d568: 687b ldr r3, [r7, #4] 801d56a: 685b ldr r3, [r3, #4] 801d56c: 4a9a ldr r2, [pc, #616] @ (801d7d8 ) 801d56e: 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) { 801d570: 687b ldr r3, [r7, #4] 801d572: 895b ldrh r3, [r3, #10] 801d574: 2b13 cmp r3, #19 801d576: f240 83d1 bls.w 801dd1c 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()) || 801d57a: 4b98 ldr r3, [pc, #608] @ (801d7dc ) 801d57c: 695b ldr r3, [r3, #20] 801d57e: 4a97 ldr r2, [pc, #604] @ (801d7dc ) 801d580: 6812 ldr r2, [r2, #0] 801d582: 4611 mov r1, r2 801d584: 4618 mov r0, r3 801d586: f008 fc1b bl 8025dc0 801d58a: 4603 mov r3, r0 801d58c: 2b00 cmp r3, #0 801d58e: f040 83c7 bne.w 801dd20 ip_addr_ismulticast(ip_current_dest_addr())) { 801d592: 4b92 ldr r3, [pc, #584] @ (801d7dc ) 801d594: 695b ldr r3, [r3, #20] 801d596: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 801d59a: 2be0 cmp r3, #224 @ 0xe0 801d59c: f000 83c0 beq.w 801dd20 } } #endif /* CHECKSUM_CHECK_TCP */ /* sanity-check header length */ hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); 801d5a0: 4b8d ldr r3, [pc, #564] @ (801d7d8 ) 801d5a2: 681b ldr r3, [r3, #0] 801d5a4: 899b ldrh r3, [r3, #12] 801d5a6: b29b uxth r3, r3 801d5a8: 4618 mov r0, r3 801d5aa: f7fc fa05 bl 80199b8 801d5ae: 4603 mov r3, r0 801d5b0: 0b1b lsrs r3, r3, #12 801d5b2: b29b uxth r3, r3 801d5b4: b2db uxtb r3, r3 801d5b6: 009b lsls r3, r3, #2 801d5b8: 74bb strb r3, [r7, #18] if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { 801d5ba: 7cbb ldrb r3, [r7, #18] 801d5bc: 2b13 cmp r3, #19 801d5be: f240 83b1 bls.w 801dd24 801d5c2: 7cbb ldrb r3, [r7, #18] 801d5c4: b29a uxth r2, r3 801d5c6: 687b ldr r3, [r7, #4] 801d5c8: 891b ldrh r3, [r3, #8] 801d5ca: 429a cmp r2, r3 801d5cc: f200 83aa bhi.w 801dd24 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); 801d5d0: 7cbb ldrb r3, [r7, #18] 801d5d2: b29b uxth r3, r3 801d5d4: 3b14 subs r3, #20 801d5d6: b29a uxth r2, r3 801d5d8: 4b81 ldr r3, [pc, #516] @ (801d7e0 ) 801d5da: 801a strh r2, [r3, #0] tcphdr_opt2 = NULL; 801d5dc: 4b81 ldr r3, [pc, #516] @ (801d7e4 ) 801d5de: 2200 movs r2, #0 801d5e0: 601a str r2, [r3, #0] if (p->len >= hdrlen_bytes) { 801d5e2: 687b ldr r3, [r7, #4] 801d5e4: 895a ldrh r2, [r3, #10] 801d5e6: 7cbb ldrb r3, [r7, #18] 801d5e8: b29b uxth r3, r3 801d5ea: 429a cmp r2, r3 801d5ec: d309 bcc.n 801d602 /* all options are in the first pbuf */ tcphdr_opt1len = tcphdr_optlen; 801d5ee: 4b7c ldr r3, [pc, #496] @ (801d7e0 ) 801d5f0: 881a ldrh r2, [r3, #0] 801d5f2: 4b7d ldr r3, [pc, #500] @ (801d7e8 ) 801d5f4: 801a strh r2, [r3, #0] pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ 801d5f6: 7cbb ldrb r3, [r7, #18] 801d5f8: 4619 mov r1, r3 801d5fa: 6878 ldr r0, [r7, #4] 801d5fc: f7fd fe06 bl 801b20c 801d600: e04e b.n 801d6a0 } 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); 801d602: 687b ldr r3, [r7, #4] 801d604: 681b ldr r3, [r3, #0] 801d606: 2b00 cmp r3, #0 801d608: d105 bne.n 801d616 801d60a: 4b70 ldr r3, [pc, #448] @ (801d7cc ) 801d60c: 22c2 movs r2, #194 @ 0xc2 801d60e: 4977 ldr r1, [pc, #476] @ (801d7ec ) 801d610: 4870 ldr r0, [pc, #448] @ (801d7d4 ) 801d612: f00d f92b bl 802a86c /* advance over the TCP header (cannot fail) */ pbuf_remove_header(p, TCP_HLEN); 801d616: 2114 movs r1, #20 801d618: 6878 ldr r0, [r7, #4] 801d61a: f7fd fdf7 bl 801b20c /* determine how long the first and second parts of the options are */ tcphdr_opt1len = p->len; 801d61e: 687b ldr r3, [r7, #4] 801d620: 895a ldrh r2, [r3, #10] 801d622: 4b71 ldr r3, [pc, #452] @ (801d7e8 ) 801d624: 801a strh r2, [r3, #0] opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); 801d626: 4b6e ldr r3, [pc, #440] @ (801d7e0 ) 801d628: 881a ldrh r2, [r3, #0] 801d62a: 4b6f ldr r3, [pc, #444] @ (801d7e8 ) 801d62c: 881b ldrh r3, [r3, #0] 801d62e: 1ad3 subs r3, r2, r3 801d630: 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); 801d632: 4b6d ldr r3, [pc, #436] @ (801d7e8 ) 801d634: 881b ldrh r3, [r3, #0] 801d636: 4619 mov r1, r3 801d638: 6878 ldr r0, [r7, #4] 801d63a: f7fd fde7 bl 801b20c /* check that the options fit in the second pbuf */ if (opt2len > p->next->len) { 801d63e: 687b ldr r3, [r7, #4] 801d640: 681b ldr r3, [r3, #0] 801d642: 895b ldrh r3, [r3, #10] 801d644: 8a3a ldrh r2, [r7, #16] 801d646: 429a cmp r2, r3 801d648: f200 836e bhi.w 801dd28 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* remember the pointer to the second part of the options */ tcphdr_opt2 = (u8_t *)p->next->payload; 801d64c: 687b ldr r3, [r7, #4] 801d64e: 681b ldr r3, [r3, #0] 801d650: 685b ldr r3, [r3, #4] 801d652: 4a64 ldr r2, [pc, #400] @ (801d7e4 ) 801d654: 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); 801d656: 687b ldr r3, [r7, #4] 801d658: 681b ldr r3, [r3, #0] 801d65a: 8a3a ldrh r2, [r7, #16] 801d65c: 4611 mov r1, r2 801d65e: 4618 mov r0, r3 801d660: f7fd fdd4 bl 801b20c p->tot_len = (u16_t)(p->tot_len - opt2len); 801d664: 687b ldr r3, [r7, #4] 801d666: 891a ldrh r2, [r3, #8] 801d668: 8a3b ldrh r3, [r7, #16] 801d66a: 1ad3 subs r3, r2, r3 801d66c: b29a uxth r2, r3 801d66e: 687b ldr r3, [r7, #4] 801d670: 811a strh r2, [r3, #8] LWIP_ASSERT("p->len == 0", p->len == 0); 801d672: 687b ldr r3, [r7, #4] 801d674: 895b ldrh r3, [r3, #10] 801d676: 2b00 cmp r3, #0 801d678: d005 beq.n 801d686 801d67a: 4b54 ldr r3, [pc, #336] @ (801d7cc ) 801d67c: 22df movs r2, #223 @ 0xdf 801d67e: 495c ldr r1, [pc, #368] @ (801d7f0 ) 801d680: 4854 ldr r0, [pc, #336] @ (801d7d4 ) 801d682: f00d f8f3 bl 802a86c LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); 801d686: 687b ldr r3, [r7, #4] 801d688: 891a ldrh r2, [r3, #8] 801d68a: 687b ldr r3, [r7, #4] 801d68c: 681b ldr r3, [r3, #0] 801d68e: 891b ldrh r3, [r3, #8] 801d690: 429a cmp r2, r3 801d692: d005 beq.n 801d6a0 801d694: 4b4d ldr r3, [pc, #308] @ (801d7cc ) 801d696: 22e0 movs r2, #224 @ 0xe0 801d698: 4956 ldr r1, [pc, #344] @ (801d7f4 ) 801d69a: 484e ldr r0, [pc, #312] @ (801d7d4 ) 801d69c: f00d f8e6 bl 802a86c } /* Convert fields in TCP header to host byte order. */ tcphdr->src = lwip_ntohs(tcphdr->src); 801d6a0: 4b4d ldr r3, [pc, #308] @ (801d7d8 ) 801d6a2: 681b ldr r3, [r3, #0] 801d6a4: 881b ldrh r3, [r3, #0] 801d6a6: b29b uxth r3, r3 801d6a8: 4a4b ldr r2, [pc, #300] @ (801d7d8 ) 801d6aa: 6814 ldr r4, [r2, #0] 801d6ac: 4618 mov r0, r3 801d6ae: f7fc f983 bl 80199b8 801d6b2: 4603 mov r3, r0 801d6b4: 8023 strh r3, [r4, #0] tcphdr->dest = lwip_ntohs(tcphdr->dest); 801d6b6: 4b48 ldr r3, [pc, #288] @ (801d7d8 ) 801d6b8: 681b ldr r3, [r3, #0] 801d6ba: 885b ldrh r3, [r3, #2] 801d6bc: b29b uxth r3, r3 801d6be: 4a46 ldr r2, [pc, #280] @ (801d7d8 ) 801d6c0: 6814 ldr r4, [r2, #0] 801d6c2: 4618 mov r0, r3 801d6c4: f7fc f978 bl 80199b8 801d6c8: 4603 mov r3, r0 801d6ca: 8063 strh r3, [r4, #2] seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); 801d6cc: 4b42 ldr r3, [pc, #264] @ (801d7d8 ) 801d6ce: 681b ldr r3, [r3, #0] 801d6d0: 685b ldr r3, [r3, #4] 801d6d2: 4a41 ldr r2, [pc, #260] @ (801d7d8 ) 801d6d4: 6814 ldr r4, [r2, #0] 801d6d6: 4618 mov r0, r3 801d6d8: f7fc f983 bl 80199e2 801d6dc: 4603 mov r3, r0 801d6de: 6063 str r3, [r4, #4] 801d6e0: 6863 ldr r3, [r4, #4] 801d6e2: 4a45 ldr r2, [pc, #276] @ (801d7f8 ) 801d6e4: 6013 str r3, [r2, #0] ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); 801d6e6: 4b3c ldr r3, [pc, #240] @ (801d7d8 ) 801d6e8: 681b ldr r3, [r3, #0] 801d6ea: 689b ldr r3, [r3, #8] 801d6ec: 4a3a ldr r2, [pc, #232] @ (801d7d8 ) 801d6ee: 6814 ldr r4, [r2, #0] 801d6f0: 4618 mov r0, r3 801d6f2: f7fc f976 bl 80199e2 801d6f6: 4603 mov r3, r0 801d6f8: 60a3 str r3, [r4, #8] 801d6fa: 68a3 ldr r3, [r4, #8] 801d6fc: 4a3f ldr r2, [pc, #252] @ (801d7fc ) 801d6fe: 6013 str r3, [r2, #0] tcphdr->wnd = lwip_ntohs(tcphdr->wnd); 801d700: 4b35 ldr r3, [pc, #212] @ (801d7d8 ) 801d702: 681b ldr r3, [r3, #0] 801d704: 89db ldrh r3, [r3, #14] 801d706: b29b uxth r3, r3 801d708: 4a33 ldr r2, [pc, #204] @ (801d7d8 ) 801d70a: 6814 ldr r4, [r2, #0] 801d70c: 4618 mov r0, r3 801d70e: f7fc f953 bl 80199b8 801d712: 4603 mov r3, r0 801d714: 81e3 strh r3, [r4, #14] flags = TCPH_FLAGS(tcphdr); 801d716: 4b30 ldr r3, [pc, #192] @ (801d7d8 ) 801d718: 681b ldr r3, [r3, #0] 801d71a: 899b ldrh r3, [r3, #12] 801d71c: b29b uxth r3, r3 801d71e: 4618 mov r0, r3 801d720: f7fc f94a bl 80199b8 801d724: 4603 mov r3, r0 801d726: b2db uxtb r3, r3 801d728: f003 033f and.w r3, r3, #63 @ 0x3f 801d72c: b2da uxtb r2, r3 801d72e: 4b34 ldr r3, [pc, #208] @ (801d800 ) 801d730: 701a strb r2, [r3, #0] tcplen = p->tot_len; 801d732: 687b ldr r3, [r7, #4] 801d734: 891a ldrh r2, [r3, #8] 801d736: 4b33 ldr r3, [pc, #204] @ (801d804 ) 801d738: 801a strh r2, [r3, #0] if (flags & (TCP_FIN | TCP_SYN)) { 801d73a: 4b31 ldr r3, [pc, #196] @ (801d800 ) 801d73c: 781b ldrb r3, [r3, #0] 801d73e: f003 0303 and.w r3, r3, #3 801d742: 2b00 cmp r3, #0 801d744: d00c beq.n 801d760 tcplen++; 801d746: 4b2f ldr r3, [pc, #188] @ (801d804 ) 801d748: 881b ldrh r3, [r3, #0] 801d74a: 3301 adds r3, #1 801d74c: b29a uxth r2, r3 801d74e: 4b2d ldr r3, [pc, #180] @ (801d804 ) 801d750: 801a strh r2, [r3, #0] if (tcplen < p->tot_len) { 801d752: 687b ldr r3, [r7, #4] 801d754: 891a ldrh r2, [r3, #8] 801d756: 4b2b ldr r3, [pc, #172] @ (801d804 ) 801d758: 881b ldrh r3, [r3, #0] 801d75a: 429a cmp r2, r3 801d75c: f200 82e6 bhi.w 801dd2c } } /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 801d760: 2300 movs r3, #0 801d762: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801d764: 4b28 ldr r3, [pc, #160] @ (801d808 ) 801d766: 681b ldr r3, [r3, #0] 801d768: 61bb str r3, [r7, #24] 801d76a: e09d b.n 801d8a8 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 801d76c: 69bb ldr r3, [r7, #24] 801d76e: 7d1b ldrb r3, [r3, #20] 801d770: 2b00 cmp r3, #0 801d772: d105 bne.n 801d780 801d774: 4b15 ldr r3, [pc, #84] @ (801d7cc ) 801d776: 22fb movs r2, #251 @ 0xfb 801d778: 4924 ldr r1, [pc, #144] @ (801d80c ) 801d77a: 4816 ldr r0, [pc, #88] @ (801d7d4 ) 801d77c: f00d f876 bl 802a86c LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 801d780: 69bb ldr r3, [r7, #24] 801d782: 7d1b ldrb r3, [r3, #20] 801d784: 2b0a cmp r3, #10 801d786: d105 bne.n 801d794 801d788: 4b10 ldr r3, [pc, #64] @ (801d7cc ) 801d78a: 22fc movs r2, #252 @ 0xfc 801d78c: 4920 ldr r1, [pc, #128] @ (801d810 ) 801d78e: 4811 ldr r0, [pc, #68] @ (801d7d4 ) 801d790: f00d f86c bl 802a86c LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 801d794: 69bb ldr r3, [r7, #24] 801d796: 7d1b ldrb r3, [r3, #20] 801d798: 2b01 cmp r3, #1 801d79a: d105 bne.n 801d7a8 801d79c: 4b0b ldr r3, [pc, #44] @ (801d7cc ) 801d79e: 22fd movs r2, #253 @ 0xfd 801d7a0: 491c ldr r1, [pc, #112] @ (801d814 ) 801d7a2: 480c ldr r0, [pc, #48] @ (801d7d4 ) 801d7a4: f00d f862 bl 802a86c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d7a8: 69bb ldr r3, [r7, #24] 801d7aa: 7a1b ldrb r3, [r3, #8] 801d7ac: 2b00 cmp r3, #0 801d7ae: d033 beq.n 801d818 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d7b0: 69bb ldr r3, [r7, #24] 801d7b2: 7a1a ldrb r2, [r3, #8] 801d7b4: 4b09 ldr r3, [pc, #36] @ (801d7dc ) 801d7b6: 685b ldr r3, [r3, #4] 801d7b8: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d7bc: 3301 adds r3, #1 801d7be: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d7c0: 429a cmp r2, r3 801d7c2: d029 beq.n 801d818 prev = pcb; 801d7c4: 69bb ldr r3, [r7, #24] 801d7c6: 61fb str r3, [r7, #28] continue; 801d7c8: e06b b.n 801d8a2 801d7ca: bf00 nop 801d7cc: 0802fd10 .word 0x0802fd10 801d7d0: 0802fd44 .word 0x0802fd44 801d7d4: 0802fd5c .word 0x0802fd5c 801d7d8: 2402af94 .word 0x2402af94 801d7dc: 24024418 .word 0x24024418 801d7e0: 2402af98 .word 0x2402af98 801d7e4: 2402af9c .word 0x2402af9c 801d7e8: 2402af9a .word 0x2402af9a 801d7ec: 0802fd84 .word 0x0802fd84 801d7f0: 0802fd94 .word 0x0802fd94 801d7f4: 0802fda0 .word 0x0802fda0 801d7f8: 2402afa4 .word 0x2402afa4 801d7fc: 2402afa8 .word 0x2402afa8 801d800: 2402afb0 .word 0x2402afb0 801d804: 2402afae .word 0x2402afae 801d808: 2402af74 .word 0x2402af74 801d80c: 0802fdc0 .word 0x0802fdc0 801d810: 0802fde8 .word 0x0802fde8 801d814: 0802fe14 .word 0x0802fe14 } if (pcb->remote_port == tcphdr->src && 801d818: 69bb ldr r3, [r7, #24] 801d81a: 8b1a ldrh r2, [r3, #24] 801d81c: 4b72 ldr r3, [pc, #456] @ (801d9e8 ) 801d81e: 681b ldr r3, [r3, #0] 801d820: 881b ldrh r3, [r3, #0] 801d822: b29b uxth r3, r3 801d824: 429a cmp r2, r3 801d826: d13a bne.n 801d89e pcb->local_port == tcphdr->dest && 801d828: 69bb ldr r3, [r7, #24] 801d82a: 8ada ldrh r2, [r3, #22] 801d82c: 4b6e ldr r3, [pc, #440] @ (801d9e8 ) 801d82e: 681b ldr r3, [r3, #0] 801d830: 885b ldrh r3, [r3, #2] 801d832: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801d834: 429a cmp r2, r3 801d836: d132 bne.n 801d89e ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d838: 69bb ldr r3, [r7, #24] 801d83a: 685a ldr r2, [r3, #4] 801d83c: 4b6b ldr r3, [pc, #428] @ (801d9ec ) 801d83e: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801d840: 429a cmp r2, r3 801d842: d12c bne.n 801d89e ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801d844: 69bb ldr r3, [r7, #24] 801d846: 681a ldr r2, [r3, #0] 801d848: 4b68 ldr r3, [pc, #416] @ (801d9ec ) 801d84a: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d84c: 429a cmp r2, r3 801d84e: d126 bne.n 801d89e /* 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); 801d850: 69bb ldr r3, [r7, #24] 801d852: 68db ldr r3, [r3, #12] 801d854: 69ba ldr r2, [r7, #24] 801d856: 429a cmp r2, r3 801d858: d106 bne.n 801d868 801d85a: 4b65 ldr r3, [pc, #404] @ (801d9f0 ) 801d85c: f240 120d movw r2, #269 @ 0x10d 801d860: 4964 ldr r1, [pc, #400] @ (801d9f4 ) 801d862: 4865 ldr r0, [pc, #404] @ (801d9f8 ) 801d864: f00d f802 bl 802a86c if (prev != NULL) { 801d868: 69fb ldr r3, [r7, #28] 801d86a: 2b00 cmp r3, #0 801d86c: d00a beq.n 801d884 prev->next = pcb->next; 801d86e: 69bb ldr r3, [r7, #24] 801d870: 68da ldr r2, [r3, #12] 801d872: 69fb ldr r3, [r7, #28] 801d874: 60da str r2, [r3, #12] pcb->next = tcp_active_pcbs; 801d876: 4b61 ldr r3, [pc, #388] @ (801d9fc ) 801d878: 681a ldr r2, [r3, #0] 801d87a: 69bb ldr r3, [r7, #24] 801d87c: 60da str r2, [r3, #12] tcp_active_pcbs = pcb; 801d87e: 4a5f ldr r2, [pc, #380] @ (801d9fc ) 801d880: 69bb ldr r3, [r7, #24] 801d882: 6013 str r3, [r2, #0] } else { TCP_STATS_INC(tcp.cachehit); } LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 801d884: 69bb ldr r3, [r7, #24] 801d886: 68db ldr r3, [r3, #12] 801d888: 69ba ldr r2, [r7, #24] 801d88a: 429a cmp r2, r3 801d88c: d111 bne.n 801d8b2 801d88e: 4b58 ldr r3, [pc, #352] @ (801d9f0 ) 801d890: f240 1215 movw r2, #277 @ 0x115 801d894: 495a ldr r1, [pc, #360] @ (801da00 ) 801d896: 4858 ldr r0, [pc, #352] @ (801d9f8 ) 801d898: f00c ffe8 bl 802a86c break; 801d89c: e009 b.n 801d8b2 } prev = pcb; 801d89e: 69bb ldr r3, [r7, #24] 801d8a0: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801d8a2: 69bb ldr r3, [r7, #24] 801d8a4: 68db ldr r3, [r3, #12] 801d8a6: 61bb str r3, [r7, #24] 801d8a8: 69bb ldr r3, [r7, #24] 801d8aa: 2b00 cmp r3, #0 801d8ac: f47f af5e bne.w 801d76c 801d8b0: e000 b.n 801d8b4 break; 801d8b2: bf00 nop } if (pcb == NULL) { 801d8b4: 69bb ldr r3, [r7, #24] 801d8b6: 2b00 cmp r3, #0 801d8b8: f040 80aa bne.w 801da10 /* 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) { 801d8bc: 4b51 ldr r3, [pc, #324] @ (801da04 ) 801d8be: 681b ldr r3, [r3, #0] 801d8c0: 61bb str r3, [r7, #24] 801d8c2: e03f b.n 801d944 LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801d8c4: 69bb ldr r3, [r7, #24] 801d8c6: 7d1b ldrb r3, [r3, #20] 801d8c8: 2b0a cmp r3, #10 801d8ca: d006 beq.n 801d8da 801d8cc: 4b48 ldr r3, [pc, #288] @ (801d9f0 ) 801d8ce: f240 121f movw r2, #287 @ 0x11f 801d8d2: 494d ldr r1, [pc, #308] @ (801da08 ) 801d8d4: 4848 ldr r0, [pc, #288] @ (801d9f8 ) 801d8d6: f00c ffc9 bl 802a86c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d8da: 69bb ldr r3, [r7, #24] 801d8dc: 7a1b ldrb r3, [r3, #8] 801d8de: 2b00 cmp r3, #0 801d8e0: d009 beq.n 801d8f6 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d8e2: 69bb ldr r3, [r7, #24] 801d8e4: 7a1a ldrb r2, [r3, #8] 801d8e6: 4b41 ldr r3, [pc, #260] @ (801d9ec ) 801d8e8: 685b ldr r3, [r3, #4] 801d8ea: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d8ee: 3301 adds r3, #1 801d8f0: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d8f2: 429a cmp r2, r3 801d8f4: d122 bne.n 801d93c continue; } if (pcb->remote_port == tcphdr->src && 801d8f6: 69bb ldr r3, [r7, #24] 801d8f8: 8b1a ldrh r2, [r3, #24] 801d8fa: 4b3b ldr r3, [pc, #236] @ (801d9e8 ) 801d8fc: 681b ldr r3, [r3, #0] 801d8fe: 881b ldrh r3, [r3, #0] 801d900: b29b uxth r3, r3 801d902: 429a cmp r2, r3 801d904: d11b bne.n 801d93e pcb->local_port == tcphdr->dest && 801d906: 69bb ldr r3, [r7, #24] 801d908: 8ada ldrh r2, [r3, #22] 801d90a: 4b37 ldr r3, [pc, #220] @ (801d9e8 ) 801d90c: 681b ldr r3, [r3, #0] 801d90e: 885b ldrh r3, [r3, #2] 801d910: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801d912: 429a cmp r2, r3 801d914: d113 bne.n 801d93e ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d916: 69bb ldr r3, [r7, #24] 801d918: 685a ldr r2, [r3, #4] 801d91a: 4b34 ldr r3, [pc, #208] @ (801d9ec ) 801d91c: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801d91e: 429a cmp r2, r3 801d920: d10d bne.n 801d93e ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801d922: 69bb ldr r3, [r7, #24] 801d924: 681a ldr r2, [r3, #0] 801d926: 4b31 ldr r3, [pc, #196] @ (801d9ec ) 801d928: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d92a: 429a cmp r2, r3 801d92c: d107 bne.n 801d93e #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); 801d92e: 69b8 ldr r0, [r7, #24] 801d930: f000 fb56 bl 801dfe0 } pbuf_free(p); 801d934: 6878 ldr r0, [r7, #4] 801d936: f7fd fd21 bl 801b37c return; 801d93a: e1fd b.n 801dd38 continue; 801d93c: bf00 nop for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801d93e: 69bb ldr r3, [r7, #24] 801d940: 68db ldr r3, [r3, #12] 801d942: 61bb str r3, [r7, #24] 801d944: 69bb ldr r3, [r7, #24] 801d946: 2b00 cmp r3, #0 801d948: d1bc bne.n 801d8c4 } } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; 801d94a: 2300 movs r3, #0 801d94c: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d94e: 4b2f ldr r3, [pc, #188] @ (801da0c ) 801d950: 681b ldr r3, [r3, #0] 801d952: 617b str r3, [r7, #20] 801d954: e02a b.n 801d9ac /* check if PCB is bound to specific netif */ if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801d956: 697b ldr r3, [r7, #20] 801d958: 7a1b ldrb r3, [r3, #8] 801d95a: 2b00 cmp r3, #0 801d95c: d00c beq.n 801d978 (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d95e: 697b ldr r3, [r7, #20] 801d960: 7a1a ldrb r2, [r3, #8] 801d962: 4b22 ldr r3, [pc, #136] @ (801d9ec ) 801d964: 685b ldr r3, [r3, #4] 801d966: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d96a: 3301 adds r3, #1 801d96c: b2db uxtb r3, r3 if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801d96e: 429a cmp r2, r3 801d970: d002 beq.n 801d978 prev = (struct tcp_pcb *)lpcb; 801d972: 697b ldr r3, [r7, #20] 801d974: 61fb str r3, [r7, #28] continue; 801d976: e016 b.n 801d9a6 } if (lpcb->local_port == tcphdr->dest) { 801d978: 697b ldr r3, [r7, #20] 801d97a: 8ada ldrh r2, [r3, #22] 801d97c: 4b1a ldr r3, [pc, #104] @ (801d9e8 ) 801d97e: 681b ldr r3, [r3, #0] 801d980: 885b ldrh r3, [r3, #2] 801d982: b29b uxth r3, r3 801d984: 429a cmp r2, r3 801d986: d10c bne.n 801d9a2 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())) { 801d988: 697b ldr r3, [r7, #20] 801d98a: 681a ldr r2, [r3, #0] 801d98c: 4b17 ldr r3, [pc, #92] @ (801d9ec ) 801d98e: 695b ldr r3, [r3, #20] 801d990: 429a cmp r2, r3 801d992: d00f beq.n 801d9b4 /* found an exact match */ break; } else if (ip_addr_isany(&lpcb->local_ip)) { 801d994: 697b ldr r3, [r7, #20] 801d996: 2b00 cmp r3, #0 801d998: d00d beq.n 801d9b6 801d99a: 697b ldr r3, [r7, #20] 801d99c: 681b ldr r3, [r3, #0] 801d99e: 2b00 cmp r3, #0 801d9a0: d009 beq.n 801d9b6 break; #endif /* SO_REUSE */ } } } prev = (struct tcp_pcb *)lpcb; 801d9a2: 697b ldr r3, [r7, #20] 801d9a4: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d9a6: 697b ldr r3, [r7, #20] 801d9a8: 68db ldr r3, [r3, #12] 801d9aa: 617b str r3, [r7, #20] 801d9ac: 697b ldr r3, [r7, #20] 801d9ae: 2b00 cmp r3, #0 801d9b0: d1d1 bne.n 801d956 801d9b2: e000 b.n 801d9b6 break; 801d9b4: 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) { 801d9b6: 697b ldr r3, [r7, #20] 801d9b8: 2b00 cmp r3, #0 801d9ba: d029 beq.n 801da10 /* 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) { 801d9bc: 69fb ldr r3, [r7, #28] 801d9be: 2b00 cmp r3, #0 801d9c0: d00a beq.n 801d9d8 ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 801d9c2: 697b ldr r3, [r7, #20] 801d9c4: 68da ldr r2, [r3, #12] 801d9c6: 69fb ldr r3, [r7, #28] 801d9c8: 60da str r2, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 801d9ca: 4b10 ldr r3, [pc, #64] @ (801da0c ) 801d9cc: 681a ldr r2, [r3, #0] 801d9ce: 697b ldr r3, [r7, #20] 801d9d0: 60da str r2, [r3, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 801d9d2: 4a0e ldr r2, [pc, #56] @ (801da0c ) 801d9d4: 697b ldr r3, [r7, #20] 801d9d6: 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); 801d9d8: 6978 ldr r0, [r7, #20] 801d9da: f000 fa03 bl 801dde4 } pbuf_free(p); 801d9de: 6878 ldr r0, [r7, #4] 801d9e0: f7fd fccc bl 801b37c return; 801d9e4: e1a8 b.n 801dd38 801d9e6: bf00 nop 801d9e8: 2402af94 .word 0x2402af94 801d9ec: 24024418 .word 0x24024418 801d9f0: 0802fd10 .word 0x0802fd10 801d9f4: 0802fe3c .word 0x0802fe3c 801d9f8: 0802fd5c .word 0x0802fd5c 801d9fc: 2402af74 .word 0x2402af74 801da00: 0802fe68 .word 0x0802fe68 801da04: 2402af78 .word 0x2402af78 801da08: 0802fe94 .word 0x0802fe94 801da0c: 2402af70 .word 0x2402af70 tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) { pbuf_free(p); return; } #endif if (pcb != NULL) { 801da10: 69bb ldr r3, [r7, #24] 801da12: 2b00 cmp r3, #0 801da14: f000 8158 beq.w 801dcc8 #if TCP_INPUT_DEBUG tcp_debug_print_state(pcb->state); #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 801da18: 4b95 ldr r3, [pc, #596] @ (801dc70 ) 801da1a: 2200 movs r2, #0 801da1c: 601a str r2, [r3, #0] inseg.len = p->tot_len; 801da1e: 687b ldr r3, [r7, #4] 801da20: 891a ldrh r2, [r3, #8] 801da22: 4b93 ldr r3, [pc, #588] @ (801dc70 ) 801da24: 811a strh r2, [r3, #8] inseg.p = p; 801da26: 4a92 ldr r2, [pc, #584] @ (801dc70 ) 801da28: 687b ldr r3, [r7, #4] 801da2a: 6053 str r3, [r2, #4] inseg.tcphdr = tcphdr; 801da2c: 4b91 ldr r3, [pc, #580] @ (801dc74 ) 801da2e: 681b ldr r3, [r3, #0] 801da30: 4a8f ldr r2, [pc, #572] @ (801dc70 ) 801da32: 6113 str r3, [r2, #16] recv_data = NULL; 801da34: 4b90 ldr r3, [pc, #576] @ (801dc78 ) 801da36: 2200 movs r2, #0 801da38: 601a str r2, [r3, #0] recv_flags = 0; 801da3a: 4b90 ldr r3, [pc, #576] @ (801dc7c ) 801da3c: 2200 movs r2, #0 801da3e: 701a strb r2, [r3, #0] recv_acked = 0; 801da40: 4b8f ldr r3, [pc, #572] @ (801dc80 ) 801da42: 2200 movs r2, #0 801da44: 801a strh r2, [r3, #0] if (flags & TCP_PSH) { 801da46: 4b8f ldr r3, [pc, #572] @ (801dc84 ) 801da48: 781b ldrb r3, [r3, #0] 801da4a: f003 0308 and.w r3, r3, #8 801da4e: 2b00 cmp r3, #0 801da50: d006 beq.n 801da60 p->flags |= PBUF_FLAG_PUSH; 801da52: 687b ldr r3, [r7, #4] 801da54: 7b5b ldrb r3, [r3, #13] 801da56: f043 0301 orr.w r3, r3, #1 801da5a: b2da uxtb r2, r3 801da5c: 687b ldr r3, [r7, #4] 801da5e: 735a strb r2, [r3, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801da60: 69bb ldr r3, [r7, #24] 801da62: 6f9b ldr r3, [r3, #120] @ 0x78 801da64: 2b00 cmp r3, #0 801da66: d017 beq.n 801da98 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801da68: 69b8 ldr r0, [r7, #24] 801da6a: f7ff f84d bl 801cb08 801da6e: 4603 mov r3, r0 801da70: f113 0f0d cmn.w r3, #13 801da74: d007 beq.n 801da86 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801da76: 69bb ldr r3, [r7, #24] 801da78: 6f9b ldr r3, [r3, #120] @ 0x78 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801da7a: 2b00 cmp r3, #0 801da7c: d00c beq.n 801da98 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801da7e: 4b82 ldr r3, [pc, #520] @ (801dc88 ) 801da80: 881b ldrh r3, [r3, #0] 801da82: 2b00 cmp r3, #0 801da84: d008 beq.n 801da98 /* pcb has been aborted or refused data is still refused and the new segment contains data */ if (pcb->rcv_ann_wnd == 0) { 801da86: 69bb ldr r3, [r7, #24] 801da88: 8d5b ldrh r3, [r3, #42] @ 0x2a 801da8a: 2b00 cmp r3, #0 801da8c: f040 80e4 bne.w 801dc58 /* this is a zero-window probe, we respond to it with current RCV.NXT and drop the data segment */ tcp_send_empty_ack(pcb); 801da90: 69b8 ldr r0, [r7, #24] 801da92: f003 fe73 bl 802177c } TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); goto aborted; 801da96: e0df b.n 801dc58 } } tcp_input_pcb = pcb; 801da98: 4a7c ldr r2, [pc, #496] @ (801dc8c ) 801da9a: 69bb ldr r3, [r7, #24] 801da9c: 6013 str r3, [r2, #0] err = tcp_process(pcb); 801da9e: 69b8 ldr r0, [r7, #24] 801daa0: f000 fb18 bl 801e0d4 801daa4: 4603 mov r3, r0 801daa6: 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) { 801daa8: f997 3013 ldrsb.w r3, [r7, #19] 801daac: f113 0f0d cmn.w r3, #13 801dab0: f000 80d4 beq.w 801dc5c if (recv_flags & TF_RESET) { 801dab4: 4b71 ldr r3, [pc, #452] @ (801dc7c ) 801dab6: 781b ldrb r3, [r3, #0] 801dab8: f003 0308 and.w r3, r3, #8 801dabc: 2b00 cmp r3, #0 801dabe: d015 beq.n 801daec /* 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); 801dac0: 69bb ldr r3, [r7, #24] 801dac2: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801dac6: 2b00 cmp r3, #0 801dac8: d008 beq.n 801dadc 801daca: 69bb ldr r3, [r7, #24] 801dacc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801dad0: 69ba ldr r2, [r7, #24] 801dad2: 6912 ldr r2, [r2, #16] 801dad4: f06f 010d mvn.w r1, #13 801dad8: 4610 mov r0, r2 801dada: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 801dadc: 69b9 ldr r1, [r7, #24] 801dade: 486c ldr r0, [pc, #432] @ (801dc90 ) 801dae0: f7ff fbba bl 801d258 tcp_free(pcb); 801dae4: 69b8 ldr r0, [r7, #24] 801dae6: f7fd ff05 bl 801b8f4 801daea: e0da b.n 801dca2 } else { err = ERR_OK; 801daec: 2300 movs r3, #0 801daee: 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) { 801daf0: 4b63 ldr r3, [pc, #396] @ (801dc80 ) 801daf2: 881b ldrh r3, [r3, #0] 801daf4: 2b00 cmp r3, #0 801daf6: d01d beq.n 801db34 while (acked > 0) { acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); acked -= acked16; #else { acked16 = recv_acked; 801daf8: 4b61 ldr r3, [pc, #388] @ (801dc80 ) 801dafa: 881b ldrh r3, [r3, #0] 801dafc: 81fb strh r3, [r7, #14] #endif TCP_EVENT_SENT(pcb, (u16_t)acked16, err); 801dafe: 69bb ldr r3, [r7, #24] 801db00: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801db04: 2b00 cmp r3, #0 801db06: d00a beq.n 801db1e 801db08: 69bb ldr r3, [r7, #24] 801db0a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801db0e: 69ba ldr r2, [r7, #24] 801db10: 6910 ldr r0, [r2, #16] 801db12: 89fa ldrh r2, [r7, #14] 801db14: 69b9 ldr r1, [r7, #24] 801db16: 4798 blx r3 801db18: 4603 mov r3, r0 801db1a: 74fb strb r3, [r7, #19] 801db1c: e001 b.n 801db22 801db1e: 2300 movs r3, #0 801db20: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801db22: f997 3013 ldrsb.w r3, [r7, #19] 801db26: f113 0f0d cmn.w r3, #13 801db2a: f000 8099 beq.w 801dc60 goto aborted; } } recv_acked = 0; 801db2e: 4b54 ldr r3, [pc, #336] @ (801dc80 ) 801db30: 2200 movs r2, #0 801db32: 801a strh r2, [r3, #0] } if (tcp_input_delayed_close(pcb)) { 801db34: 69b8 ldr r0, [r7, #24] 801db36: f000 f915 bl 801dd64 801db3a: 4603 mov r3, r0 801db3c: 2b00 cmp r3, #0 801db3e: f040 8091 bne.w 801dc64 #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) { 801db42: 4b4d ldr r3, [pc, #308] @ (801dc78 ) 801db44: 681b ldr r3, [r3, #0] 801db46: 2b00 cmp r3, #0 801db48: d041 beq.n 801dbce #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); 801db4a: 69bb ldr r3, [r7, #24] 801db4c: 6f9b ldr r3, [r3, #120] @ 0x78 801db4e: 2b00 cmp r3, #0 801db50: d006 beq.n 801db60 801db52: 4b50 ldr r3, [pc, #320] @ (801dc94 ) 801db54: f44f 72f3 mov.w r2, #486 @ 0x1e6 801db58: 494f ldr r1, [pc, #316] @ (801dc98 ) 801db5a: 4850 ldr r0, [pc, #320] @ (801dc9c ) 801db5c: f00c fe86 bl 802a86c if (pcb->flags & TF_RXCLOSED) { 801db60: 69bb ldr r3, [r7, #24] 801db62: 8b5b ldrh r3, [r3, #26] 801db64: f003 0310 and.w r3, r3, #16 801db68: 2b00 cmp r3, #0 801db6a: d008 beq.n 801db7e /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 801db6c: 4b42 ldr r3, [pc, #264] @ (801dc78 ) 801db6e: 681b ldr r3, [r3, #0] 801db70: 4618 mov r0, r3 801db72: f7fd fc03 bl 801b37c #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE if (rest != NULL) { pbuf_free(rest); } #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ tcp_abort(pcb); 801db76: 69b8 ldr r0, [r7, #24] 801db78: f7fe fa06 bl 801bf88 goto aborted; 801db7c: e091 b.n 801dca2 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 801db7e: 69bb ldr r3, [r7, #24] 801db80: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801db84: 2b00 cmp r3, #0 801db86: d00c beq.n 801dba2 801db88: 69bb ldr r3, [r7, #24] 801db8a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801db8e: 69bb ldr r3, [r7, #24] 801db90: 6918 ldr r0, [r3, #16] 801db92: 4b39 ldr r3, [pc, #228] @ (801dc78 ) 801db94: 681a ldr r2, [r3, #0] 801db96: 2300 movs r3, #0 801db98: 69b9 ldr r1, [r7, #24] 801db9a: 47a0 blx r4 801db9c: 4603 mov r3, r0 801db9e: 74fb strb r3, [r7, #19] 801dba0: e008 b.n 801dbb4 801dba2: 4b35 ldr r3, [pc, #212] @ (801dc78 ) 801dba4: 681a ldr r2, [r3, #0] 801dba6: 2300 movs r3, #0 801dba8: 69b9 ldr r1, [r7, #24] 801dbaa: 2000 movs r0, #0 801dbac: f7ff f884 bl 801ccb8 801dbb0: 4603 mov r3, r0 801dbb2: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801dbb4: f997 3013 ldrsb.w r3, [r7, #19] 801dbb8: f113 0f0d cmn.w r3, #13 801dbbc: d054 beq.n 801dc68 #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 801dbbe: f997 3013 ldrsb.w r3, [r7, #19] 801dbc2: 2b00 cmp r3, #0 801dbc4: d003 beq.n 801dbce #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; 801dbc6: 4b2c ldr r3, [pc, #176] @ (801dc78 ) 801dbc8: 681a ldr r2, [r3, #0] 801dbca: 69bb ldr r3, [r7, #24] 801dbcc: 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) { 801dbce: 4b2b ldr r3, [pc, #172] @ (801dc7c ) 801dbd0: 781b ldrb r3, [r3, #0] 801dbd2: f003 0320 and.w r3, r3, #32 801dbd6: 2b00 cmp r3, #0 801dbd8: d031 beq.n 801dc3e if (pcb->refused_data != NULL) { 801dbda: 69bb ldr r3, [r7, #24] 801dbdc: 6f9b ldr r3, [r3, #120] @ 0x78 801dbde: 2b00 cmp r3, #0 801dbe0: d009 beq.n 801dbf6 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 801dbe2: 69bb ldr r3, [r7, #24] 801dbe4: 6f9b ldr r3, [r3, #120] @ 0x78 801dbe6: 7b5a ldrb r2, [r3, #13] 801dbe8: 69bb ldr r3, [r7, #24] 801dbea: 6f9b ldr r3, [r3, #120] @ 0x78 801dbec: f042 0220 orr.w r2, r2, #32 801dbf0: b2d2 uxtb r2, r2 801dbf2: 735a strb r2, [r3, #13] 801dbf4: e023 b.n 801dc3e } 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)) { 801dbf6: 69bb ldr r3, [r7, #24] 801dbf8: 8d1b ldrh r3, [r3, #40] @ 0x28 801dbfa: f241 62d0 movw r2, #5840 @ 0x16d0 801dbfe: 4293 cmp r3, r2 801dc00: d005 beq.n 801dc0e pcb->rcv_wnd++; 801dc02: 69bb ldr r3, [r7, #24] 801dc04: 8d1b ldrh r3, [r3, #40] @ 0x28 801dc06: 3301 adds r3, #1 801dc08: b29a uxth r2, r3 801dc0a: 69bb ldr r3, [r7, #24] 801dc0c: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801dc0e: 69bb ldr r3, [r7, #24] 801dc10: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801dc14: 2b00 cmp r3, #0 801dc16: d00b beq.n 801dc30 801dc18: 69bb ldr r3, [r7, #24] 801dc1a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801dc1e: 69bb ldr r3, [r7, #24] 801dc20: 6918 ldr r0, [r3, #16] 801dc22: 2300 movs r3, #0 801dc24: 2200 movs r2, #0 801dc26: 69b9 ldr r1, [r7, #24] 801dc28: 47a0 blx r4 801dc2a: 4603 mov r3, r0 801dc2c: 74fb strb r3, [r7, #19] 801dc2e: e001 b.n 801dc34 801dc30: 2300 movs r3, #0 801dc32: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801dc34: f997 3013 ldrsb.w r3, [r7, #19] 801dc38: f113 0f0d cmn.w r3, #13 801dc3c: d016 beq.n 801dc6c goto aborted; } } } tcp_input_pcb = NULL; 801dc3e: 4b13 ldr r3, [pc, #76] @ (801dc8c ) 801dc40: 2200 movs r2, #0 801dc42: 601a str r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 801dc44: 69b8 ldr r0, [r7, #24] 801dc46: f000 f88d bl 801dd64 801dc4a: 4603 mov r3, r0 801dc4c: 2b00 cmp r3, #0 801dc4e: d127 bne.n 801dca0 goto aborted; } /* Try to send something out. */ tcp_output(pcb); 801dc50: 69b8 ldr r0, [r7, #24] 801dc52: f002 ff7f bl 8020b54 801dc56: e024 b.n 801dca2 goto aborted; 801dc58: bf00 nop 801dc5a: e022 b.n 801dca2 #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: 801dc5c: bf00 nop 801dc5e: e020 b.n 801dca2 goto aborted; 801dc60: bf00 nop 801dc62: e01e b.n 801dca2 goto aborted; 801dc64: bf00 nop 801dc66: e01c b.n 801dca2 goto aborted; 801dc68: bf00 nop 801dc6a: e01a b.n 801dca2 goto aborted; 801dc6c: bf00 nop 801dc6e: e018 b.n 801dca2 801dc70: 2402af80 .word 0x2402af80 801dc74: 2402af94 .word 0x2402af94 801dc78: 2402afb4 .word 0x2402afb4 801dc7c: 2402afb1 .word 0x2402afb1 801dc80: 2402afac .word 0x2402afac 801dc84: 2402afb0 .word 0x2402afb0 801dc88: 2402afae .word 0x2402afae 801dc8c: 2402afb8 .word 0x2402afb8 801dc90: 2402af74 .word 0x2402af74 801dc94: 0802fd10 .word 0x0802fd10 801dc98: 0802fec4 .word 0x0802fec4 801dc9c: 0802fd5c .word 0x0802fd5c goto aborted; 801dca0: bf00 nop tcp_input_pcb = NULL; 801dca2: 4b27 ldr r3, [pc, #156] @ (801dd40 ) 801dca4: 2200 movs r2, #0 801dca6: 601a str r2, [r3, #0] recv_data = NULL; 801dca8: 4b26 ldr r3, [pc, #152] @ (801dd44 ) 801dcaa: 2200 movs r2, #0 801dcac: 601a str r2, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) { 801dcae: 4b26 ldr r3, [pc, #152] @ (801dd48 ) 801dcb0: 685b ldr r3, [r3, #4] 801dcb2: 2b00 cmp r3, #0 801dcb4: d03f beq.n 801dd36 pbuf_free(inseg.p); 801dcb6: 4b24 ldr r3, [pc, #144] @ (801dd48 ) 801dcb8: 685b ldr r3, [r3, #4] 801dcba: 4618 mov r0, r3 801dcbc: f7fd fb5e bl 801b37c inseg.p = NULL; 801dcc0: 4b21 ldr r3, [pc, #132] @ (801dd48 ) 801dcc2: 2200 movs r2, #0 801dcc4: 605a str r2, [r3, #4] pbuf_free(p); } LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; 801dcc6: e036 b.n 801dd36 if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 801dcc8: 4b20 ldr r3, [pc, #128] @ (801dd4c ) 801dcca: 681b ldr r3, [r3, #0] 801dccc: 899b ldrh r3, [r3, #12] 801dcce: b29b uxth r3, r3 801dcd0: 4618 mov r0, r3 801dcd2: f7fb fe71 bl 80199b8 801dcd6: 4603 mov r3, r0 801dcd8: b2db uxtb r3, r3 801dcda: f003 0304 and.w r3, r3, #4 801dcde: 2b00 cmp r3, #0 801dce0: d118 bne.n 801dd14 tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dce2: 4b1b ldr r3, [pc, #108] @ (801dd50 ) 801dce4: 6819 ldr r1, [r3, #0] 801dce6: 4b1b ldr r3, [pc, #108] @ (801dd54 ) 801dce8: 881b ldrh r3, [r3, #0] 801dcea: 461a mov r2, r3 801dcec: 4b1a ldr r3, [pc, #104] @ (801dd58 ) 801dcee: 681b ldr r3, [r3, #0] 801dcf0: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801dcf2: 4b16 ldr r3, [pc, #88] @ (801dd4c ) 801dcf4: 681b ldr r3, [r3, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dcf6: 885b ldrh r3, [r3, #2] 801dcf8: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801dcfa: 4a14 ldr r2, [pc, #80] @ (801dd4c ) 801dcfc: 6812 ldr r2, [r2, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dcfe: 8812 ldrh r2, [r2, #0] 801dd00: b292 uxth r2, r2 801dd02: 9202 str r2, [sp, #8] 801dd04: 9301 str r3, [sp, #4] 801dd06: 4b15 ldr r3, [pc, #84] @ (801dd5c ) 801dd08: 9300 str r3, [sp, #0] 801dd0a: 4b15 ldr r3, [pc, #84] @ (801dd60 ) 801dd0c: 4602 mov r2, r0 801dd0e: 2000 movs r0, #0 801dd10: f003 fce2 bl 80216d8 pbuf_free(p); 801dd14: 6878 ldr r0, [r7, #4] 801dd16: f7fd fb31 bl 801b37c return; 801dd1a: e00c b.n 801dd36 goto dropped; 801dd1c: bf00 nop 801dd1e: e006 b.n 801dd2e goto dropped; 801dd20: bf00 nop 801dd22: e004 b.n 801dd2e goto dropped; 801dd24: bf00 nop 801dd26: e002 b.n 801dd2e goto dropped; 801dd28: bf00 nop 801dd2a: e000 b.n 801dd2e goto dropped; 801dd2c: bf00 nop dropped: TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); pbuf_free(p); 801dd2e: 6878 ldr r0, [r7, #4] 801dd30: f7fd fb24 bl 801b37c 801dd34: e000 b.n 801dd38 return; 801dd36: bf00 nop } 801dd38: 3724 adds r7, #36 @ 0x24 801dd3a: 46bd mov sp, r7 801dd3c: bd90 pop {r4, r7, pc} 801dd3e: bf00 nop 801dd40: 2402afb8 .word 0x2402afb8 801dd44: 2402afb4 .word 0x2402afb4 801dd48: 2402af80 .word 0x2402af80 801dd4c: 2402af94 .word 0x2402af94 801dd50: 2402afa8 .word 0x2402afa8 801dd54: 2402afae .word 0x2402afae 801dd58: 2402afa4 .word 0x2402afa4 801dd5c: 24024428 .word 0x24024428 801dd60: 2402442c .word 0x2402442c 0801dd64 : * any more. * @returns 1 if the pcb has been closed and deallocated, 0 otherwise */ static int tcp_input_delayed_close(struct tcp_pcb *pcb) { 801dd64: b580 push {r7, lr} 801dd66: b082 sub sp, #8 801dd68: af00 add r7, sp, #0 801dd6a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 801dd6c: 687b ldr r3, [r7, #4] 801dd6e: 2b00 cmp r3, #0 801dd70: d106 bne.n 801dd80 801dd72: 4b17 ldr r3, [pc, #92] @ (801ddd0 ) 801dd74: f240 225a movw r2, #602 @ 0x25a 801dd78: 4916 ldr r1, [pc, #88] @ (801ddd4 ) 801dd7a: 4817 ldr r0, [pc, #92] @ (801ddd8 ) 801dd7c: f00c fd76 bl 802a86c if (recv_flags & TF_CLOSED) { 801dd80: 4b16 ldr r3, [pc, #88] @ (801dddc ) 801dd82: 781b ldrb r3, [r3, #0] 801dd84: f003 0310 and.w r3, r3, #16 801dd88: 2b00 cmp r3, #0 801dd8a: d01c beq.n 801ddc6 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 801dd8c: 687b ldr r3, [r7, #4] 801dd8e: 8b5b ldrh r3, [r3, #26] 801dd90: f003 0310 and.w r3, r3, #16 801dd94: 2b00 cmp r3, #0 801dd96: d10d bne.n 801ddb4 /* 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); 801dd98: 687b ldr r3, [r7, #4] 801dd9a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801dd9e: 2b00 cmp r3, #0 801dda0: d008 beq.n 801ddb4 801dda2: 687b ldr r3, [r7, #4] 801dda4: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801dda8: 687a ldr r2, [r7, #4] 801ddaa: 6912 ldr r2, [r2, #16] 801ddac: f06f 010e mvn.w r1, #14 801ddb0: 4610 mov r0, r2 801ddb2: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 801ddb4: 6879 ldr r1, [r7, #4] 801ddb6: 480a ldr r0, [pc, #40] @ (801dde0 ) 801ddb8: f7ff fa4e bl 801d258 tcp_free(pcb); 801ddbc: 6878 ldr r0, [r7, #4] 801ddbe: f7fd fd99 bl 801b8f4 return 1; 801ddc2: 2301 movs r3, #1 801ddc4: e000 b.n 801ddc8 } return 0; 801ddc6: 2300 movs r3, #0 } 801ddc8: 4618 mov r0, r3 801ddca: 3708 adds r7, #8 801ddcc: 46bd mov sp, r7 801ddce: bd80 pop {r7, pc} 801ddd0: 0802fd10 .word 0x0802fd10 801ddd4: 0802fee0 .word 0x0802fee0 801ddd8: 0802fd5c .word 0x0802fd5c 801dddc: 2402afb1 .word 0x2402afb1 801dde0: 2402af74 .word 0x2402af74 0801dde4 : * @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) { 801dde4: b590 push {r4, r7, lr} 801dde6: b08b sub sp, #44 @ 0x2c 801dde8: af04 add r7, sp, #16 801ddea: 6078 str r0, [r7, #4] struct tcp_pcb *npcb; u32_t iss; err_t rc; if (flags & TCP_RST) { 801ddec: 4b6f ldr r3, [pc, #444] @ (801dfac ) 801ddee: 781b ldrb r3, [r3, #0] 801ddf0: f003 0304 and.w r3, r3, #4 801ddf4: 2b00 cmp r3, #0 801ddf6: f040 80d2 bne.w 801df9e /* An incoming RST should be ignored. Return. */ return; } LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 801ddfa: 687b ldr r3, [r7, #4] 801ddfc: 2b00 cmp r3, #0 801ddfe: d106 bne.n 801de0e 801de00: 4b6b ldr r3, [pc, #428] @ (801dfb0 ) 801de02: f240 2281 movw r2, #641 @ 0x281 801de06: 496b ldr r1, [pc, #428] @ (801dfb4 ) 801de08: 486b ldr r0, [pc, #428] @ (801dfb8 ) 801de0a: f00c fd2f bl 802a86c /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 801de0e: 4b67 ldr r3, [pc, #412] @ (801dfac ) 801de10: 781b ldrb r3, [r3, #0] 801de12: f003 0310 and.w r3, r3, #16 801de16: 2b00 cmp r3, #0 801de18: d019 beq.n 801de4e /* 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(), 801de1a: 4b68 ldr r3, [pc, #416] @ (801dfbc ) 801de1c: 6819 ldr r1, [r3, #0] 801de1e: 4b68 ldr r3, [pc, #416] @ (801dfc0 ) 801de20: 881b ldrh r3, [r3, #0] 801de22: 461a mov r2, r3 801de24: 4b67 ldr r3, [pc, #412] @ (801dfc4 ) 801de26: 681b ldr r3, [r3, #0] 801de28: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801de2a: 4b67 ldr r3, [pc, #412] @ (801dfc8 ) 801de2c: 681b ldr r3, [r3, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801de2e: 885b ldrh r3, [r3, #2] 801de30: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801de32: 4a65 ldr r2, [pc, #404] @ (801dfc8 ) 801de34: 6812 ldr r2, [r2, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801de36: 8812 ldrh r2, [r2, #0] 801de38: b292 uxth r2, r2 801de3a: 9202 str r2, [sp, #8] 801de3c: 9301 str r3, [sp, #4] 801de3e: 4b63 ldr r3, [pc, #396] @ (801dfcc ) 801de40: 9300 str r3, [sp, #0] 801de42: 4b63 ldr r3, [pc, #396] @ (801dfd0 ) 801de44: 4602 mov r2, r0 801de46: 6878 ldr r0, [r7, #4] 801de48: f003 fc46 bl 80216d8 tcp_abandon(npcb, 0); return; } tcp_output(npcb); } return; 801de4c: e0a9 b.n 801dfa2 } else if (flags & TCP_SYN) { 801de4e: 4b57 ldr r3, [pc, #348] @ (801dfac ) 801de50: 781b ldrb r3, [r3, #0] 801de52: f003 0302 and.w r3, r3, #2 801de56: 2b00 cmp r3, #0 801de58: f000 80a3 beq.w 801dfa2 npcb = tcp_alloc(pcb->prio); 801de5c: 687b ldr r3, [r7, #4] 801de5e: 7d5b ldrb r3, [r3, #21] 801de60: 4618 mov r0, r3 801de62: f7ff f84d bl 801cf00 801de66: 6178 str r0, [r7, #20] if (npcb == NULL) { 801de68: 697b ldr r3, [r7, #20] 801de6a: 2b00 cmp r3, #0 801de6c: d111 bne.n 801de92 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801de6e: 687b ldr r3, [r7, #4] 801de70: 699b ldr r3, [r3, #24] 801de72: 2b00 cmp r3, #0 801de74: d00a beq.n 801de8c 801de76: 687b ldr r3, [r7, #4] 801de78: 699b ldr r3, [r3, #24] 801de7a: 687a ldr r2, [r7, #4] 801de7c: 6910 ldr r0, [r2, #16] 801de7e: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801de82: 2100 movs r1, #0 801de84: 4798 blx r3 801de86: 4603 mov r3, r0 801de88: 73bb strb r3, [r7, #14] return; 801de8a: e08b b.n 801dfa4 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801de8c: 23f0 movs r3, #240 @ 0xf0 801de8e: 73bb strb r3, [r7, #14] return; 801de90: e088 b.n 801dfa4 ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); 801de92: 4b50 ldr r3, [pc, #320] @ (801dfd4 ) 801de94: 695a ldr r2, [r3, #20] 801de96: 697b ldr r3, [r7, #20] 801de98: 601a str r2, [r3, #0] ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); 801de9a: 4b4e ldr r3, [pc, #312] @ (801dfd4 ) 801de9c: 691a ldr r2, [r3, #16] 801de9e: 697b ldr r3, [r7, #20] 801dea0: 605a str r2, [r3, #4] npcb->local_port = pcb->local_port; 801dea2: 687b ldr r3, [r7, #4] 801dea4: 8ada ldrh r2, [r3, #22] 801dea6: 697b ldr r3, [r7, #20] 801dea8: 82da strh r2, [r3, #22] npcb->remote_port = tcphdr->src; 801deaa: 4b47 ldr r3, [pc, #284] @ (801dfc8 ) 801deac: 681b ldr r3, [r3, #0] 801deae: 881b ldrh r3, [r3, #0] 801deb0: b29a uxth r2, r3 801deb2: 697b ldr r3, [r7, #20] 801deb4: 831a strh r2, [r3, #24] npcb->state = SYN_RCVD; 801deb6: 697b ldr r3, [r7, #20] 801deb8: 2203 movs r2, #3 801deba: 751a strb r2, [r3, #20] npcb->rcv_nxt = seqno + 1; 801debc: 4b41 ldr r3, [pc, #260] @ (801dfc4 ) 801debe: 681b ldr r3, [r3, #0] 801dec0: 1c5a adds r2, r3, #1 801dec2: 697b ldr r3, [r7, #20] 801dec4: 625a str r2, [r3, #36] @ 0x24 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 801dec6: 697b ldr r3, [r7, #20] 801dec8: 6a5a ldr r2, [r3, #36] @ 0x24 801deca: 697b ldr r3, [r7, #20] 801decc: 62da str r2, [r3, #44] @ 0x2c iss = tcp_next_iss(npcb); 801dece: 6978 ldr r0, [r7, #20] 801ded0: f7ff fa56 bl 801d380 801ded4: 6138 str r0, [r7, #16] npcb->snd_wl2 = iss; 801ded6: 697b ldr r3, [r7, #20] 801ded8: 693a ldr r2, [r7, #16] 801deda: 659a str r2, [r3, #88] @ 0x58 npcb->snd_nxt = iss; 801dedc: 697b ldr r3, [r7, #20] 801dede: 693a ldr r2, [r7, #16] 801dee0: 651a str r2, [r3, #80] @ 0x50 npcb->lastack = iss; 801dee2: 697b ldr r3, [r7, #20] 801dee4: 693a ldr r2, [r7, #16] 801dee6: 645a str r2, [r3, #68] @ 0x44 npcb->snd_lbb = iss; 801dee8: 697b ldr r3, [r7, #20] 801deea: 693a ldr r2, [r7, #16] 801deec: 65da str r2, [r3, #92] @ 0x5c npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 801deee: 4b35 ldr r3, [pc, #212] @ (801dfc4 ) 801def0: 681b ldr r3, [r3, #0] 801def2: 1e5a subs r2, r3, #1 801def4: 697b ldr r3, [r7, #20] 801def6: 655a str r2, [r3, #84] @ 0x54 npcb->callback_arg = pcb->callback_arg; 801def8: 687b ldr r3, [r7, #4] 801defa: 691a ldr r2, [r3, #16] 801defc: 697b ldr r3, [r7, #20] 801defe: 611a str r2, [r3, #16] npcb->listener = pcb; 801df00: 697b ldr r3, [r7, #20] 801df02: 687a ldr r2, [r7, #4] 801df04: 67da str r2, [r3, #124] @ 0x7c npcb->so_options = pcb->so_options & SOF_INHERITED; 801df06: 687b ldr r3, [r7, #4] 801df08: 7a5b ldrb r3, [r3, #9] 801df0a: f003 030c and.w r3, r3, #12 801df0e: b2da uxtb r2, r3 801df10: 697b ldr r3, [r7, #20] 801df12: 725a strb r2, [r3, #9] npcb->netif_idx = pcb->netif_idx; 801df14: 687b ldr r3, [r7, #4] 801df16: 7a1a ldrb r2, [r3, #8] 801df18: 697b ldr r3, [r7, #20] 801df1a: 721a strb r2, [r3, #8] TCP_REG_ACTIVE(npcb); 801df1c: 4b2e ldr r3, [pc, #184] @ (801dfd8 ) 801df1e: 681a ldr r2, [r3, #0] 801df20: 697b ldr r3, [r7, #20] 801df22: 60da str r2, [r3, #12] 801df24: 4a2c ldr r2, [pc, #176] @ (801dfd8 ) 801df26: 697b ldr r3, [r7, #20] 801df28: 6013 str r3, [r2, #0] 801df2a: f003 fd97 bl 8021a5c 801df2e: 4b2b ldr r3, [pc, #172] @ (801dfdc ) 801df30: 2201 movs r2, #1 801df32: 701a strb r2, [r3, #0] tcp_parseopt(npcb); 801df34: 6978 ldr r0, [r7, #20] 801df36: f001 fd8b bl 801fa50 npcb->snd_wnd = tcphdr->wnd; 801df3a: 4b23 ldr r3, [pc, #140] @ (801dfc8 ) 801df3c: 681b ldr r3, [r3, #0] 801df3e: 89db ldrh r3, [r3, #14] 801df40: b29a uxth r2, r3 801df42: 697b ldr r3, [r7, #20] 801df44: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 npcb->snd_wnd_max = npcb->snd_wnd; 801df48: 697b ldr r3, [r7, #20] 801df4a: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801df4e: 697b ldr r3, [r7, #20] 801df50: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); 801df54: 697b ldr r3, [r7, #20] 801df56: 8e5c ldrh r4, [r3, #50] @ 0x32 801df58: 697b ldr r3, [r7, #20] 801df5a: 3304 adds r3, #4 801df5c: 4618 mov r0, r3 801df5e: f007 fc77 bl 8025850 801df62: 4601 mov r1, r0 801df64: 697b ldr r3, [r7, #20] 801df66: 3304 adds r3, #4 801df68: 461a mov r2, r3 801df6a: 4620 mov r0, r4 801df6c: f7ff fa2e bl 801d3cc 801df70: 4603 mov r3, r0 801df72: 461a mov r2, r3 801df74: 697b ldr r3, [r7, #20] 801df76: 865a strh r2, [r3, #50] @ 0x32 rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 801df78: 2112 movs r1, #18 801df7a: 6978 ldr r0, [r7, #20] 801df7c: f002 fcfc bl 8020978 801df80: 4603 mov r3, r0 801df82: 73fb strb r3, [r7, #15] if (rc != ERR_OK) { 801df84: f997 300f ldrsb.w r3, [r7, #15] 801df88: 2b00 cmp r3, #0 801df8a: d004 beq.n 801df96 tcp_abandon(npcb, 0); 801df8c: 2100 movs r1, #0 801df8e: 6978 ldr r0, [r7, #20] 801df90: f7fd ff3a bl 801be08 return; 801df94: e006 b.n 801dfa4 tcp_output(npcb); 801df96: 6978 ldr r0, [r7, #20] 801df98: f002 fddc bl 8020b54 return; 801df9c: e001 b.n 801dfa2 return; 801df9e: bf00 nop 801dfa0: e000 b.n 801dfa4 return; 801dfa2: bf00 nop } 801dfa4: 371c adds r7, #28 801dfa6: 46bd mov sp, r7 801dfa8: bd90 pop {r4, r7, pc} 801dfaa: bf00 nop 801dfac: 2402afb0 .word 0x2402afb0 801dfb0: 0802fd10 .word 0x0802fd10 801dfb4: 0802ff08 .word 0x0802ff08 801dfb8: 0802fd5c .word 0x0802fd5c 801dfbc: 2402afa8 .word 0x2402afa8 801dfc0: 2402afae .word 0x2402afae 801dfc4: 2402afa4 .word 0x2402afa4 801dfc8: 2402af94 .word 0x2402af94 801dfcc: 24024428 .word 0x24024428 801dfd0: 2402442c .word 0x2402442c 801dfd4: 24024418 .word 0x24024418 801dfd8: 2402af74 .word 0x2402af74 801dfdc: 2402af7c .word 0x2402af7c 0801dfe0 : * @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) { 801dfe0: b580 push {r7, lr} 801dfe2: b086 sub sp, #24 801dfe4: af04 add r7, sp, #16 801dfe6: 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) { 801dfe8: 4b2f ldr r3, [pc, #188] @ (801e0a8 ) 801dfea: 781b ldrb r3, [r3, #0] 801dfec: f003 0304 and.w r3, r3, #4 801dff0: 2b00 cmp r3, #0 801dff2: d153 bne.n 801e09c return; } LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 801dff4: 687b ldr r3, [r7, #4] 801dff6: 2b00 cmp r3, #0 801dff8: d106 bne.n 801e008 801dffa: 4b2c ldr r3, [pc, #176] @ (801e0ac ) 801dffc: f240 22ee movw r2, #750 @ 0x2ee 801e000: 492b ldr r1, [pc, #172] @ (801e0b0 ) 801e002: 482c ldr r0, [pc, #176] @ (801e0b4 ) 801e004: f00c fc32 bl 802a86c /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 801e008: 4b27 ldr r3, [pc, #156] @ (801e0a8 ) 801e00a: 781b ldrb r3, [r3, #0] 801e00c: f003 0302 and.w r3, r3, #2 801e010: 2b00 cmp r3, #0 801e012: d02a beq.n 801e06a /* 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)) { 801e014: 4b28 ldr r3, [pc, #160] @ (801e0b8 ) 801e016: 681a ldr r2, [r3, #0] 801e018: 687b ldr r3, [r7, #4] 801e01a: 6a5b ldr r3, [r3, #36] @ 0x24 801e01c: 1ad3 subs r3, r2, r3 801e01e: 2b00 cmp r3, #0 801e020: db2d blt.n 801e07e 801e022: 4b25 ldr r3, [pc, #148] @ (801e0b8 ) 801e024: 681a ldr r2, [r3, #0] 801e026: 687b ldr r3, [r7, #4] 801e028: 6a5b ldr r3, [r3, #36] @ 0x24 801e02a: 6879 ldr r1, [r7, #4] 801e02c: 8d09 ldrh r1, [r1, #40] @ 0x28 801e02e: 440b add r3, r1 801e030: 1ad3 subs r3, r2, r3 801e032: 2b00 cmp r3, #0 801e034: dc23 bgt.n 801e07e /* If the SYN is in the window it is an error, send a reset */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e036: 4b21 ldr r3, [pc, #132] @ (801e0bc ) 801e038: 6819 ldr r1, [r3, #0] 801e03a: 4b21 ldr r3, [pc, #132] @ (801e0c0 ) 801e03c: 881b ldrh r3, [r3, #0] 801e03e: 461a mov r2, r3 801e040: 4b1d ldr r3, [pc, #116] @ (801e0b8 ) 801e042: 681b ldr r3, [r3, #0] 801e044: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e046: 4b1f ldr r3, [pc, #124] @ (801e0c4 ) 801e048: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e04a: 885b ldrh r3, [r3, #2] 801e04c: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e04e: 4a1d ldr r2, [pc, #116] @ (801e0c4 ) 801e050: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e052: 8812 ldrh r2, [r2, #0] 801e054: b292 uxth r2, r2 801e056: 9202 str r2, [sp, #8] 801e058: 9301 str r3, [sp, #4] 801e05a: 4b1b ldr r3, [pc, #108] @ (801e0c8 ) 801e05c: 9300 str r3, [sp, #0] 801e05e: 4b1b ldr r3, [pc, #108] @ (801e0cc ) 801e060: 4602 mov r2, r0 801e062: 6878 ldr r0, [r7, #4] 801e064: f003 fb38 bl 80216d8 return; 801e068: e01b b.n 801e0a2 } } else if (flags & TCP_FIN) { 801e06a: 4b0f ldr r3, [pc, #60] @ (801e0a8 ) 801e06c: 781b ldrb r3, [r3, #0] 801e06e: f003 0301 and.w r3, r3, #1 801e072: 2b00 cmp r3, #0 801e074: d003 beq.n 801e07e /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 801e076: 4b16 ldr r3, [pc, #88] @ (801e0d0 ) 801e078: 681a ldr r2, [r3, #0] 801e07a: 687b ldr r3, [r7, #4] 801e07c: 621a str r2, [r3, #32] } if ((tcplen > 0)) { 801e07e: 4b10 ldr r3, [pc, #64] @ (801e0c0 ) 801e080: 881b ldrh r3, [r3, #0] 801e082: 2b00 cmp r3, #0 801e084: d00c beq.n 801e0a0 /* Acknowledge data, FIN or out-of-window SYN */ tcp_ack_now(pcb); 801e086: 687b ldr r3, [r7, #4] 801e088: 8b5b ldrh r3, [r3, #26] 801e08a: f043 0302 orr.w r3, r3, #2 801e08e: b29a uxth r2, r3 801e090: 687b ldr r3, [r7, #4] 801e092: 835a strh r2, [r3, #26] tcp_output(pcb); 801e094: 6878 ldr r0, [r7, #4] 801e096: f002 fd5d bl 8020b54 } return; 801e09a: e001 b.n 801e0a0 return; 801e09c: bf00 nop 801e09e: e000 b.n 801e0a2 return; 801e0a0: bf00 nop } 801e0a2: 3708 adds r7, #8 801e0a4: 46bd mov sp, r7 801e0a6: bd80 pop {r7, pc} 801e0a8: 2402afb0 .word 0x2402afb0 801e0ac: 0802fd10 .word 0x0802fd10 801e0b0: 0802ff28 .word 0x0802ff28 801e0b4: 0802fd5c .word 0x0802fd5c 801e0b8: 2402afa4 .word 0x2402afa4 801e0bc: 2402afa8 .word 0x2402afa8 801e0c0: 2402afae .word 0x2402afae 801e0c4: 2402af94 .word 0x2402af94 801e0c8: 24024428 .word 0x24024428 801e0cc: 2402442c .word 0x2402442c 801e0d0: 2402af68 .word 0x2402af68 0801e0d4 : * @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) { 801e0d4: b590 push {r4, r7, lr} 801e0d6: b08d sub sp, #52 @ 0x34 801e0d8: af04 add r7, sp, #16 801e0da: 6078 str r0, [r7, #4] struct tcp_seg *rseg; u8_t acceptable = 0; 801e0dc: 2300 movs r3, #0 801e0de: 77fb strb r3, [r7, #31] err_t err; err = ERR_OK; 801e0e0: 2300 movs r3, #0 801e0e2: 77bb strb r3, [r7, #30] LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 801e0e4: 687b ldr r3, [r7, #4] 801e0e6: 2b00 cmp r3, #0 801e0e8: d106 bne.n 801e0f8 801e0ea: 4b9d ldr r3, [pc, #628] @ (801e360 ) 801e0ec: f44f 7247 mov.w r2, #796 @ 0x31c 801e0f0: 499c ldr r1, [pc, #624] @ (801e364 ) 801e0f2: 489d ldr r0, [pc, #628] @ (801e368 ) 801e0f4: f00c fbba bl 802a86c /* Process incoming RST segments. */ if (flags & TCP_RST) { 801e0f8: 4b9c ldr r3, [pc, #624] @ (801e36c ) 801e0fa: 781b ldrb r3, [r3, #0] 801e0fc: f003 0304 and.w r3, r3, #4 801e100: 2b00 cmp r3, #0 801e102: d04e beq.n 801e1a2 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 801e104: 687b ldr r3, [r7, #4] 801e106: 7d1b ldrb r3, [r3, #20] 801e108: 2b02 cmp r3, #2 801e10a: d108 bne.n 801e11e /* "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) { 801e10c: 687b ldr r3, [r7, #4] 801e10e: 6d1a ldr r2, [r3, #80] @ 0x50 801e110: 4b97 ldr r3, [pc, #604] @ (801e370 ) 801e112: 681b ldr r3, [r3, #0] 801e114: 429a cmp r2, r3 801e116: d123 bne.n 801e160 acceptable = 1; 801e118: 2301 movs r3, #1 801e11a: 77fb strb r3, [r7, #31] 801e11c: e020 b.n 801e160 } } else { /* "In all states except SYN-SENT, all reset (RST) segments are validated by checking their SEQ-fields." */ if (seqno == pcb->rcv_nxt) { 801e11e: 687b ldr r3, [r7, #4] 801e120: 6a5a ldr r2, [r3, #36] @ 0x24 801e122: 4b94 ldr r3, [pc, #592] @ (801e374 ) 801e124: 681b ldr r3, [r3, #0] 801e126: 429a cmp r2, r3 801e128: d102 bne.n 801e130 acceptable = 1; 801e12a: 2301 movs r3, #1 801e12c: 77fb strb r3, [r7, #31] 801e12e: e017 b.n 801e160 } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801e130: 4b90 ldr r3, [pc, #576] @ (801e374 ) 801e132: 681a ldr r2, [r3, #0] 801e134: 687b ldr r3, [r7, #4] 801e136: 6a5b ldr r3, [r3, #36] @ 0x24 801e138: 1ad3 subs r3, r2, r3 801e13a: 2b00 cmp r3, #0 801e13c: db10 blt.n 801e160 801e13e: 4b8d ldr r3, [pc, #564] @ (801e374 ) 801e140: 681a ldr r2, [r3, #0] 801e142: 687b ldr r3, [r7, #4] 801e144: 6a5b ldr r3, [r3, #36] @ 0x24 801e146: 6879 ldr r1, [r7, #4] 801e148: 8d09 ldrh r1, [r1, #40] @ 0x28 801e14a: 440b add r3, r1 801e14c: 1ad3 subs r3, r2, r3 801e14e: 2b00 cmp r3, #0 801e150: dc06 bgt.n 801e160 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); 801e152: 687b ldr r3, [r7, #4] 801e154: 8b5b ldrh r3, [r3, #26] 801e156: f043 0302 orr.w r3, r3, #2 801e15a: b29a uxth r2, r3 801e15c: 687b ldr r3, [r7, #4] 801e15e: 835a strh r2, [r3, #26] } } if (acceptable) { 801e160: 7ffb ldrb r3, [r7, #31] 801e162: 2b00 cmp r3, #0 801e164: d01b beq.n 801e19e LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 801e166: 687b ldr r3, [r7, #4] 801e168: 7d1b ldrb r3, [r3, #20] 801e16a: 2b00 cmp r3, #0 801e16c: d106 bne.n 801e17c 801e16e: 4b7c ldr r3, [pc, #496] @ (801e360 ) 801e170: f44f 724e mov.w r2, #824 @ 0x338 801e174: 4980 ldr r1, [pc, #512] @ (801e378 ) 801e176: 487c ldr r0, [pc, #496] @ (801e368 ) 801e178: f00c fb78 bl 802a86c recv_flags |= TF_RESET; 801e17c: 4b7f ldr r3, [pc, #508] @ (801e37c ) 801e17e: 781b ldrb r3, [r3, #0] 801e180: f043 0308 orr.w r3, r3, #8 801e184: b2da uxtb r2, r3 801e186: 4b7d ldr r3, [pc, #500] @ (801e37c ) 801e188: 701a strb r2, [r3, #0] tcp_clear_flags(pcb, TF_ACK_DELAY); 801e18a: 687b ldr r3, [r7, #4] 801e18c: 8b5b ldrh r3, [r3, #26] 801e18e: f023 0301 bic.w r3, r3, #1 801e192: b29a uxth r2, r3 801e194: 687b ldr r3, [r7, #4] 801e196: 835a strh r2, [r3, #26] return ERR_RST; 801e198: f06f 030d mvn.w r3, #13 801e19c: e37a b.n 801e894 } 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; 801e19e: 2300 movs r3, #0 801e1a0: e378 b.n 801e894 } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 801e1a2: 4b72 ldr r3, [pc, #456] @ (801e36c ) 801e1a4: 781b ldrb r3, [r3, #0] 801e1a6: f003 0302 and.w r3, r3, #2 801e1aa: 2b00 cmp r3, #0 801e1ac: d010 beq.n 801e1d0 801e1ae: 687b ldr r3, [r7, #4] 801e1b0: 7d1b ldrb r3, [r3, #20] 801e1b2: 2b02 cmp r3, #2 801e1b4: d00c beq.n 801e1d0 801e1b6: 687b ldr r3, [r7, #4] 801e1b8: 7d1b ldrb r3, [r3, #20] 801e1ba: 2b03 cmp r3, #3 801e1bc: d008 beq.n 801e1d0 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); 801e1be: 687b ldr r3, [r7, #4] 801e1c0: 8b5b ldrh r3, [r3, #26] 801e1c2: f043 0302 orr.w r3, r3, #2 801e1c6: b29a uxth r2, r3 801e1c8: 687b ldr r3, [r7, #4] 801e1ca: 835a strh r2, [r3, #26] return ERR_OK; 801e1cc: 2300 movs r3, #0 801e1ce: e361 b.n 801e894 } if ((pcb->flags & TF_RXCLOSED) == 0) { 801e1d0: 687b ldr r3, [r7, #4] 801e1d2: 8b5b ldrh r3, [r3, #26] 801e1d4: f003 0310 and.w r3, r3, #16 801e1d8: 2b00 cmp r3, #0 801e1da: d103 bne.n 801e1e4 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 801e1dc: 4b68 ldr r3, [pc, #416] @ (801e380 ) 801e1de: 681a ldr r2, [r3, #0] 801e1e0: 687b ldr r3, [r7, #4] 801e1e2: 621a str r2, [r3, #32] } pcb->keep_cnt_sent = 0; 801e1e4: 687b ldr r3, [r7, #4] 801e1e6: 2200 movs r2, #0 801e1e8: f883 209b strb.w r2, [r3, #155] @ 0x9b pcb->persist_probe = 0; 801e1ec: 687b ldr r3, [r7, #4] 801e1ee: 2200 movs r2, #0 801e1f0: f883 209a strb.w r2, [r3, #154] @ 0x9a tcp_parseopt(pcb); 801e1f4: 6878 ldr r0, [r7, #4] 801e1f6: f001 fc2b bl 801fa50 /* Do different things depending on the TCP state. */ switch (pcb->state) { 801e1fa: 687b ldr r3, [r7, #4] 801e1fc: 7d1b ldrb r3, [r3, #20] 801e1fe: 3b02 subs r3, #2 801e200: 2b07 cmp r3, #7 801e202: f200 8337 bhi.w 801e874 801e206: a201 add r2, pc, #4 @ (adr r2, 801e20c ) 801e208: f852 f023 ldr.w pc, [r2, r3, lsl #2] 801e20c: 0801e22d .word 0x0801e22d 801e210: 0801e45d .word 0x0801e45d 801e214: 0801e5d5 .word 0x0801e5d5 801e218: 0801e5ff .word 0x0801e5ff 801e21c: 0801e723 .word 0x0801e723 801e220: 0801e5d5 .word 0x0801e5d5 801e224: 0801e7af .word 0x0801e7af 801e228: 0801e83f .word 0x0801e83f 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) 801e22c: 4b4f ldr r3, [pc, #316] @ (801e36c ) 801e22e: 781b ldrb r3, [r3, #0] 801e230: f003 0310 and.w r3, r3, #16 801e234: 2b00 cmp r3, #0 801e236: f000 80e4 beq.w 801e402 801e23a: 4b4c ldr r3, [pc, #304] @ (801e36c ) 801e23c: 781b ldrb r3, [r3, #0] 801e23e: f003 0302 and.w r3, r3, #2 801e242: 2b00 cmp r3, #0 801e244: f000 80dd beq.w 801e402 && (ackno == pcb->lastack + 1)) { 801e248: 687b ldr r3, [r7, #4] 801e24a: 6c5b ldr r3, [r3, #68] @ 0x44 801e24c: 1c5a adds r2, r3, #1 801e24e: 4b48 ldr r3, [pc, #288] @ (801e370 ) 801e250: 681b ldr r3, [r3, #0] 801e252: 429a cmp r2, r3 801e254: f040 80d5 bne.w 801e402 pcb->rcv_nxt = seqno + 1; 801e258: 4b46 ldr r3, [pc, #280] @ (801e374 ) 801e25a: 681b ldr r3, [r3, #0] 801e25c: 1c5a adds r2, r3, #1 801e25e: 687b ldr r3, [r7, #4] 801e260: 625a str r2, [r3, #36] @ 0x24 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801e262: 687b ldr r3, [r7, #4] 801e264: 6a5a ldr r2, [r3, #36] @ 0x24 801e266: 687b ldr r3, [r7, #4] 801e268: 62da str r2, [r3, #44] @ 0x2c pcb->lastack = ackno; 801e26a: 4b41 ldr r3, [pc, #260] @ (801e370 ) 801e26c: 681a ldr r2, [r3, #0] 801e26e: 687b ldr r3, [r7, #4] 801e270: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wnd = tcphdr->wnd; 801e272: 4b44 ldr r3, [pc, #272] @ (801e384 ) 801e274: 681b ldr r3, [r3, #0] 801e276: 89db ldrh r3, [r3, #14] 801e278: b29a uxth r2, r3 801e27a: 687b ldr r3, [r7, #4] 801e27c: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 pcb->snd_wnd_max = pcb->snd_wnd; 801e280: 687b ldr r3, [r7, #4] 801e282: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801e286: 687b ldr r3, [r7, #4] 801e288: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 801e28c: 4b39 ldr r3, [pc, #228] @ (801e374 ) 801e28e: 681b ldr r3, [r3, #0] 801e290: 1e5a subs r2, r3, #1 801e292: 687b ldr r3, [r7, #4] 801e294: 655a str r2, [r3, #84] @ 0x54 pcb->state = ESTABLISHED; 801e296: 687b ldr r3, [r7, #4] 801e298: 2204 movs r2, #4 801e29a: 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); 801e29c: 687b ldr r3, [r7, #4] 801e29e: 8e5c ldrh r4, [r3, #50] @ 0x32 801e2a0: 687b ldr r3, [r7, #4] 801e2a2: 3304 adds r3, #4 801e2a4: 4618 mov r0, r3 801e2a6: f007 fad3 bl 8025850 801e2aa: 4601 mov r1, r0 801e2ac: 687b ldr r3, [r7, #4] 801e2ae: 3304 adds r3, #4 801e2b0: 461a mov r2, r3 801e2b2: 4620 mov r0, r4 801e2b4: f7ff f88a bl 801d3cc 801e2b8: 4603 mov r3, r0 801e2ba: 461a mov r2, r3 801e2bc: 687b ldr r3, [r7, #4] 801e2be: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801e2c0: 687b ldr r3, [r7, #4] 801e2c2: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2c4: 009a lsls r2, r3, #2 801e2c6: 687b ldr r3, [r7, #4] 801e2c8: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2ca: 005b lsls r3, r3, #1 801e2cc: f241 111c movw r1, #4380 @ 0x111c 801e2d0: 428b cmp r3, r1 801e2d2: bf38 it cc 801e2d4: 460b movcc r3, r1 801e2d6: 429a cmp r2, r3 801e2d8: d204 bcs.n 801e2e4 801e2da: 687b ldr r3, [r7, #4] 801e2dc: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2de: 009b lsls r3, r3, #2 801e2e0: b29b uxth r3, r3 801e2e2: e00d b.n 801e300 801e2e4: 687b ldr r3, [r7, #4] 801e2e6: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2e8: 005b lsls r3, r3, #1 801e2ea: f241 121c movw r2, #4380 @ 0x111c 801e2ee: 4293 cmp r3, r2 801e2f0: d904 bls.n 801e2fc 801e2f2: 687b ldr r3, [r7, #4] 801e2f4: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2f6: 005b lsls r3, r3, #1 801e2f8: b29b uxth r3, r3 801e2fa: e001 b.n 801e300 801e2fc: f241 131c movw r3, #4380 @ 0x111c 801e300: 687a ldr r2, [r7, #4] 801e302: 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)); 801e306: 687b ldr r3, [r7, #4] 801e308: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801e30c: 2b00 cmp r3, #0 801e30e: d106 bne.n 801e31e 801e310: 4b13 ldr r3, [pc, #76] @ (801e360 ) 801e312: f44f 725b mov.w r2, #876 @ 0x36c 801e316: 491c ldr r1, [pc, #112] @ (801e388 ) 801e318: 4813 ldr r0, [pc, #76] @ (801e368 ) 801e31a: f00c faa7 bl 802a86c --pcb->snd_queuelen; 801e31e: 687b ldr r3, [r7, #4] 801e320: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801e324: 3b01 subs r3, #1 801e326: b29a uxth r2, r3 801e328: 687b ldr r3, [r7, #4] 801e32a: 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; 801e32e: 687b ldr r3, [r7, #4] 801e330: 6f1b ldr r3, [r3, #112] @ 0x70 801e332: 617b str r3, [r7, #20] if (rseg == NULL) { 801e334: 697b ldr r3, [r7, #20] 801e336: 2b00 cmp r3, #0 801e338: d12a bne.n 801e390 /* might happen if tcp_output fails in tcp_rexmit_rto() in which case the segment is on the unsent list */ rseg = pcb->unsent; 801e33a: 687b ldr r3, [r7, #4] 801e33c: 6edb ldr r3, [r3, #108] @ 0x6c 801e33e: 617b str r3, [r7, #20] LWIP_ASSERT("no segment to free", rseg != NULL); 801e340: 697b ldr r3, [r7, #20] 801e342: 2b00 cmp r3, #0 801e344: d106 bne.n 801e354 801e346: 4b06 ldr r3, [pc, #24] @ (801e360 ) 801e348: f44f 725d mov.w r2, #884 @ 0x374 801e34c: 490f ldr r1, [pc, #60] @ (801e38c ) 801e34e: 4806 ldr r0, [pc, #24] @ (801e368 ) 801e350: f00c fa8c bl 802a86c pcb->unsent = rseg->next; 801e354: 697b ldr r3, [r7, #20] 801e356: 681a ldr r2, [r3, #0] 801e358: 687b ldr r3, [r7, #4] 801e35a: 66da str r2, [r3, #108] @ 0x6c 801e35c: e01c b.n 801e398 801e35e: bf00 nop 801e360: 0802fd10 .word 0x0802fd10 801e364: 0802ff48 .word 0x0802ff48 801e368: 0802fd5c .word 0x0802fd5c 801e36c: 2402afb0 .word 0x2402afb0 801e370: 2402afa8 .word 0x2402afa8 801e374: 2402afa4 .word 0x2402afa4 801e378: 0802ff64 .word 0x0802ff64 801e37c: 2402afb1 .word 0x2402afb1 801e380: 2402af68 .word 0x2402af68 801e384: 2402af94 .word 0x2402af94 801e388: 0802ff84 .word 0x0802ff84 801e38c: 0802ff9c .word 0x0802ff9c } else { pcb->unacked = rseg->next; 801e390: 697b ldr r3, [r7, #20] 801e392: 681a ldr r2, [r3, #0] 801e394: 687b ldr r3, [r7, #4] 801e396: 671a str r2, [r3, #112] @ 0x70 } tcp_seg_free(rseg); 801e398: 6978 ldr r0, [r7, #20] 801e39a: f7fe fc48 bl 801cc2e /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if (pcb->unacked == NULL) { 801e39e: 687b ldr r3, [r7, #4] 801e3a0: 6f1b ldr r3, [r3, #112] @ 0x70 801e3a2: 2b00 cmp r3, #0 801e3a4: d104 bne.n 801e3b0 pcb->rtime = -1; 801e3a6: 687b ldr r3, [r7, #4] 801e3a8: f64f 72ff movw r2, #65535 @ 0xffff 801e3ac: 861a strh r2, [r3, #48] @ 0x30 801e3ae: e006 b.n 801e3be } else { pcb->rtime = 0; 801e3b0: 687b ldr r3, [r7, #4] 801e3b2: 2200 movs r2, #0 801e3b4: 861a strh r2, [r3, #48] @ 0x30 pcb->nrtx = 0; 801e3b6: 687b ldr r3, [r7, #4] 801e3b8: 2200 movs r2, #0 801e3ba: 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); 801e3be: 687b ldr r3, [r7, #4] 801e3c0: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801e3c4: 2b00 cmp r3, #0 801e3c6: d00a beq.n 801e3de 801e3c8: 687b ldr r3, [r7, #4] 801e3ca: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801e3ce: 687a ldr r2, [r7, #4] 801e3d0: 6910 ldr r0, [r2, #16] 801e3d2: 2200 movs r2, #0 801e3d4: 6879 ldr r1, [r7, #4] 801e3d6: 4798 blx r3 801e3d8: 4603 mov r3, r0 801e3da: 77bb strb r3, [r7, #30] 801e3dc: e001 b.n 801e3e2 801e3de: 2300 movs r3, #0 801e3e0: 77bb strb r3, [r7, #30] if (err == ERR_ABRT) { 801e3e2: f997 301e ldrsb.w r3, [r7, #30] 801e3e6: f113 0f0d cmn.w r3, #13 801e3ea: d102 bne.n 801e3f2 return ERR_ABRT; 801e3ec: f06f 030c mvn.w r3, #12 801e3f0: e250 b.n 801e894 } tcp_ack_now(pcb); 801e3f2: 687b ldr r3, [r7, #4] 801e3f4: 8b5b ldrh r3, [r3, #26] 801e3f6: f043 0302 orr.w r3, r3, #2 801e3fa: b29a uxth r2, r3 801e3fc: 687b ldr r3, [r7, #4] 801e3fe: 835a strh r2, [r3, #26] if (pcb->nrtx < TCP_SYNMAXRTX) { pcb->rtime = 0; tcp_rexmit_rto(pcb); } } break; 801e400: e23a b.n 801e878 else if (flags & TCP_ACK) { 801e402: 4b98 ldr r3, [pc, #608] @ (801e664 ) 801e404: 781b ldrb r3, [r3, #0] 801e406: f003 0310 and.w r3, r3, #16 801e40a: 2b00 cmp r3, #0 801e40c: f000 8234 beq.w 801e878 tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e410: 4b95 ldr r3, [pc, #596] @ (801e668 ) 801e412: 6819 ldr r1, [r3, #0] 801e414: 4b95 ldr r3, [pc, #596] @ (801e66c ) 801e416: 881b ldrh r3, [r3, #0] 801e418: 461a mov r2, r3 801e41a: 4b95 ldr r3, [pc, #596] @ (801e670 ) 801e41c: 681b ldr r3, [r3, #0] 801e41e: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e420: 4b94 ldr r3, [pc, #592] @ (801e674 ) 801e422: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e424: 885b ldrh r3, [r3, #2] 801e426: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e428: 4a92 ldr r2, [pc, #584] @ (801e674 ) 801e42a: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e42c: 8812 ldrh r2, [r2, #0] 801e42e: b292 uxth r2, r2 801e430: 9202 str r2, [sp, #8] 801e432: 9301 str r3, [sp, #4] 801e434: 4b90 ldr r3, [pc, #576] @ (801e678 ) 801e436: 9300 str r3, [sp, #0] 801e438: 4b90 ldr r3, [pc, #576] @ (801e67c ) 801e43a: 4602 mov r2, r0 801e43c: 6878 ldr r0, [r7, #4] 801e43e: f003 f94b bl 80216d8 if (pcb->nrtx < TCP_SYNMAXRTX) { 801e442: 687b ldr r3, [r7, #4] 801e444: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801e448: 2b05 cmp r3, #5 801e44a: f200 8215 bhi.w 801e878 pcb->rtime = 0; 801e44e: 687b ldr r3, [r7, #4] 801e450: 2200 movs r2, #0 801e452: 861a strh r2, [r3, #48] @ 0x30 tcp_rexmit_rto(pcb); 801e454: 6878 ldr r0, [r7, #4] 801e456: f002 ff17 bl 8021288 break; 801e45a: e20d b.n 801e878 case SYN_RCVD: if (flags & TCP_ACK) { 801e45c: 4b81 ldr r3, [pc, #516] @ (801e664 ) 801e45e: 781b ldrb r3, [r3, #0] 801e460: f003 0310 and.w r3, r3, #16 801e464: 2b00 cmp r3, #0 801e466: f000 80a1 beq.w 801e5ac /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801e46a: 4b7f ldr r3, [pc, #508] @ (801e668 ) 801e46c: 681a ldr r2, [r3, #0] 801e46e: 687b ldr r3, [r7, #4] 801e470: 6c5b ldr r3, [r3, #68] @ 0x44 801e472: 1ad3 subs r3, r2, r3 801e474: 3b01 subs r3, #1 801e476: 2b00 cmp r3, #0 801e478: db7e blt.n 801e578 801e47a: 4b7b ldr r3, [pc, #492] @ (801e668 ) 801e47c: 681a ldr r2, [r3, #0] 801e47e: 687b ldr r3, [r7, #4] 801e480: 6d1b ldr r3, [r3, #80] @ 0x50 801e482: 1ad3 subs r3, r2, r3 801e484: 2b00 cmp r3, #0 801e486: dc77 bgt.n 801e578 pcb->state = ESTABLISHED; 801e488: 687b ldr r3, [r7, #4] 801e48a: 2204 movs r2, #4 801e48c: 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) { 801e48e: 687b ldr r3, [r7, #4] 801e490: 6fdb ldr r3, [r3, #124] @ 0x7c 801e492: 2b00 cmp r3, #0 801e494: d102 bne.n 801e49c /* listen pcb might be closed by now */ err = ERR_VAL; 801e496: 23fa movs r3, #250 @ 0xfa 801e498: 77bb strb r3, [r7, #30] 801e49a: e01d b.n 801e4d8 } else #endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ { #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 801e49c: 687b ldr r3, [r7, #4] 801e49e: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4a0: 699b ldr r3, [r3, #24] 801e4a2: 2b00 cmp r3, #0 801e4a4: d106 bne.n 801e4b4 801e4a6: 4b76 ldr r3, [pc, #472] @ (801e680 ) 801e4a8: f44f 726a mov.w r2, #936 @ 0x3a8 801e4ac: 4975 ldr r1, [pc, #468] @ (801e684 ) 801e4ae: 4876 ldr r0, [pc, #472] @ (801e688 ) 801e4b0: f00c f9dc bl 802a86c #endif tcp_backlog_accepted(pcb); /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 801e4b4: 687b ldr r3, [r7, #4] 801e4b6: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4b8: 699b ldr r3, [r3, #24] 801e4ba: 2b00 cmp r3, #0 801e4bc: d00a beq.n 801e4d4 801e4be: 687b ldr r3, [r7, #4] 801e4c0: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4c2: 699b ldr r3, [r3, #24] 801e4c4: 687a ldr r2, [r7, #4] 801e4c6: 6910 ldr r0, [r2, #16] 801e4c8: 2200 movs r2, #0 801e4ca: 6879 ldr r1, [r7, #4] 801e4cc: 4798 blx r3 801e4ce: 4603 mov r3, r0 801e4d0: 77bb strb r3, [r7, #30] 801e4d2: e001 b.n 801e4d8 801e4d4: 23f0 movs r3, #240 @ 0xf0 801e4d6: 77bb strb r3, [r7, #30] } if (err != ERR_OK) { 801e4d8: f997 301e ldrsb.w r3, [r7, #30] 801e4dc: 2b00 cmp r3, #0 801e4de: d00a beq.n 801e4f6 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 801e4e0: f997 301e ldrsb.w r3, [r7, #30] 801e4e4: f113 0f0d cmn.w r3, #13 801e4e8: d002 beq.n 801e4f0 tcp_abort(pcb); 801e4ea: 6878 ldr r0, [r7, #4] 801e4ec: f7fd fd4c bl 801bf88 } return ERR_ABRT; 801e4f0: f06f 030c mvn.w r3, #12 801e4f4: e1ce b.n 801e894 } /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 801e4f6: 6878 ldr r0, [r7, #4] 801e4f8: f000 fae0 bl 801eabc /* Prevent ACK for SYN to generate a sent event */ if (recv_acked != 0) { 801e4fc: 4b63 ldr r3, [pc, #396] @ (801e68c ) 801e4fe: 881b ldrh r3, [r3, #0] 801e500: 2b00 cmp r3, #0 801e502: d005 beq.n 801e510 recv_acked--; 801e504: 4b61 ldr r3, [pc, #388] @ (801e68c ) 801e506: 881b ldrh r3, [r3, #0] 801e508: 3b01 subs r3, #1 801e50a: b29a uxth r2, r3 801e50c: 4b5f ldr r3, [pc, #380] @ (801e68c ) 801e50e: 801a strh r2, [r3, #0] } pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801e510: 687b ldr r3, [r7, #4] 801e512: 8e5b ldrh r3, [r3, #50] @ 0x32 801e514: 009a lsls r2, r3, #2 801e516: 687b ldr r3, [r7, #4] 801e518: 8e5b ldrh r3, [r3, #50] @ 0x32 801e51a: 005b lsls r3, r3, #1 801e51c: f241 111c movw r1, #4380 @ 0x111c 801e520: 428b cmp r3, r1 801e522: bf38 it cc 801e524: 460b movcc r3, r1 801e526: 429a cmp r2, r3 801e528: d204 bcs.n 801e534 801e52a: 687b ldr r3, [r7, #4] 801e52c: 8e5b ldrh r3, [r3, #50] @ 0x32 801e52e: 009b lsls r3, r3, #2 801e530: b29b uxth r3, r3 801e532: e00d b.n 801e550 801e534: 687b ldr r3, [r7, #4] 801e536: 8e5b ldrh r3, [r3, #50] @ 0x32 801e538: 005b lsls r3, r3, #1 801e53a: f241 121c movw r2, #4380 @ 0x111c 801e53e: 4293 cmp r3, r2 801e540: d904 bls.n 801e54c 801e542: 687b ldr r3, [r7, #4] 801e544: 8e5b ldrh r3, [r3, #50] @ 0x32 801e546: 005b lsls r3, r3, #1 801e548: b29b uxth r3, r3 801e54a: e001 b.n 801e550 801e54c: f241 131c movw r3, #4380 @ 0x111c 801e550: 687a ldr r2, [r7, #4] 801e552: 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) { 801e556: 4b4e ldr r3, [pc, #312] @ (801e690 ) 801e558: 781b ldrb r3, [r3, #0] 801e55a: f003 0320 and.w r3, r3, #32 801e55e: 2b00 cmp r3, #0 801e560: d037 beq.n 801e5d2 tcp_ack_now(pcb); 801e562: 687b ldr r3, [r7, #4] 801e564: 8b5b ldrh r3, [r3, #26] 801e566: f043 0302 orr.w r3, r3, #2 801e56a: b29a uxth r2, r3 801e56c: 687b ldr r3, [r7, #4] 801e56e: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801e570: 687b ldr r3, [r7, #4] 801e572: 2207 movs r2, #7 801e574: 751a strb r2, [r3, #20] if (recv_flags & TF_GOT_FIN) { 801e576: e02c b.n 801e5d2 } } else { /* incorrect ACK number, send RST */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e578: 4b3b ldr r3, [pc, #236] @ (801e668 ) 801e57a: 6819 ldr r1, [r3, #0] 801e57c: 4b3b ldr r3, [pc, #236] @ (801e66c ) 801e57e: 881b ldrh r3, [r3, #0] 801e580: 461a mov r2, r3 801e582: 4b3b ldr r3, [pc, #236] @ (801e670 ) 801e584: 681b ldr r3, [r3, #0] 801e586: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e588: 4b3a ldr r3, [pc, #232] @ (801e674 ) 801e58a: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e58c: 885b ldrh r3, [r3, #2] 801e58e: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e590: 4a38 ldr r2, [pc, #224] @ (801e674 ) 801e592: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e594: 8812 ldrh r2, [r2, #0] 801e596: b292 uxth r2, r2 801e598: 9202 str r2, [sp, #8] 801e59a: 9301 str r3, [sp, #4] 801e59c: 4b36 ldr r3, [pc, #216] @ (801e678 ) 801e59e: 9300 str r3, [sp, #0] 801e5a0: 4b36 ldr r3, [pc, #216] @ (801e67c ) 801e5a2: 4602 mov r2, r0 801e5a4: 6878 ldr r0, [r7, #4] 801e5a6: f003 f897 bl 80216d8 } } 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; 801e5aa: e167 b.n 801e87c } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 801e5ac: 4b2d ldr r3, [pc, #180] @ (801e664 ) 801e5ae: 781b ldrb r3, [r3, #0] 801e5b0: f003 0302 and.w r3, r3, #2 801e5b4: 2b00 cmp r3, #0 801e5b6: f000 8161 beq.w 801e87c 801e5ba: 687b ldr r3, [r7, #4] 801e5bc: 6a5b ldr r3, [r3, #36] @ 0x24 801e5be: 1e5a subs r2, r3, #1 801e5c0: 4b2b ldr r3, [pc, #172] @ (801e670 ) 801e5c2: 681b ldr r3, [r3, #0] 801e5c4: 429a cmp r2, r3 801e5c6: f040 8159 bne.w 801e87c tcp_rexmit(pcb); 801e5ca: 6878 ldr r0, [r7, #4] 801e5cc: f002 fe7e bl 80212cc break; 801e5d0: e154 b.n 801e87c 801e5d2: e153 b.n 801e87c case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 801e5d4: 6878 ldr r0, [r7, #4] 801e5d6: f000 fa71 bl 801eabc if (recv_flags & TF_GOT_FIN) { /* passive close */ 801e5da: 4b2d ldr r3, [pc, #180] @ (801e690 ) 801e5dc: 781b ldrb r3, [r3, #0] 801e5de: f003 0320 and.w r3, r3, #32 801e5e2: 2b00 cmp r3, #0 801e5e4: f000 814c beq.w 801e880 tcp_ack_now(pcb); 801e5e8: 687b ldr r3, [r7, #4] 801e5ea: 8b5b ldrh r3, [r3, #26] 801e5ec: f043 0302 orr.w r3, r3, #2 801e5f0: b29a uxth r2, r3 801e5f2: 687b ldr r3, [r7, #4] 801e5f4: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801e5f6: 687b ldr r3, [r7, #4] 801e5f8: 2207 movs r2, #7 801e5fa: 751a strb r2, [r3, #20] } break; 801e5fc: e140 b.n 801e880 case FIN_WAIT_1: tcp_receive(pcb); 801e5fe: 6878 ldr r0, [r7, #4] 801e600: f000 fa5c bl 801eabc if (recv_flags & TF_GOT_FIN) { 801e604: 4b22 ldr r3, [pc, #136] @ (801e690 ) 801e606: 781b ldrb r3, [r3, #0] 801e608: f003 0320 and.w r3, r3, #32 801e60c: 2b00 cmp r3, #0 801e60e: d071 beq.n 801e6f4 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e610: 4b14 ldr r3, [pc, #80] @ (801e664 ) 801e612: 781b ldrb r3, [r3, #0] 801e614: f003 0310 and.w r3, r3, #16 801e618: 2b00 cmp r3, #0 801e61a: d060 beq.n 801e6de 801e61c: 687b ldr r3, [r7, #4] 801e61e: 6d1a ldr r2, [r3, #80] @ 0x50 801e620: 4b11 ldr r3, [pc, #68] @ (801e668 ) 801e622: 681b ldr r3, [r3, #0] 801e624: 429a cmp r2, r3 801e626: d15a bne.n 801e6de pcb->unsent == NULL) { 801e628: 687b ldr r3, [r7, #4] 801e62a: 6edb ldr r3, [r3, #108] @ 0x6c if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e62c: 2b00 cmp r3, #0 801e62e: d156 bne.n 801e6de 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); 801e630: 687b ldr r3, [r7, #4] 801e632: 8b5b ldrh r3, [r3, #26] 801e634: f043 0302 orr.w r3, r3, #2 801e638: b29a uxth r2, r3 801e63a: 687b ldr r3, [r7, #4] 801e63c: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801e63e: 6878 ldr r0, [r7, #4] 801e640: f7fe fdba bl 801d1b8 TCP_RMV_ACTIVE(pcb); 801e644: 4b13 ldr r3, [pc, #76] @ (801e694 ) 801e646: 681b ldr r3, [r3, #0] 801e648: 687a ldr r2, [r7, #4] 801e64a: 429a cmp r2, r3 801e64c: d105 bne.n 801e65a 801e64e: 4b11 ldr r3, [pc, #68] @ (801e694 ) 801e650: 681b ldr r3, [r3, #0] 801e652: 68db ldr r3, [r3, #12] 801e654: 4a0f ldr r2, [pc, #60] @ (801e694 ) 801e656: 6013 str r3, [r2, #0] 801e658: e02e b.n 801e6b8 801e65a: 4b0e ldr r3, [pc, #56] @ (801e694 ) 801e65c: 681b ldr r3, [r3, #0] 801e65e: 613b str r3, [r7, #16] 801e660: e027 b.n 801e6b2 801e662: bf00 nop 801e664: 2402afb0 .word 0x2402afb0 801e668: 2402afa8 .word 0x2402afa8 801e66c: 2402afae .word 0x2402afae 801e670: 2402afa4 .word 0x2402afa4 801e674: 2402af94 .word 0x2402af94 801e678: 24024428 .word 0x24024428 801e67c: 2402442c .word 0x2402442c 801e680: 0802fd10 .word 0x0802fd10 801e684: 0802ffb0 .word 0x0802ffb0 801e688: 0802fd5c .word 0x0802fd5c 801e68c: 2402afac .word 0x2402afac 801e690: 2402afb1 .word 0x2402afb1 801e694: 2402af74 .word 0x2402af74 801e698: 693b ldr r3, [r7, #16] 801e69a: 68db ldr r3, [r3, #12] 801e69c: 687a ldr r2, [r7, #4] 801e69e: 429a cmp r2, r3 801e6a0: d104 bne.n 801e6ac 801e6a2: 687b ldr r3, [r7, #4] 801e6a4: 68da ldr r2, [r3, #12] 801e6a6: 693b ldr r3, [r7, #16] 801e6a8: 60da str r2, [r3, #12] 801e6aa: e005 b.n 801e6b8 801e6ac: 693b ldr r3, [r7, #16] 801e6ae: 68db ldr r3, [r3, #12] 801e6b0: 613b str r3, [r7, #16] 801e6b2: 693b ldr r3, [r7, #16] 801e6b4: 2b00 cmp r3, #0 801e6b6: d1ef bne.n 801e698 801e6b8: 687b ldr r3, [r7, #4] 801e6ba: 2200 movs r2, #0 801e6bc: 60da str r2, [r3, #12] 801e6be: 4b77 ldr r3, [pc, #476] @ (801e89c ) 801e6c0: 2201 movs r2, #1 801e6c2: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e6c4: 687b ldr r3, [r7, #4] 801e6c6: 220a movs r2, #10 801e6c8: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e6ca: 4b75 ldr r3, [pc, #468] @ (801e8a0 ) 801e6cc: 681a ldr r2, [r3, #0] 801e6ce: 687b ldr r3, [r7, #4] 801e6d0: 60da str r2, [r3, #12] 801e6d2: 4a73 ldr r2, [pc, #460] @ (801e8a0 ) 801e6d4: 687b ldr r3, [r7, #4] 801e6d6: 6013 str r3, [r2, #0] 801e6d8: f003 f9c0 bl 8021a5c } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && pcb->unsent == NULL) { pcb->state = FIN_WAIT_2; } break; 801e6dc: e0d2 b.n 801e884 tcp_ack_now(pcb); 801e6de: 687b ldr r3, [r7, #4] 801e6e0: 8b5b ldrh r3, [r3, #26] 801e6e2: f043 0302 orr.w r3, r3, #2 801e6e6: b29a uxth r2, r3 801e6e8: 687b ldr r3, [r7, #4] 801e6ea: 835a strh r2, [r3, #26] pcb->state = CLOSING; 801e6ec: 687b ldr r3, [r7, #4] 801e6ee: 2208 movs r2, #8 801e6f0: 751a strb r2, [r3, #20] break; 801e6f2: e0c7 b.n 801e884 } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e6f4: 4b6b ldr r3, [pc, #428] @ (801e8a4 ) 801e6f6: 781b ldrb r3, [r3, #0] 801e6f8: f003 0310 and.w r3, r3, #16 801e6fc: 2b00 cmp r3, #0 801e6fe: f000 80c1 beq.w 801e884 801e702: 687b ldr r3, [r7, #4] 801e704: 6d1a ldr r2, [r3, #80] @ 0x50 801e706: 4b68 ldr r3, [pc, #416] @ (801e8a8 ) 801e708: 681b ldr r3, [r3, #0] 801e70a: 429a cmp r2, r3 801e70c: f040 80ba bne.w 801e884 pcb->unsent == NULL) { 801e710: 687b ldr r3, [r7, #4] 801e712: 6edb ldr r3, [r3, #108] @ 0x6c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e714: 2b00 cmp r3, #0 801e716: f040 80b5 bne.w 801e884 pcb->state = FIN_WAIT_2; 801e71a: 687b ldr r3, [r7, #4] 801e71c: 2206 movs r2, #6 801e71e: 751a strb r2, [r3, #20] break; 801e720: e0b0 b.n 801e884 case FIN_WAIT_2: tcp_receive(pcb); 801e722: 6878 ldr r0, [r7, #4] 801e724: f000 f9ca bl 801eabc if (recv_flags & TF_GOT_FIN) { 801e728: 4b60 ldr r3, [pc, #384] @ (801e8ac ) 801e72a: 781b ldrb r3, [r3, #0] 801e72c: f003 0320 and.w r3, r3, #32 801e730: 2b00 cmp r3, #0 801e732: f000 80a9 beq.w 801e888 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); 801e736: 687b ldr r3, [r7, #4] 801e738: 8b5b ldrh r3, [r3, #26] 801e73a: f043 0302 orr.w r3, r3, #2 801e73e: b29a uxth r2, r3 801e740: 687b ldr r3, [r7, #4] 801e742: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801e744: 6878 ldr r0, [r7, #4] 801e746: f7fe fd37 bl 801d1b8 TCP_RMV_ACTIVE(pcb); 801e74a: 4b59 ldr r3, [pc, #356] @ (801e8b0 ) 801e74c: 681b ldr r3, [r3, #0] 801e74e: 687a ldr r2, [r7, #4] 801e750: 429a cmp r2, r3 801e752: d105 bne.n 801e760 801e754: 4b56 ldr r3, [pc, #344] @ (801e8b0 ) 801e756: 681b ldr r3, [r3, #0] 801e758: 68db ldr r3, [r3, #12] 801e75a: 4a55 ldr r2, [pc, #340] @ (801e8b0 ) 801e75c: 6013 str r3, [r2, #0] 801e75e: e013 b.n 801e788 801e760: 4b53 ldr r3, [pc, #332] @ (801e8b0 ) 801e762: 681b ldr r3, [r3, #0] 801e764: 60fb str r3, [r7, #12] 801e766: e00c b.n 801e782 801e768: 68fb ldr r3, [r7, #12] 801e76a: 68db ldr r3, [r3, #12] 801e76c: 687a ldr r2, [r7, #4] 801e76e: 429a cmp r2, r3 801e770: d104 bne.n 801e77c 801e772: 687b ldr r3, [r7, #4] 801e774: 68da ldr r2, [r3, #12] 801e776: 68fb ldr r3, [r7, #12] 801e778: 60da str r2, [r3, #12] 801e77a: e005 b.n 801e788 801e77c: 68fb ldr r3, [r7, #12] 801e77e: 68db ldr r3, [r3, #12] 801e780: 60fb str r3, [r7, #12] 801e782: 68fb ldr r3, [r7, #12] 801e784: 2b00 cmp r3, #0 801e786: d1ef bne.n 801e768 801e788: 687b ldr r3, [r7, #4] 801e78a: 2200 movs r2, #0 801e78c: 60da str r2, [r3, #12] 801e78e: 4b43 ldr r3, [pc, #268] @ (801e89c ) 801e790: 2201 movs r2, #1 801e792: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e794: 687b ldr r3, [r7, #4] 801e796: 220a movs r2, #10 801e798: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e79a: 4b41 ldr r3, [pc, #260] @ (801e8a0 ) 801e79c: 681a ldr r2, [r3, #0] 801e79e: 687b ldr r3, [r7, #4] 801e7a0: 60da str r2, [r3, #12] 801e7a2: 4a3f ldr r2, [pc, #252] @ (801e8a0 ) 801e7a4: 687b ldr r3, [r7, #4] 801e7a6: 6013 str r3, [r2, #0] 801e7a8: f003 f958 bl 8021a5c } break; 801e7ac: e06c b.n 801e888 case CLOSING: tcp_receive(pcb); 801e7ae: 6878 ldr r0, [r7, #4] 801e7b0: f000 f984 bl 801eabc if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801e7b4: 4b3b ldr r3, [pc, #236] @ (801e8a4 ) 801e7b6: 781b ldrb r3, [r3, #0] 801e7b8: f003 0310 and.w r3, r3, #16 801e7bc: 2b00 cmp r3, #0 801e7be: d065 beq.n 801e88c 801e7c0: 687b ldr r3, [r7, #4] 801e7c2: 6d1a ldr r2, [r3, #80] @ 0x50 801e7c4: 4b38 ldr r3, [pc, #224] @ (801e8a8 ) 801e7c6: 681b ldr r3, [r3, #0] 801e7c8: 429a cmp r2, r3 801e7ca: d15f bne.n 801e88c 801e7cc: 687b ldr r3, [r7, #4] 801e7ce: 6edb ldr r3, [r3, #108] @ 0x6c 801e7d0: 2b00 cmp r3, #0 801e7d2: d15b bne.n 801e88c LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 801e7d4: 6878 ldr r0, [r7, #4] 801e7d6: f7fe fcef bl 801d1b8 TCP_RMV_ACTIVE(pcb); 801e7da: 4b35 ldr r3, [pc, #212] @ (801e8b0 ) 801e7dc: 681b ldr r3, [r3, #0] 801e7de: 687a ldr r2, [r7, #4] 801e7e0: 429a cmp r2, r3 801e7e2: d105 bne.n 801e7f0 801e7e4: 4b32 ldr r3, [pc, #200] @ (801e8b0 ) 801e7e6: 681b ldr r3, [r3, #0] 801e7e8: 68db ldr r3, [r3, #12] 801e7ea: 4a31 ldr r2, [pc, #196] @ (801e8b0 ) 801e7ec: 6013 str r3, [r2, #0] 801e7ee: e013 b.n 801e818 801e7f0: 4b2f ldr r3, [pc, #188] @ (801e8b0 ) 801e7f2: 681b ldr r3, [r3, #0] 801e7f4: 61bb str r3, [r7, #24] 801e7f6: e00c b.n 801e812 801e7f8: 69bb ldr r3, [r7, #24] 801e7fa: 68db ldr r3, [r3, #12] 801e7fc: 687a ldr r2, [r7, #4] 801e7fe: 429a cmp r2, r3 801e800: d104 bne.n 801e80c 801e802: 687b ldr r3, [r7, #4] 801e804: 68da ldr r2, [r3, #12] 801e806: 69bb ldr r3, [r7, #24] 801e808: 60da str r2, [r3, #12] 801e80a: e005 b.n 801e818 801e80c: 69bb ldr r3, [r7, #24] 801e80e: 68db ldr r3, [r3, #12] 801e810: 61bb str r3, [r7, #24] 801e812: 69bb ldr r3, [r7, #24] 801e814: 2b00 cmp r3, #0 801e816: d1ef bne.n 801e7f8 801e818: 687b ldr r3, [r7, #4] 801e81a: 2200 movs r2, #0 801e81c: 60da str r2, [r3, #12] 801e81e: 4b1f ldr r3, [pc, #124] @ (801e89c ) 801e820: 2201 movs r2, #1 801e822: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e824: 687b ldr r3, [r7, #4] 801e826: 220a movs r2, #10 801e828: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e82a: 4b1d ldr r3, [pc, #116] @ (801e8a0 ) 801e82c: 681a ldr r2, [r3, #0] 801e82e: 687b ldr r3, [r7, #4] 801e830: 60da str r2, [r3, #12] 801e832: 4a1b ldr r2, [pc, #108] @ (801e8a0 ) 801e834: 687b ldr r3, [r7, #4] 801e836: 6013 str r3, [r2, #0] 801e838: f003 f910 bl 8021a5c } break; 801e83c: e026 b.n 801e88c case LAST_ACK: tcp_receive(pcb); 801e83e: 6878 ldr r0, [r7, #4] 801e840: f000 f93c bl 801eabc if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801e844: 4b17 ldr r3, [pc, #92] @ (801e8a4 ) 801e846: 781b ldrb r3, [r3, #0] 801e848: f003 0310 and.w r3, r3, #16 801e84c: 2b00 cmp r3, #0 801e84e: d01f beq.n 801e890 801e850: 687b ldr r3, [r7, #4] 801e852: 6d1a ldr r2, [r3, #80] @ 0x50 801e854: 4b14 ldr r3, [pc, #80] @ (801e8a8 ) 801e856: 681b ldr r3, [r3, #0] 801e858: 429a cmp r2, r3 801e85a: d119 bne.n 801e890 801e85c: 687b ldr r3, [r7, #4] 801e85e: 6edb ldr r3, [r3, #108] @ 0x6c 801e860: 2b00 cmp r3, #0 801e862: d115 bne.n 801e890 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; 801e864: 4b11 ldr r3, [pc, #68] @ (801e8ac ) 801e866: 781b ldrb r3, [r3, #0] 801e868: f043 0310 orr.w r3, r3, #16 801e86c: b2da uxtb r2, r3 801e86e: 4b0f ldr r3, [pc, #60] @ (801e8ac ) 801e870: 701a strb r2, [r3, #0] } break; 801e872: e00d b.n 801e890 default: break; 801e874: bf00 nop 801e876: e00c b.n 801e892 break; 801e878: bf00 nop 801e87a: e00a b.n 801e892 break; 801e87c: bf00 nop 801e87e: e008 b.n 801e892 break; 801e880: bf00 nop 801e882: e006 b.n 801e892 break; 801e884: bf00 nop 801e886: e004 b.n 801e892 break; 801e888: bf00 nop 801e88a: e002 b.n 801e892 break; 801e88c: bf00 nop 801e88e: e000 b.n 801e892 break; 801e890: bf00 nop } return ERR_OK; 801e892: 2300 movs r3, #0 } 801e894: 4618 mov r0, r3 801e896: 3724 adds r7, #36 @ 0x24 801e898: 46bd mov sp, r7 801e89a: bd90 pop {r4, r7, pc} 801e89c: 2402af7c .word 0x2402af7c 801e8a0: 2402af78 .word 0x2402af78 801e8a4: 2402afb0 .word 0x2402afb0 801e8a8: 2402afa8 .word 0x2402afa8 801e8ac: 2402afb1 .word 0x2402afb1 801e8b0: 2402af74 .word 0x2402af74 0801e8b4 : * * Called from tcp_receive() */ static void tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) { 801e8b4: b590 push {r4, r7, lr} 801e8b6: b085 sub sp, #20 801e8b8: af00 add r7, sp, #0 801e8ba: 6078 str r0, [r7, #4] 801e8bc: 6039 str r1, [r7, #0] struct tcp_seg *old_seg; LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 801e8be: 687b ldr r3, [r7, #4] 801e8c0: 2b00 cmp r3, #0 801e8c2: d106 bne.n 801e8d2 801e8c4: 4b3b ldr r3, [pc, #236] @ (801e9b4 ) 801e8c6: f240 421f movw r2, #1055 @ 0x41f 801e8ca: 493b ldr r1, [pc, #236] @ (801e9b8 ) 801e8cc: 483b ldr r0, [pc, #236] @ (801e9bc ) 801e8ce: f00b ffcd bl 802a86c if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801e8d2: 687b ldr r3, [r7, #4] 801e8d4: 691b ldr r3, [r3, #16] 801e8d6: 899b ldrh r3, [r3, #12] 801e8d8: b29b uxth r3, r3 801e8da: 4618 mov r0, r3 801e8dc: f7fb f86c bl 80199b8 801e8e0: 4603 mov r3, r0 801e8e2: b2db uxtb r3, r3 801e8e4: f003 0301 and.w r3, r3, #1 801e8e8: 2b00 cmp r3, #0 801e8ea: d028 beq.n 801e93e /* received segment overlaps all following segments */ tcp_segs_free(next); 801e8ec: 6838 ldr r0, [r7, #0] 801e8ee: f7fe f989 bl 801cc04 next = NULL; 801e8f2: 2300 movs r3, #0 801e8f4: 603b str r3, [r7, #0] 801e8f6: e056 b.n 801e9a6 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) { 801e8f8: 683b ldr r3, [r7, #0] 801e8fa: 691b ldr r3, [r3, #16] 801e8fc: 899b ldrh r3, [r3, #12] 801e8fe: b29b uxth r3, r3 801e900: 4618 mov r0, r3 801e902: f7fb f859 bl 80199b8 801e906: 4603 mov r3, r0 801e908: b2db uxtb r3, r3 801e90a: f003 0301 and.w r3, r3, #1 801e90e: 2b00 cmp r3, #0 801e910: d00d beq.n 801e92e TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); 801e912: 687b ldr r3, [r7, #4] 801e914: 691b ldr r3, [r3, #16] 801e916: 899b ldrh r3, [r3, #12] 801e918: b29c uxth r4, r3 801e91a: 2001 movs r0, #1 801e91c: f7fb f84c bl 80199b8 801e920: 4603 mov r3, r0 801e922: 461a mov r2, r3 801e924: 687b ldr r3, [r7, #4] 801e926: 691b ldr r3, [r3, #16] 801e928: 4322 orrs r2, r4 801e92a: b292 uxth r2, r2 801e92c: 819a strh r2, [r3, #12] } old_seg = next; 801e92e: 683b ldr r3, [r7, #0] 801e930: 60fb str r3, [r7, #12] next = next->next; 801e932: 683b ldr r3, [r7, #0] 801e934: 681b ldr r3, [r3, #0] 801e936: 603b str r3, [r7, #0] tcp_seg_free(old_seg); 801e938: 68f8 ldr r0, [r7, #12] 801e93a: f7fe f978 bl 801cc2e while (next && 801e93e: 683b ldr r3, [r7, #0] 801e940: 2b00 cmp r3, #0 801e942: d00e beq.n 801e962 TCP_SEQ_GEQ((seqno + cseg->len), 801e944: 687b ldr r3, [r7, #4] 801e946: 891b ldrh r3, [r3, #8] 801e948: 461a mov r2, r3 801e94a: 4b1d ldr r3, [pc, #116] @ (801e9c0 ) 801e94c: 681b ldr r3, [r3, #0] 801e94e: 441a add r2, r3 801e950: 683b ldr r3, [r7, #0] 801e952: 691b ldr r3, [r3, #16] 801e954: 685b ldr r3, [r3, #4] 801e956: 6839 ldr r1, [r7, #0] 801e958: 8909 ldrh r1, [r1, #8] 801e95a: 440b add r3, r1 801e95c: 1ad3 subs r3, r2, r3 while (next && 801e95e: 2b00 cmp r3, #0 801e960: daca bge.n 801e8f8 } if (next && 801e962: 683b ldr r3, [r7, #0] 801e964: 2b00 cmp r3, #0 801e966: d01e beq.n 801e9a6 TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { 801e968: 687b ldr r3, [r7, #4] 801e96a: 891b ldrh r3, [r3, #8] 801e96c: 461a mov r2, r3 801e96e: 4b14 ldr r3, [pc, #80] @ (801e9c0 ) 801e970: 681b ldr r3, [r3, #0] 801e972: 441a add r2, r3 801e974: 683b ldr r3, [r7, #0] 801e976: 691b ldr r3, [r3, #16] 801e978: 685b ldr r3, [r3, #4] 801e97a: 1ad3 subs r3, r2, r3 if (next && 801e97c: 2b00 cmp r3, #0 801e97e: dd12 ble.n 801e9a6 /* We need to trim the incoming segment. */ cseg->len = (u16_t)(next->tcphdr->seqno - seqno); 801e980: 683b ldr r3, [r7, #0] 801e982: 691b ldr r3, [r3, #16] 801e984: 685b ldr r3, [r3, #4] 801e986: b29a uxth r2, r3 801e988: 4b0d ldr r3, [pc, #52] @ (801e9c0 ) 801e98a: 681b ldr r3, [r3, #0] 801e98c: b29b uxth r3, r3 801e98e: 1ad3 subs r3, r2, r3 801e990: b29a uxth r2, r3 801e992: 687b ldr r3, [r7, #4] 801e994: 811a strh r2, [r3, #8] pbuf_realloc(cseg->p, cseg->len); 801e996: 687b ldr r3, [r7, #4] 801e998: 685a ldr r2, [r3, #4] 801e99a: 687b ldr r3, [r7, #4] 801e99c: 891b ldrh r3, [r3, #8] 801e99e: 4619 mov r1, r3 801e9a0: 4610 mov r0, r2 801e9a2: f7fc fb35 bl 801b010 } } cseg->next = next; 801e9a6: 687b ldr r3, [r7, #4] 801e9a8: 683a ldr r2, [r7, #0] 801e9aa: 601a str r2, [r3, #0] } 801e9ac: bf00 nop 801e9ae: 3714 adds r7, #20 801e9b0: 46bd mov sp, r7 801e9b2: bd90 pop {r4, r7, pc} 801e9b4: 0802fd10 .word 0x0802fd10 801e9b8: 0802ffd0 .word 0x0802ffd0 801e9bc: 0802fd5c .word 0x0802fd5c 801e9c0: 2402afa4 .word 0x2402afa4 0801e9c4 : /** 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) { 801e9c4: b5b0 push {r4, r5, r7, lr} 801e9c6: b086 sub sp, #24 801e9c8: af00 add r7, sp, #0 801e9ca: 60f8 str r0, [r7, #12] 801e9cc: 60b9 str r1, [r7, #8] 801e9ce: 607a str r2, [r7, #4] 801e9d0: 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 && 801e9d2: e03e b.n 801ea52 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; 801e9d4: 68bb ldr r3, [r7, #8] 801e9d6: 617b str r3, [r7, #20] seg_list = seg_list->next; 801e9d8: 68bb ldr r3, [r7, #8] 801e9da: 681b ldr r3, [r3, #0] 801e9dc: 60bb str r3, [r7, #8] clen = pbuf_clen(next->p); 801e9de: 697b ldr r3, [r7, #20] 801e9e0: 685b ldr r3, [r3, #4] 801e9e2: 4618 mov r0, r3 801e9e4: f7fc fd58 bl 801b498 801e9e8: 4603 mov r3, r0 801e9ea: 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)); 801e9ec: 68fb ldr r3, [r7, #12] 801e9ee: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801e9f2: 8a7a ldrh r2, [r7, #18] 801e9f4: 429a cmp r2, r3 801e9f6: d906 bls.n 801ea06 801e9f8: 4b2a ldr r3, [pc, #168] @ (801eaa4 ) 801e9fa: f240 4257 movw r2, #1111 @ 0x457 801e9fe: 492a ldr r1, [pc, #168] @ (801eaa8 ) 801ea00: 482a ldr r0, [pc, #168] @ (801eaac ) 801ea02: f00b ff33 bl 802a86c pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); 801ea06: 68fb ldr r3, [r7, #12] 801ea08: f8b3 2066 ldrh.w r2, [r3, #102] @ 0x66 801ea0c: 8a7b ldrh r3, [r7, #18] 801ea0e: 1ad3 subs r3, r2, r3 801ea10: b29a uxth r2, r3 801ea12: 68fb ldr r3, [r7, #12] 801ea14: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 recv_acked = (tcpwnd_size_t)(recv_acked + next->len); 801ea18: 697b ldr r3, [r7, #20] 801ea1a: 891a ldrh r2, [r3, #8] 801ea1c: 4b24 ldr r3, [pc, #144] @ (801eab0 ) 801ea1e: 881b ldrh r3, [r3, #0] 801ea20: 4413 add r3, r2 801ea22: b29a uxth r2, r3 801ea24: 4b22 ldr r3, [pc, #136] @ (801eab0 ) 801ea26: 801a strh r2, [r3, #0] tcp_seg_free(next); 801ea28: 6978 ldr r0, [r7, #20] 801ea2a: f7fe f900 bl 801cc2e 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) { 801ea2e: 68fb ldr r3, [r7, #12] 801ea30: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801ea34: 2b00 cmp r3, #0 801ea36: d00c beq.n 801ea52 LWIP_ASSERT("tcp_receive: valid queue length", 801ea38: 68bb ldr r3, [r7, #8] 801ea3a: 2b00 cmp r3, #0 801ea3c: d109 bne.n 801ea52 801ea3e: 683b ldr r3, [r7, #0] 801ea40: 2b00 cmp r3, #0 801ea42: d106 bne.n 801ea52 801ea44: 4b17 ldr r3, [pc, #92] @ (801eaa4 ) 801ea46: f240 4261 movw r2, #1121 @ 0x461 801ea4a: 491a ldr r1, [pc, #104] @ (801eab4 ) 801ea4c: 4817 ldr r0, [pc, #92] @ (801eaac ) 801ea4e: f00b ff0d bl 802a86c while (seg_list != NULL && 801ea52: 68bb ldr r3, [r7, #8] 801ea54: 2b00 cmp r3, #0 801ea56: d020 beq.n 801ea9a TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 801ea58: 68bb ldr r3, [r7, #8] 801ea5a: 691b ldr r3, [r3, #16] 801ea5c: 685b ldr r3, [r3, #4] 801ea5e: 4618 mov r0, r3 801ea60: f7fa ffbf bl 80199e2 801ea64: 4604 mov r4, r0 801ea66: 68bb ldr r3, [r7, #8] 801ea68: 891b ldrh r3, [r3, #8] 801ea6a: 461d mov r5, r3 801ea6c: 68bb ldr r3, [r7, #8] 801ea6e: 691b ldr r3, [r3, #16] 801ea70: 899b ldrh r3, [r3, #12] 801ea72: b29b uxth r3, r3 801ea74: 4618 mov r0, r3 801ea76: f7fa ff9f bl 80199b8 801ea7a: 4603 mov r3, r0 801ea7c: b2db uxtb r3, r3 801ea7e: f003 0303 and.w r3, r3, #3 801ea82: 2b00 cmp r3, #0 801ea84: d001 beq.n 801ea8a 801ea86: 2301 movs r3, #1 801ea88: e000 b.n 801ea8c 801ea8a: 2300 movs r3, #0 801ea8c: 442b add r3, r5 801ea8e: 18e2 adds r2, r4, r3 801ea90: 4b09 ldr r3, [pc, #36] @ (801eab8 ) 801ea92: 681b ldr r3, [r3, #0] 801ea94: 1ad3 subs r3, r2, r3 while (seg_list != NULL && 801ea96: 2b00 cmp r3, #0 801ea98: dd9c ble.n 801e9d4 seg_list != NULL || dbg_other_seg_list != NULL); } } return seg_list; 801ea9a: 68bb ldr r3, [r7, #8] } 801ea9c: 4618 mov r0, r3 801ea9e: 3718 adds r7, #24 801eaa0: 46bd mov sp, r7 801eaa2: bdb0 pop {r4, r5, r7, pc} 801eaa4: 0802fd10 .word 0x0802fd10 801eaa8: 0802fff8 .word 0x0802fff8 801eaac: 0802fd5c .word 0x0802fd5c 801eab0: 2402afac .word 0x2402afac 801eab4: 08030020 .word 0x08030020 801eab8: 2402afa8 .word 0x2402afa8 0801eabc : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 801eabc: b5b0 push {r4, r5, r7, lr} 801eabe: b094 sub sp, #80 @ 0x50 801eac0: af00 add r7, sp, #0 801eac2: 6078 str r0, [r7, #4] s16_t m; u32_t right_wnd_edge; int found_dupack = 0; 801eac4: 2300 movs r3, #0 801eac6: 64bb str r3, [r7, #72] @ 0x48 LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 801eac8: 687b ldr r3, [r7, #4] 801eaca: 2b00 cmp r3, #0 801eacc: d106 bne.n 801eadc 801eace: 4b91 ldr r3, [pc, #580] @ (801ed14 ) 801ead0: f240 427b movw r2, #1147 @ 0x47b 801ead4: 4990 ldr r1, [pc, #576] @ (801ed18 ) 801ead6: 4891 ldr r0, [pc, #580] @ (801ed1c ) 801ead8: f00b fec8 bl 802a86c LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 801eadc: 687b ldr r3, [r7, #4] 801eade: 7d1b ldrb r3, [r3, #20] 801eae0: 2b03 cmp r3, #3 801eae2: d806 bhi.n 801eaf2 801eae4: 4b8b ldr r3, [pc, #556] @ (801ed14 ) 801eae6: f240 427c movw r2, #1148 @ 0x47c 801eaea: 498d ldr r1, [pc, #564] @ (801ed20 ) 801eaec: 488b ldr r0, [pc, #556] @ (801ed1c ) 801eaee: f00b febd bl 802a86c if (flags & TCP_ACK) { 801eaf2: 4b8c ldr r3, [pc, #560] @ (801ed24 ) 801eaf4: 781b ldrb r3, [r3, #0] 801eaf6: f003 0310 and.w r3, r3, #16 801eafa: 2b00 cmp r3, #0 801eafc: f000 8264 beq.w 801efc8 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 801eb00: 687b ldr r3, [r7, #4] 801eb02: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eb06: 461a mov r2, r3 801eb08: 687b ldr r3, [r7, #4] 801eb0a: 6d9b ldr r3, [r3, #88] @ 0x58 801eb0c: 4413 add r3, r2 801eb0e: 633b str r3, [r7, #48] @ 0x30 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801eb10: 687b ldr r3, [r7, #4] 801eb12: 6d5a ldr r2, [r3, #84] @ 0x54 801eb14: 4b84 ldr r3, [pc, #528] @ (801ed28 ) 801eb16: 681b ldr r3, [r3, #0] 801eb18: 1ad3 subs r3, r2, r3 801eb1a: 2b00 cmp r3, #0 801eb1c: db1b blt.n 801eb56 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb1e: 687b ldr r3, [r7, #4] 801eb20: 6d5a ldr r2, [r3, #84] @ 0x54 801eb22: 4b81 ldr r3, [pc, #516] @ (801ed28 ) 801eb24: 681b ldr r3, [r3, #0] if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801eb26: 429a cmp r2, r3 801eb28: d106 bne.n 801eb38 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb2a: 687b ldr r3, [r7, #4] 801eb2c: 6d9a ldr r2, [r3, #88] @ 0x58 801eb2e: 4b7f ldr r3, [pc, #508] @ (801ed2c ) 801eb30: 681b ldr r3, [r3, #0] 801eb32: 1ad3 subs r3, r2, r3 801eb34: 2b00 cmp r3, #0 801eb36: db0e blt.n 801eb56 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801eb38: 687b ldr r3, [r7, #4] 801eb3a: 6d9a ldr r2, [r3, #88] @ 0x58 801eb3c: 4b7b ldr r3, [pc, #492] @ (801ed2c ) 801eb3e: 681b ldr r3, [r3, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb40: 429a cmp r2, r3 801eb42: d125 bne.n 801eb90 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801eb44: 4b7a ldr r3, [pc, #488] @ (801ed30 ) 801eb46: 681b ldr r3, [r3, #0] 801eb48: 89db ldrh r3, [r3, #14] 801eb4a: b29a uxth r2, r3 801eb4c: 687b ldr r3, [r7, #4] 801eb4e: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eb52: 429a cmp r2, r3 801eb54: d91c bls.n 801eb90 pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 801eb56: 4b76 ldr r3, [pc, #472] @ (801ed30 ) 801eb58: 681b ldr r3, [r3, #0] 801eb5a: 89db ldrh r3, [r3, #14] 801eb5c: b29a uxth r2, r3 801eb5e: 687b ldr r3, [r7, #4] 801eb60: 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) { 801eb64: 687b ldr r3, [r7, #4] 801eb66: f8b3 2062 ldrh.w r2, [r3, #98] @ 0x62 801eb6a: 687b ldr r3, [r7, #4] 801eb6c: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eb70: 429a cmp r2, r3 801eb72: d205 bcs.n 801eb80 pcb->snd_wnd_max = pcb->snd_wnd; 801eb74: 687b ldr r3, [r7, #4] 801eb76: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801eb7a: 687b ldr r3, [r7, #4] 801eb7c: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 } pcb->snd_wl1 = seqno; 801eb80: 4b69 ldr r3, [pc, #420] @ (801ed28 ) 801eb82: 681a ldr r2, [r3, #0] 801eb84: 687b ldr r3, [r7, #4] 801eb86: 655a str r2, [r3, #84] @ 0x54 pcb->snd_wl2 = ackno; 801eb88: 4b68 ldr r3, [pc, #416] @ (801ed2c ) 801eb8a: 681a ldr r2, [r3, #0] 801eb8c: 687b ldr r3, [r7, #4] 801eb8e: 659a str r2, [r3, #88] @ 0x58 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 801eb90: 4b66 ldr r3, [pc, #408] @ (801ed2c ) 801eb92: 681a ldr r2, [r3, #0] 801eb94: 687b ldr r3, [r7, #4] 801eb96: 6c5b ldr r3, [r3, #68] @ 0x44 801eb98: 1ad3 subs r3, r2, r3 801eb9a: 2b00 cmp r3, #0 801eb9c: dc58 bgt.n 801ec50 /* Clause 2 */ if (tcplen == 0) { 801eb9e: 4b65 ldr r3, [pc, #404] @ (801ed34 ) 801eba0: 881b ldrh r3, [r3, #0] 801eba2: 2b00 cmp r3, #0 801eba4: d14b bne.n 801ec3e /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { 801eba6: 687b ldr r3, [r7, #4] 801eba8: 6d9b ldr r3, [r3, #88] @ 0x58 801ebaa: 687a ldr r2, [r7, #4] 801ebac: f8b2 2060 ldrh.w r2, [r2, #96] @ 0x60 801ebb0: 4413 add r3, r2 801ebb2: 6b3a ldr r2, [r7, #48] @ 0x30 801ebb4: 429a cmp r2, r3 801ebb6: d142 bne.n 801ec3e /* Clause 4 */ if (pcb->rtime >= 0) { 801ebb8: 687b ldr r3, [r7, #4] 801ebba: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801ebbe: 2b00 cmp r3, #0 801ebc0: db3d blt.n 801ec3e /* Clause 5 */ if (pcb->lastack == ackno) { 801ebc2: 687b ldr r3, [r7, #4] 801ebc4: 6c5a ldr r2, [r3, #68] @ 0x44 801ebc6: 4b59 ldr r3, [pc, #356] @ (801ed2c ) 801ebc8: 681b ldr r3, [r3, #0] 801ebca: 429a cmp r2, r3 801ebcc: d137 bne.n 801ec3e found_dupack = 1; 801ebce: 2301 movs r3, #1 801ebd0: 64bb str r3, [r7, #72] @ 0x48 if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 801ebd2: 687b ldr r3, [r7, #4] 801ebd4: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ebd8: 2bff cmp r3, #255 @ 0xff 801ebda: d007 beq.n 801ebec ++pcb->dupacks; 801ebdc: 687b ldr r3, [r7, #4] 801ebde: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ebe2: 3301 adds r3, #1 801ebe4: b2da uxtb r2, r3 801ebe6: 687b ldr r3, [r7, #4] 801ebe8: f883 2043 strb.w r2, [r3, #67] @ 0x43 } if (pcb->dupacks > 3) { 801ebec: 687b ldr r3, [r7, #4] 801ebee: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ebf2: 2b03 cmp r3, #3 801ebf4: d91b bls.n 801ec2e /* Inflate the congestion window */ TCP_WND_INC(pcb->cwnd, pcb->mss); 801ebf6: 687b ldr r3, [r7, #4] 801ebf8: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ebfc: 687b ldr r3, [r7, #4] 801ebfe: 8e5b ldrh r3, [r3, #50] @ 0x32 801ec00: 4413 add r3, r2 801ec02: b29a uxth r2, r3 801ec04: 687b ldr r3, [r7, #4] 801ec06: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ec0a: 429a cmp r2, r3 801ec0c: d30a bcc.n 801ec24 801ec0e: 687b ldr r3, [r7, #4] 801ec10: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ec14: 687b ldr r3, [r7, #4] 801ec16: 8e5b ldrh r3, [r3, #50] @ 0x32 801ec18: 4413 add r3, r2 801ec1a: b29a uxth r2, r3 801ec1c: 687b ldr r3, [r7, #4] 801ec1e: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ec22: e004 b.n 801ec2e 801ec24: 687b ldr r3, [r7, #4] 801ec26: f64f 72ff movw r2, #65535 @ 0xffff 801ec2a: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 } if (pcb->dupacks >= 3) { 801ec2e: 687b ldr r3, [r7, #4] 801ec30: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ec34: 2b02 cmp r3, #2 801ec36: d902 bls.n 801ec3e /* Do fast retransmit (checked via TF_INFR, not via dupacks count) */ tcp_rexmit_fast(pcb); 801ec38: 6878 ldr r0, [r7, #4] 801ec3a: f002 fbb3 bl 80213a4 } } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { 801ec3e: 6cbb ldr r3, [r7, #72] @ 0x48 801ec40: 2b00 cmp r3, #0 801ec42: f040 8161 bne.w 801ef08 pcb->dupacks = 0; 801ec46: 687b ldr r3, [r7, #4] 801ec48: 2200 movs r2, #0 801ec4a: f883 2043 strb.w r2, [r3, #67] @ 0x43 801ec4e: e15b b.n 801ef08 } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ec50: 4b36 ldr r3, [pc, #216] @ (801ed2c ) 801ec52: 681a ldr r2, [r3, #0] 801ec54: 687b ldr r3, [r7, #4] 801ec56: 6c5b ldr r3, [r3, #68] @ 0x44 801ec58: 1ad3 subs r3, r2, r3 801ec5a: 3b01 subs r3, #1 801ec5c: 2b00 cmp r3, #0 801ec5e: f2c0 814e blt.w 801eefe 801ec62: 4b32 ldr r3, [pc, #200] @ (801ed2c ) 801ec64: 681a ldr r2, [r3, #0] 801ec66: 687b ldr r3, [r7, #4] 801ec68: 6d1b ldr r3, [r3, #80] @ 0x50 801ec6a: 1ad3 subs r3, r2, r3 801ec6c: 2b00 cmp r3, #0 801ec6e: f300 8146 bgt.w 801eefe 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) { 801ec72: 687b ldr r3, [r7, #4] 801ec74: 8b5b ldrh r3, [r3, #26] 801ec76: f003 0304 and.w r3, r3, #4 801ec7a: 2b00 cmp r3, #0 801ec7c: d010 beq.n 801eca0 tcp_clear_flags(pcb, TF_INFR); 801ec7e: 687b ldr r3, [r7, #4] 801ec80: 8b5b ldrh r3, [r3, #26] 801ec82: f023 0304 bic.w r3, r3, #4 801ec86: b29a uxth r2, r3 801ec88: 687b ldr r3, [r7, #4] 801ec8a: 835a strh r2, [r3, #26] pcb->cwnd = pcb->ssthresh; 801ec8c: 687b ldr r3, [r7, #4] 801ec8e: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801ec92: 687b ldr r3, [r7, #4] 801ec94: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801ec98: 687b ldr r3, [r7, #4] 801ec9a: 2200 movs r2, #0 801ec9c: f8a3 206a strh.w r2, [r3, #106] @ 0x6a } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 801eca0: 687b ldr r3, [r7, #4] 801eca2: 2200 movs r2, #0 801eca4: f883 2042 strb.w r2, [r3, #66] @ 0x42 /* Reset the retransmission time-out. */ pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801eca8: 687b ldr r3, [r7, #4] 801ecaa: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ecae: 10db asrs r3, r3, #3 801ecb0: b21b sxth r3, r3 801ecb2: b29a uxth r2, r3 801ecb4: 687b ldr r3, [r7, #4] 801ecb6: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801ecba: b29b uxth r3, r3 801ecbc: 4413 add r3, r2 801ecbe: b29b uxth r3, r3 801ecc0: b21a sxth r2, r3 801ecc2: 687b ldr r3, [r7, #4] 801ecc4: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 /* Record how much data this ACK acks */ acked = (tcpwnd_size_t)(ackno - pcb->lastack); 801ecc8: 4b18 ldr r3, [pc, #96] @ (801ed2c ) 801ecca: 681b ldr r3, [r3, #0] 801eccc: b29a uxth r2, r3 801ecce: 687b ldr r3, [r7, #4] 801ecd0: 6c5b ldr r3, [r3, #68] @ 0x44 801ecd2: b29b uxth r3, r3 801ecd4: 1ad3 subs r3, r2, r3 801ecd6: 85fb strh r3, [r7, #46] @ 0x2e /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 801ecd8: 687b ldr r3, [r7, #4] 801ecda: 2200 movs r2, #0 801ecdc: f883 2043 strb.w r2, [r3, #67] @ 0x43 pcb->lastack = ackno; 801ece0: 4b12 ldr r3, [pc, #72] @ (801ed2c ) 801ece2: 681a ldr r2, [r3, #0] 801ece4: 687b ldr r3, [r7, #4] 801ece6: 645a str r2, [r3, #68] @ 0x44 /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 801ece8: 687b ldr r3, [r7, #4] 801ecea: 7d1b ldrb r3, [r3, #20] 801ecec: 2b03 cmp r3, #3 801ecee: f240 8097 bls.w 801ee20 if (pcb->cwnd < pcb->ssthresh) { 801ecf2: 687b ldr r3, [r7, #4] 801ecf4: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ecf8: 687b ldr r3, [r7, #4] 801ecfa: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 801ecfe: 429a cmp r2, r3 801ed00: d245 bcs.n 801ed8e tcpwnd_size_t increase; /* limit to 1 SMSS segment during period following RTO */ u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 801ed02: 687b ldr r3, [r7, #4] 801ed04: 8b5b ldrh r3, [r3, #26] 801ed06: f403 6300 and.w r3, r3, #2048 @ 0x800 801ed0a: 2b00 cmp r3, #0 801ed0c: d014 beq.n 801ed38 801ed0e: 2301 movs r3, #1 801ed10: e013 b.n 801ed3a 801ed12: bf00 nop 801ed14: 0802fd10 .word 0x0802fd10 801ed18: 08030040 .word 0x08030040 801ed1c: 0802fd5c .word 0x0802fd5c 801ed20: 0803005c .word 0x0803005c 801ed24: 2402afb0 .word 0x2402afb0 801ed28: 2402afa4 .word 0x2402afa4 801ed2c: 2402afa8 .word 0x2402afa8 801ed30: 2402af94 .word 0x2402af94 801ed34: 2402afae .word 0x2402afae 801ed38: 2302 movs r3, #2 801ed3a: 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)); 801ed3e: f897 302d ldrb.w r3, [r7, #45] @ 0x2d 801ed42: b29a uxth r2, r3 801ed44: 687b ldr r3, [r7, #4] 801ed46: 8e5b ldrh r3, [r3, #50] @ 0x32 801ed48: fb12 f303 smulbb r3, r2, r3 801ed4c: b29b uxth r3, r3 801ed4e: 8dfa ldrh r2, [r7, #46] @ 0x2e 801ed50: 4293 cmp r3, r2 801ed52: bf28 it cs 801ed54: 4613 movcs r3, r2 801ed56: 857b strh r3, [r7, #42] @ 0x2a TCP_WND_INC(pcb->cwnd, increase); 801ed58: 687b ldr r3, [r7, #4] 801ed5a: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ed5e: 8d7b ldrh r3, [r7, #42] @ 0x2a 801ed60: 4413 add r3, r2 801ed62: b29a uxth r2, r3 801ed64: 687b ldr r3, [r7, #4] 801ed66: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ed6a: 429a cmp r2, r3 801ed6c: d309 bcc.n 801ed82 801ed6e: 687b ldr r3, [r7, #4] 801ed70: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ed74: 8d7b ldrh r3, [r7, #42] @ 0x2a 801ed76: 4413 add r3, r2 801ed78: b29a uxth r2, r3 801ed7a: 687b ldr r3, [r7, #4] 801ed7c: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ed80: e04e b.n 801ee20 801ed82: 687b ldr r3, [r7, #4] 801ed84: f64f 72ff movw r2, #65535 @ 0xffff 801ed88: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ed8c: e048 b.n 801ee20 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); 801ed8e: 687b ldr r3, [r7, #4] 801ed90: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801ed94: 8dfb ldrh r3, [r7, #46] @ 0x2e 801ed96: 4413 add r3, r2 801ed98: b29a uxth r2, r3 801ed9a: 687b ldr r3, [r7, #4] 801ed9c: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 801eda0: 429a cmp r2, r3 801eda2: d309 bcc.n 801edb8 801eda4: 687b ldr r3, [r7, #4] 801eda6: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edaa: 8dfb ldrh r3, [r7, #46] @ 0x2e 801edac: 4413 add r3, r2 801edae: b29a uxth r2, r3 801edb0: 687b ldr r3, [r7, #4] 801edb2: f8a3 206a strh.w r2, [r3, #106] @ 0x6a 801edb6: e004 b.n 801edc2 801edb8: 687b ldr r3, [r7, #4] 801edba: f64f 72ff movw r2, #65535 @ 0xffff 801edbe: f8a3 206a strh.w r2, [r3, #106] @ 0x6a if (pcb->bytes_acked >= pcb->cwnd) { 801edc2: 687b ldr r3, [r7, #4] 801edc4: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edc8: 687b ldr r3, [r7, #4] 801edca: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801edce: 429a cmp r2, r3 801edd0: d326 bcc.n 801ee20 pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); 801edd2: 687b ldr r3, [r7, #4] 801edd4: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edd8: 687b ldr r3, [r7, #4] 801edda: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801edde: 1ad3 subs r3, r2, r3 801ede0: b29a uxth r2, r3 801ede2: 687b ldr r3, [r7, #4] 801ede4: f8a3 206a strh.w r2, [r3, #106] @ 0x6a TCP_WND_INC(pcb->cwnd, pcb->mss); 801ede8: 687b ldr r3, [r7, #4] 801edea: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801edee: 687b ldr r3, [r7, #4] 801edf0: 8e5b ldrh r3, [r3, #50] @ 0x32 801edf2: 4413 add r3, r2 801edf4: b29a uxth r2, r3 801edf6: 687b ldr r3, [r7, #4] 801edf8: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801edfc: 429a cmp r2, r3 801edfe: d30a bcc.n 801ee16 801ee00: 687b ldr r3, [r7, #4] 801ee02: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ee06: 687b ldr r3, [r7, #4] 801ee08: 8e5b ldrh r3, [r3, #50] @ 0x32 801ee0a: 4413 add r3, r2 801ee0c: b29a uxth r2, r3 801ee0e: 687b ldr r3, [r7, #4] 801ee10: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ee14: e004 b.n 801ee20 801ee16: 687b ldr r3, [r7, #4] 801ee18: f64f 72ff movw r2, #65535 @ 0xffff 801ee1c: 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); 801ee20: 687b ldr r3, [r7, #4] 801ee22: 6f19 ldr r1, [r3, #112] @ 0x70 801ee24: 687b ldr r3, [r7, #4] 801ee26: 6edb ldr r3, [r3, #108] @ 0x6c 801ee28: 4a98 ldr r2, [pc, #608] @ (801f08c ) 801ee2a: 6878 ldr r0, [r7, #4] 801ee2c: f7ff fdca bl 801e9c4 801ee30: 4602 mov r2, r0 801ee32: 687b ldr r3, [r7, #4] 801ee34: 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); 801ee36: 687b ldr r3, [r7, #4] 801ee38: 6ed9 ldr r1, [r3, #108] @ 0x6c 801ee3a: 687b ldr r3, [r7, #4] 801ee3c: 6f1b ldr r3, [r3, #112] @ 0x70 801ee3e: 4a94 ldr r2, [pc, #592] @ (801f090 ) 801ee40: 6878 ldr r0, [r7, #4] 801ee42: f7ff fdbf bl 801e9c4 801ee46: 4602 mov r2, r0 801ee48: 687b ldr r3, [r7, #4] 801ee4a: 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) { 801ee4c: 687b ldr r3, [r7, #4] 801ee4e: 6f1b ldr r3, [r3, #112] @ 0x70 801ee50: 2b00 cmp r3, #0 801ee52: d104 bne.n 801ee5e pcb->rtime = -1; 801ee54: 687b ldr r3, [r7, #4] 801ee56: f64f 72ff movw r2, #65535 @ 0xffff 801ee5a: 861a strh r2, [r3, #48] @ 0x30 801ee5c: e002 b.n 801ee64 } else { pcb->rtime = 0; 801ee5e: 687b ldr r3, [r7, #4] 801ee60: 2200 movs r2, #0 801ee62: 861a strh r2, [r3, #48] @ 0x30 } pcb->polltmr = 0; 801ee64: 687b ldr r3, [r7, #4] 801ee66: 2200 movs r2, #0 801ee68: 771a strb r2, [r3, #28] #if TCP_OVERSIZE if (pcb->unsent == NULL) { 801ee6a: 687b ldr r3, [r7, #4] 801ee6c: 6edb ldr r3, [r3, #108] @ 0x6c 801ee6e: 2b00 cmp r3, #0 801ee70: d103 bne.n 801ee7a pcb->unsent_oversize = 0; 801ee72: 687b ldr r3, [r7, #4] 801ee74: 2200 movs r2, #0 801ee76: 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); 801ee7a: 687b ldr r3, [r7, #4] 801ee7c: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 801ee80: 4b84 ldr r3, [pc, #528] @ (801f094 ) 801ee82: 881b ldrh r3, [r3, #0] 801ee84: 4413 add r3, r2 801ee86: b29a uxth r2, r3 801ee88: 687b ldr r3, [r7, #4] 801ee8a: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 /* check if this ACK ends our retransmission of in-flight data */ if (pcb->flags & TF_RTO) { 801ee8e: 687b ldr r3, [r7, #4] 801ee90: 8b5b ldrh r3, [r3, #26] 801ee92: f403 6300 and.w r3, r3, #2048 @ 0x800 801ee96: 2b00 cmp r3, #0 801ee98: d035 beq.n 801ef06 /* 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) { 801ee9a: 687b ldr r3, [r7, #4] 801ee9c: 6f1b ldr r3, [r3, #112] @ 0x70 801ee9e: 2b00 cmp r3, #0 801eea0: d118 bne.n 801eed4 if ((pcb->unsent == NULL) || 801eea2: 687b ldr r3, [r7, #4] 801eea4: 6edb ldr r3, [r3, #108] @ 0x6c 801eea6: 2b00 cmp r3, #0 801eea8: d00c beq.n 801eec4 (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { 801eeaa: 687b ldr r3, [r7, #4] 801eeac: 6cdc ldr r4, [r3, #76] @ 0x4c 801eeae: 687b ldr r3, [r7, #4] 801eeb0: 6edb ldr r3, [r3, #108] @ 0x6c 801eeb2: 691b ldr r3, [r3, #16] 801eeb4: 685b ldr r3, [r3, #4] 801eeb6: 4618 mov r0, r3 801eeb8: f7fa fd93 bl 80199e2 801eebc: 4603 mov r3, r0 801eebe: 1ae3 subs r3, r4, r3 if ((pcb->unsent == NULL) || 801eec0: 2b00 cmp r3, #0 801eec2: dc20 bgt.n 801ef06 tcp_clear_flags(pcb, TF_RTO); 801eec4: 687b ldr r3, [r7, #4] 801eec6: 8b5b ldrh r3, [r3, #26] 801eec8: f423 6300 bic.w r3, r3, #2048 @ 0x800 801eecc: b29a uxth r2, r3 801eece: 687b ldr r3, [r7, #4] 801eed0: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801eed2: e018 b.n 801ef06 } } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { 801eed4: 687b ldr r3, [r7, #4] 801eed6: 6cdc ldr r4, [r3, #76] @ 0x4c 801eed8: 687b ldr r3, [r7, #4] 801eeda: 6f1b ldr r3, [r3, #112] @ 0x70 801eedc: 691b ldr r3, [r3, #16] 801eede: 685b ldr r3, [r3, #4] 801eee0: 4618 mov r0, r3 801eee2: f7fa fd7e bl 80199e2 801eee6: 4603 mov r3, r0 801eee8: 1ae3 subs r3, r4, r3 801eeea: 2b00 cmp r3, #0 801eeec: dc0b bgt.n 801ef06 tcp_clear_flags(pcb, TF_RTO); 801eeee: 687b ldr r3, [r7, #4] 801eef0: 8b5b ldrh r3, [r3, #26] 801eef2: f423 6300 bic.w r3, r3, #2048 @ 0x800 801eef6: b29a uxth r2, r3 801eef8: 687b ldr r3, [r7, #4] 801eefa: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801eefc: e003 b.n 801ef06 } } /* End of ACK for new data processing. */ } else { /* Out of sequence ACK, didn't really ack anything */ tcp_send_empty_ack(pcb); 801eefe: 6878 ldr r0, [r7, #4] 801ef00: f002 fc3c bl 802177c 801ef04: e000 b.n 801ef08 } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ef06: 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)) { 801ef08: 687b ldr r3, [r7, #4] 801ef0a: 6b5b ldr r3, [r3, #52] @ 0x34 801ef0c: 2b00 cmp r3, #0 801ef0e: d05b beq.n 801efc8 801ef10: 687b ldr r3, [r7, #4] 801ef12: 6b9a ldr r2, [r3, #56] @ 0x38 801ef14: 4b60 ldr r3, [pc, #384] @ (801f098 ) 801ef16: 681b ldr r3, [r3, #0] 801ef18: 1ad3 subs r3, r2, r3 801ef1a: 2b00 cmp r3, #0 801ef1c: da54 bge.n 801efc8 /* 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); 801ef1e: 4b5f ldr r3, [pc, #380] @ (801f09c ) 801ef20: 681b ldr r3, [r3, #0] 801ef22: b29a uxth r2, r3 801ef24: 687b ldr r3, [r7, #4] 801ef26: 6b5b ldr r3, [r3, #52] @ 0x34 801ef28: b29b uxth r3, r3 801ef2a: 1ad3 subs r3, r2, r3 801ef2c: b29b uxth r3, r3 801ef2e: 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)); 801ef32: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801ef36: 687b ldr r3, [r7, #4] 801ef38: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ef3c: 10db asrs r3, r3, #3 801ef3e: b21b sxth r3, r3 801ef40: b29b uxth r3, r3 801ef42: 1ad3 subs r3, r2, r3 801ef44: b29b uxth r3, r3 801ef46: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sa = (s16_t)(pcb->sa + m); 801ef4a: 687b ldr r3, [r7, #4] 801ef4c: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ef50: b29a uxth r2, r3 801ef52: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801ef56: 4413 add r3, r2 801ef58: b29b uxth r3, r3 801ef5a: b21a sxth r2, r3 801ef5c: 687b ldr r3, [r7, #4] 801ef5e: 879a strh r2, [r3, #60] @ 0x3c if (m < 0) { 801ef60: f9b7 304e ldrsh.w r3, [r7, #78] @ 0x4e 801ef64: 2b00 cmp r3, #0 801ef66: da05 bge.n 801ef74 m = (s16_t) - m; 801ef68: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801ef6c: 425b negs r3, r3 801ef6e: b29b uxth r3, r3 801ef70: f8a7 304e strh.w r3, [r7, #78] @ 0x4e } m = (s16_t)(m - (pcb->sv >> 2)); 801ef74: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801ef78: 687b ldr r3, [r7, #4] 801ef7a: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801ef7e: 109b asrs r3, r3, #2 801ef80: b21b sxth r3, r3 801ef82: b29b uxth r3, r3 801ef84: 1ad3 subs r3, r2, r3 801ef86: b29b uxth r3, r3 801ef88: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sv = (s16_t)(pcb->sv + m); 801ef8c: 687b ldr r3, [r7, #4] 801ef8e: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801ef92: b29a uxth r2, r3 801ef94: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801ef98: 4413 add r3, r2 801ef9a: b29b uxth r3, r3 801ef9c: b21a sxth r2, r3 801ef9e: 687b ldr r3, [r7, #4] 801efa0: 87da strh r2, [r3, #62] @ 0x3e pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801efa2: 687b ldr r3, [r7, #4] 801efa4: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801efa8: 10db asrs r3, r3, #3 801efaa: b21b sxth r3, r3 801efac: b29a uxth r2, r3 801efae: 687b ldr r3, [r7, #4] 801efb0: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801efb4: b29b uxth r3, r3 801efb6: 4413 add r3, r2 801efb8: b29b uxth r3, r3 801efba: b21a sxth r2, r3 801efbc: 687b ldr r3, [r7, #4] 801efbe: 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; 801efc2: 687b ldr r3, [r7, #4] 801efc4: 2200 movs r2, #0 801efc6: 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)) { 801efc8: 4b35 ldr r3, [pc, #212] @ (801f0a0 ) 801efca: 881b ldrh r3, [r3, #0] 801efcc: 2b00 cmp r3, #0 801efce: f000 84df beq.w 801f990 801efd2: 687b ldr r3, [r7, #4] 801efd4: 7d1b ldrb r3, [r3, #20] 801efd6: 2b06 cmp r3, #6 801efd8: f200 84da bhi.w 801f990 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)) { 801efdc: 687b ldr r3, [r7, #4] 801efde: 6a5a ldr r2, [r3, #36] @ 0x24 801efe0: 4b30 ldr r3, [pc, #192] @ (801f0a4 ) 801efe2: 681b ldr r3, [r3, #0] 801efe4: 1ad3 subs r3, r2, r3 801efe6: 3b01 subs r3, #1 801efe8: 2b00 cmp r3, #0 801efea: f2c0 808f blt.w 801f10c 801efee: 687b ldr r3, [r7, #4] 801eff0: 6a5a ldr r2, [r3, #36] @ 0x24 801eff2: 4b2b ldr r3, [pc, #172] @ (801f0a0 ) 801eff4: 881b ldrh r3, [r3, #0] 801eff6: 4619 mov r1, r3 801eff8: 4b2a ldr r3, [pc, #168] @ (801f0a4 ) 801effa: 681b ldr r3, [r3, #0] 801effc: 440b add r3, r1 801effe: 1ad3 subs r3, r2, r3 801f000: 3301 adds r3, #1 801f002: 2b00 cmp r3, #0 801f004: f300 8082 bgt.w 801f10c 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; 801f008: 4b27 ldr r3, [pc, #156] @ (801f0a8 ) 801f00a: 685b ldr r3, [r3, #4] 801f00c: 647b str r3, [r7, #68] @ 0x44 u32_t off32 = pcb->rcv_nxt - seqno; 801f00e: 687b ldr r3, [r7, #4] 801f010: 6a5a ldr r2, [r3, #36] @ 0x24 801f012: 4b24 ldr r3, [pc, #144] @ (801f0a4 ) 801f014: 681b ldr r3, [r3, #0] 801f016: 1ad3 subs r3, r2, r3 801f018: 627b str r3, [r7, #36] @ 0x24 u16_t new_tot_len, off; LWIP_ASSERT("inseg.p != NULL", inseg.p); 801f01a: 4b23 ldr r3, [pc, #140] @ (801f0a8 ) 801f01c: 685b ldr r3, [r3, #4] 801f01e: 2b00 cmp r3, #0 801f020: d106 bne.n 801f030 801f022: 4b22 ldr r3, [pc, #136] @ (801f0ac ) 801f024: f240 5294 movw r2, #1428 @ 0x594 801f028: 4921 ldr r1, [pc, #132] @ (801f0b0 ) 801f02a: 4822 ldr r0, [pc, #136] @ (801f0b4 ) 801f02c: f00b fc1e bl 802a86c LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 801f030: 6a7b ldr r3, [r7, #36] @ 0x24 801f032: f64f 72fe movw r2, #65534 @ 0xfffe 801f036: 4293 cmp r3, r2 801f038: d906 bls.n 801f048 801f03a: 4b1c ldr r3, [pc, #112] @ (801f0ac ) 801f03c: f240 5295 movw r2, #1429 @ 0x595 801f040: 491d ldr r1, [pc, #116] @ (801f0b8 ) 801f042: 481c ldr r0, [pc, #112] @ (801f0b4 ) 801f044: f00b fc12 bl 802a86c off = (u16_t)off32; 801f048: 6a7b ldr r3, [r7, #36] @ 0x24 801f04a: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 801f04e: 4b16 ldr r3, [pc, #88] @ (801f0a8 ) 801f050: 685b ldr r3, [r3, #4] 801f052: 891b ldrh r3, [r3, #8] 801f054: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f058: 429a cmp r2, r3 801f05a: d906 bls.n 801f06a 801f05c: 4b13 ldr r3, [pc, #76] @ (801f0ac ) 801f05e: f240 5297 movw r2, #1431 @ 0x597 801f062: 4916 ldr r1, [pc, #88] @ (801f0bc ) 801f064: 4813 ldr r0, [pc, #76] @ (801f0b4 ) 801f066: f00b fc01 bl 802a86c inseg.len -= off; 801f06a: 4b0f ldr r3, [pc, #60] @ (801f0a8 ) 801f06c: 891a ldrh r2, [r3, #8] 801f06e: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f072: 1ad3 subs r3, r2, r3 801f074: b29a uxth r2, r3 801f076: 4b0c ldr r3, [pc, #48] @ (801f0a8 ) 801f078: 811a strh r2, [r3, #8] new_tot_len = (u16_t)(inseg.p->tot_len - off); 801f07a: 4b0b ldr r3, [pc, #44] @ (801f0a8 ) 801f07c: 685b ldr r3, [r3, #4] 801f07e: 891a ldrh r2, [r3, #8] 801f080: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f084: 1ad3 subs r3, r2, r3 801f086: 847b strh r3, [r7, #34] @ 0x22 while (p->len < off) { 801f088: e02a b.n 801f0e0 801f08a: bf00 nop 801f08c: 08030078 .word 0x08030078 801f090: 08030080 .word 0x08030080 801f094: 2402afac .word 0x2402afac 801f098: 2402afa8 .word 0x2402afa8 801f09c: 2402af68 .word 0x2402af68 801f0a0: 2402afae .word 0x2402afae 801f0a4: 2402afa4 .word 0x2402afa4 801f0a8: 2402af80 .word 0x2402af80 801f0ac: 0802fd10 .word 0x0802fd10 801f0b0: 08030088 .word 0x08030088 801f0b4: 0802fd5c .word 0x0802fd5c 801f0b8: 08030098 .word 0x08030098 801f0bc: 080300a8 .word 0x080300a8 off -= p->len; 801f0c0: 6c7b ldr r3, [r7, #68] @ 0x44 801f0c2: 895b ldrh r3, [r3, #10] 801f0c4: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f0c8: 1ad3 subs r3, r2, r3 801f0ca: 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; 801f0ce: 6c7b ldr r3, [r7, #68] @ 0x44 801f0d0: 8c7a ldrh r2, [r7, #34] @ 0x22 801f0d2: 811a strh r2, [r3, #8] p->len = 0; 801f0d4: 6c7b ldr r3, [r7, #68] @ 0x44 801f0d6: 2200 movs r2, #0 801f0d8: 815a strh r2, [r3, #10] p = p->next; 801f0da: 6c7b ldr r3, [r7, #68] @ 0x44 801f0dc: 681b ldr r3, [r3, #0] 801f0de: 647b str r3, [r7, #68] @ 0x44 while (p->len < off) { 801f0e0: 6c7b ldr r3, [r7, #68] @ 0x44 801f0e2: 895b ldrh r3, [r3, #10] 801f0e4: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f0e8: 429a cmp r2, r3 801f0ea: d8e9 bhi.n 801f0c0 } /* cannot fail... */ pbuf_remove_header(p, off); 801f0ec: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f0f0: 4619 mov r1, r3 801f0f2: 6c78 ldr r0, [r7, #68] @ 0x44 801f0f4: f7fc f88a bl 801b20c inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 801f0f8: 687b ldr r3, [r7, #4] 801f0fa: 6a5b ldr r3, [r3, #36] @ 0x24 801f0fc: 4a90 ldr r2, [pc, #576] @ (801f340 ) 801f0fe: 6013 str r3, [r2, #0] 801f100: 4b90 ldr r3, [pc, #576] @ (801f344 ) 801f102: 691b ldr r3, [r3, #16] 801f104: 4a8e ldr r2, [pc, #568] @ (801f340 ) 801f106: 6812 ldr r2, [r2, #0] 801f108: 605a str r2, [r3, #4] if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 801f10a: e00d b.n 801f128 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { 801f10c: 4b8c ldr r3, [pc, #560] @ (801f340 ) 801f10e: 681a ldr r2, [r3, #0] 801f110: 687b ldr r3, [r7, #4] 801f112: 6a5b ldr r3, [r3, #36] @ 0x24 801f114: 1ad3 subs r3, r2, r3 801f116: 2b00 cmp r3, #0 801f118: da06 bge.n 801f128 /* 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); 801f11a: 687b ldr r3, [r7, #4] 801f11c: 8b5b ldrh r3, [r3, #26] 801f11e: f043 0302 orr.w r3, r3, #2 801f122: b29a uxth r2, r3 801f124: 687b ldr r3, [r7, #4] 801f126: 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, 801f128: 4b85 ldr r3, [pc, #532] @ (801f340 ) 801f12a: 681a ldr r2, [r3, #0] 801f12c: 687b ldr r3, [r7, #4] 801f12e: 6a5b ldr r3, [r3, #36] @ 0x24 801f130: 1ad3 subs r3, r2, r3 801f132: 2b00 cmp r3, #0 801f134: f2c0 8427 blt.w 801f986 801f138: 4b81 ldr r3, [pc, #516] @ (801f340 ) 801f13a: 681a ldr r2, [r3, #0] 801f13c: 687b ldr r3, [r7, #4] 801f13e: 6a5b ldr r3, [r3, #36] @ 0x24 801f140: 6879 ldr r1, [r7, #4] 801f142: 8d09 ldrh r1, [r1, #40] @ 0x28 801f144: 440b add r3, r1 801f146: 1ad3 subs r3, r2, r3 801f148: 3301 adds r3, #1 801f14a: 2b00 cmp r3, #0 801f14c: f300 841b bgt.w 801f986 pcb->rcv_nxt + pcb->rcv_wnd - 1)) { if (pcb->rcv_nxt == seqno) { 801f150: 687b ldr r3, [r7, #4] 801f152: 6a5a ldr r2, [r3, #36] @ 0x24 801f154: 4b7a ldr r3, [pc, #488] @ (801f340 ) 801f156: 681b ldr r3, [r3, #0] 801f158: 429a cmp r2, r3 801f15a: f040 8298 bne.w 801f68e /* 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); 801f15e: 4b79 ldr r3, [pc, #484] @ (801f344 ) 801f160: 891c ldrh r4, [r3, #8] 801f162: 4b78 ldr r3, [pc, #480] @ (801f344 ) 801f164: 691b ldr r3, [r3, #16] 801f166: 899b ldrh r3, [r3, #12] 801f168: b29b uxth r3, r3 801f16a: 4618 mov r0, r3 801f16c: f7fa fc24 bl 80199b8 801f170: 4603 mov r3, r0 801f172: b2db uxtb r3, r3 801f174: f003 0303 and.w r3, r3, #3 801f178: 2b00 cmp r3, #0 801f17a: d001 beq.n 801f180 801f17c: 2301 movs r3, #1 801f17e: e000 b.n 801f182 801f180: 2300 movs r3, #0 801f182: 4423 add r3, r4 801f184: b29a uxth r2, r3 801f186: 4b70 ldr r3, [pc, #448] @ (801f348 ) 801f188: 801a strh r2, [r3, #0] if (tcplen > pcb->rcv_wnd) { 801f18a: 687b ldr r3, [r7, #4] 801f18c: 8d1a ldrh r2, [r3, #40] @ 0x28 801f18e: 4b6e ldr r3, [pc, #440] @ (801f348 ) 801f190: 881b ldrh r3, [r3, #0] 801f192: 429a cmp r2, r3 801f194: d274 bcs.n 801f280 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) { 801f196: 4b6b ldr r3, [pc, #428] @ (801f344 ) 801f198: 691b ldr r3, [r3, #16] 801f19a: 899b ldrh r3, [r3, #12] 801f19c: b29b uxth r3, r3 801f19e: 4618 mov r0, r3 801f1a0: f7fa fc0a bl 80199b8 801f1a4: 4603 mov r3, r0 801f1a6: b2db uxtb r3, r3 801f1a8: f003 0301 and.w r3, r3, #1 801f1ac: 2b00 cmp r3, #0 801f1ae: d01e beq.n 801f1ee /* 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); 801f1b0: 4b64 ldr r3, [pc, #400] @ (801f344 ) 801f1b2: 691b ldr r3, [r3, #16] 801f1b4: 899b ldrh r3, [r3, #12] 801f1b6: b29b uxth r3, r3 801f1b8: b21b sxth r3, r3 801f1ba: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801f1be: b21c sxth r4, r3 801f1c0: 4b60 ldr r3, [pc, #384] @ (801f344 ) 801f1c2: 691b ldr r3, [r3, #16] 801f1c4: 899b ldrh r3, [r3, #12] 801f1c6: b29b uxth r3, r3 801f1c8: 4618 mov r0, r3 801f1ca: f7fa fbf5 bl 80199b8 801f1ce: 4603 mov r3, r0 801f1d0: b2db uxtb r3, r3 801f1d2: f003 033e and.w r3, r3, #62 @ 0x3e 801f1d6: b29b uxth r3, r3 801f1d8: 4618 mov r0, r3 801f1da: f7fa fbed bl 80199b8 801f1de: 4603 mov r3, r0 801f1e0: b21b sxth r3, r3 801f1e2: 4323 orrs r3, r4 801f1e4: b21a sxth r2, r3 801f1e6: 4b57 ldr r3, [pc, #348] @ (801f344 ) 801f1e8: 691b ldr r3, [r3, #16] 801f1ea: b292 uxth r2, r2 801f1ec: 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; 801f1ee: 687b ldr r3, [r7, #4] 801f1f0: 8d1a ldrh r2, [r3, #40] @ 0x28 801f1f2: 4b54 ldr r3, [pc, #336] @ (801f344 ) 801f1f4: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801f1f6: 4b53 ldr r3, [pc, #332] @ (801f344 ) 801f1f8: 691b ldr r3, [r3, #16] 801f1fa: 899b ldrh r3, [r3, #12] 801f1fc: b29b uxth r3, r3 801f1fe: 4618 mov r0, r3 801f200: f7fa fbda bl 80199b8 801f204: 4603 mov r3, r0 801f206: b2db uxtb r3, r3 801f208: f003 0302 and.w r3, r3, #2 801f20c: 2b00 cmp r3, #0 801f20e: d005 beq.n 801f21c inseg.len -= 1; 801f210: 4b4c ldr r3, [pc, #304] @ (801f344 ) 801f212: 891b ldrh r3, [r3, #8] 801f214: 3b01 subs r3, #1 801f216: b29a uxth r2, r3 801f218: 4b4a ldr r3, [pc, #296] @ (801f344 ) 801f21a: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801f21c: 4b49 ldr r3, [pc, #292] @ (801f344 ) 801f21e: 685b ldr r3, [r3, #4] 801f220: 4a48 ldr r2, [pc, #288] @ (801f344 ) 801f222: 8912 ldrh r2, [r2, #8] 801f224: 4611 mov r1, r2 801f226: 4618 mov r0, r3 801f228: f7fb fef2 bl 801b010 tcplen = TCP_TCPLEN(&inseg); 801f22c: 4b45 ldr r3, [pc, #276] @ (801f344 ) 801f22e: 891c ldrh r4, [r3, #8] 801f230: 4b44 ldr r3, [pc, #272] @ (801f344 ) 801f232: 691b ldr r3, [r3, #16] 801f234: 899b ldrh r3, [r3, #12] 801f236: b29b uxth r3, r3 801f238: 4618 mov r0, r3 801f23a: f7fa fbbd bl 80199b8 801f23e: 4603 mov r3, r0 801f240: b2db uxtb r3, r3 801f242: f003 0303 and.w r3, r3, #3 801f246: 2b00 cmp r3, #0 801f248: d001 beq.n 801f24e 801f24a: 2301 movs r3, #1 801f24c: e000 b.n 801f250 801f24e: 2300 movs r3, #0 801f250: 4423 add r3, r4 801f252: b29a uxth r2, r3 801f254: 4b3c ldr r3, [pc, #240] @ (801f348 ) 801f256: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801f258: 4b3b ldr r3, [pc, #236] @ (801f348 ) 801f25a: 881b ldrh r3, [r3, #0] 801f25c: 461a mov r2, r3 801f25e: 4b38 ldr r3, [pc, #224] @ (801f340 ) 801f260: 681b ldr r3, [r3, #0] 801f262: 441a add r2, r3 801f264: 687b ldr r3, [r7, #4] 801f266: 6a5b ldr r3, [r3, #36] @ 0x24 801f268: 6879 ldr r1, [r7, #4] 801f26a: 8d09 ldrh r1, [r1, #40] @ 0x28 801f26c: 440b add r3, r1 801f26e: 429a cmp r2, r3 801f270: d006 beq.n 801f280 801f272: 4b36 ldr r3, [pc, #216] @ (801f34c ) 801f274: f240 52cb movw r2, #1483 @ 0x5cb 801f278: 4935 ldr r1, [pc, #212] @ (801f350 ) 801f27a: 4836 ldr r0, [pc, #216] @ (801f354 ) 801f27c: f00b faf6 bl 802a86c } #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) { 801f280: 687b ldr r3, [r7, #4] 801f282: 6f5b ldr r3, [r3, #116] @ 0x74 801f284: 2b00 cmp r3, #0 801f286: f000 80e6 beq.w 801f456 if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801f28a: 4b2e ldr r3, [pc, #184] @ (801f344 ) 801f28c: 691b ldr r3, [r3, #16] 801f28e: 899b ldrh r3, [r3, #12] 801f290: b29b uxth r3, r3 801f292: 4618 mov r0, r3 801f294: f7fa fb90 bl 80199b8 801f298: 4603 mov r3, r0 801f29a: b2db uxtb r3, r3 801f29c: f003 0301 and.w r3, r3, #1 801f2a0: 2b00 cmp r3, #0 801f2a2: d010 beq.n 801f2c6 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) { 801f2a4: e00a b.n 801f2bc struct tcp_seg *old_ooseq = pcb->ooseq; 801f2a6: 687b ldr r3, [r7, #4] 801f2a8: 6f5b ldr r3, [r3, #116] @ 0x74 801f2aa: 60fb str r3, [r7, #12] pcb->ooseq = pcb->ooseq->next; 801f2ac: 687b ldr r3, [r7, #4] 801f2ae: 6f5b ldr r3, [r3, #116] @ 0x74 801f2b0: 681a ldr r2, [r3, #0] 801f2b2: 687b ldr r3, [r7, #4] 801f2b4: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(old_ooseq); 801f2b6: 68f8 ldr r0, [r7, #12] 801f2b8: f7fd fcb9 bl 801cc2e while (pcb->ooseq != NULL) { 801f2bc: 687b ldr r3, [r7, #4] 801f2be: 6f5b ldr r3, [r3, #116] @ 0x74 801f2c0: 2b00 cmp r3, #0 801f2c2: d1f0 bne.n 801f2a6 801f2c4: e0c7 b.n 801f456 } } else { struct tcp_seg *next = pcb->ooseq; 801f2c6: 687b ldr r3, [r7, #4] 801f2c8: 6f5b ldr r3, [r3, #116] @ 0x74 801f2ca: 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 && 801f2cc: e051 b.n 801f372 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 && 801f2ce: 6bfb ldr r3, [r7, #60] @ 0x3c 801f2d0: 691b ldr r3, [r3, #16] 801f2d2: 899b ldrh r3, [r3, #12] 801f2d4: b29b uxth r3, r3 801f2d6: 4618 mov r0, r3 801f2d8: f7fa fb6e bl 80199b8 801f2dc: 4603 mov r3, r0 801f2de: b2db uxtb r3, r3 801f2e0: f003 0301 and.w r3, r3, #1 801f2e4: 2b00 cmp r3, #0 801f2e6: d03c beq.n 801f362 (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { 801f2e8: 4b16 ldr r3, [pc, #88] @ (801f344 ) 801f2ea: 691b ldr r3, [r3, #16] 801f2ec: 899b ldrh r3, [r3, #12] 801f2ee: b29b uxth r3, r3 801f2f0: 4618 mov r0, r3 801f2f2: f7fa fb61 bl 80199b8 801f2f6: 4603 mov r3, r0 801f2f8: b2db uxtb r3, r3 801f2fa: f003 0302 and.w r3, r3, #2 if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 801f2fe: 2b00 cmp r3, #0 801f300: d12f bne.n 801f362 TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); 801f302: 4b10 ldr r3, [pc, #64] @ (801f344 ) 801f304: 691b ldr r3, [r3, #16] 801f306: 899b ldrh r3, [r3, #12] 801f308: b29c uxth r4, r3 801f30a: 2001 movs r0, #1 801f30c: f7fa fb54 bl 80199b8 801f310: 4603 mov r3, r0 801f312: 461a mov r2, r3 801f314: 4b0b ldr r3, [pc, #44] @ (801f344 ) 801f316: 691b ldr r3, [r3, #16] 801f318: 4322 orrs r2, r4 801f31a: b292 uxth r2, r2 801f31c: 819a strh r2, [r3, #12] tcplen = TCP_TCPLEN(&inseg); 801f31e: 4b09 ldr r3, [pc, #36] @ (801f344 ) 801f320: 891c ldrh r4, [r3, #8] 801f322: 4b08 ldr r3, [pc, #32] @ (801f344 ) 801f324: 691b ldr r3, [r3, #16] 801f326: 899b ldrh r3, [r3, #12] 801f328: b29b uxth r3, r3 801f32a: 4618 mov r0, r3 801f32c: f7fa fb44 bl 80199b8 801f330: 4603 mov r3, r0 801f332: b2db uxtb r3, r3 801f334: f003 0303 and.w r3, r3, #3 801f338: 2b00 cmp r3, #0 801f33a: d00d beq.n 801f358 801f33c: 2301 movs r3, #1 801f33e: e00c b.n 801f35a 801f340: 2402afa4 .word 0x2402afa4 801f344: 2402af80 .word 0x2402af80 801f348: 2402afae .word 0x2402afae 801f34c: 0802fd10 .word 0x0802fd10 801f350: 080300b8 .word 0x080300b8 801f354: 0802fd5c .word 0x0802fd5c 801f358: 2300 movs r3, #0 801f35a: 4423 add r3, r4 801f35c: b29a uxth r2, r3 801f35e: 4b98 ldr r3, [pc, #608] @ (801f5c0 ) 801f360: 801a strh r2, [r3, #0] } tmp = next; 801f362: 6bfb ldr r3, [r7, #60] @ 0x3c 801f364: 613b str r3, [r7, #16] next = next->next; 801f366: 6bfb ldr r3, [r7, #60] @ 0x3c 801f368: 681b ldr r3, [r3, #0] 801f36a: 63fb str r3, [r7, #60] @ 0x3c tcp_seg_free(tmp); 801f36c: 6938 ldr r0, [r7, #16] 801f36e: f7fd fc5e bl 801cc2e while (next && 801f372: 6bfb ldr r3, [r7, #60] @ 0x3c 801f374: 2b00 cmp r3, #0 801f376: d00e beq.n 801f396 TCP_SEQ_GEQ(seqno + tcplen, 801f378: 4b91 ldr r3, [pc, #580] @ (801f5c0 ) 801f37a: 881b ldrh r3, [r3, #0] 801f37c: 461a mov r2, r3 801f37e: 4b91 ldr r3, [pc, #580] @ (801f5c4 ) 801f380: 681b ldr r3, [r3, #0] 801f382: 441a add r2, r3 801f384: 6bfb ldr r3, [r7, #60] @ 0x3c 801f386: 691b ldr r3, [r3, #16] 801f388: 685b ldr r3, [r3, #4] 801f38a: 6bf9 ldr r1, [r7, #60] @ 0x3c 801f38c: 8909 ldrh r1, [r1, #8] 801f38e: 440b add r3, r1 801f390: 1ad3 subs r3, r2, r3 while (next && 801f392: 2b00 cmp r3, #0 801f394: da9b bge.n 801f2ce } /* Now trim right side of inseg if it overlaps with the first * segment on ooseq */ if (next && 801f396: 6bfb ldr r3, [r7, #60] @ 0x3c 801f398: 2b00 cmp r3, #0 801f39a: d059 beq.n 801f450 TCP_SEQ_GT(seqno + tcplen, 801f39c: 4b88 ldr r3, [pc, #544] @ (801f5c0 ) 801f39e: 881b ldrh r3, [r3, #0] 801f3a0: 461a mov r2, r3 801f3a2: 4b88 ldr r3, [pc, #544] @ (801f5c4 ) 801f3a4: 681b ldr r3, [r3, #0] 801f3a6: 441a add r2, r3 801f3a8: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3aa: 691b ldr r3, [r3, #16] 801f3ac: 685b ldr r3, [r3, #4] 801f3ae: 1ad3 subs r3, r2, r3 if (next && 801f3b0: 2b00 cmp r3, #0 801f3b2: dd4d ble.n 801f450 next->tcphdr->seqno)) { /* inseg cannot have FIN here (already processed above) */ inseg.len = (u16_t)(next->tcphdr->seqno - seqno); 801f3b4: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3b6: 691b ldr r3, [r3, #16] 801f3b8: 685b ldr r3, [r3, #4] 801f3ba: b29a uxth r2, r3 801f3bc: 4b81 ldr r3, [pc, #516] @ (801f5c4 ) 801f3be: 681b ldr r3, [r3, #0] 801f3c0: b29b uxth r3, r3 801f3c2: 1ad3 subs r3, r2, r3 801f3c4: b29a uxth r2, r3 801f3c6: 4b80 ldr r3, [pc, #512] @ (801f5c8 ) 801f3c8: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801f3ca: 4b7f ldr r3, [pc, #508] @ (801f5c8 ) 801f3cc: 691b ldr r3, [r3, #16] 801f3ce: 899b ldrh r3, [r3, #12] 801f3d0: b29b uxth r3, r3 801f3d2: 4618 mov r0, r3 801f3d4: f7fa faf0 bl 80199b8 801f3d8: 4603 mov r3, r0 801f3da: b2db uxtb r3, r3 801f3dc: f003 0302 and.w r3, r3, #2 801f3e0: 2b00 cmp r3, #0 801f3e2: d005 beq.n 801f3f0 inseg.len -= 1; 801f3e4: 4b78 ldr r3, [pc, #480] @ (801f5c8 ) 801f3e6: 891b ldrh r3, [r3, #8] 801f3e8: 3b01 subs r3, #1 801f3ea: b29a uxth r2, r3 801f3ec: 4b76 ldr r3, [pc, #472] @ (801f5c8 ) 801f3ee: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801f3f0: 4b75 ldr r3, [pc, #468] @ (801f5c8 ) 801f3f2: 685b ldr r3, [r3, #4] 801f3f4: 4a74 ldr r2, [pc, #464] @ (801f5c8 ) 801f3f6: 8912 ldrh r2, [r2, #8] 801f3f8: 4611 mov r1, r2 801f3fa: 4618 mov r0, r3 801f3fc: f7fb fe08 bl 801b010 tcplen = TCP_TCPLEN(&inseg); 801f400: 4b71 ldr r3, [pc, #452] @ (801f5c8 ) 801f402: 891c ldrh r4, [r3, #8] 801f404: 4b70 ldr r3, [pc, #448] @ (801f5c8 ) 801f406: 691b ldr r3, [r3, #16] 801f408: 899b ldrh r3, [r3, #12] 801f40a: b29b uxth r3, r3 801f40c: 4618 mov r0, r3 801f40e: f7fa fad3 bl 80199b8 801f412: 4603 mov r3, r0 801f414: b2db uxtb r3, r3 801f416: f003 0303 and.w r3, r3, #3 801f41a: 2b00 cmp r3, #0 801f41c: d001 beq.n 801f422 801f41e: 2301 movs r3, #1 801f420: e000 b.n 801f424 801f422: 2300 movs r3, #0 801f424: 4423 add r3, r4 801f426: b29a uxth r2, r3 801f428: 4b65 ldr r3, [pc, #404] @ (801f5c0 ) 801f42a: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", 801f42c: 4b64 ldr r3, [pc, #400] @ (801f5c0 ) 801f42e: 881b ldrh r3, [r3, #0] 801f430: 461a mov r2, r3 801f432: 4b64 ldr r3, [pc, #400] @ (801f5c4 ) 801f434: 681b ldr r3, [r3, #0] 801f436: 441a add r2, r3 801f438: 6bfb ldr r3, [r7, #60] @ 0x3c 801f43a: 691b ldr r3, [r3, #16] 801f43c: 685b ldr r3, [r3, #4] 801f43e: 429a cmp r2, r3 801f440: d006 beq.n 801f450 801f442: 4b62 ldr r3, [pc, #392] @ (801f5cc ) 801f444: f240 52fc movw r2, #1532 @ 0x5fc 801f448: 4961 ldr r1, [pc, #388] @ (801f5d0 ) 801f44a: 4862 ldr r0, [pc, #392] @ (801f5d4 ) 801f44c: f00b fa0e bl 802a86c (seqno + tcplen) == next->tcphdr->seqno); } pcb->ooseq = next; 801f450: 687b ldr r3, [r7, #4] 801f452: 6bfa ldr r2, [r7, #60] @ 0x3c 801f454: 675a str r2, [r3, #116] @ 0x74 } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 801f456: 4b5a ldr r3, [pc, #360] @ (801f5c0 ) 801f458: 881b ldrh r3, [r3, #0] 801f45a: 461a mov r2, r3 801f45c: 4b59 ldr r3, [pc, #356] @ (801f5c4 ) 801f45e: 681b ldr r3, [r3, #0] 801f460: 441a add r2, r3 801f462: 687b ldr r3, [r7, #4] 801f464: 625a str r2, [r3, #36] @ 0x24 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 801f466: 687b ldr r3, [r7, #4] 801f468: 8d1a ldrh r2, [r3, #40] @ 0x28 801f46a: 4b55 ldr r3, [pc, #340] @ (801f5c0 ) 801f46c: 881b ldrh r3, [r3, #0] 801f46e: 429a cmp r2, r3 801f470: d206 bcs.n 801f480 801f472: 4b56 ldr r3, [pc, #344] @ (801f5cc ) 801f474: f240 6207 movw r2, #1543 @ 0x607 801f478: 4957 ldr r1, [pc, #348] @ (801f5d8 ) 801f47a: 4856 ldr r0, [pc, #344] @ (801f5d4 ) 801f47c: f00b f9f6 bl 802a86c pcb->rcv_wnd -= tcplen; 801f480: 687b ldr r3, [r7, #4] 801f482: 8d1a ldrh r2, [r3, #40] @ 0x28 801f484: 4b4e ldr r3, [pc, #312] @ (801f5c0 ) 801f486: 881b ldrh r3, [r3, #0] 801f488: 1ad3 subs r3, r2, r3 801f48a: b29a uxth r2, r3 801f48c: 687b ldr r3, [r7, #4] 801f48e: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801f490: 6878 ldr r0, [r7, #4] 801f492: f7fc fd85 bl 801bfa0 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) { 801f496: 4b4c ldr r3, [pc, #304] @ (801f5c8 ) 801f498: 685b ldr r3, [r3, #4] 801f49a: 891b ldrh r3, [r3, #8] 801f49c: 2b00 cmp r3, #0 801f49e: d006 beq.n 801f4ae recv_data = inseg.p; 801f4a0: 4b49 ldr r3, [pc, #292] @ (801f5c8 ) 801f4a2: 685b ldr r3, [r3, #4] 801f4a4: 4a4d ldr r2, [pc, #308] @ (801f5dc ) 801f4a6: 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; 801f4a8: 4b47 ldr r3, [pc, #284] @ (801f5c8 ) 801f4aa: 2200 movs r2, #0 801f4ac: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801f4ae: 4b46 ldr r3, [pc, #280] @ (801f5c8 ) 801f4b0: 691b ldr r3, [r3, #16] 801f4b2: 899b ldrh r3, [r3, #12] 801f4b4: b29b uxth r3, r3 801f4b6: 4618 mov r0, r3 801f4b8: f7fa fa7e bl 80199b8 801f4bc: 4603 mov r3, r0 801f4be: b2db uxtb r3, r3 801f4c0: f003 0301 and.w r3, r3, #1 801f4c4: 2b00 cmp r3, #0 801f4c6: f000 80b8 beq.w 801f63a LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 801f4ca: 4b45 ldr r3, [pc, #276] @ (801f5e0 ) 801f4cc: 781b ldrb r3, [r3, #0] 801f4ce: f043 0320 orr.w r3, r3, #32 801f4d2: b2da uxtb r2, r3 801f4d4: 4b42 ldr r3, [pc, #264] @ (801f5e0 ) 801f4d6: 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 && 801f4d8: e0af b.n 801f63a pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { struct tcp_seg *cseg = pcb->ooseq; 801f4da: 687b ldr r3, [r7, #4] 801f4dc: 6f5b ldr r3, [r3, #116] @ 0x74 801f4de: 60bb str r3, [r7, #8] seqno = pcb->ooseq->tcphdr->seqno; 801f4e0: 687b ldr r3, [r7, #4] 801f4e2: 6f5b ldr r3, [r3, #116] @ 0x74 801f4e4: 691b ldr r3, [r3, #16] 801f4e6: 685b ldr r3, [r3, #4] 801f4e8: 4a36 ldr r2, [pc, #216] @ (801f5c4 ) 801f4ea: 6013 str r3, [r2, #0] pcb->rcv_nxt += TCP_TCPLEN(cseg); 801f4ec: 68bb ldr r3, [r7, #8] 801f4ee: 891b ldrh r3, [r3, #8] 801f4f0: 461c mov r4, r3 801f4f2: 68bb ldr r3, [r7, #8] 801f4f4: 691b ldr r3, [r3, #16] 801f4f6: 899b ldrh r3, [r3, #12] 801f4f8: b29b uxth r3, r3 801f4fa: 4618 mov r0, r3 801f4fc: f7fa fa5c bl 80199b8 801f500: 4603 mov r3, r0 801f502: b2db uxtb r3, r3 801f504: f003 0303 and.w r3, r3, #3 801f508: 2b00 cmp r3, #0 801f50a: d001 beq.n 801f510 801f50c: 2301 movs r3, #1 801f50e: e000 b.n 801f512 801f510: 2300 movs r3, #0 801f512: 191a adds r2, r3, r4 801f514: 687b ldr r3, [r7, #4] 801f516: 6a5b ldr r3, [r3, #36] @ 0x24 801f518: 441a add r2, r3 801f51a: 687b ldr r3, [r7, #4] 801f51c: 625a str r2, [r3, #36] @ 0x24 LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 801f51e: 687b ldr r3, [r7, #4] 801f520: 8d1b ldrh r3, [r3, #40] @ 0x28 801f522: 461c mov r4, r3 801f524: 68bb ldr r3, [r7, #8] 801f526: 891b ldrh r3, [r3, #8] 801f528: 461d mov r5, r3 801f52a: 68bb ldr r3, [r7, #8] 801f52c: 691b ldr r3, [r3, #16] 801f52e: 899b ldrh r3, [r3, #12] 801f530: b29b uxth r3, r3 801f532: 4618 mov r0, r3 801f534: f7fa fa40 bl 80199b8 801f538: 4603 mov r3, r0 801f53a: b2db uxtb r3, r3 801f53c: f003 0303 and.w r3, r3, #3 801f540: 2b00 cmp r3, #0 801f542: d001 beq.n 801f548 801f544: 2301 movs r3, #1 801f546: e000 b.n 801f54a 801f548: 2300 movs r3, #0 801f54a: 442b add r3, r5 801f54c: 429c cmp r4, r3 801f54e: d206 bcs.n 801f55e 801f550: 4b1e ldr r3, [pc, #120] @ (801f5cc ) 801f552: f240 622b movw r2, #1579 @ 0x62b 801f556: 4923 ldr r1, [pc, #140] @ (801f5e4 ) 801f558: 481e ldr r0, [pc, #120] @ (801f5d4 ) 801f55a: f00b f987 bl 802a86c pcb->rcv_wnd >= TCP_TCPLEN(cseg)); pcb->rcv_wnd -= TCP_TCPLEN(cseg); 801f55e: 68bb ldr r3, [r7, #8] 801f560: 891b ldrh r3, [r3, #8] 801f562: 461c mov r4, r3 801f564: 68bb ldr r3, [r7, #8] 801f566: 691b ldr r3, [r3, #16] 801f568: 899b ldrh r3, [r3, #12] 801f56a: b29b uxth r3, r3 801f56c: 4618 mov r0, r3 801f56e: f7fa fa23 bl 80199b8 801f572: 4603 mov r3, r0 801f574: b2db uxtb r3, r3 801f576: f003 0303 and.w r3, r3, #3 801f57a: 2b00 cmp r3, #0 801f57c: d001 beq.n 801f582 801f57e: 2301 movs r3, #1 801f580: e000 b.n 801f584 801f582: 2300 movs r3, #0 801f584: 1919 adds r1, r3, r4 801f586: 687b ldr r3, [r7, #4] 801f588: 8d1a ldrh r2, [r3, #40] @ 0x28 801f58a: b28b uxth r3, r1 801f58c: 1ad3 subs r3, r2, r3 801f58e: b29a uxth r2, r3 801f590: 687b ldr r3, [r7, #4] 801f592: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801f594: 6878 ldr r0, [r7, #4] 801f596: f7fc fd03 bl 801bfa0 if (cseg->p->tot_len > 0) { 801f59a: 68bb ldr r3, [r7, #8] 801f59c: 685b ldr r3, [r3, #4] 801f59e: 891b ldrh r3, [r3, #8] 801f5a0: 2b00 cmp r3, #0 801f5a2: d028 beq.n 801f5f6 /* 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) { 801f5a4: 4b0d ldr r3, [pc, #52] @ (801f5dc ) 801f5a6: 681b ldr r3, [r3, #0] 801f5a8: 2b00 cmp r3, #0 801f5aa: d01d beq.n 801f5e8 pbuf_cat(recv_data, cseg->p); 801f5ac: 4b0b ldr r3, [pc, #44] @ (801f5dc ) 801f5ae: 681a ldr r2, [r3, #0] 801f5b0: 68bb ldr r3, [r7, #8] 801f5b2: 685b ldr r3, [r3, #4] 801f5b4: 4619 mov r1, r3 801f5b6: 4610 mov r0, r2 801f5b8: f7fb ffae bl 801b518 801f5bc: e018 b.n 801f5f0 801f5be: bf00 nop 801f5c0: 2402afae .word 0x2402afae 801f5c4: 2402afa4 .word 0x2402afa4 801f5c8: 2402af80 .word 0x2402af80 801f5cc: 0802fd10 .word 0x0802fd10 801f5d0: 080300f0 .word 0x080300f0 801f5d4: 0802fd5c .word 0x0802fd5c 801f5d8: 0803012c .word 0x0803012c 801f5dc: 2402afb4 .word 0x2402afb4 801f5e0: 2402afb1 .word 0x2402afb1 801f5e4: 0803014c .word 0x0803014c } else { recv_data = cseg->p; 801f5e8: 68bb ldr r3, [r7, #8] 801f5ea: 685b ldr r3, [r3, #4] 801f5ec: 4a70 ldr r2, [pc, #448] @ (801f7b0 ) 801f5ee: 6013 str r3, [r2, #0] } cseg->p = NULL; 801f5f0: 68bb ldr r3, [r7, #8] 801f5f2: 2200 movs r2, #0 801f5f4: 605a str r2, [r3, #4] } if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801f5f6: 68bb ldr r3, [r7, #8] 801f5f8: 691b ldr r3, [r3, #16] 801f5fa: 899b ldrh r3, [r3, #12] 801f5fc: b29b uxth r3, r3 801f5fe: 4618 mov r0, r3 801f600: f7fa f9da bl 80199b8 801f604: 4603 mov r3, r0 801f606: b2db uxtb r3, r3 801f608: f003 0301 and.w r3, r3, #1 801f60c: 2b00 cmp r3, #0 801f60e: d00d beq.n 801f62c LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); recv_flags |= TF_GOT_FIN; 801f610: 4b68 ldr r3, [pc, #416] @ (801f7b4 ) 801f612: 781b ldrb r3, [r3, #0] 801f614: f043 0320 orr.w r3, r3, #32 801f618: b2da uxtb r2, r3 801f61a: 4b66 ldr r3, [pc, #408] @ (801f7b4 ) 801f61c: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ 801f61e: 687b ldr r3, [r7, #4] 801f620: 7d1b ldrb r3, [r3, #20] 801f622: 2b04 cmp r3, #4 801f624: d102 bne.n 801f62c pcb->state = CLOSE_WAIT; 801f626: 687b ldr r3, [r7, #4] 801f628: 2207 movs r2, #7 801f62a: 751a strb r2, [r3, #20] } } pcb->ooseq = cseg->next; 801f62c: 68bb ldr r3, [r7, #8] 801f62e: 681a ldr r2, [r3, #0] 801f630: 687b ldr r3, [r7, #4] 801f632: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(cseg); 801f634: 68b8 ldr r0, [r7, #8] 801f636: f7fd fafa bl 801cc2e while (pcb->ooseq != NULL && 801f63a: 687b ldr r3, [r7, #4] 801f63c: 6f5b ldr r3, [r3, #116] @ 0x74 801f63e: 2b00 cmp r3, #0 801f640: d008 beq.n 801f654 pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { 801f642: 687b ldr r3, [r7, #4] 801f644: 6f5b ldr r3, [r3, #116] @ 0x74 801f646: 691b ldr r3, [r3, #16] 801f648: 685a ldr r2, [r3, #4] 801f64a: 687b ldr r3, [r7, #4] 801f64c: 6a5b ldr r3, [r3, #36] @ 0x24 while (pcb->ooseq != NULL && 801f64e: 429a cmp r2, r3 801f650: f43f af43 beq.w 801f4da #endif /* LWIP_TCP_SACK_OUT */ #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 801f654: 687b ldr r3, [r7, #4] 801f656: 8b5b ldrh r3, [r3, #26] 801f658: f003 0301 and.w r3, r3, #1 801f65c: 2b00 cmp r3, #0 801f65e: d00e beq.n 801f67e 801f660: 687b ldr r3, [r7, #4] 801f662: 8b5b ldrh r3, [r3, #26] 801f664: f023 0301 bic.w r3, r3, #1 801f668: b29a uxth r2, r3 801f66a: 687b ldr r3, [r7, #4] 801f66c: 835a strh r2, [r3, #26] 801f66e: 687b ldr r3, [r7, #4] 801f670: 8b5b ldrh r3, [r3, #26] 801f672: f043 0302 orr.w r3, r3, #2 801f676: b29a uxth r2, r3 801f678: 687b ldr r3, [r7, #4] 801f67a: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801f67c: e187 b.n 801f98e tcp_ack(pcb); 801f67e: 687b ldr r3, [r7, #4] 801f680: 8b5b ldrh r3, [r3, #26] 801f682: f043 0301 orr.w r3, r3, #1 801f686: b29a uxth r2, r3 801f688: 687b ldr r3, [r7, #4] 801f68a: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801f68c: e17f b.n 801f98e } 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) { 801f68e: 687b ldr r3, [r7, #4] 801f690: 6f5b ldr r3, [r3, #116] @ 0x74 801f692: 2b00 cmp r3, #0 801f694: d106 bne.n 801f6a4 pcb->ooseq = tcp_seg_copy(&inseg); 801f696: 4848 ldr r0, [pc, #288] @ (801f7b8 ) 801f698: f7fd fae2 bl 801cc60 801f69c: 4602 mov r2, r0 801f69e: 687b ldr r3, [r7, #4] 801f6a0: 675a str r2, [r3, #116] @ 0x74 801f6a2: e16c b.n 801f97e #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; 801f6a4: 2300 movs r3, #0 801f6a6: 637b str r3, [r7, #52] @ 0x34 for (next = pcb->ooseq; next != NULL; next = next->next) { 801f6a8: 687b ldr r3, [r7, #4] 801f6aa: 6f5b ldr r3, [r3, #116] @ 0x74 801f6ac: 63bb str r3, [r7, #56] @ 0x38 801f6ae: e156 b.n 801f95e if (seqno == next->tcphdr->seqno) { 801f6b0: 6bbb ldr r3, [r7, #56] @ 0x38 801f6b2: 691b ldr r3, [r3, #16] 801f6b4: 685a ldr r2, [r3, #4] 801f6b6: 4b41 ldr r3, [pc, #260] @ (801f7bc ) 801f6b8: 681b ldr r3, [r3, #0] 801f6ba: 429a cmp r2, r3 801f6bc: d11d bne.n 801f6fa /* 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) { 801f6be: 4b3e ldr r3, [pc, #248] @ (801f7b8 ) 801f6c0: 891a ldrh r2, [r3, #8] 801f6c2: 6bbb ldr r3, [r7, #56] @ 0x38 801f6c4: 891b ldrh r3, [r3, #8] 801f6c6: 429a cmp r2, r3 801f6c8: f240 814e bls.w 801f968 /* 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); 801f6cc: 483a ldr r0, [pc, #232] @ (801f7b8 ) 801f6ce: f7fd fac7 bl 801cc60 801f6d2: 6178 str r0, [r7, #20] if (cseg != NULL) { 801f6d4: 697b ldr r3, [r7, #20] 801f6d6: 2b00 cmp r3, #0 801f6d8: f000 8148 beq.w 801f96c if (prev != NULL) { 801f6dc: 6b7b ldr r3, [r7, #52] @ 0x34 801f6de: 2b00 cmp r3, #0 801f6e0: d003 beq.n 801f6ea prev->next = cseg; 801f6e2: 6b7b ldr r3, [r7, #52] @ 0x34 801f6e4: 697a ldr r2, [r7, #20] 801f6e6: 601a str r2, [r3, #0] 801f6e8: e002 b.n 801f6f0 } else { pcb->ooseq = cseg; 801f6ea: 687b ldr r3, [r7, #4] 801f6ec: 697a ldr r2, [r7, #20] 801f6ee: 675a str r2, [r3, #116] @ 0x74 } tcp_oos_insert_segment(cseg, next); 801f6f0: 6bb9 ldr r1, [r7, #56] @ 0x38 801f6f2: 6978 ldr r0, [r7, #20] 801f6f4: f7ff f8de bl 801e8b4 } break; 801f6f8: e138 b.n 801f96c segment was smaller than the old one; in either case, we ditch the incoming segment. */ break; } } else { if (prev == NULL) { 801f6fa: 6b7b ldr r3, [r7, #52] @ 0x34 801f6fc: 2b00 cmp r3, #0 801f6fe: d117 bne.n 801f730 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { 801f700: 4b2e ldr r3, [pc, #184] @ (801f7bc ) 801f702: 681a ldr r2, [r3, #0] 801f704: 6bbb ldr r3, [r7, #56] @ 0x38 801f706: 691b ldr r3, [r3, #16] 801f708: 685b ldr r3, [r3, #4] 801f70a: 1ad3 subs r3, r2, r3 801f70c: 2b00 cmp r3, #0 801f70e: da57 bge.n 801f7c0 /* 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); 801f710: 4829 ldr r0, [pc, #164] @ (801f7b8 ) 801f712: f7fd faa5 bl 801cc60 801f716: 61b8 str r0, [r7, #24] if (cseg != NULL) { 801f718: 69bb ldr r3, [r7, #24] 801f71a: 2b00 cmp r3, #0 801f71c: f000 8128 beq.w 801f970 pcb->ooseq = cseg; 801f720: 687b ldr r3, [r7, #4] 801f722: 69ba ldr r2, [r7, #24] 801f724: 675a str r2, [r3, #116] @ 0x74 tcp_oos_insert_segment(cseg, next); 801f726: 6bb9 ldr r1, [r7, #56] @ 0x38 801f728: 69b8 ldr r0, [r7, #24] 801f72a: f7ff f8c3 bl 801e8b4 } break; 801f72e: e11f b.n 801f970 } } 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)) { 801f730: 4b22 ldr r3, [pc, #136] @ (801f7bc ) 801f732: 681a ldr r2, [r3, #0] 801f734: 6b7b ldr r3, [r7, #52] @ 0x34 801f736: 691b ldr r3, [r3, #16] 801f738: 685b ldr r3, [r3, #4] 801f73a: 1ad3 subs r3, r2, r3 801f73c: 3b01 subs r3, #1 801f73e: 2b00 cmp r3, #0 801f740: db3e blt.n 801f7c0 801f742: 4b1e ldr r3, [pc, #120] @ (801f7bc ) 801f744: 681a ldr r2, [r3, #0] 801f746: 6bbb ldr r3, [r7, #56] @ 0x38 801f748: 691b ldr r3, [r3, #16] 801f74a: 685b ldr r3, [r3, #4] 801f74c: 1ad3 subs r3, r2, r3 801f74e: 3301 adds r3, #1 801f750: 2b00 cmp r3, #0 801f752: dc35 bgt.n 801f7c0 /* 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); 801f754: 4818 ldr r0, [pc, #96] @ (801f7b8 ) 801f756: f7fd fa83 bl 801cc60 801f75a: 61f8 str r0, [r7, #28] if (cseg != NULL) { 801f75c: 69fb ldr r3, [r7, #28] 801f75e: 2b00 cmp r3, #0 801f760: f000 8108 beq.w 801f974 if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { 801f764: 6b7b ldr r3, [r7, #52] @ 0x34 801f766: 691b ldr r3, [r3, #16] 801f768: 685b ldr r3, [r3, #4] 801f76a: 6b7a ldr r2, [r7, #52] @ 0x34 801f76c: 8912 ldrh r2, [r2, #8] 801f76e: 441a add r2, r3 801f770: 4b12 ldr r3, [pc, #72] @ (801f7bc ) 801f772: 681b ldr r3, [r3, #0] 801f774: 1ad3 subs r3, r2, r3 801f776: 2b00 cmp r3, #0 801f778: dd12 ble.n 801f7a0 /* We need to trim the prev segment. */ prev->len = (u16_t)(seqno - prev->tcphdr->seqno); 801f77a: 4b10 ldr r3, [pc, #64] @ (801f7bc ) 801f77c: 681b ldr r3, [r3, #0] 801f77e: b29a uxth r2, r3 801f780: 6b7b ldr r3, [r7, #52] @ 0x34 801f782: 691b ldr r3, [r3, #16] 801f784: 685b ldr r3, [r3, #4] 801f786: b29b uxth r3, r3 801f788: 1ad3 subs r3, r2, r3 801f78a: b29a uxth r2, r3 801f78c: 6b7b ldr r3, [r7, #52] @ 0x34 801f78e: 811a strh r2, [r3, #8] pbuf_realloc(prev->p, prev->len); 801f790: 6b7b ldr r3, [r7, #52] @ 0x34 801f792: 685a ldr r2, [r3, #4] 801f794: 6b7b ldr r3, [r7, #52] @ 0x34 801f796: 891b ldrh r3, [r3, #8] 801f798: 4619 mov r1, r3 801f79a: 4610 mov r0, r2 801f79c: f7fb fc38 bl 801b010 } prev->next = cseg; 801f7a0: 6b7b ldr r3, [r7, #52] @ 0x34 801f7a2: 69fa ldr r2, [r7, #28] 801f7a4: 601a str r2, [r3, #0] tcp_oos_insert_segment(cseg, next); 801f7a6: 6bb9 ldr r1, [r7, #56] @ 0x38 801f7a8: 69f8 ldr r0, [r7, #28] 801f7aa: f7ff f883 bl 801e8b4 } break; 801f7ae: e0e1 b.n 801f974 801f7b0: 2402afb4 .word 0x2402afb4 801f7b4: 2402afb1 .word 0x2402afb1 801f7b8: 2402af80 .word 0x2402af80 801f7bc: 2402afa4 .word 0x2402afa4 #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; 801f7c0: 6bbb ldr r3, [r7, #56] @ 0x38 801f7c2: 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 && 801f7c4: 6bbb ldr r3, [r7, #56] @ 0x38 801f7c6: 681b ldr r3, [r3, #0] 801f7c8: 2b00 cmp r3, #0 801f7ca: f040 80c5 bne.w 801f958 TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { 801f7ce: 4b7f ldr r3, [pc, #508] @ (801f9cc ) 801f7d0: 681a ldr r2, [r3, #0] 801f7d2: 6bbb ldr r3, [r7, #56] @ 0x38 801f7d4: 691b ldr r3, [r3, #16] 801f7d6: 685b ldr r3, [r3, #4] 801f7d8: 1ad3 subs r3, r2, r3 if (next->next == NULL && 801f7da: 2b00 cmp r3, #0 801f7dc: f340 80bc ble.w 801f958 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 801f7e0: 6bbb ldr r3, [r7, #56] @ 0x38 801f7e2: 691b ldr r3, [r3, #16] 801f7e4: 899b ldrh r3, [r3, #12] 801f7e6: b29b uxth r3, r3 801f7e8: 4618 mov r0, r3 801f7ea: f7fa f8e5 bl 80199b8 801f7ee: 4603 mov r3, r0 801f7f0: b2db uxtb r3, r3 801f7f2: f003 0301 and.w r3, r3, #1 801f7f6: 2b00 cmp r3, #0 801f7f8: f040 80be bne.w 801f978 /* segment "next" already contains all data */ break; } next->next = tcp_seg_copy(&inseg); 801f7fc: 4874 ldr r0, [pc, #464] @ (801f9d0 ) 801f7fe: f7fd fa2f bl 801cc60 801f802: 4602 mov r2, r0 801f804: 6bbb ldr r3, [r7, #56] @ 0x38 801f806: 601a str r2, [r3, #0] if (next->next != NULL) { 801f808: 6bbb ldr r3, [r7, #56] @ 0x38 801f80a: 681b ldr r3, [r3, #0] 801f80c: 2b00 cmp r3, #0 801f80e: f000 80b5 beq.w 801f97c if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { 801f812: 6bbb ldr r3, [r7, #56] @ 0x38 801f814: 691b ldr r3, [r3, #16] 801f816: 685b ldr r3, [r3, #4] 801f818: 6bba ldr r2, [r7, #56] @ 0x38 801f81a: 8912 ldrh r2, [r2, #8] 801f81c: 441a add r2, r3 801f81e: 4b6b ldr r3, [pc, #428] @ (801f9cc ) 801f820: 681b ldr r3, [r3, #0] 801f822: 1ad3 subs r3, r2, r3 801f824: 2b00 cmp r3, #0 801f826: dd12 ble.n 801f84e /* We need to trim the last segment. */ next->len = (u16_t)(seqno - next->tcphdr->seqno); 801f828: 4b68 ldr r3, [pc, #416] @ (801f9cc ) 801f82a: 681b ldr r3, [r3, #0] 801f82c: b29a uxth r2, r3 801f82e: 6bbb ldr r3, [r7, #56] @ 0x38 801f830: 691b ldr r3, [r3, #16] 801f832: 685b ldr r3, [r3, #4] 801f834: b29b uxth r3, r3 801f836: 1ad3 subs r3, r2, r3 801f838: b29a uxth r2, r3 801f83a: 6bbb ldr r3, [r7, #56] @ 0x38 801f83c: 811a strh r2, [r3, #8] pbuf_realloc(next->p, next->len); 801f83e: 6bbb ldr r3, [r7, #56] @ 0x38 801f840: 685a ldr r2, [r3, #4] 801f842: 6bbb ldr r3, [r7, #56] @ 0x38 801f844: 891b ldrh r3, [r3, #8] 801f846: 4619 mov r1, r3 801f848: 4610 mov r0, r2 801f84a: f7fb fbe1 bl 801b010 } /* 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)) { 801f84e: 4b61 ldr r3, [pc, #388] @ (801f9d4 ) 801f850: 881b ldrh r3, [r3, #0] 801f852: 461a mov r2, r3 801f854: 4b5d ldr r3, [pc, #372] @ (801f9cc ) 801f856: 681b ldr r3, [r3, #0] 801f858: 441a add r2, r3 801f85a: 687b ldr r3, [r7, #4] 801f85c: 6a5b ldr r3, [r3, #36] @ 0x24 801f85e: 6879 ldr r1, [r7, #4] 801f860: 8d09 ldrh r1, [r1, #40] @ 0x28 801f862: 440b add r3, r1 801f864: 1ad3 subs r3, r2, r3 801f866: 2b00 cmp r3, #0 801f868: f340 8088 ble.w 801f97c 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) { 801f86c: 6bbb ldr r3, [r7, #56] @ 0x38 801f86e: 681b ldr r3, [r3, #0] 801f870: 691b ldr r3, [r3, #16] 801f872: 899b ldrh r3, [r3, #12] 801f874: b29b uxth r3, r3 801f876: 4618 mov r0, r3 801f878: f7fa f89e bl 80199b8 801f87c: 4603 mov r3, r0 801f87e: b2db uxtb r3, r3 801f880: f003 0301 and.w r3, r3, #1 801f884: 2b00 cmp r3, #0 801f886: d021 beq.n 801f8cc /* 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); 801f888: 6bbb ldr r3, [r7, #56] @ 0x38 801f88a: 681b ldr r3, [r3, #0] 801f88c: 691b ldr r3, [r3, #16] 801f88e: 899b ldrh r3, [r3, #12] 801f890: b29b uxth r3, r3 801f892: b21b sxth r3, r3 801f894: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801f898: b21c sxth r4, r3 801f89a: 6bbb ldr r3, [r7, #56] @ 0x38 801f89c: 681b ldr r3, [r3, #0] 801f89e: 691b ldr r3, [r3, #16] 801f8a0: 899b ldrh r3, [r3, #12] 801f8a2: b29b uxth r3, r3 801f8a4: 4618 mov r0, r3 801f8a6: f7fa f887 bl 80199b8 801f8aa: 4603 mov r3, r0 801f8ac: b2db uxtb r3, r3 801f8ae: f003 033e and.w r3, r3, #62 @ 0x3e 801f8b2: b29b uxth r3, r3 801f8b4: 4618 mov r0, r3 801f8b6: f7fa f87f bl 80199b8 801f8ba: 4603 mov r3, r0 801f8bc: b21b sxth r3, r3 801f8be: 4323 orrs r3, r4 801f8c0: b21a sxth r2, r3 801f8c2: 6bbb ldr r3, [r7, #56] @ 0x38 801f8c4: 681b ldr r3, [r3, #0] 801f8c6: 691b ldr r3, [r3, #16] 801f8c8: b292 uxth r2, r2 801f8ca: 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); 801f8cc: 687b ldr r3, [r7, #4] 801f8ce: 6a5b ldr r3, [r3, #36] @ 0x24 801f8d0: b29a uxth r2, r3 801f8d2: 687b ldr r3, [r7, #4] 801f8d4: 8d1b ldrh r3, [r3, #40] @ 0x28 801f8d6: 4413 add r3, r2 801f8d8: b299 uxth r1, r3 801f8da: 4b3c ldr r3, [pc, #240] @ (801f9cc ) 801f8dc: 681b ldr r3, [r3, #0] 801f8de: b29a uxth r2, r3 801f8e0: 6bbb ldr r3, [r7, #56] @ 0x38 801f8e2: 681b ldr r3, [r3, #0] 801f8e4: 1a8a subs r2, r1, r2 801f8e6: b292 uxth r2, r2 801f8e8: 811a strh r2, [r3, #8] pbuf_realloc(next->next->p, next->next->len); 801f8ea: 6bbb ldr r3, [r7, #56] @ 0x38 801f8ec: 681b ldr r3, [r3, #0] 801f8ee: 685a ldr r2, [r3, #4] 801f8f0: 6bbb ldr r3, [r7, #56] @ 0x38 801f8f2: 681b ldr r3, [r3, #0] 801f8f4: 891b ldrh r3, [r3, #8] 801f8f6: 4619 mov r1, r3 801f8f8: 4610 mov r0, r2 801f8fa: f7fb fb89 bl 801b010 tcplen = TCP_TCPLEN(next->next); 801f8fe: 6bbb ldr r3, [r7, #56] @ 0x38 801f900: 681b ldr r3, [r3, #0] 801f902: 891c ldrh r4, [r3, #8] 801f904: 6bbb ldr r3, [r7, #56] @ 0x38 801f906: 681b ldr r3, [r3, #0] 801f908: 691b ldr r3, [r3, #16] 801f90a: 899b ldrh r3, [r3, #12] 801f90c: b29b uxth r3, r3 801f90e: 4618 mov r0, r3 801f910: f7fa f852 bl 80199b8 801f914: 4603 mov r3, r0 801f916: b2db uxtb r3, r3 801f918: f003 0303 and.w r3, r3, #3 801f91c: 2b00 cmp r3, #0 801f91e: d001 beq.n 801f924 801f920: 2301 movs r3, #1 801f922: e000 b.n 801f926 801f924: 2300 movs r3, #0 801f926: 4423 add r3, r4 801f928: b29a uxth r2, r3 801f92a: 4b2a ldr r3, [pc, #168] @ (801f9d4 ) 801f92c: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801f92e: 4b29 ldr r3, [pc, #164] @ (801f9d4 ) 801f930: 881b ldrh r3, [r3, #0] 801f932: 461a mov r2, r3 801f934: 4b25 ldr r3, [pc, #148] @ (801f9cc ) 801f936: 681b ldr r3, [r3, #0] 801f938: 441a add r2, r3 801f93a: 687b ldr r3, [r7, #4] 801f93c: 6a5b ldr r3, [r3, #36] @ 0x24 801f93e: 6879 ldr r1, [r7, #4] 801f940: 8d09 ldrh r1, [r1, #40] @ 0x28 801f942: 440b add r3, r1 801f944: 429a cmp r2, r3 801f946: d019 beq.n 801f97c 801f948: 4b23 ldr r3, [pc, #140] @ (801f9d8 ) 801f94a: f44f 62df mov.w r2, #1784 @ 0x6f8 801f94e: 4923 ldr r1, [pc, #140] @ (801f9dc ) 801f950: 4823 ldr r0, [pc, #140] @ (801f9e0 ) 801f952: f00a ff8b bl 802a86c (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); } } break; 801f956: e011 b.n 801f97c for (next = pcb->ooseq; next != NULL; next = next->next) { 801f958: 6bbb ldr r3, [r7, #56] @ 0x38 801f95a: 681b ldr r3, [r3, #0] 801f95c: 63bb str r3, [r7, #56] @ 0x38 801f95e: 6bbb ldr r3, [r7, #56] @ 0x38 801f960: 2b00 cmp r3, #0 801f962: f47f aea5 bne.w 801f6b0 801f966: e00a b.n 801f97e break; 801f968: bf00 nop 801f96a: e008 b.n 801f97e break; 801f96c: bf00 nop 801f96e: e006 b.n 801f97e break; 801f970: bf00 nop 801f972: e004 b.n 801f97e break; 801f974: bf00 nop 801f976: e002 b.n 801f97e break; 801f978: bf00 nop 801f97a: e000 b.n 801f97e break; 801f97c: 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); 801f97e: 6878 ldr r0, [r7, #4] 801f980: f001 fefc bl 802177c if (pcb->rcv_nxt == seqno) { 801f984: e003 b.n 801f98e } } else { /* The incoming segment is not within the window. */ tcp_send_empty_ack(pcb); 801f986: 6878 ldr r0, [r7, #4] 801f988: f001 fef8 bl 802177c if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801f98c: e01a b.n 801f9c4 801f98e: e019 b.n 801f9c4 } } 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)) { 801f990: 4b0e ldr r3, [pc, #56] @ (801f9cc ) 801f992: 681a ldr r2, [r3, #0] 801f994: 687b ldr r3, [r7, #4] 801f996: 6a5b ldr r3, [r3, #36] @ 0x24 801f998: 1ad3 subs r3, r2, r3 801f99a: 2b00 cmp r3, #0 801f99c: db0a blt.n 801f9b4 801f99e: 4b0b ldr r3, [pc, #44] @ (801f9cc ) 801f9a0: 681a ldr r2, [r3, #0] 801f9a2: 687b ldr r3, [r7, #4] 801f9a4: 6a5b ldr r3, [r3, #36] @ 0x24 801f9a6: 6879 ldr r1, [r7, #4] 801f9a8: 8d09 ldrh r1, [r1, #40] @ 0x28 801f9aa: 440b add r3, r1 801f9ac: 1ad3 subs r3, r2, r3 801f9ae: 3301 adds r3, #1 801f9b0: 2b00 cmp r3, #0 801f9b2: dd07 ble.n 801f9c4 tcp_ack_now(pcb); 801f9b4: 687b ldr r3, [r7, #4] 801f9b6: 8b5b ldrh r3, [r3, #26] 801f9b8: f043 0302 orr.w r3, r3, #2 801f9bc: b29a uxth r2, r3 801f9be: 687b ldr r3, [r7, #4] 801f9c0: 835a strh r2, [r3, #26] } } } 801f9c2: e7ff b.n 801f9c4 801f9c4: bf00 nop 801f9c6: 3750 adds r7, #80 @ 0x50 801f9c8: 46bd mov sp, r7 801f9ca: bdb0 pop {r4, r5, r7, pc} 801f9cc: 2402afa4 .word 0x2402afa4 801f9d0: 2402af80 .word 0x2402af80 801f9d4: 2402afae .word 0x2402afae 801f9d8: 0802fd10 .word 0x0802fd10 801f9dc: 080300b8 .word 0x080300b8 801f9e0: 0802fd5c .word 0x0802fd5c 0801f9e4 : static u8_t tcp_get_next_optbyte(void) { 801f9e4: b480 push {r7} 801f9e6: b083 sub sp, #12 801f9e8: af00 add r7, sp, #0 u16_t optidx = tcp_optidx++; 801f9ea: 4b15 ldr r3, [pc, #84] @ (801fa40 ) 801f9ec: 881b ldrh r3, [r3, #0] 801f9ee: 1c5a adds r2, r3, #1 801f9f0: b291 uxth r1, r2 801f9f2: 4a13 ldr r2, [pc, #76] @ (801fa40 ) 801f9f4: 8011 strh r1, [r2, #0] 801f9f6: 80fb strh r3, [r7, #6] if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { 801f9f8: 4b12 ldr r3, [pc, #72] @ (801fa44 ) 801f9fa: 681b ldr r3, [r3, #0] 801f9fc: 2b00 cmp r3, #0 801f9fe: d004 beq.n 801fa0a 801fa00: 4b11 ldr r3, [pc, #68] @ (801fa48 ) 801fa02: 881b ldrh r3, [r3, #0] 801fa04: 88fa ldrh r2, [r7, #6] 801fa06: 429a cmp r2, r3 801fa08: d208 bcs.n 801fa1c u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; 801fa0a: 4b10 ldr r3, [pc, #64] @ (801fa4c ) 801fa0c: 681b ldr r3, [r3, #0] 801fa0e: 3314 adds r3, #20 801fa10: 603b str r3, [r7, #0] return opts[optidx]; 801fa12: 88fb ldrh r3, [r7, #6] 801fa14: 683a ldr r2, [r7, #0] 801fa16: 4413 add r3, r2 801fa18: 781b ldrb r3, [r3, #0] 801fa1a: e00b b.n 801fa34 } else { u8_t idx = (u8_t)(optidx - tcphdr_opt1len); 801fa1c: 88fb ldrh r3, [r7, #6] 801fa1e: b2da uxtb r2, r3 801fa20: 4b09 ldr r3, [pc, #36] @ (801fa48 ) 801fa22: 881b ldrh r3, [r3, #0] 801fa24: b2db uxtb r3, r3 801fa26: 1ad3 subs r3, r2, r3 801fa28: 717b strb r3, [r7, #5] return tcphdr_opt2[idx]; 801fa2a: 4b06 ldr r3, [pc, #24] @ (801fa44 ) 801fa2c: 681a ldr r2, [r3, #0] 801fa2e: 797b ldrb r3, [r7, #5] 801fa30: 4413 add r3, r2 801fa32: 781b ldrb r3, [r3, #0] } } 801fa34: 4618 mov r0, r3 801fa36: 370c adds r7, #12 801fa38: 46bd mov sp, r7 801fa3a: f85d 7b04 ldr.w r7, [sp], #4 801fa3e: 4770 bx lr 801fa40: 2402afa0 .word 0x2402afa0 801fa44: 2402af9c .word 0x2402af9c 801fa48: 2402af9a .word 0x2402af9a 801fa4c: 2402af94 .word 0x2402af94 0801fa50 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 801fa50: b580 push {r7, lr} 801fa52: b084 sub sp, #16 801fa54: af00 add r7, sp, #0 801fa56: 6078 str r0, [r7, #4] u16_t mss; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 801fa58: 687b ldr r3, [r7, #4] 801fa5a: 2b00 cmp r3, #0 801fa5c: d106 bne.n 801fa6c 801fa5e: 4b33 ldr r3, [pc, #204] @ (801fb2c ) 801fa60: f240 727d movw r2, #1917 @ 0x77d 801fa64: 4932 ldr r1, [pc, #200] @ (801fb30 ) 801fa66: 4833 ldr r0, [pc, #204] @ (801fb34 ) 801fa68: f00a ff00 bl 802a86c /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { 801fa6c: 4b32 ldr r3, [pc, #200] @ (801fb38 ) 801fa6e: 881b ldrh r3, [r3, #0] 801fa70: 2b00 cmp r3, #0 801fa72: d057 beq.n 801fb24 for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801fa74: 4b31 ldr r3, [pc, #196] @ (801fb3c ) 801fa76: 2200 movs r2, #0 801fa78: 801a strh r2, [r3, #0] 801fa7a: e047 b.n 801fb0c u8_t opt = tcp_get_next_optbyte(); 801fa7c: f7ff ffb2 bl 801f9e4 801fa80: 4603 mov r3, r0 801fa82: 73fb strb r3, [r7, #15] switch (opt) { 801fa84: 7bfb ldrb r3, [r7, #15] 801fa86: 2b02 cmp r3, #2 801fa88: d006 beq.n 801fa98 801fa8a: 2b02 cmp r3, #2 801fa8c: dc2b bgt.n 801fae6 801fa8e: 2b00 cmp r3, #0 801fa90: d043 beq.n 801fb1a 801fa92: 2b01 cmp r3, #1 801fa94: d039 beq.n 801fb0a 801fa96: e026 b.n 801fae6 /* 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) { 801fa98: f7ff ffa4 bl 801f9e4 801fa9c: 4603 mov r3, r0 801fa9e: 2b04 cmp r3, #4 801faa0: d13d bne.n 801fb1e 801faa2: 4b26 ldr r3, [pc, #152] @ (801fb3c ) 801faa4: 881b ldrh r3, [r3, #0] 801faa6: 3301 adds r3, #1 801faa8: 4a23 ldr r2, [pc, #140] @ (801fb38 ) 801faaa: 8812 ldrh r2, [r2, #0] 801faac: 4293 cmp r3, r2 801faae: da36 bge.n 801fb1e /* 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); 801fab0: f7ff ff98 bl 801f9e4 801fab4: 4603 mov r3, r0 801fab6: 021b lsls r3, r3, #8 801fab8: 81bb strh r3, [r7, #12] mss |= tcp_get_next_optbyte(); 801faba: f7ff ff93 bl 801f9e4 801fabe: 4603 mov r3, r0 801fac0: 461a mov r2, r3 801fac2: 89bb ldrh r3, [r7, #12] 801fac4: 4313 orrs r3, r2 801fac6: 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; 801fac8: 89bb ldrh r3, [r7, #12] 801faca: f240 52b4 movw r2, #1460 @ 0x5b4 801face: 4293 cmp r3, r2 801fad0: d804 bhi.n 801fadc 801fad2: 89bb ldrh r3, [r7, #12] 801fad4: 2b00 cmp r3, #0 801fad6: d001 beq.n 801fadc 801fad8: 89ba ldrh r2, [r7, #12] 801fada: e001 b.n 801fae0 801fadc: f240 52b4 movw r2, #1460 @ 0x5b4 801fae0: 687b ldr r3, [r7, #4] 801fae2: 865a strh r2, [r3, #50] @ 0x32 break; 801fae4: e012 b.n 801fb0c } break; #endif /* LWIP_TCP_SACK_OUT */ default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); data = tcp_get_next_optbyte(); 801fae6: f7ff ff7d bl 801f9e4 801faea: 4603 mov r3, r0 801faec: 72fb strb r3, [r7, #11] if (data < 2) { 801faee: 7afb ldrb r3, [r7, #11] 801faf0: 2b01 cmp r3, #1 801faf2: d916 bls.n 801fb22 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; 801faf4: 7afb ldrb r3, [r7, #11] 801faf6: b29a uxth r2, r3 801faf8: 4b10 ldr r3, [pc, #64] @ (801fb3c ) 801fafa: 881b ldrh r3, [r3, #0] 801fafc: 4413 add r3, r2 801fafe: b29b uxth r3, r3 801fb00: 3b02 subs r3, #2 801fb02: b29a uxth r2, r3 801fb04: 4b0d ldr r3, [pc, #52] @ (801fb3c ) 801fb06: 801a strh r2, [r3, #0] 801fb08: e000 b.n 801fb0c break; 801fb0a: bf00 nop for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801fb0c: 4b0b ldr r3, [pc, #44] @ (801fb3c ) 801fb0e: 881a ldrh r2, [r3, #0] 801fb10: 4b09 ldr r3, [pc, #36] @ (801fb38 ) 801fb12: 881b ldrh r3, [r3, #0] 801fb14: 429a cmp r2, r3 801fb16: d3b1 bcc.n 801fa7c 801fb18: e004 b.n 801fb24 return; 801fb1a: bf00 nop 801fb1c: e002 b.n 801fb24 return; 801fb1e: bf00 nop 801fb20: e000 b.n 801fb24 return; 801fb22: bf00 nop } } } } 801fb24: 3710 adds r7, #16 801fb26: 46bd mov sp, r7 801fb28: bd80 pop {r7, pc} 801fb2a: bf00 nop 801fb2c: 0802fd10 .word 0x0802fd10 801fb30: 08030174 .word 0x08030174 801fb34: 0802fd5c .word 0x0802fd5c 801fb38: 2402af98 .word 0x2402af98 801fb3c: 2402afa0 .word 0x2402afa0 0801fb40 : void tcp_trigger_input_pcb_close(void) { 801fb40: b480 push {r7} 801fb42: af00 add r7, sp, #0 recv_flags |= TF_CLOSED; 801fb44: 4b05 ldr r3, [pc, #20] @ (801fb5c ) 801fb46: 781b ldrb r3, [r3, #0] 801fb48: f043 0310 orr.w r3, r3, #16 801fb4c: b2da uxtb r2, r3 801fb4e: 4b03 ldr r3, [pc, #12] @ (801fb5c ) 801fb50: 701a strb r2, [r3, #0] } 801fb52: bf00 nop 801fb54: 46bd mov sp, r7 801fb56: f85d 7b04 ldr.w r7, [sp], #4 801fb5a: 4770 bx lr 801fb5c: 2402afb1 .word 0x2402afb1 0801fb60 : 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) { 801fb60: b580 push {r7, lr} 801fb62: b084 sub sp, #16 801fb64: af00 add r7, sp, #0 801fb66: 60f8 str r0, [r7, #12] 801fb68: 60b9 str r1, [r7, #8] 801fb6a: 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)) { 801fb6c: 68fb ldr r3, [r7, #12] 801fb6e: 2b00 cmp r3, #0 801fb70: d00a beq.n 801fb88 801fb72: 68fb ldr r3, [r7, #12] 801fb74: 7a1b ldrb r3, [r3, #8] 801fb76: 2b00 cmp r3, #0 801fb78: d006 beq.n 801fb88 return netif_get_by_index(pcb->netif_idx); 801fb7a: 68fb ldr r3, [r7, #12] 801fb7c: 7a1b ldrb r3, [r3, #8] 801fb7e: 4618 mov r0, r3 801fb80: f7fb f83c bl 801abfc 801fb84: 4603 mov r3, r0 801fb86: e003 b.n 801fb90 } else { return ip_route(src, dst); 801fb88: 6878 ldr r0, [r7, #4] 801fb8a: f005 fe61 bl 8025850 801fb8e: 4603 mov r3, r0 } } 801fb90: 4618 mov r0, r3 801fb92: 3710 adds r7, #16 801fb94: 46bd mov sp, r7 801fb96: bd80 pop {r7, pc} 0801fb98 : * 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) { 801fb98: b590 push {r4, r7, lr} 801fb9a: b087 sub sp, #28 801fb9c: af00 add r7, sp, #0 801fb9e: 60f8 str r0, [r7, #12] 801fba0: 60b9 str r1, [r7, #8] 801fba2: 603b str r3, [r7, #0] 801fba4: 4613 mov r3, r2 801fba6: 71fb strb r3, [r7, #7] struct tcp_seg *seg; u8_t optlen; LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 801fba8: 68fb ldr r3, [r7, #12] 801fbaa: 2b00 cmp r3, #0 801fbac: d105 bne.n 801fbba 801fbae: 4b45 ldr r3, [pc, #276] @ (801fcc4 ) 801fbb0: 22a3 movs r2, #163 @ 0xa3 801fbb2: 4945 ldr r1, [pc, #276] @ (801fcc8 ) 801fbb4: 4845 ldr r0, [pc, #276] @ (801fccc ) 801fbb6: f00a fe59 bl 802a86c LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 801fbba: 68bb ldr r3, [r7, #8] 801fbbc: 2b00 cmp r3, #0 801fbbe: d105 bne.n 801fbcc 801fbc0: 4b40 ldr r3, [pc, #256] @ (801fcc4 ) 801fbc2: 22a4 movs r2, #164 @ 0xa4 801fbc4: 4942 ldr r1, [pc, #264] @ (801fcd0 ) 801fbc6: 4841 ldr r0, [pc, #260] @ (801fccc ) 801fbc8: f00a fe50 bl 802a86c optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 801fbcc: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801fbd0: 009b lsls r3, r3, #2 801fbd2: b2db uxtb r3, r3 801fbd4: f003 0304 and.w r3, r3, #4 801fbd8: 75fb strb r3, [r7, #23] if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 801fbda: 2003 movs r0, #3 801fbdc: f7fa fc6a bl 801a4b4 801fbe0: 6138 str r0, [r7, #16] 801fbe2: 693b ldr r3, [r7, #16] 801fbe4: 2b00 cmp r3, #0 801fbe6: d104 bne.n 801fbf2 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 801fbe8: 68b8 ldr r0, [r7, #8] 801fbea: f7fb fbc7 bl 801b37c return NULL; 801fbee: 2300 movs r3, #0 801fbf0: e063 b.n 801fcba } seg->flags = optflags; 801fbf2: 693b ldr r3, [r7, #16] 801fbf4: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 801fbf8: 731a strb r2, [r3, #12] seg->next = NULL; 801fbfa: 693b ldr r3, [r7, #16] 801fbfc: 2200 movs r2, #0 801fbfe: 601a str r2, [r3, #0] seg->p = p; 801fc00: 693b ldr r3, [r7, #16] 801fc02: 68ba ldr r2, [r7, #8] 801fc04: 605a str r2, [r3, #4] LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 801fc06: 68bb ldr r3, [r7, #8] 801fc08: 891a ldrh r2, [r3, #8] 801fc0a: 7dfb ldrb r3, [r7, #23] 801fc0c: b29b uxth r3, r3 801fc0e: 429a cmp r2, r3 801fc10: d205 bcs.n 801fc1e 801fc12: 4b2c ldr r3, [pc, #176] @ (801fcc4 ) 801fc14: 22b0 movs r2, #176 @ 0xb0 801fc16: 492f ldr r1, [pc, #188] @ (801fcd4 ) 801fc18: 482c ldr r0, [pc, #176] @ (801fccc ) 801fc1a: f00a fe27 bl 802a86c seg->len = p->tot_len - optlen; 801fc1e: 68bb ldr r3, [r7, #8] 801fc20: 891a ldrh r2, [r3, #8] 801fc22: 7dfb ldrb r3, [r7, #23] 801fc24: b29b uxth r3, r3 801fc26: 1ad3 subs r3, r2, r3 801fc28: b29a uxth r2, r3 801fc2a: 693b ldr r3, [r7, #16] 801fc2c: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 801fc2e: 693b ldr r3, [r7, #16] 801fc30: 2200 movs r2, #0 801fc32: 815a strh r2, [r3, #10] 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)) { 801fc34: 2114 movs r1, #20 801fc36: 68b8 ldr r0, [r7, #8] 801fc38: f7fb fad8 bl 801b1ec 801fc3c: 4603 mov r3, r0 801fc3e: 2b00 cmp r3, #0 801fc40: d004 beq.n 801fc4c 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); 801fc42: 6938 ldr r0, [r7, #16] 801fc44: f7fc fff3 bl 801cc2e return NULL; 801fc48: 2300 movs r3, #0 801fc4a: e036 b.n 801fcba } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 801fc4c: 693b ldr r3, [r7, #16] 801fc4e: 685b ldr r3, [r3, #4] 801fc50: 685a ldr r2, [r3, #4] 801fc52: 693b ldr r3, [r7, #16] 801fc54: 611a str r2, [r3, #16] seg->tcphdr->src = lwip_htons(pcb->local_port); 801fc56: 68fb ldr r3, [r7, #12] 801fc58: 8ada ldrh r2, [r3, #22] 801fc5a: 693b ldr r3, [r7, #16] 801fc5c: 691c ldr r4, [r3, #16] 801fc5e: 4610 mov r0, r2 801fc60: f7f9 feaa bl 80199b8 801fc64: 4603 mov r3, r0 801fc66: 8023 strh r3, [r4, #0] seg->tcphdr->dest = lwip_htons(pcb->remote_port); 801fc68: 68fb ldr r3, [r7, #12] 801fc6a: 8b1a ldrh r2, [r3, #24] 801fc6c: 693b ldr r3, [r7, #16] 801fc6e: 691c ldr r4, [r3, #16] 801fc70: 4610 mov r0, r2 801fc72: f7f9 fea1 bl 80199b8 801fc76: 4603 mov r3, r0 801fc78: 8063 strh r3, [r4, #2] seg->tcphdr->seqno = lwip_htonl(seqno); 801fc7a: 693b ldr r3, [r7, #16] 801fc7c: 691c ldr r4, [r3, #16] 801fc7e: 6838 ldr r0, [r7, #0] 801fc80: f7f9 feaf bl 80199e2 801fc84: 4603 mov r3, r0 801fc86: 6063 str r3, [r4, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); 801fc88: 7dfb ldrb r3, [r7, #23] 801fc8a: 089b lsrs r3, r3, #2 801fc8c: b2db uxtb r3, r3 801fc8e: 3305 adds r3, #5 801fc90: b29b uxth r3, r3 801fc92: 031b lsls r3, r3, #12 801fc94: b29a uxth r2, r3 801fc96: 79fb ldrb r3, [r7, #7] 801fc98: b29b uxth r3, r3 801fc9a: 4313 orrs r3, r2 801fc9c: b29a uxth r2, r3 801fc9e: 693b ldr r3, [r7, #16] 801fca0: 691c ldr r4, [r3, #16] 801fca2: 4610 mov r0, r2 801fca4: f7f9 fe88 bl 80199b8 801fca8: 4603 mov r3, r0 801fcaa: 81a3 strh r3, [r4, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 801fcac: 693b ldr r3, [r7, #16] 801fcae: 691b ldr r3, [r3, #16] 801fcb0: 2200 movs r2, #0 801fcb2: 749a strb r2, [r3, #18] 801fcb4: 2200 movs r2, #0 801fcb6: 74da strb r2, [r3, #19] return seg; 801fcb8: 693b ldr r3, [r7, #16] } 801fcba: 4618 mov r0, r3 801fcbc: 371c adds r7, #28 801fcbe: 46bd mov sp, r7 801fcc0: bd90 pop {r4, r7, pc} 801fcc2: bf00 nop 801fcc4: 08030190 .word 0x08030190 801fcc8: 080301c4 .word 0x080301c4 801fccc: 080301e4 .word 0x080301e4 801fcd0: 0803020c .word 0x0803020c 801fcd4: 08030230 .word 0x08030230 0801fcd8 : #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, const struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 801fcd8: b580 push {r7, lr} 801fcda: b086 sub sp, #24 801fcdc: af00 add r7, sp, #0 801fcde: 607b str r3, [r7, #4] 801fce0: 4603 mov r3, r0 801fce2: 73fb strb r3, [r7, #15] 801fce4: 460b mov r3, r1 801fce6: 81bb strh r3, [r7, #12] 801fce8: 4613 mov r3, r2 801fcea: 817b strh r3, [r7, #10] struct pbuf *p; u16_t alloc = length; 801fcec: 89bb ldrh r3, [r7, #12] 801fcee: 82fb strh r3, [r7, #22] LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 801fcf0: 687b ldr r3, [r7, #4] 801fcf2: 2b00 cmp r3, #0 801fcf4: d105 bne.n 801fd02 801fcf6: 4b30 ldr r3, [pc, #192] @ (801fdb8 ) 801fcf8: 22e8 movs r2, #232 @ 0xe8 801fcfa: 4930 ldr r1, [pc, #192] @ (801fdbc ) 801fcfc: 4830 ldr r0, [pc, #192] @ (801fdc0 ) 801fcfe: f00a fdb5 bl 802a86c LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 801fd02: 6a3b ldr r3, [r7, #32] 801fd04: 2b00 cmp r3, #0 801fd06: d105 bne.n 801fd14 801fd08: 4b2b ldr r3, [pc, #172] @ (801fdb8 ) 801fd0a: 22e9 movs r2, #233 @ 0xe9 801fd0c: 492d ldr r1, [pc, #180] @ (801fdc4 ) 801fd0e: 482c ldr r0, [pc, #176] @ (801fdc0 ) 801fd10: f00a fdac bl 802a86c LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 801fd14: 89ba ldrh r2, [r7, #12] 801fd16: 897b ldrh r3, [r7, #10] 801fd18: 429a cmp r2, r3 801fd1a: d221 bcs.n 801fd60 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 801fd1c: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 801fd20: f003 0302 and.w r3, r3, #2 801fd24: 2b00 cmp r3, #0 801fd26: d111 bne.n 801fd4c (!(pcb->flags & TF_NODELAY) && 801fd28: 6a3b ldr r3, [r7, #32] 801fd2a: 8b5b ldrh r3, [r3, #26] 801fd2c: f003 0340 and.w r3, r3, #64 @ 0x40 if ((apiflags & TCP_WRITE_FLAG_MORE) || 801fd30: 2b00 cmp r3, #0 801fd32: d115 bne.n 801fd60 (!(pcb->flags & TF_NODELAY) && 801fd34: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801fd38: 2b00 cmp r3, #0 801fd3a: d007 beq.n 801fd4c (!first_seg || pcb->unsent != NULL || 801fd3c: 6a3b ldr r3, [r7, #32] 801fd3e: 6edb ldr r3, [r3, #108] @ 0x6c (!first_seg || 801fd40: 2b00 cmp r3, #0 801fd42: d103 bne.n 801fd4c pcb->unacked != NULL))) { 801fd44: 6a3b ldr r3, [r7, #32] 801fd46: 6f1b ldr r3, [r3, #112] @ 0x70 pcb->unsent != NULL || 801fd48: 2b00 cmp r3, #0 801fd4a: d009 beq.n 801fd60 alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); 801fd4c: 89bb ldrh r3, [r7, #12] 801fd4e: f203 53b7 addw r3, r3, #1463 @ 0x5b7 801fd52: f023 0203 bic.w r2, r3, #3 801fd56: 897b ldrh r3, [r7, #10] 801fd58: 4293 cmp r3, r2 801fd5a: bf28 it cs 801fd5c: 4613 movcs r3, r2 801fd5e: 82fb strh r3, [r7, #22] } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 801fd60: 8af9 ldrh r1, [r7, #22] 801fd62: 7bfb ldrb r3, [r7, #15] 801fd64: f44f 7220 mov.w r2, #640 @ 0x280 801fd68: 4618 mov r0, r3 801fd6a: f7fa fff1 bl 801ad50 801fd6e: 6138 str r0, [r7, #16] if (p == NULL) { 801fd70: 693b ldr r3, [r7, #16] 801fd72: 2b00 cmp r3, #0 801fd74: d101 bne.n 801fd7a return NULL; 801fd76: 2300 movs r3, #0 801fd78: e019 b.n 801fdae } LWIP_ASSERT("need unchained pbuf", p->next == NULL); 801fd7a: 693b ldr r3, [r7, #16] 801fd7c: 681b ldr r3, [r3, #0] 801fd7e: 2b00 cmp r3, #0 801fd80: d006 beq.n 801fd90 801fd82: 4b0d ldr r3, [pc, #52] @ (801fdb8 ) 801fd84: f240 120b movw r2, #267 @ 0x10b 801fd88: 490f ldr r1, [pc, #60] @ (801fdc8 ) 801fd8a: 480d ldr r0, [pc, #52] @ (801fdc0 ) 801fd8c: f00a fd6e bl 802a86c *oversize = p->len - length; 801fd90: 693b ldr r3, [r7, #16] 801fd92: 895a ldrh r2, [r3, #10] 801fd94: 89bb ldrh r3, [r7, #12] 801fd96: 1ad3 subs r3, r2, r3 801fd98: b29a uxth r2, r3 801fd9a: 687b ldr r3, [r7, #4] 801fd9c: 801a strh r2, [r3, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 801fd9e: 693b ldr r3, [r7, #16] 801fda0: 89ba ldrh r2, [r7, #12] 801fda2: 811a strh r2, [r3, #8] 801fda4: 693b ldr r3, [r7, #16] 801fda6: 891a ldrh r2, [r3, #8] 801fda8: 693b ldr r3, [r7, #16] 801fdaa: 815a strh r2, [r3, #10] return p; 801fdac: 693b ldr r3, [r7, #16] } 801fdae: 4618 mov r0, r3 801fdb0: 3718 adds r7, #24 801fdb2: 46bd mov sp, r7 801fdb4: bd80 pop {r7, pc} 801fdb6: bf00 nop 801fdb8: 08030190 .word 0x08030190 801fdbc: 08030248 .word 0x08030248 801fdc0: 080301e4 .word 0x080301e4 801fdc4: 0803026c .word 0x0803026c 801fdc8: 0803028c .word 0x0803028c 0801fdcc : * @param len length of data to send (checked agains snd_buf) * @return ERR_OK if tcp_write is allowed to proceed, another err_t otherwise */ static err_t tcp_write_checks(struct tcp_pcb *pcb, u16_t len) { 801fdcc: b580 push {r7, lr} 801fdce: b082 sub sp, #8 801fdd0: af00 add r7, sp, #0 801fdd2: 6078 str r0, [r7, #4] 801fdd4: 460b mov r3, r1 801fdd6: 807b strh r3, [r7, #2] LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 801fdd8: 687b ldr r3, [r7, #4] 801fdda: 2b00 cmp r3, #0 801fddc: d106 bne.n 801fdec 801fdde: 4b33 ldr r3, [pc, #204] @ (801feac ) 801fde0: f240 1233 movw r2, #307 @ 0x133 801fde4: 4932 ldr r1, [pc, #200] @ (801feb0 ) 801fde6: 4833 ldr r0, [pc, #204] @ (801feb4 ) 801fde8: f00a fd40 bl 802a86c /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && 801fdec: 687b ldr r3, [r7, #4] 801fdee: 7d1b ldrb r3, [r3, #20] 801fdf0: 2b04 cmp r3, #4 801fdf2: d00e beq.n 801fe12 (pcb->state != CLOSE_WAIT) && 801fdf4: 687b ldr r3, [r7, #4] 801fdf6: 7d1b ldrb r3, [r3, #20] if ((pcb->state != ESTABLISHED) && 801fdf8: 2b07 cmp r3, #7 801fdfa: d00a beq.n 801fe12 (pcb->state != SYN_SENT) && 801fdfc: 687b ldr r3, [r7, #4] 801fdfe: 7d1b ldrb r3, [r3, #20] (pcb->state != CLOSE_WAIT) && 801fe00: 2b02 cmp r3, #2 801fe02: d006 beq.n 801fe12 (pcb->state != SYN_RCVD)) { 801fe04: 687b ldr r3, [r7, #4] 801fe06: 7d1b ldrb r3, [r3, #20] (pcb->state != SYN_SENT) && 801fe08: 2b03 cmp r3, #3 801fe0a: d002 beq.n 801fe12 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 801fe0c: f06f 030a mvn.w r3, #10 801fe10: e048 b.n 801fea4 } else if (len == 0) { 801fe12: 887b ldrh r3, [r7, #2] 801fe14: 2b00 cmp r3, #0 801fe16: d101 bne.n 801fe1c return ERR_OK; 801fe18: 2300 movs r3, #0 801fe1a: e043 b.n 801fea4 } /* fail on too much data */ if (len > pcb->snd_buf) { 801fe1c: 687b ldr r3, [r7, #4] 801fe1e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 801fe22: 887a ldrh r2, [r7, #2] 801fe24: 429a cmp r2, r3 801fe26: d909 bls.n 801fe3c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", len, pcb->snd_buf)); tcp_set_flags(pcb, TF_NAGLEMEMERR); 801fe28: 687b ldr r3, [r7, #4] 801fe2a: 8b5b ldrh r3, [r3, #26] 801fe2c: f043 0380 orr.w r3, r3, #128 @ 0x80 801fe30: b29a uxth r2, r3 801fe32: 687b ldr r3, [r7, #4] 801fe34: 835a strh r2, [r3, #26] return ERR_MEM; 801fe36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fe3a: e033 b.n 801fea4 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ if (pcb->snd_queuelen >= LWIP_MIN(TCP_SND_QUEUELEN, (TCP_SNDQUEUELEN_OVERFLOW + 1))) { 801fe3c: 687b ldr r3, [r7, #4] 801fe3e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fe42: 2b0f cmp r3, #15 801fe44: d909 bls.n 801fe5a LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); tcp_set_flags(pcb, TF_NAGLEMEMERR); 801fe46: 687b ldr r3, [r7, #4] 801fe48: 8b5b ldrh r3, [r3, #26] 801fe4a: f043 0380 orr.w r3, r3, #128 @ 0x80 801fe4e: b29a uxth r2, r3 801fe50: 687b ldr r3, [r7, #4] 801fe52: 835a strh r2, [r3, #26] return ERR_MEM; 801fe54: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fe58: e024 b.n 801fea4 } if (pcb->snd_queuelen != 0) { 801fe5a: 687b ldr r3, [r7, #4] 801fe5c: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fe60: 2b00 cmp r3, #0 801fe62: d00f beq.n 801fe84 LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 801fe64: 687b ldr r3, [r7, #4] 801fe66: 6f1b ldr r3, [r3, #112] @ 0x70 801fe68: 2b00 cmp r3, #0 801fe6a: d11a bne.n 801fea2 801fe6c: 687b ldr r3, [r7, #4] 801fe6e: 6edb ldr r3, [r3, #108] @ 0x6c 801fe70: 2b00 cmp r3, #0 801fe72: d116 bne.n 801fea2 801fe74: 4b0d ldr r3, [pc, #52] @ (801feac ) 801fe76: f240 1255 movw r2, #341 @ 0x155 801fe7a: 490f ldr r1, [pc, #60] @ (801feb8 ) 801fe7c: 480d ldr r0, [pc, #52] @ (801feb4 ) 801fe7e: f00a fcf5 bl 802a86c 801fe82: e00e b.n 801fea2 pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 801fe84: 687b ldr r3, [r7, #4] 801fe86: 6f1b ldr r3, [r3, #112] @ 0x70 801fe88: 2b00 cmp r3, #0 801fe8a: d103 bne.n 801fe94 801fe8c: 687b ldr r3, [r7, #4] 801fe8e: 6edb ldr r3, [r3, #108] @ 0x6c 801fe90: 2b00 cmp r3, #0 801fe92: d006 beq.n 801fea2 801fe94: 4b05 ldr r3, [pc, #20] @ (801feac ) 801fe96: f44f 72ac mov.w r2, #344 @ 0x158 801fe9a: 4908 ldr r1, [pc, #32] @ (801febc ) 801fe9c: 4805 ldr r0, [pc, #20] @ (801feb4 ) 801fe9e: f00a fce5 bl 802a86c pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; 801fea2: 2300 movs r3, #0 } 801fea4: 4618 mov r0, r3 801fea6: 3708 adds r7, #8 801fea8: 46bd mov sp, r7 801feaa: bd80 pop {r7, pc} 801feac: 08030190 .word 0x08030190 801feb0: 080302a0 .word 0x080302a0 801feb4: 080301e4 .word 0x080301e4 801feb8: 080302c0 .word 0x080302c0 801febc: 080302fc .word 0x080302fc 0801fec0 : * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will not be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 801fec0: b590 push {r4, r7, lr} 801fec2: b09d sub sp, #116 @ 0x74 801fec4: af04 add r7, sp, #16 801fec6: 60f8 str r0, [r7, #12] 801fec8: 60b9 str r1, [r7, #8] 801feca: 4611 mov r1, r2 801fecc: 461a mov r2, r3 801fece: 460b mov r3, r1 801fed0: 80fb strh r3, [r7, #6] 801fed2: 4613 mov r3, r2 801fed4: 717b strb r3, [r7, #5] struct pbuf *concat_p = NULL; 801fed6: 2300 movs r3, #0 801fed8: 63fb str r3, [r7, #60] @ 0x3c struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 801feda: 2300 movs r3, #0 801fedc: 643b str r3, [r7, #64] @ 0x40 801fede: 2300 movs r3, #0 801fee0: 657b str r3, [r7, #84] @ 0x54 801fee2: 2300 movs r3, #0 801fee4: 653b str r3, [r7, #80] @ 0x50 801fee6: 2300 movs r3, #0 801fee8: 64fb str r3, [r7, #76] @ 0x4c u16_t pos = 0; /* position in 'arg' data */ 801feea: 2300 movs r3, #0 801feec: f8a7 304a strh.w r3, [r7, #74] @ 0x4a u16_t queuelen; u8_t optlen; u8_t optflags = 0; 801fef0: 2300 movs r3, #0 801fef2: f887 302b strb.w r3, [r7, #43] @ 0x2b #if TCP_OVERSIZE u16_t oversize = 0; 801fef6: 2300 movs r3, #0 801fef8: 82fb strh r3, [r7, #22] u16_t oversize_used = 0; 801fefa: 2300 movs r3, #0 801fefc: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 #if TCP_OVERSIZE_DBGCHECK u16_t oversize_add = 0; 801ff00: 2300 movs r3, #0 801ff02: f8a7 305a strh.w r3, [r7, #90] @ 0x5a #endif /* TCP_OVERSIZE_DBGCHECK*/ #endif /* TCP_OVERSIZE */ u16_t extendlen = 0; 801ff06: 2300 movs r3, #0 801ff08: f8a7 305e strh.w r3, [r7, #94] @ 0x5e u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; u16_t mss_local; LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG); 801ff0c: 68fb ldr r3, [r7, #12] 801ff0e: 2b00 cmp r3, #0 801ff10: d109 bne.n 801ff26 801ff12: 4b9d ldr r3, [pc, #628] @ (8020188 ) 801ff14: f44f 72cf mov.w r2, #414 @ 0x19e 801ff18: 499c ldr r1, [pc, #624] @ (802018c ) 801ff1a: 489d ldr r0, [pc, #628] @ (8020190 ) 801ff1c: f00a fca6 bl 802a86c 801ff20: f06f 030f mvn.w r3, #15 801ff24: e37b b.n 802061e /* don't allocate segments bigger than half the maximum window we ever received */ mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2)); 801ff26: 68fb ldr r3, [r7, #12] 801ff28: f8b3 3062 ldrh.w r3, [r3, #98] @ 0x62 801ff2c: 085b lsrs r3, r3, #1 801ff2e: b29a uxth r2, r3 801ff30: 68fb ldr r3, [r7, #12] 801ff32: 8e5b ldrh r3, [r3, #50] @ 0x32 801ff34: 4293 cmp r3, r2 801ff36: bf28 it cs 801ff38: 4613 movcs r3, r2 801ff3a: 853b strh r3, [r7, #40] @ 0x28 mss_local = mss_local ? mss_local : pcb->mss; 801ff3c: 8d3b ldrh r3, [r7, #40] @ 0x28 801ff3e: 2b00 cmp r3, #0 801ff40: d102 bne.n 801ff48 801ff42: 68fb ldr r3, [r7, #12] 801ff44: 8e5b ldrh r3, [r3, #50] @ 0x32 801ff46: e000 b.n 801ff4a 801ff48: 8d3b ldrh r3, [r7, #40] @ 0x28 801ff4a: 853b strh r3, [r7, #40] @ 0x28 LWIP_ASSERT_CORE_LOCKED(); 801ff4c: f7f1 f866 bl 801101c apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 801ff50: 68bb ldr r3, [r7, #8] 801ff52: 2b00 cmp r3, #0 801ff54: d109 bne.n 801ff6a 801ff56: 4b8c ldr r3, [pc, #560] @ (8020188 ) 801ff58: f240 12ad movw r2, #429 @ 0x1ad 801ff5c: 498d ldr r1, [pc, #564] @ (8020194 ) 801ff5e: 488c ldr r0, [pc, #560] @ (8020190 ) 801ff60: f00a fc84 bl 802a86c 801ff64: f06f 030f mvn.w r3, #15 801ff68: e359 b.n 802061e arg != NULL, return ERR_ARG;); err = tcp_write_checks(pcb, len); 801ff6a: 88fb ldrh r3, [r7, #6] 801ff6c: 4619 mov r1, r3 801ff6e: 68f8 ldr r0, [r7, #12] 801ff70: f7ff ff2c bl 801fdcc 801ff74: 4603 mov r3, r0 801ff76: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (err != ERR_OK) { 801ff7a: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801ff7e: 2b00 cmp r3, #0 801ff80: d002 beq.n 801ff88 return err; 801ff82: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801ff86: e34a b.n 802061e } queuelen = pcb->snd_queuelen; 801ff88: 68fb ldr r3, [r7, #12] 801ff8a: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801ff8e: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 /* ensure that segments can hold at least one data byte... */ mss_local = LWIP_MAX(mss_local, LWIP_TCP_OPT_LEN_TS + 1); } else #endif /* LWIP_TCP_TIMESTAMPS */ { optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 801ff92: 2300 movs r3, #0 801ff94: f887 3026 strb.w r3, [r7, #38] @ 0x26 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 801ff98: 68fb ldr r3, [r7, #12] 801ff9a: 6edb ldr r3, [r3, #108] @ 0x6c 801ff9c: 2b00 cmp r3, #0 801ff9e: f000 8127 beq.w 80201f0 u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801ffa2: 68fb ldr r3, [r7, #12] 801ffa4: 6edb ldr r3, [r3, #108] @ 0x6c 801ffa6: 643b str r3, [r7, #64] @ 0x40 801ffa8: e002 b.n 801ffb0 last_unsent = last_unsent->next); 801ffaa: 6c3b ldr r3, [r7, #64] @ 0x40 801ffac: 681b ldr r3, [r3, #0] 801ffae: 643b str r3, [r7, #64] @ 0x40 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801ffb0: 6c3b ldr r3, [r7, #64] @ 0x40 801ffb2: 681b ldr r3, [r3, #0] 801ffb4: 2b00 cmp r3, #0 801ffb6: d1f8 bne.n 801ffaa /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); 801ffb8: 6c3b ldr r3, [r7, #64] @ 0x40 801ffba: 7b1b ldrb r3, [r3, #12] 801ffbc: 009b lsls r3, r3, #2 801ffbe: b29b uxth r3, r3 801ffc0: f003 0304 and.w r3, r3, #4 801ffc4: 84bb strh r3, [r7, #36] @ 0x24 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 801ffc6: 8d3a ldrh r2, [r7, #40] @ 0x28 801ffc8: 6c3b ldr r3, [r7, #64] @ 0x40 801ffca: 891b ldrh r3, [r3, #8] 801ffcc: 4619 mov r1, r3 801ffce: 8cbb ldrh r3, [r7, #36] @ 0x24 801ffd0: 440b add r3, r1 801ffd2: 429a cmp r2, r3 801ffd4: da06 bge.n 801ffe4 801ffd6: 4b6c ldr r3, [pc, #432] @ (8020188 ) 801ffd8: f44f 72f3 mov.w r2, #486 @ 0x1e6 801ffdc: 496e ldr r1, [pc, #440] @ (8020198 ) 801ffde: 486c ldr r0, [pc, #432] @ (8020190 ) 801ffe0: f00a fc44 bl 802a86c space = mss_local - (last_unsent->len + unsent_optlen); 801ffe4: 6c3b ldr r3, [r7, #64] @ 0x40 801ffe6: 891a ldrh r2, [r3, #8] 801ffe8: 8cbb ldrh r3, [r7, #36] @ 0x24 801ffea: 4413 add r3, r2 801ffec: b29b uxth r3, r3 801ffee: 8d3a ldrh r2, [r7, #40] @ 0x28 801fff0: 1ad3 subs r3, r2, r3 801fff2: f8a7 305c strh.w r3, [r7, #92] @ 0x5c * function. */ #if TCP_OVERSIZE #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->oversize_left */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", 801fff6: 68fb ldr r3, [r7, #12] 801fff8: f8b3 2068 ldrh.w r2, [r3, #104] @ 0x68 801fffc: 6c3b ldr r3, [r7, #64] @ 0x40 801fffe: 895b ldrh r3, [r3, #10] 8020000: 429a cmp r2, r3 8020002: d006 beq.n 8020012 8020004: 4b60 ldr r3, [pc, #384] @ (8020188 ) 8020006: f240 12f3 movw r2, #499 @ 0x1f3 802000a: 4964 ldr r1, [pc, #400] @ (802019c ) 802000c: 4860 ldr r0, [pc, #384] @ (8020190 ) 802000e: f00a fc2d bl 802a86c pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 8020012: 68fb ldr r3, [r7, #12] 8020014: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 8020018: 82fb strh r3, [r7, #22] if (oversize > 0) { 802001a: 8afb ldrh r3, [r7, #22] 802001c: 2b00 cmp r3, #0 802001e: d02e beq.n 802007e LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 8020020: 8afb ldrh r3, [r7, #22] 8020022: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 8020026: 429a cmp r2, r3 8020028: d206 bcs.n 8020038 802002a: 4b57 ldr r3, [pc, #348] @ (8020188 ) 802002c: f44f 72fc mov.w r2, #504 @ 0x1f8 8020030: 495b ldr r1, [pc, #364] @ (80201a0 ) 8020032: 4857 ldr r0, [pc, #348] @ (8020190 ) 8020034: f00a fc1a bl 802a86c seg = last_unsent; 8020038: 6c3b ldr r3, [r7, #64] @ 0x40 802003a: 657b str r3, [r7, #84] @ 0x54 oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); 802003c: 8afb ldrh r3, [r7, #22] 802003e: 88fa ldrh r2, [r7, #6] 8020040: 4293 cmp r3, r2 8020042: bf28 it cs 8020044: 4613 movcs r3, r2 8020046: b29b uxth r3, r3 8020048: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 802004c: 4293 cmp r3, r2 802004e: bf28 it cs 8020050: 4613 movcs r3, r2 8020052: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 pos += oversize_used; 8020056: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 802005a: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802005e: 4413 add r3, r2 8020060: f8a7 304a strh.w r3, [r7, #74] @ 0x4a oversize -= oversize_used; 8020064: 8afa ldrh r2, [r7, #22] 8020066: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802006a: 1ad3 subs r3, r2, r3 802006c: b29b uxth r3, r3 802006e: 82fb strh r3, [r7, #22] space -= oversize_used; 8020070: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 8020074: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020078: 1ad3 subs r3, r2, r3 802007a: f8a7 305c strh.w r3, [r7, #92] @ 0x5c } /* now we are either finished or oversize is zero */ LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); 802007e: 8afb ldrh r3, [r7, #22] 8020080: 2b00 cmp r3, #0 8020082: d00b beq.n 802009c 8020084: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 8020088: 88fb ldrh r3, [r7, #6] 802008a: 429a cmp r2, r3 802008c: d006 beq.n 802009c 802008e: 4b3e ldr r3, [pc, #248] @ (8020188 ) 8020090: f44f 7200 mov.w r2, #512 @ 0x200 8020094: 4943 ldr r1, [pc, #268] @ (80201a4 ) 8020096: 483e ldr r0, [pc, #248] @ (8020190 ) 8020098: f00a fbe8 bl 802a86c * * This phase is skipped for LWIP_NETIF_TX_SINGLE_PBUF as we could only execute * it after rexmit puts a segment from unacked to unsent and at this point, * oversize info is lost. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 802009c: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80200a0: 88fb ldrh r3, [r7, #6] 80200a2: 429a cmp r2, r3 80200a4: f080 8172 bcs.w 802038c 80200a8: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 80200ac: 2b00 cmp r3, #0 80200ae: f000 816d beq.w 802038c 80200b2: 6c3b ldr r3, [r7, #64] @ 0x40 80200b4: 891b ldrh r3, [r3, #8] 80200b6: 2b00 cmp r3, #0 80200b8: f000 8168 beq.w 802038c u16_t seglen = LWIP_MIN(space, len - pos); 80200bc: 88fa ldrh r2, [r7, #6] 80200be: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80200c2: 1ad2 subs r2, r2, r3 80200c4: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 80200c8: 4293 cmp r3, r2 80200ca: bfa8 it ge 80200cc: 4613 movge r3, r2 80200ce: 847b strh r3, [r7, #34] @ 0x22 seg = last_unsent; 80200d0: 6c3b ldr r3, [r7, #64] @ 0x40 80200d2: 657b str r3, [r7, #84] @ 0x54 /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 80200d4: 797b ldrb r3, [r7, #5] 80200d6: f003 0301 and.w r3, r3, #1 80200da: 2b00 cmp r3, #0 80200dc: d02b beq.n 8020136 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 80200de: f107 0016 add.w r0, r7, #22 80200e2: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 80200e6: 8c79 ldrh r1, [r7, #34] @ 0x22 80200e8: 2301 movs r3, #1 80200ea: 9302 str r3, [sp, #8] 80200ec: 797b ldrb r3, [r7, #5] 80200ee: 9301 str r3, [sp, #4] 80200f0: 68fb ldr r3, [r7, #12] 80200f2: 9300 str r3, [sp, #0] 80200f4: 4603 mov r3, r0 80200f6: 2000 movs r0, #0 80200f8: f7ff fdee bl 801fcd8 80200fc: 63f8 str r0, [r7, #60] @ 0x3c 80200fe: 6bfb ldr r3, [r7, #60] @ 0x3c 8020100: 2b00 cmp r3, #0 8020102: f000 825a beq.w 80205ba ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } #if TCP_OVERSIZE_DBGCHECK oversize_add = oversize; 8020106: 8afb ldrh r3, [r7, #22] 8020108: f8a7 305a strh.w r3, [r7, #90] @ 0x5a #endif /* TCP_OVERSIZE_DBGCHECK */ TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); 802010c: 6bfb ldr r3, [r7, #60] @ 0x3c 802010e: 6858 ldr r0, [r3, #4] 8020110: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020114: 68ba ldr r2, [r7, #8] 8020116: 4413 add r3, r2 8020118: 8c7a ldrh r2, [r7, #34] @ 0x22 802011a: 4619 mov r1, r3 802011c: f00a fe2f bl 802ad7e #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ queuelen += pbuf_clen(concat_p); 8020120: 6bf8 ldr r0, [r7, #60] @ 0x3c 8020122: f7fb f9b9 bl 801b498 8020126: 4603 mov r3, r0 8020128: 461a mov r2, r3 802012a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 802012e: 4413 add r3, r2 8020130: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 8020134: e055 b.n 80201e2 } else { /* Data is not copied */ /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ struct pbuf *p; for (p = last_unsent->p; p->next != NULL; p = p->next); 8020136: 6c3b ldr r3, [r7, #64] @ 0x40 8020138: 685b ldr r3, [r3, #4] 802013a: 63bb str r3, [r7, #56] @ 0x38 802013c: e002 b.n 8020144 802013e: 6bbb ldr r3, [r7, #56] @ 0x38 8020140: 681b ldr r3, [r3, #0] 8020142: 63bb str r3, [r7, #56] @ 0x38 8020144: 6bbb ldr r3, [r7, #56] @ 0x38 8020146: 681b ldr r3, [r3, #0] 8020148: 2b00 cmp r3, #0 802014a: d1f8 bne.n 802013e if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 802014c: 6bbb ldr r3, [r7, #56] @ 0x38 802014e: 7b1b ldrb r3, [r3, #12] 8020150: f003 03c0 and.w r3, r3, #192 @ 0xc0 8020154: 2b00 cmp r3, #0 8020156: d129 bne.n 80201ac (const u8_t *)p->payload + p->len == (const u8_t *)arg) { 8020158: 6bbb ldr r3, [r7, #56] @ 0x38 802015a: 685b ldr r3, [r3, #4] 802015c: 6bba ldr r2, [r7, #56] @ 0x38 802015e: 8952 ldrh r2, [r2, #10] 8020160: 4413 add r3, r2 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 8020162: 68ba ldr r2, [r7, #8] 8020164: 429a cmp r2, r3 8020166: d121 bne.n 80201ac LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 8020168: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 802016c: 2b00 cmp r3, #0 802016e: d006 beq.n 802017e 8020170: 4b05 ldr r3, [pc, #20] @ (8020188 ) 8020172: f240 2231 movw r2, #561 @ 0x231 8020176: 490c ldr r1, [pc, #48] @ (80201a8 ) 8020178: 4805 ldr r0, [pc, #20] @ (8020190 ) 802017a: f00a fb77 bl 802a86c extendlen = seglen; 802017e: 8c7b ldrh r3, [r7, #34] @ 0x22 8020180: f8a7 305e strh.w r3, [r7, #94] @ 0x5e 8020184: e02d b.n 80201e2 8020186: bf00 nop 8020188: 08030190 .word 0x08030190 802018c: 08030330 .word 0x08030330 8020190: 080301e4 .word 0x080301e4 8020194: 08030348 .word 0x08030348 8020198: 0803037c .word 0x0803037c 802019c: 08030394 .word 0x08030394 80201a0: 080303c4 .word 0x080303c4 80201a4: 080303e4 .word 0x080303e4 80201a8: 08030404 .word 0x08030404 } else { if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 80201ac: 8c7b ldrh r3, [r7, #34] @ 0x22 80201ae: 2201 movs r2, #1 80201b0: 4619 mov r1, r3 80201b2: 2000 movs r0, #0 80201b4: f7fa fdcc bl 801ad50 80201b8: 63f8 str r0, [r7, #60] @ 0x3c 80201ba: 6bfb ldr r3, [r7, #60] @ 0x3c 80201bc: 2b00 cmp r3, #0 80201be: f000 81fe beq.w 80205be LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for zero-copy pbuf\n")); goto memerr; } /* reference the non-volatile payload data */ ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos; 80201c2: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80201c6: 68ba ldr r2, [r7, #8] 80201c8: 441a add r2, r3 80201ca: 6bfb ldr r3, [r7, #60] @ 0x3c 80201cc: 605a str r2, [r3, #4] queuelen += pbuf_clen(concat_p); 80201ce: 6bf8 ldr r0, [r7, #60] @ 0x3c 80201d0: f7fb f962 bl 801b498 80201d4: 4603 mov r3, r0 80201d6: 461a mov r2, r3 80201d8: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 80201dc: 4413 add r3, r2 80201de: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } pos += seglen; 80201e2: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80201e6: 8c7b ldrh r3, [r7, #34] @ 0x22 80201e8: 4413 add r3, r2 80201ea: f8a7 304a strh.w r3, [r7, #74] @ 0x4a 80201ee: e0cd b.n 802038c } #endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ } else { #if TCP_OVERSIZE LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 80201f0: 68fb ldr r3, [r7, #12] 80201f2: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 80201f6: 2b00 cmp r3, #0 80201f8: f000 80c8 beq.w 802038c 80201fc: 4b72 ldr r3, [pc, #456] @ (80203c8 ) 80201fe: f240 224a movw r2, #586 @ 0x24a 8020202: 4972 ldr r1, [pc, #456] @ (80203cc ) 8020204: 4872 ldr r0, [pc, #456] @ (80203d0 ) 8020206: f00a fb31 bl 802a86c * Phase 3: Create new segments. * * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { 802020a: e0bf b.n 802038c struct pbuf *p; u16_t left = len - pos; 802020c: 88fa ldrh r2, [r7, #6] 802020e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020212: 1ad3 subs r3, r2, r3 8020214: 843b strh r3, [r7, #32] u16_t max_len = mss_local - optlen; 8020216: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802021a: b29b uxth r3, r3 802021c: 8d3a ldrh r2, [r7, #40] @ 0x28 802021e: 1ad3 subs r3, r2, r3 8020220: 83fb strh r3, [r7, #30] u16_t seglen = LWIP_MIN(left, max_len); 8020222: 8bfa ldrh r2, [r7, #30] 8020224: 8c3b ldrh r3, [r7, #32] 8020226: 4293 cmp r3, r2 8020228: bf28 it cs 802022a: 4613 movcs r3, r2 802022c: 83bb strh r3, [r7, #28] #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802022e: 797b ldrb r3, [r7, #5] 8020230: f003 0301 and.w r3, r3, #1 8020234: 2b00 cmp r3, #0 8020236: d036 beq.n 80202a6 /* If copy is set, memory should be allocated and data copied * into pbuf */ if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { 8020238: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802023c: b29a uxth r2, r3 802023e: 8bbb ldrh r3, [r7, #28] 8020240: 4413 add r3, r2 8020242: b299 uxth r1, r3 8020244: 6cfb ldr r3, [r7, #76] @ 0x4c 8020246: 2b00 cmp r3, #0 8020248: bf0c ite eq 802024a: 2301 moveq r3, #1 802024c: 2300 movne r3, #0 802024e: b2db uxtb r3, r3 8020250: f107 0016 add.w r0, r7, #22 8020254: 8d3a ldrh r2, [r7, #40] @ 0x28 8020256: 9302 str r3, [sp, #8] 8020258: 797b ldrb r3, [r7, #5] 802025a: 9301 str r3, [sp, #4] 802025c: 68fb ldr r3, [r7, #12] 802025e: 9300 str r3, [sp, #0] 8020260: 4603 mov r3, r0 8020262: 2036 movs r0, #54 @ 0x36 8020264: f7ff fd38 bl 801fcd8 8020268: 6378 str r0, [r7, #52] @ 0x34 802026a: 6b7b ldr r3, [r7, #52] @ 0x34 802026c: 2b00 cmp r3, #0 802026e: f000 81a8 beq.w 80205c2 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", 8020272: 6b7b ldr r3, [r7, #52] @ 0x34 8020274: 895b ldrh r3, [r3, #10] 8020276: 8bba ldrh r2, [r7, #28] 8020278: 429a cmp r2, r3 802027a: d906 bls.n 802028a 802027c: 4b52 ldr r3, [pc, #328] @ (80203c8 ) 802027e: f240 2266 movw r2, #614 @ 0x266 8020282: 4954 ldr r1, [pc, #336] @ (80203d4 ) 8020284: 4852 ldr r0, [pc, #328] @ (80203d0 ) 8020286: f00a faf1 bl 802a86c (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); 802028a: 6b7b ldr r3, [r7, #52] @ 0x34 802028c: 685a ldr r2, [r3, #4] 802028e: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 8020292: 18d0 adds r0, r2, r3 8020294: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020298: 68ba ldr r2, [r7, #8] 802029a: 4413 add r3, r2 802029c: 8bba ldrh r2, [r7, #28] 802029e: 4619 mov r1, r3 80202a0: f00a fd6d bl 802ad7e 80202a4: e02f b.n 8020306 * sent out on the link (as it has to be ACKed by the remote * party) we can safely use PBUF_ROM instead of PBUF_REF here. */ struct pbuf *p2; #if TCP_OVERSIZE LWIP_ASSERT("oversize == 0", oversize == 0); 80202a6: 8afb ldrh r3, [r7, #22] 80202a8: 2b00 cmp r3, #0 80202aa: d006 beq.n 80202ba 80202ac: 4b46 ldr r3, [pc, #280] @ (80203c8 ) 80202ae: f240 2271 movw r2, #625 @ 0x271 80202b2: 4949 ldr r1, [pc, #292] @ (80203d8 ) 80202b4: 4846 ldr r0, [pc, #280] @ (80203d0 ) 80202b6: f00a fad9 bl 802a86c #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 80202ba: 8bbb ldrh r3, [r7, #28] 80202bc: 2201 movs r2, #1 80202be: 4619 mov r1, r3 80202c0: 2036 movs r0, #54 @ 0x36 80202c2: f7fa fd45 bl 801ad50 80202c6: 61b8 str r0, [r7, #24] 80202c8: 69bb ldr r3, [r7, #24] 80202ca: 2b00 cmp r3, #0 80202cc: f000 817b beq.w 80205c6 chksum_swapped = 1; chksum = SWAP_BYTES_IN_WORD(chksum); } #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos; 80202d0: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80202d4: 68ba ldr r2, [r7, #8] 80202d6: 441a add r2, r3 80202d8: 69bb ldr r3, [r7, #24] 80202da: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 80202dc: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 80202e0: b29b uxth r3, r3 80202e2: f44f 7220 mov.w r2, #640 @ 0x280 80202e6: 4619 mov r1, r3 80202e8: 2036 movs r0, #54 @ 0x36 80202ea: f7fa fd31 bl 801ad50 80202ee: 6378 str r0, [r7, #52] @ 0x34 80202f0: 6b7b ldr r3, [r7, #52] @ 0x34 80202f2: 2b00 cmp r3, #0 80202f4: d103 bne.n 80202fe /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 80202f6: 69b8 ldr r0, [r7, #24] 80202f8: f7fb f840 bl 801b37c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; 80202fc: e166 b.n 80205cc } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 80202fe: 69b9 ldr r1, [r7, #24] 8020300: 6b78 ldr r0, [r7, #52] @ 0x34 8020302: f7fb f909 bl 801b518 } queuelen += pbuf_clen(p); 8020306: 6b78 ldr r0, [r7, #52] @ 0x34 8020308: f7fb f8c6 bl 801b498 802030c: 4603 mov r3, r0 802030e: 461a mov r2, r3 8020310: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 8020314: 4413 add r3, r2 8020316: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 /* Now that there are more segments queued, we check again if the * length of the queue exceeds the configured maximum or * overflows. */ if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) { 802031a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 802031e: 2b10 cmp r3, #16 8020320: d903 bls.n 802032a LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", queuelen, (int)TCP_SND_QUEUELEN)); pbuf_free(p); 8020322: 6b78 ldr r0, [r7, #52] @ 0x34 8020324: f7fb f82a bl 801b37c goto memerr; 8020328: e150 b.n 80205cc } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 802032a: 68fb ldr r3, [r7, #12] 802032c: 6dda ldr r2, [r3, #92] @ 0x5c 802032e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020332: 441a add r2, r3 8020334: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8020338: 9300 str r3, [sp, #0] 802033a: 4613 mov r3, r2 802033c: 2200 movs r2, #0 802033e: 6b79 ldr r1, [r7, #52] @ 0x34 8020340: 68f8 ldr r0, [r7, #12] 8020342: f7ff fc29 bl 801fb98 8020346: 6578 str r0, [r7, #84] @ 0x54 8020348: 6d7b ldr r3, [r7, #84] @ 0x54 802034a: 2b00 cmp r3, #0 802034c: f000 813d beq.w 80205ca goto memerr; } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = oversize; 8020350: 8afa ldrh r2, [r7, #22] 8020352: 6d7b ldr r3, [r7, #84] @ 0x54 8020354: 815a strh r2, [r3, #10] seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 8020356: 6cfb ldr r3, [r7, #76] @ 0x4c 8020358: 2b00 cmp r3, #0 802035a: d102 bne.n 8020362 queue = seg; 802035c: 6d7b ldr r3, [r7, #84] @ 0x54 802035e: 64fb str r3, [r7, #76] @ 0x4c 8020360: e00c b.n 802037c } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 8020362: 6d3b ldr r3, [r7, #80] @ 0x50 8020364: 2b00 cmp r3, #0 8020366: d106 bne.n 8020376 8020368: 4b17 ldr r3, [pc, #92] @ (80203c8 ) 802036a: f240 22ab movw r2, #683 @ 0x2ab 802036e: 491b ldr r1, [pc, #108] @ (80203dc ) 8020370: 4817 ldr r0, [pc, #92] @ (80203d0 ) 8020372: f00a fa7b bl 802a86c prev_seg->next = seg; 8020376: 6d3b ldr r3, [r7, #80] @ 0x50 8020378: 6d7a ldr r2, [r7, #84] @ 0x54 802037a: 601a str r2, [r3, #0] } /* remember last segment of to-be-queued data for next iteration */ prev_seg = seg; 802037c: 6d7b ldr r3, [r7, #84] @ 0x54 802037e: 653b str r3, [r7, #80] @ 0x50 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); pos += seglen; 8020380: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 8020384: 8bbb ldrh r3, [r7, #28] 8020386: 4413 add r3, r2 8020388: f8a7 304a strh.w r3, [r7, #74] @ 0x4a while (pos < len) { 802038c: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 8020390: 88fb ldrh r3, [r7, #6] 8020392: 429a cmp r2, r3 8020394: f4ff af3a bcc.w 802020c /* * All three segmentation phases were successful. We can commit the * transaction. */ #if TCP_OVERSIZE_DBGCHECK if ((last_unsent != NULL) && (oversize_add != 0)) { 8020398: 6c3b ldr r3, [r7, #64] @ 0x40 802039a: 2b00 cmp r3, #0 802039c: d00b beq.n 80203b6 802039e: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 80203a2: 2b00 cmp r3, #0 80203a4: d007 beq.n 80203b6 last_unsent->oversize_left += oversize_add; 80203a6: 6c3b ldr r3, [r7, #64] @ 0x40 80203a8: 895a ldrh r2, [r3, #10] 80203aa: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 80203ae: 4413 add r3, r2 80203b0: b29a uxth r2, r3 80203b2: 6c3b ldr r3, [r7, #64] @ 0x40 80203b4: 815a strh r2, [r3, #10] /* * Phase 1: If data has been added to the preallocated tail of * last_unsent, we update the length fields of the pbuf chain. */ #if TCP_OVERSIZE if (oversize_used > 0) { 80203b6: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80203ba: 2b00 cmp r3, #0 80203bc: d052 beq.n 8020464 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 80203be: 6c3b ldr r3, [r7, #64] @ 0x40 80203c0: 685b ldr r3, [r3, #4] 80203c2: 633b str r3, [r7, #48] @ 0x30 80203c4: e02e b.n 8020424 80203c6: bf00 nop 80203c8: 08030190 .word 0x08030190 80203cc: 08030430 .word 0x08030430 80203d0: 080301e4 .word 0x080301e4 80203d4: 08030460 .word 0x08030460 80203d8: 080304a0 .word 0x080304a0 80203dc: 080304b0 .word 0x080304b0 p->tot_len += oversize_used; 80203e0: 6b3b ldr r3, [r7, #48] @ 0x30 80203e2: 891a ldrh r2, [r3, #8] 80203e4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80203e8: 4413 add r3, r2 80203ea: b29a uxth r2, r3 80203ec: 6b3b ldr r3, [r7, #48] @ 0x30 80203ee: 811a strh r2, [r3, #8] if (p->next == NULL) { 80203f0: 6b3b ldr r3, [r7, #48] @ 0x30 80203f2: 681b ldr r3, [r3, #0] 80203f4: 2b00 cmp r3, #0 80203f6: d112 bne.n 802041e TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 80203f8: 6b3b ldr r3, [r7, #48] @ 0x30 80203fa: 685b ldr r3, [r3, #4] 80203fc: 6b3a ldr r2, [r7, #48] @ 0x30 80203fe: 8952 ldrh r2, [r2, #10] 8020400: 4413 add r3, r2 8020402: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8020406: 68b9 ldr r1, [r7, #8] 8020408: 4618 mov r0, r3 802040a: f00a fcb8 bl 802ad7e p->len += oversize_used; 802040e: 6b3b ldr r3, [r7, #48] @ 0x30 8020410: 895a ldrh r2, [r3, #10] 8020412: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020416: 4413 add r3, r2 8020418: b29a uxth r2, r3 802041a: 6b3b ldr r3, [r7, #48] @ 0x30 802041c: 815a strh r2, [r3, #10] for (p = last_unsent->p; p; p = p->next) { 802041e: 6b3b ldr r3, [r7, #48] @ 0x30 8020420: 681b ldr r3, [r3, #0] 8020422: 633b str r3, [r7, #48] @ 0x30 8020424: 6b3b ldr r3, [r7, #48] @ 0x30 8020426: 2b00 cmp r3, #0 8020428: d1da bne.n 80203e0 } } last_unsent->len += oversize_used; 802042a: 6c3b ldr r3, [r7, #64] @ 0x40 802042c: 891a ldrh r2, [r3, #8] 802042e: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020432: 4413 add r3, r2 8020434: b29a uxth r2, r3 8020436: 6c3b ldr r3, [r7, #64] @ 0x40 8020438: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 802043a: 6c3b ldr r3, [r7, #64] @ 0x40 802043c: 895b ldrh r3, [r3, #10] 802043e: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8020442: 429a cmp r2, r3 8020444: d906 bls.n 8020454 8020446: 4b78 ldr r3, [pc, #480] @ (8020628 ) 8020448: f240 22d3 movw r2, #723 @ 0x2d3 802044c: 4977 ldr r1, [pc, #476] @ (802062c ) 802044e: 4878 ldr r0, [pc, #480] @ (8020630 ) 8020450: f00a fa0c bl 802a86c last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; 8020454: 6c3b ldr r3, [r7, #64] @ 0x40 8020456: 895a ldrh r2, [r3, #10] 8020458: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802045c: 1ad3 subs r3, r2, r3 802045e: b29a uxth r2, r3 8020460: 6c3b ldr r3, [r7, #64] @ 0x40 8020462: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 8020464: 8afa ldrh r2, [r7, #22] 8020466: 68fb ldr r3, [r7, #12] 8020468: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 /* * Phase 2: concat_p can be concatenated onto last_unsent->p, unless we * determined that the last ROM pbuf can be extended to include the new data. */ if (concat_p != NULL) { 802046c: 6bfb ldr r3, [r7, #60] @ 0x3c 802046e: 2b00 cmp r3, #0 8020470: d018 beq.n 80204a4 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 8020472: 6c3b ldr r3, [r7, #64] @ 0x40 8020474: 2b00 cmp r3, #0 8020476: d106 bne.n 8020486 8020478: 4b6b ldr r3, [pc, #428] @ (8020628 ) 802047a: f44f 7238 mov.w r2, #736 @ 0x2e0 802047e: 496d ldr r1, [pc, #436] @ (8020634 ) 8020480: 486b ldr r0, [pc, #428] @ (8020630 ) 8020482: f00a f9f3 bl 802a86c (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 8020486: 6c3b ldr r3, [r7, #64] @ 0x40 8020488: 685b ldr r3, [r3, #4] 802048a: 6bf9 ldr r1, [r7, #60] @ 0x3c 802048c: 4618 mov r0, r3 802048e: f7fb f843 bl 801b518 last_unsent->len += concat_p->tot_len; 8020492: 6c3b ldr r3, [r7, #64] @ 0x40 8020494: 891a ldrh r2, [r3, #8] 8020496: 6bfb ldr r3, [r7, #60] @ 0x3c 8020498: 891b ldrh r3, [r3, #8] 802049a: 4413 add r3, r2 802049c: b29a uxth r2, r3 802049e: 6c3b ldr r3, [r7, #64] @ 0x40 80204a0: 811a strh r2, [r3, #8] 80204a2: e03c b.n 802051e } else if (extendlen > 0) { 80204a4: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 80204a8: 2b00 cmp r3, #0 80204aa: d038 beq.n 802051e struct pbuf *p; LWIP_ASSERT("tcp_write: extension of reference requires reference", 80204ac: 6c3b ldr r3, [r7, #64] @ 0x40 80204ae: 2b00 cmp r3, #0 80204b0: d003 beq.n 80204ba 80204b2: 6c3b ldr r3, [r7, #64] @ 0x40 80204b4: 685b ldr r3, [r3, #4] 80204b6: 2b00 cmp r3, #0 80204b8: d106 bne.n 80204c8 80204ba: 4b5b ldr r3, [pc, #364] @ (8020628 ) 80204bc: f240 22e6 movw r2, #742 @ 0x2e6 80204c0: 495d ldr r1, [pc, #372] @ (8020638 ) 80204c2: 485b ldr r0, [pc, #364] @ (8020630 ) 80204c4: f00a f9d2 bl 802a86c last_unsent != NULL && last_unsent->p != NULL); for (p = last_unsent->p; p->next != NULL; p = p->next) { 80204c8: 6c3b ldr r3, [r7, #64] @ 0x40 80204ca: 685b ldr r3, [r3, #4] 80204cc: 62fb str r3, [r7, #44] @ 0x2c 80204ce: e00a b.n 80204e6 p->tot_len += extendlen; 80204d0: 6afb ldr r3, [r7, #44] @ 0x2c 80204d2: 891a ldrh r2, [r3, #8] 80204d4: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 80204d8: 4413 add r3, r2 80204da: b29a uxth r2, r3 80204dc: 6afb ldr r3, [r7, #44] @ 0x2c 80204de: 811a strh r2, [r3, #8] for (p = last_unsent->p; p->next != NULL; p = p->next) { 80204e0: 6afb ldr r3, [r7, #44] @ 0x2c 80204e2: 681b ldr r3, [r3, #0] 80204e4: 62fb str r3, [r7, #44] @ 0x2c 80204e6: 6afb ldr r3, [r7, #44] @ 0x2c 80204e8: 681b ldr r3, [r3, #0] 80204ea: 2b00 cmp r3, #0 80204ec: d1f0 bne.n 80204d0 } p->tot_len += extendlen; 80204ee: 6afb ldr r3, [r7, #44] @ 0x2c 80204f0: 891a ldrh r2, [r3, #8] 80204f2: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 80204f6: 4413 add r3, r2 80204f8: b29a uxth r2, r3 80204fa: 6afb ldr r3, [r7, #44] @ 0x2c 80204fc: 811a strh r2, [r3, #8] p->len += extendlen; 80204fe: 6afb ldr r3, [r7, #44] @ 0x2c 8020500: 895a ldrh r2, [r3, #10] 8020502: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020506: 4413 add r3, r2 8020508: b29a uxth r2, r3 802050a: 6afb ldr r3, [r7, #44] @ 0x2c 802050c: 815a strh r2, [r3, #10] last_unsent->len += extendlen; 802050e: 6c3b ldr r3, [r7, #64] @ 0x40 8020510: 891a ldrh r2, [r3, #8] 8020512: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020516: 4413 add r3, r2 8020518: b29a uxth r2, r3 802051a: 6c3b ldr r3, [r7, #64] @ 0x40 802051c: 811a strh r2, [r3, #8] /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 802051e: 6c3b ldr r3, [r7, #64] @ 0x40 8020520: 2b00 cmp r3, #0 8020522: d103 bne.n 802052c pcb->unsent = queue; 8020524: 68fb ldr r3, [r7, #12] 8020526: 6cfa ldr r2, [r7, #76] @ 0x4c 8020528: 66da str r2, [r3, #108] @ 0x6c 802052a: e002 b.n 8020532 } else { last_unsent->next = queue; 802052c: 6c3b ldr r3, [r7, #64] @ 0x40 802052e: 6cfa ldr r2, [r7, #76] @ 0x4c 8020530: 601a str r2, [r3, #0] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8020532: 68fb ldr r3, [r7, #12] 8020534: 6dda ldr r2, [r3, #92] @ 0x5c 8020536: 88fb ldrh r3, [r7, #6] 8020538: 441a add r2, r3 802053a: 68fb ldr r3, [r7, #12] 802053c: 65da str r2, [r3, #92] @ 0x5c pcb->snd_buf -= len; 802053e: 68fb ldr r3, [r7, #12] 8020540: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 8020544: 88fb ldrh r3, [r7, #6] 8020546: 1ad3 subs r3, r2, r3 8020548: b29a uxth r2, r3 802054a: 68fb ldr r3, [r7, #12] 802054c: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 pcb->snd_queuelen = queuelen; 8020550: 68fb ldr r3, [r7, #12] 8020552: f8b7 2048 ldrh.w r2, [r7, #72] @ 0x48 8020556: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); if (pcb->snd_queuelen != 0) { 802055a: 68fb ldr r3, [r7, #12] 802055c: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020560: 2b00 cmp r3, #0 8020562: d00e beq.n 8020582 LWIP_ASSERT("tcp_write: valid queue length", 8020564: 68fb ldr r3, [r7, #12] 8020566: 6f1b ldr r3, [r3, #112] @ 0x70 8020568: 2b00 cmp r3, #0 802056a: d10a bne.n 8020582 802056c: 68fb ldr r3, [r7, #12] 802056e: 6edb ldr r3, [r3, #108] @ 0x6c 8020570: 2b00 cmp r3, #0 8020572: d106 bne.n 8020582 8020574: 4b2c ldr r3, [pc, #176] @ (8020628 ) 8020576: f240 3212 movw r2, #786 @ 0x312 802057a: 4930 ldr r1, [pc, #192] @ (802063c ) 802057c: 482c ldr r0, [pc, #176] @ (8020630 ) 802057e: f00a f975 bl 802a86c pcb->unacked != NULL || pcb->unsent != NULL); } /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) { 8020582: 6d7b ldr r3, [r7, #84] @ 0x54 8020584: 2b00 cmp r3, #0 8020586: d016 beq.n 80205b6 8020588: 6d7b ldr r3, [r7, #84] @ 0x54 802058a: 691b ldr r3, [r3, #16] 802058c: 2b00 cmp r3, #0 802058e: d012 beq.n 80205b6 8020590: 797b ldrb r3, [r7, #5] 8020592: f003 0302 and.w r3, r3, #2 8020596: 2b00 cmp r3, #0 8020598: d10d bne.n 80205b6 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 802059a: 6d7b ldr r3, [r7, #84] @ 0x54 802059c: 691b ldr r3, [r3, #16] 802059e: 899b ldrh r3, [r3, #12] 80205a0: b29c uxth r4, r3 80205a2: 2008 movs r0, #8 80205a4: f7f9 fa08 bl 80199b8 80205a8: 4603 mov r3, r0 80205aa: 461a mov r2, r3 80205ac: 6d7b ldr r3, [r7, #84] @ 0x54 80205ae: 691b ldr r3, [r3, #16] 80205b0: 4322 orrs r2, r4 80205b2: b292 uxth r2, r2 80205b4: 819a strh r2, [r3, #12] } return ERR_OK; 80205b6: 2300 movs r3, #0 80205b8: e031 b.n 802061e goto memerr; 80205ba: bf00 nop 80205bc: e006 b.n 80205cc goto memerr; 80205be: bf00 nop 80205c0: e004 b.n 80205cc goto memerr; 80205c2: bf00 nop 80205c4: e002 b.n 80205cc goto memerr; 80205c6: bf00 nop 80205c8: e000 b.n 80205cc goto memerr; 80205ca: bf00 nop memerr: tcp_set_flags(pcb, TF_NAGLEMEMERR); 80205cc: 68fb ldr r3, [r7, #12] 80205ce: 8b5b ldrh r3, [r3, #26] 80205d0: f043 0380 orr.w r3, r3, #128 @ 0x80 80205d4: b29a uxth r2, r3 80205d6: 68fb ldr r3, [r7, #12] 80205d8: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 80205da: 6bfb ldr r3, [r7, #60] @ 0x3c 80205dc: 2b00 cmp r3, #0 80205de: d002 beq.n 80205e6 pbuf_free(concat_p); 80205e0: 6bf8 ldr r0, [r7, #60] @ 0x3c 80205e2: f7fa fecb bl 801b37c } if (queue != NULL) { 80205e6: 6cfb ldr r3, [r7, #76] @ 0x4c 80205e8: 2b00 cmp r3, #0 80205ea: d002 beq.n 80205f2 tcp_segs_free(queue); 80205ec: 6cf8 ldr r0, [r7, #76] @ 0x4c 80205ee: f7fc fb09 bl 801cc04 } if (pcb->snd_queuelen != 0) { 80205f2: 68fb ldr r3, [r7, #12] 80205f4: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 80205f8: 2b00 cmp r3, #0 80205fa: d00e beq.n 802061a LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 80205fc: 68fb ldr r3, [r7, #12] 80205fe: 6f1b ldr r3, [r3, #112] @ 0x70 8020600: 2b00 cmp r3, #0 8020602: d10a bne.n 802061a 8020604: 68fb ldr r3, [r7, #12] 8020606: 6edb ldr r3, [r3, #108] @ 0x6c 8020608: 2b00 cmp r3, #0 802060a: d106 bne.n 802061a 802060c: 4b06 ldr r3, [pc, #24] @ (8020628 ) 802060e: f240 3227 movw r2, #807 @ 0x327 8020612: 490a ldr r1, [pc, #40] @ (802063c ) 8020614: 4806 ldr r0, [pc, #24] @ (8020630 ) 8020616: f00a f929 bl 802a86c pcb->unsent != NULL); } LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); return ERR_MEM; 802061a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 802061e: 4618 mov r0, r3 8020620: 3764 adds r7, #100 @ 0x64 8020622: 46bd mov sp, r7 8020624: bd90 pop {r4, r7, pc} 8020626: bf00 nop 8020628: 08030190 .word 0x08030190 802062c: 080304c4 .word 0x080304c4 8020630: 080301e4 .word 0x080301e4 8020634: 080304f0 .word 0x080304f0 8020638: 08030528 .word 0x08030528 802063c: 08030560 .word 0x08030560 08020640 : * @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) { 8020640: b590 push {r4, r7, lr} 8020642: b08b sub sp, #44 @ 0x2c 8020644: af02 add r7, sp, #8 8020646: 6078 str r0, [r7, #4] 8020648: 460b mov r3, r1 802064a: 807b strh r3, [r7, #2] struct tcp_seg *seg = NULL, *useg = NULL; 802064c: 2300 movs r3, #0 802064e: 61bb str r3, [r7, #24] 8020650: 2300 movs r3, #0 8020652: 617b str r3, [r7, #20] struct pbuf *p = NULL; 8020654: 2300 movs r3, #0 8020656: 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); 8020658: 687b ldr r3, [r7, #4] 802065a: 2b00 cmp r3, #0 802065c: d106 bne.n 802066c 802065e: 4b97 ldr r3, [pc, #604] @ (80208bc ) 8020660: f240 324b movw r2, #843 @ 0x34b 8020664: 4996 ldr r1, [pc, #600] @ (80208c0 ) 8020666: 4897 ldr r0, [pc, #604] @ (80208c4 ) 8020668: f00a f900 bl 802a86c useg = pcb->unsent; 802066c: 687b ldr r3, [r7, #4] 802066e: 6edb ldr r3, [r3, #108] @ 0x6c 8020670: 617b str r3, [r7, #20] if (useg == NULL) { 8020672: 697b ldr r3, [r7, #20] 8020674: 2b00 cmp r3, #0 8020676: d102 bne.n 802067e return ERR_MEM; 8020678: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802067c: e119 b.n 80208b2 } if (split == 0) { 802067e: 887b ldrh r3, [r7, #2] 8020680: 2b00 cmp r3, #0 8020682: d109 bne.n 8020698 LWIP_ASSERT("Can't split segment into length 0", 0); 8020684: 4b8d ldr r3, [pc, #564] @ (80208bc ) 8020686: f240 3253 movw r2, #851 @ 0x353 802068a: 498f ldr r1, [pc, #572] @ (80208c8 ) 802068c: 488d ldr r0, [pc, #564] @ (80208c4 ) 802068e: f00a f8ed bl 802a86c return ERR_VAL; 8020692: f06f 0305 mvn.w r3, #5 8020696: e10c b.n 80208b2 } if (useg->len <= split) { 8020698: 697b ldr r3, [r7, #20] 802069a: 891b ldrh r3, [r3, #8] 802069c: 887a ldrh r2, [r7, #2] 802069e: 429a cmp r2, r3 80206a0: d301 bcc.n 80206a6 return ERR_OK; 80206a2: 2300 movs r3, #0 80206a4: e105 b.n 80208b2 } LWIP_ASSERT("split <= mss", split <= pcb->mss); 80206a6: 687b ldr r3, [r7, #4] 80206a8: 8e5b ldrh r3, [r3, #50] @ 0x32 80206aa: 887a ldrh r2, [r7, #2] 80206ac: 429a cmp r2, r3 80206ae: d906 bls.n 80206be 80206b0: 4b82 ldr r3, [pc, #520] @ (80208bc ) 80206b2: f240 325b movw r2, #859 @ 0x35b 80206b6: 4985 ldr r1, [pc, #532] @ (80208cc ) 80206b8: 4882 ldr r0, [pc, #520] @ (80208c4 ) 80206ba: f00a f8d7 bl 802a86c LWIP_ASSERT("useg->len > 0", useg->len > 0); 80206be: 697b ldr r3, [r7, #20] 80206c0: 891b ldrh r3, [r3, #8] 80206c2: 2b00 cmp r3, #0 80206c4: d106 bne.n 80206d4 80206c6: 4b7d ldr r3, [pc, #500] @ (80208bc ) 80206c8: f44f 7257 mov.w r2, #860 @ 0x35c 80206cc: 4980 ldr r1, [pc, #512] @ (80208d0 ) 80206ce: 487d ldr r0, [pc, #500] @ (80208c4 ) 80206d0: f00a f8cc bl 802a86c * 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; 80206d4: 697b ldr r3, [r7, #20] 80206d6: 7b1b ldrb r3, [r3, #12] 80206d8: 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); 80206da: 7bfb ldrb r3, [r7, #15] 80206dc: 009b lsls r3, r3, #2 80206de: b2db uxtb r3, r3 80206e0: f003 0304 and.w r3, r3, #4 80206e4: 73bb strb r3, [r7, #14] remainder = useg->len - split; 80206e6: 697b ldr r3, [r7, #20] 80206e8: 891a ldrh r2, [r3, #8] 80206ea: 887b ldrh r3, [r7, #2] 80206ec: 1ad3 subs r3, r2, r3 80206ee: 81bb strh r3, [r7, #12] /* Create new pbuf for the remainder of the split */ p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); 80206f0: 7bbb ldrb r3, [r7, #14] 80206f2: b29a uxth r2, r3 80206f4: 89bb ldrh r3, [r7, #12] 80206f6: 4413 add r3, r2 80206f8: b29b uxth r3, r3 80206fa: f44f 7220 mov.w r2, #640 @ 0x280 80206fe: 4619 mov r1, r3 8020700: 2036 movs r0, #54 @ 0x36 8020702: f7fa fb25 bl 801ad50 8020706: 6138 str r0, [r7, #16] if (p == NULL) { 8020708: 693b ldr r3, [r7, #16] 802070a: 2b00 cmp r3, #0 802070c: f000 80ba beq.w 8020884 ("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; 8020710: 697b ldr r3, [r7, #20] 8020712: 685b ldr r3, [r3, #4] 8020714: 891a ldrh r2, [r3, #8] 8020716: 697b ldr r3, [r7, #20] 8020718: 891b ldrh r3, [r3, #8] 802071a: 1ad3 subs r3, r2, r3 802071c: b29a uxth r2, r3 802071e: 887b ldrh r3, [r7, #2] 8020720: 4413 add r3, r2 8020722: 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) { 8020724: 697b ldr r3, [r7, #20] 8020726: 6858 ldr r0, [r3, #4] 8020728: 693b ldr r3, [r7, #16] 802072a: 685a ldr r2, [r3, #4] 802072c: 7bbb ldrb r3, [r7, #14] 802072e: 18d1 adds r1, r2, r3 8020730: 897b ldrh r3, [r7, #10] 8020732: 89ba ldrh r2, [r7, #12] 8020734: f7fb f828 bl 801b788 8020738: 4603 mov r3, r0 802073a: 461a mov r2, r3 802073c: 89bb ldrh r3, [r7, #12] 802073e: 4293 cmp r3, r2 8020740: f040 80a2 bne.w 8020888 #endif /* TCP_CHECKSUM_ON_COPY */ /* Options are created when calling tcp_output() */ /* Migrate flags from original segment */ split_flags = TCPH_FLAGS(useg->tcphdr); 8020744: 697b ldr r3, [r7, #20] 8020746: 691b ldr r3, [r3, #16] 8020748: 899b ldrh r3, [r3, #12] 802074a: b29b uxth r3, r3 802074c: 4618 mov r0, r3 802074e: f7f9 f933 bl 80199b8 8020752: 4603 mov r3, r0 8020754: b2db uxtb r3, r3 8020756: f003 033f and.w r3, r3, #63 @ 0x3f 802075a: 77fb strb r3, [r7, #31] remainder_flags = 0; /* ACK added in tcp_output() */ 802075c: 2300 movs r3, #0 802075e: 77bb strb r3, [r7, #30] if (split_flags & TCP_PSH) { 8020760: 7ffb ldrb r3, [r7, #31] 8020762: f003 0308 and.w r3, r3, #8 8020766: 2b00 cmp r3, #0 8020768: d007 beq.n 802077a split_flags &= ~TCP_PSH; 802076a: 7ffb ldrb r3, [r7, #31] 802076c: f023 0308 bic.w r3, r3, #8 8020770: 77fb strb r3, [r7, #31] remainder_flags |= TCP_PSH; 8020772: 7fbb ldrb r3, [r7, #30] 8020774: f043 0308 orr.w r3, r3, #8 8020778: 77bb strb r3, [r7, #30] } if (split_flags & TCP_FIN) { 802077a: 7ffb ldrb r3, [r7, #31] 802077c: f003 0301 and.w r3, r3, #1 8020780: 2b00 cmp r3, #0 8020782: d007 beq.n 8020794 split_flags &= ~TCP_FIN; 8020784: 7ffb ldrb r3, [r7, #31] 8020786: f023 0301 bic.w r3, r3, #1 802078a: 77fb strb r3, [r7, #31] remainder_flags |= TCP_FIN; 802078c: 7fbb ldrb r3, [r7, #30] 802078e: f043 0301 orr.w r3, r3, #1 8020792: 77bb strb r3, [r7, #30] } /* 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); 8020794: 697b ldr r3, [r7, #20] 8020796: 691b ldr r3, [r3, #16] 8020798: 685b ldr r3, [r3, #4] 802079a: 4618 mov r0, r3 802079c: f7f9 f921 bl 80199e2 80207a0: 4602 mov r2, r0 80207a2: 887b ldrh r3, [r7, #2] 80207a4: 18d1 adds r1, r2, r3 80207a6: 7fba ldrb r2, [r7, #30] 80207a8: 7bfb ldrb r3, [r7, #15] 80207aa: 9300 str r3, [sp, #0] 80207ac: 460b mov r3, r1 80207ae: 6939 ldr r1, [r7, #16] 80207b0: 6878 ldr r0, [r7, #4] 80207b2: f7ff f9f1 bl 801fb98 80207b6: 61b8 str r0, [r7, #24] if (seg == NULL) { 80207b8: 69bb ldr r3, [r7, #24] 80207ba: 2b00 cmp r3, #0 80207bc: d066 beq.n 802088c 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); 80207be: 697b ldr r3, [r7, #20] 80207c0: 685b ldr r3, [r3, #4] 80207c2: 4618 mov r0, r3 80207c4: f7fa fe68 bl 801b498 80207c8: 4603 mov r3, r0 80207ca: 461a mov r2, r3 80207cc: 687b ldr r3, [r7, #4] 80207ce: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 80207d2: 1a9b subs r3, r3, r2 80207d4: b29a uxth r2, r3 80207d6: 687b ldr r3, [r7, #4] 80207d8: 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); 80207dc: 697b ldr r3, [r7, #20] 80207de: 6858 ldr r0, [r3, #4] 80207e0: 697b ldr r3, [r7, #20] 80207e2: 685b ldr r3, [r3, #4] 80207e4: 891a ldrh r2, [r3, #8] 80207e6: 89bb ldrh r3, [r7, #12] 80207e8: 1ad3 subs r3, r2, r3 80207ea: b29b uxth r3, r3 80207ec: 4619 mov r1, r3 80207ee: f7fa fc0f bl 801b010 useg->len -= remainder; 80207f2: 697b ldr r3, [r7, #20] 80207f4: 891a ldrh r2, [r3, #8] 80207f6: 89bb ldrh r3, [r7, #12] 80207f8: 1ad3 subs r3, r2, r3 80207fa: b29a uxth r2, r3 80207fc: 697b ldr r3, [r7, #20] 80207fe: 811a strh r2, [r3, #8] TCPH_SET_FLAG(useg->tcphdr, split_flags); 8020800: 697b ldr r3, [r7, #20] 8020802: 691b ldr r3, [r3, #16] 8020804: 899b ldrh r3, [r3, #12] 8020806: b29c uxth r4, r3 8020808: 7ffb ldrb r3, [r7, #31] 802080a: b29b uxth r3, r3 802080c: 4618 mov r0, r3 802080e: f7f9 f8d3 bl 80199b8 8020812: 4603 mov r3, r0 8020814: 461a mov r2, r3 8020816: 697b ldr r3, [r7, #20] 8020818: 691b ldr r3, [r3, #16] 802081a: 4322 orrs r2, r4 802081c: b292 uxth r2, r2 802081e: 819a strh r2, [r3, #12] #if TCP_OVERSIZE_DBGCHECK /* By trimming, realloc may have actually shrunk the pbuf, so clear oversize_left */ useg->oversize_left = 0; 8020820: 697b ldr r3, [r7, #20] 8020822: 2200 movs r2, #0 8020824: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ /* Add back to the queue with new trimmed pbuf */ pcb->snd_queuelen += pbuf_clen(useg->p); 8020826: 697b ldr r3, [r7, #20] 8020828: 685b ldr r3, [r3, #4] 802082a: 4618 mov r0, r3 802082c: f7fa fe34 bl 801b498 8020830: 4603 mov r3, r0 8020832: 461a mov r2, r3 8020834: 687b ldr r3, [r7, #4] 8020836: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 802083a: 4413 add r3, r2 802083c: b29a uxth r2, r3 802083e: 687b ldr r3, [r7, #4] 8020840: 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); 8020844: 69bb ldr r3, [r7, #24] 8020846: 685b ldr r3, [r3, #4] 8020848: 4618 mov r0, r3 802084a: f7fa fe25 bl 801b498 802084e: 4603 mov r3, r0 8020850: 461a mov r2, r3 8020852: 687b ldr r3, [r7, #4] 8020854: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020858: 4413 add r3, r2 802085a: b29a uxth r2, r3 802085c: 687b ldr r3, [r7, #4] 802085e: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 /* Finally insert remainder into queue after split (which stays head) */ seg->next = useg->next; 8020862: 697b ldr r3, [r7, #20] 8020864: 681a ldr r2, [r3, #0] 8020866: 69bb ldr r3, [r7, #24] 8020868: 601a str r2, [r3, #0] useg->next = seg; 802086a: 697b ldr r3, [r7, #20] 802086c: 69ba ldr r2, [r7, #24] 802086e: 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) { 8020870: 69bb ldr r3, [r7, #24] 8020872: 681b ldr r3, [r3, #0] 8020874: 2b00 cmp r3, #0 8020876: d103 bne.n 8020880 pcb->unsent_oversize = 0; 8020878: 687b ldr r3, [r7, #4] 802087a: 2200 movs r2, #0 802087c: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ return ERR_OK; 8020880: 2300 movs r3, #0 8020882: e016 b.n 80208b2 goto memerr; 8020884: bf00 nop 8020886: e002 b.n 802088e goto memerr; 8020888: bf00 nop 802088a: e000 b.n 802088e goto memerr; 802088c: bf00 nop memerr: TCP_STATS_INC(tcp.memerr); LWIP_ASSERT("seg == NULL", seg == NULL); 802088e: 69bb ldr r3, [r7, #24] 8020890: 2b00 cmp r3, #0 8020892: d006 beq.n 80208a2 8020894: 4b09 ldr r3, [pc, #36] @ (80208bc ) 8020896: f44f 7276 mov.w r2, #984 @ 0x3d8 802089a: 490e ldr r1, [pc, #56] @ (80208d4 ) 802089c: 4809 ldr r0, [pc, #36] @ (80208c4 ) 802089e: f009 ffe5 bl 802a86c if (p != NULL) { 80208a2: 693b ldr r3, [r7, #16] 80208a4: 2b00 cmp r3, #0 80208a6: d002 beq.n 80208ae pbuf_free(p); 80208a8: 6938 ldr r0, [r7, #16] 80208aa: f7fa fd67 bl 801b37c } return ERR_MEM; 80208ae: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 80208b2: 4618 mov r0, r3 80208b4: 3724 adds r7, #36 @ 0x24 80208b6: 46bd mov sp, r7 80208b8: bd90 pop {r4, r7, pc} 80208ba: bf00 nop 80208bc: 08030190 .word 0x08030190 80208c0: 08030580 .word 0x08030580 80208c4: 080301e4 .word 0x080301e4 80208c8: 080305a4 .word 0x080305a4 80208cc: 080305c8 .word 0x080305c8 80208d0: 080305d8 .word 0x080305d8 80208d4: 080305e8 .word 0x080305e8 080208d8 : * @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) { 80208d8: b590 push {r4, r7, lr} 80208da: b085 sub sp, #20 80208dc: af00 add r7, sp, #0 80208de: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 80208e0: 687b ldr r3, [r7, #4] 80208e2: 2b00 cmp r3, #0 80208e4: d106 bne.n 80208f4 80208e6: 4b21 ldr r3, [pc, #132] @ (802096c ) 80208e8: f240 32eb movw r2, #1003 @ 0x3eb 80208ec: 4920 ldr r1, [pc, #128] @ (8020970 ) 80208ee: 4821 ldr r0, [pc, #132] @ (8020974 ) 80208f0: f009 ffbc bl 802a86c /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 80208f4: 687b ldr r3, [r7, #4] 80208f6: 6edb ldr r3, [r3, #108] @ 0x6c 80208f8: 2b00 cmp r3, #0 80208fa: d02e beq.n 802095a struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 80208fc: 687b ldr r3, [r7, #4] 80208fe: 6edb ldr r3, [r3, #108] @ 0x6c 8020900: 60fb str r3, [r7, #12] 8020902: e002 b.n 802090a last_unsent = last_unsent->next); 8020904: 68fb ldr r3, [r7, #12] 8020906: 681b ldr r3, [r3, #0] 8020908: 60fb str r3, [r7, #12] for (last_unsent = pcb->unsent; last_unsent->next != NULL; 802090a: 68fb ldr r3, [r7, #12] 802090c: 681b ldr r3, [r3, #0] 802090e: 2b00 cmp r3, #0 8020910: d1f8 bne.n 8020904 if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8020912: 68fb ldr r3, [r7, #12] 8020914: 691b ldr r3, [r3, #16] 8020916: 899b ldrh r3, [r3, #12] 8020918: b29b uxth r3, r3 802091a: 4618 mov r0, r3 802091c: f7f9 f84c bl 80199b8 8020920: 4603 mov r3, r0 8020922: b2db uxtb r3, r3 8020924: f003 0307 and.w r3, r3, #7 8020928: 2b00 cmp r3, #0 802092a: d116 bne.n 802095a /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 802092c: 68fb ldr r3, [r7, #12] 802092e: 691b ldr r3, [r3, #16] 8020930: 899b ldrh r3, [r3, #12] 8020932: b29c uxth r4, r3 8020934: 2001 movs r0, #1 8020936: f7f9 f83f bl 80199b8 802093a: 4603 mov r3, r0 802093c: 461a mov r2, r3 802093e: 68fb ldr r3, [r7, #12] 8020940: 691b ldr r3, [r3, #16] 8020942: 4322 orrs r2, r4 8020944: b292 uxth r2, r2 8020946: 819a strh r2, [r3, #12] tcp_set_flags(pcb, TF_FIN); 8020948: 687b ldr r3, [r7, #4] 802094a: 8b5b ldrh r3, [r3, #26] 802094c: f043 0320 orr.w r3, r3, #32 8020950: b29a uxth r2, r3 8020952: 687b ldr r3, [r7, #4] 8020954: 835a strh r2, [r3, #26] return ERR_OK; 8020956: 2300 movs r3, #0 8020958: e004 b.n 8020964 } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 802095a: 2101 movs r1, #1 802095c: 6878 ldr r0, [r7, #4] 802095e: f000 f80b bl 8020978 8020962: 4603 mov r3, r0 } 8020964: 4618 mov r0, r3 8020966: 3714 adds r7, #20 8020968: 46bd mov sp, r7 802096a: bd90 pop {r4, r7, pc} 802096c: 08030190 .word 0x08030190 8020970: 080305f4 .word 0x080305f4 8020974: 080301e4 .word 0x080301e4 08020978 : * @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) { 8020978: b580 push {r7, lr} 802097a: b088 sub sp, #32 802097c: af02 add r7, sp, #8 802097e: 6078 str r0, [r7, #4] 8020980: 460b mov r3, r1 8020982: 70fb strb r3, [r7, #3] struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 8020984: 2300 movs r3, #0 8020986: 75fb strb r3, [r7, #23] u8_t optlen = 0; 8020988: 2300 movs r3, #0 802098a: 75bb strb r3, [r7, #22] 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)", 802098c: 78fb ldrb r3, [r7, #3] 802098e: f003 0303 and.w r3, r3, #3 8020992: 2b00 cmp r3, #0 8020994: d106 bne.n 80209a4 8020996: 4b67 ldr r3, [pc, #412] @ (8020b34 ) 8020998: f240 4211 movw r2, #1041 @ 0x411 802099c: 4966 ldr r1, [pc, #408] @ (8020b38 ) 802099e: 4867 ldr r0, [pc, #412] @ (8020b3c ) 80209a0: f009 ff64 bl 802a86c (flags & (TCP_SYN | TCP_FIN)) != 0); LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 80209a4: 687b ldr r3, [r7, #4] 80209a6: 2b00 cmp r3, #0 80209a8: d106 bne.n 80209b8 80209aa: 4b62 ldr r3, [pc, #392] @ (8020b34 ) 80209ac: f240 4213 movw r2, #1043 @ 0x413 80209b0: 4963 ldr r1, [pc, #396] @ (8020b40 ) 80209b2: 4862 ldr r0, [pc, #392] @ (8020b3c ) 80209b4: f009 ff5a bl 802a86c /* 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) { 80209b8: 78fb ldrb r3, [r7, #3] 80209ba: f003 0302 and.w r3, r3, #2 80209be: 2b00 cmp r3, #0 80209c0: d001 beq.n 80209c6 optflags = TF_SEG_OPTS_MSS; 80209c2: 2301 movs r3, #1 80209c4: 75fb strb r3, [r7, #23] /* 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); 80209c6: 7dfb ldrb r3, [r7, #23] 80209c8: 009b lsls r3, r3, #2 80209ca: b2db uxtb r3, r3 80209cc: f003 0304 and.w r3, r3, #4 80209d0: 75bb strb r3, [r7, #22] /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 80209d2: 7dbb ldrb r3, [r7, #22] 80209d4: b29b uxth r3, r3 80209d6: f44f 7220 mov.w r2, #640 @ 0x280 80209da: 4619 mov r1, r3 80209dc: 2036 movs r0, #54 @ 0x36 80209de: f7fa f9b7 bl 801ad50 80209e2: 60f8 str r0, [r7, #12] 80209e4: 68fb ldr r3, [r7, #12] 80209e6: 2b00 cmp r3, #0 80209e8: d109 bne.n 80209fe tcp_set_flags(pcb, TF_NAGLEMEMERR); 80209ea: 687b ldr r3, [r7, #4] 80209ec: 8b5b ldrh r3, [r3, #26] 80209ee: f043 0380 orr.w r3, r3, #128 @ 0x80 80209f2: b29a uxth r2, r3 80209f4: 687b ldr r3, [r7, #4] 80209f6: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 80209f8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80209fc: e095 b.n 8020b2a } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 80209fe: 68fb ldr r3, [r7, #12] 8020a00: 895a ldrh r2, [r3, #10] 8020a02: 7dbb ldrb r3, [r7, #22] 8020a04: b29b uxth r3, r3 8020a06: 429a cmp r2, r3 8020a08: d206 bcs.n 8020a18 8020a0a: 4b4a ldr r3, [pc, #296] @ (8020b34 ) 8020a0c: f240 4239 movw r2, #1081 @ 0x439 8020a10: 494c ldr r1, [pc, #304] @ (8020b44 ) 8020a12: 484a ldr r0, [pc, #296] @ (8020b3c ) 8020a14: f009 ff2a bl 802a86c (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) { 8020a18: 687b ldr r3, [r7, #4] 8020a1a: 6dd9 ldr r1, [r3, #92] @ 0x5c 8020a1c: 78fa ldrb r2, [r7, #3] 8020a1e: 7dfb ldrb r3, [r7, #23] 8020a20: 9300 str r3, [sp, #0] 8020a22: 460b mov r3, r1 8020a24: 68f9 ldr r1, [r7, #12] 8020a26: 6878 ldr r0, [r7, #4] 8020a28: f7ff f8b6 bl 801fb98 8020a2c: 60b8 str r0, [r7, #8] 8020a2e: 68bb ldr r3, [r7, #8] 8020a30: 2b00 cmp r3, #0 8020a32: d109 bne.n 8020a48 tcp_set_flags(pcb, TF_NAGLEMEMERR); 8020a34: 687b ldr r3, [r7, #4] 8020a36: 8b5b ldrh r3, [r3, #26] 8020a38: f043 0380 orr.w r3, r3, #128 @ 0x80 8020a3c: b29a uxth r2, r3 8020a3e: 687b ldr r3, [r7, #4] 8020a40: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 8020a42: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8020a46: e070 b.n 8020b2a } LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 8020a48: 68bb ldr r3, [r7, #8] 8020a4a: 691b ldr r3, [r3, #16] 8020a4c: f003 0303 and.w r3, r3, #3 8020a50: 2b00 cmp r3, #0 8020a52: d006 beq.n 8020a62 8020a54: 4b37 ldr r3, [pc, #220] @ (8020b34 ) 8020a56: f240 4242 movw r2, #1090 @ 0x442 8020a5a: 493b ldr r1, [pc, #236] @ (8020b48 ) 8020a5c: 4837 ldr r0, [pc, #220] @ (8020b3c ) 8020a5e: f009 ff05 bl 802a86c LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 8020a62: 68bb ldr r3, [r7, #8] 8020a64: 891b ldrh r3, [r3, #8] 8020a66: 2b00 cmp r3, #0 8020a68: d006 beq.n 8020a78 8020a6a: 4b32 ldr r3, [pc, #200] @ (8020b34 ) 8020a6c: f240 4243 movw r2, #1091 @ 0x443 8020a70: 4936 ldr r1, [pc, #216] @ (8020b4c ) 8020a72: 4832 ldr r0, [pc, #200] @ (8020b3c ) 8020a74: f009 fefa bl 802a86c 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) { 8020a78: 687b ldr r3, [r7, #4] 8020a7a: 6edb ldr r3, [r3, #108] @ 0x6c 8020a7c: 2b00 cmp r3, #0 8020a7e: d103 bne.n 8020a88 pcb->unsent = seg; 8020a80: 687b ldr r3, [r7, #4] 8020a82: 68ba ldr r2, [r7, #8] 8020a84: 66da str r2, [r3, #108] @ 0x6c 8020a86: e00d b.n 8020aa4 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8020a88: 687b ldr r3, [r7, #4] 8020a8a: 6edb ldr r3, [r3, #108] @ 0x6c 8020a8c: 613b str r3, [r7, #16] 8020a8e: e002 b.n 8020a96 8020a90: 693b ldr r3, [r7, #16] 8020a92: 681b ldr r3, [r3, #0] 8020a94: 613b str r3, [r7, #16] 8020a96: 693b ldr r3, [r7, #16] 8020a98: 681b ldr r3, [r3, #0] 8020a9a: 2b00 cmp r3, #0 8020a9c: d1f8 bne.n 8020a90 useg->next = seg; 8020a9e: 693b ldr r3, [r7, #16] 8020aa0: 68ba ldr r2, [r7, #8] 8020aa2: 601a str r2, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8020aa4: 687b ldr r3, [r7, #4] 8020aa6: 2200 movs r2, #0 8020aa8: 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)) { 8020aac: 78fb ldrb r3, [r7, #3] 8020aae: f003 0302 and.w r3, r3, #2 8020ab2: 2b00 cmp r3, #0 8020ab4: d104 bne.n 8020ac0 8020ab6: 78fb ldrb r3, [r7, #3] 8020ab8: f003 0301 and.w r3, r3, #1 8020abc: 2b00 cmp r3, #0 8020abe: d004 beq.n 8020aca pcb->snd_lbb++; 8020ac0: 687b ldr r3, [r7, #4] 8020ac2: 6ddb ldr r3, [r3, #92] @ 0x5c 8020ac4: 1c5a adds r2, r3, #1 8020ac6: 687b ldr r3, [r7, #4] 8020ac8: 65da str r2, [r3, #92] @ 0x5c /* optlen does not influence snd_buf */ } if (flags & TCP_FIN) { 8020aca: 78fb ldrb r3, [r7, #3] 8020acc: f003 0301 and.w r3, r3, #1 8020ad0: 2b00 cmp r3, #0 8020ad2: d006 beq.n 8020ae2 tcp_set_flags(pcb, TF_FIN); 8020ad4: 687b ldr r3, [r7, #4] 8020ad6: 8b5b ldrh r3, [r3, #26] 8020ad8: f043 0320 orr.w r3, r3, #32 8020adc: b29a uxth r2, r3 8020ade: 687b ldr r3, [r7, #4] 8020ae0: 835a strh r2, [r3, #26] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 8020ae2: 68bb ldr r3, [r7, #8] 8020ae4: 685b ldr r3, [r3, #4] 8020ae6: 4618 mov r0, r3 8020ae8: f7fa fcd6 bl 801b498 8020aec: 4603 mov r3, r0 8020aee: 461a mov r2, r3 8020af0: 687b ldr r3, [r7, #4] 8020af2: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020af6: 4413 add r3, r2 8020af8: b29a uxth r2, r3 8020afa: 687b ldr r3, [r7, #4] 8020afc: 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) { 8020b00: 687b ldr r3, [r7, #4] 8020b02: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020b06: 2b00 cmp r3, #0 8020b08: d00e beq.n 8020b28 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 8020b0a: 687b ldr r3, [r7, #4] 8020b0c: 6f1b ldr r3, [r3, #112] @ 0x70 8020b0e: 2b00 cmp r3, #0 8020b10: d10a bne.n 8020b28 8020b12: 687b ldr r3, [r7, #4] 8020b14: 6edb ldr r3, [r3, #108] @ 0x6c 8020b16: 2b00 cmp r3, #0 8020b18: d106 bne.n 8020b28 8020b1a: 4b06 ldr r3, [pc, #24] @ (8020b34 ) 8020b1c: f240 4265 movw r2, #1125 @ 0x465 8020b20: 490b ldr r1, [pc, #44] @ (8020b50 ) 8020b22: 4806 ldr r0, [pc, #24] @ (8020b3c ) 8020b24: f009 fea2 bl 802a86c pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 8020b28: 2300 movs r3, #0 } 8020b2a: 4618 mov r0, r3 8020b2c: 3718 adds r7, #24 8020b2e: 46bd mov sp, r7 8020b30: bd80 pop {r7, pc} 8020b32: bf00 nop 8020b34: 08030190 .word 0x08030190 8020b38: 08030610 .word 0x08030610 8020b3c: 080301e4 .word 0x080301e4 8020b40: 08030668 .word 0x08030668 8020b44: 08030688 .word 0x08030688 8020b48: 080306c4 .word 0x080306c4 8020b4c: 080306dc .word 0x080306dc 8020b50: 08030708 .word 0x08030708 08020b54 : * @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) { 8020b54: b5b0 push {r4, r5, r7, lr} 8020b56: b08a sub sp, #40 @ 0x28 8020b58: af00 add r7, sp, #0 8020b5a: 6078 str r0, [r7, #4] struct netif *netif; #if TCP_CWND_DEBUG s16_t i = 0; #endif /* TCP_CWND_DEBUG */ LWIP_ASSERT_CORE_LOCKED(); 8020b5c: f7f0 fa5e bl 801101c LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); 8020b60: 687b ldr r3, [r7, #4] 8020b62: 2b00 cmp r3, #0 8020b64: d106 bne.n 8020b74 8020b66: 4b8a ldr r3, [pc, #552] @ (8020d90 ) 8020b68: f240 42e1 movw r2, #1249 @ 0x4e1 8020b6c: 4989 ldr r1, [pc, #548] @ (8020d94 ) 8020b6e: 488a ldr r0, [pc, #552] @ (8020d98 ) 8020b70: f009 fe7c bl 802a86c /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_output for listen-pcbs", 8020b74: 687b ldr r3, [r7, #4] 8020b76: 7d1b ldrb r3, [r3, #20] 8020b78: 2b01 cmp r3, #1 8020b7a: d106 bne.n 8020b8a 8020b7c: 4b84 ldr r3, [pc, #528] @ (8020d90 ) 8020b7e: f240 42e3 movw r2, #1251 @ 0x4e3 8020b82: 4986 ldr r1, [pc, #536] @ (8020d9c ) 8020b84: 4884 ldr r0, [pc, #528] @ (8020d98 ) 8020b86: f009 fe71 bl 802a86c /* 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) { 8020b8a: 4b85 ldr r3, [pc, #532] @ (8020da0 ) 8020b8c: 681b ldr r3, [r3, #0] 8020b8e: 687a ldr r2, [r7, #4] 8020b90: 429a cmp r2, r3 8020b92: d101 bne.n 8020b98 return ERR_OK; 8020b94: 2300 movs r3, #0 8020b96: e1d1 b.n 8020f3c } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8020b98: 687b ldr r3, [r7, #4] 8020b9a: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 8020b9e: 687b ldr r3, [r7, #4] 8020ba0: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 8020ba4: 4293 cmp r3, r2 8020ba6: bf28 it cs 8020ba8: 4613 movcs r3, r2 8020baa: b29b uxth r3, r3 8020bac: 61bb str r3, [r7, #24] seg = pcb->unsent; 8020bae: 687b ldr r3, [r7, #4] 8020bb0: 6edb ldr r3, [r3, #108] @ 0x6c 8020bb2: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 8020bb4: 6a7b ldr r3, [r7, #36] @ 0x24 8020bb6: 2b00 cmp r3, #0 8020bb8: d10b bne.n 8020bd2 ", 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) { 8020bba: 687b ldr r3, [r7, #4] 8020bbc: 8b5b ldrh r3, [r3, #26] 8020bbe: f003 0302 and.w r3, r3, #2 8020bc2: 2b00 cmp r3, #0 8020bc4: f000 81ad beq.w 8020f22 return tcp_send_empty_ack(pcb); 8020bc8: 6878 ldr r0, [r7, #4] 8020bca: f000 fdd7 bl 802177c 8020bce: 4603 mov r3, r0 8020bd0: e1b4 b.n 8020f3c 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); 8020bd2: 6879 ldr r1, [r7, #4] 8020bd4: 687b ldr r3, [r7, #4] 8020bd6: 3304 adds r3, #4 8020bd8: 461a mov r2, r3 8020bda: 6878 ldr r0, [r7, #4] 8020bdc: f7fe ffc0 bl 801fb60 8020be0: 6178 str r0, [r7, #20] if (netif == NULL) { 8020be2: 697b ldr r3, [r7, #20] 8020be4: 2b00 cmp r3, #0 8020be6: d102 bne.n 8020bee return ERR_RTE; 8020be8: f06f 0303 mvn.w r3, #3 8020bec: e1a6 b.n 8020f3c } /* If we don't have a local IP address, we get one from netif */ if (ip_addr_isany(&pcb->local_ip)) { 8020bee: 687b ldr r3, [r7, #4] 8020bf0: 2b00 cmp r3, #0 8020bf2: d003 beq.n 8020bfc 8020bf4: 687b ldr r3, [r7, #4] 8020bf6: 681b ldr r3, [r3, #0] 8020bf8: 2b00 cmp r3, #0 8020bfa: d111 bne.n 8020c20 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); 8020bfc: 697b ldr r3, [r7, #20] 8020bfe: 2b00 cmp r3, #0 8020c00: d002 beq.n 8020c08 8020c02: 697b ldr r3, [r7, #20] 8020c04: 3304 adds r3, #4 8020c06: e000 b.n 8020c0a 8020c08: 2300 movs r3, #0 8020c0a: 613b str r3, [r7, #16] if (local_ip == NULL) { 8020c0c: 693b ldr r3, [r7, #16] 8020c0e: 2b00 cmp r3, #0 8020c10: d102 bne.n 8020c18 return ERR_RTE; 8020c12: f06f 0303 mvn.w r3, #3 8020c16: e191 b.n 8020f3c } ip_addr_copy(pcb->local_ip, *local_ip); 8020c18: 693b ldr r3, [r7, #16] 8020c1a: 681a ldr r2, [r3, #0] 8020c1c: 687b ldr r3, [r7, #4] 8020c1e: 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) { 8020c20: 6a7b ldr r3, [r7, #36] @ 0x24 8020c22: 691b ldr r3, [r3, #16] 8020c24: 685b ldr r3, [r3, #4] 8020c26: 4618 mov r0, r3 8020c28: f7f8 fedb bl 80199e2 8020c2c: 4602 mov r2, r0 8020c2e: 687b ldr r3, [r7, #4] 8020c30: 6c5b ldr r3, [r3, #68] @ 0x44 8020c32: 1ad3 subs r3, r2, r3 8020c34: 6a7a ldr r2, [r7, #36] @ 0x24 8020c36: 8912 ldrh r2, [r2, #8] 8020c38: 4413 add r3, r2 8020c3a: 69ba ldr r2, [r7, #24] 8020c3c: 429a cmp r2, r3 8020c3e: d227 bcs.n 8020c90 * 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) { 8020c40: 687b ldr r3, [r7, #4] 8020c42: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 8020c46: 461a mov r2, r3 8020c48: 69bb ldr r3, [r7, #24] 8020c4a: 4293 cmp r3, r2 8020c4c: d114 bne.n 8020c78 8020c4e: 687b ldr r3, [r7, #4] 8020c50: 6f1b ldr r3, [r3, #112] @ 0x70 8020c52: 2b00 cmp r3, #0 8020c54: d110 bne.n 8020c78 8020c56: 687b ldr r3, [r7, #4] 8020c58: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 8020c5c: 2b00 cmp r3, #0 8020c5e: d10b bne.n 8020c78 pcb->persist_cnt = 0; 8020c60: 687b ldr r3, [r7, #4] 8020c62: 2200 movs r2, #0 8020c64: f883 2098 strb.w r2, [r3, #152] @ 0x98 pcb->persist_backoff = 1; 8020c68: 687b ldr r3, [r7, #4] 8020c6a: 2201 movs r2, #1 8020c6c: f883 2099 strb.w r2, [r3, #153] @ 0x99 pcb->persist_probe = 0; 8020c70: 687b ldr r3, [r7, #4] 8020c72: 2200 movs r2, #0 8020c74: 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) { 8020c78: 687b ldr r3, [r7, #4] 8020c7a: 8b5b ldrh r3, [r3, #26] 8020c7c: f003 0302 and.w r3, r3, #2 8020c80: 2b00 cmp r3, #0 8020c82: f000 8150 beq.w 8020f26 return tcp_send_empty_ack(pcb); 8020c86: 6878 ldr r0, [r7, #4] 8020c88: f000 fd78 bl 802177c 8020c8c: 4603 mov r3, r0 8020c8e: e155 b.n 8020f3c } goto output_done; } /* Stop persist timer, above conditions are not active */ pcb->persist_backoff = 0; 8020c90: 687b ldr r3, [r7, #4] 8020c92: 2200 movs r2, #0 8020c94: f883 2099 strb.w r2, [r3, #153] @ 0x99 /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 8020c98: 687b ldr r3, [r7, #4] 8020c9a: 6f1b ldr r3, [r3, #112] @ 0x70 8020c9c: 623b str r3, [r7, #32] if (useg != NULL) { 8020c9e: 6a3b ldr r3, [r7, #32] 8020ca0: 2b00 cmp r3, #0 8020ca2: f000 811f beq.w 8020ee4 for (; useg->next != NULL; useg = useg->next); 8020ca6: e002 b.n 8020cae 8020ca8: 6a3b ldr r3, [r7, #32] 8020caa: 681b ldr r3, [r3, #0] 8020cac: 623b str r3, [r7, #32] 8020cae: 6a3b ldr r3, [r7, #32] 8020cb0: 681b ldr r3, [r3, #0] 8020cb2: 2b00 cmp r3, #0 8020cb4: d1f8 bne.n 8020ca8 } /* data available and window allows it to be sent? */ while (seg != NULL && 8020cb6: e115 b.n 8020ee4 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 8020cb8: 6a7b ldr r3, [r7, #36] @ 0x24 8020cba: 691b ldr r3, [r3, #16] 8020cbc: 899b ldrh r3, [r3, #12] 8020cbe: b29b uxth r3, r3 8020cc0: 4618 mov r0, r3 8020cc2: f7f8 fe79 bl 80199b8 8020cc6: 4603 mov r3, r0 8020cc8: b2db uxtb r3, r3 8020cca: f003 0304 and.w r3, r3, #4 8020cce: 2b00 cmp r3, #0 8020cd0: d006 beq.n 8020ce0 8020cd2: 4b2f ldr r3, [pc, #188] @ (8020d90 ) 8020cd4: f240 5236 movw r2, #1334 @ 0x536 8020cd8: 4932 ldr r1, [pc, #200] @ (8020da4 ) 8020cda: 482f ldr r0, [pc, #188] @ (8020d98 ) 8020cdc: f009 fdc6 bl 802a86c * - 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) && 8020ce0: 687b ldr r3, [r7, #4] 8020ce2: 6f1b ldr r3, [r3, #112] @ 0x70 8020ce4: 2b00 cmp r3, #0 8020ce6: d01f beq.n 8020d28 8020ce8: 687b ldr r3, [r7, #4] 8020cea: 8b5b ldrh r3, [r3, #26] 8020cec: f003 0344 and.w r3, r3, #68 @ 0x44 8020cf0: 2b00 cmp r3, #0 8020cf2: d119 bne.n 8020d28 8020cf4: 687b ldr r3, [r7, #4] 8020cf6: 6edb ldr r3, [r3, #108] @ 0x6c 8020cf8: 2b00 cmp r3, #0 8020cfa: d00b beq.n 8020d14 8020cfc: 687b ldr r3, [r7, #4] 8020cfe: 6edb ldr r3, [r3, #108] @ 0x6c 8020d00: 681b ldr r3, [r3, #0] 8020d02: 2b00 cmp r3, #0 8020d04: d110 bne.n 8020d28 8020d06: 687b ldr r3, [r7, #4] 8020d08: 6edb ldr r3, [r3, #108] @ 0x6c 8020d0a: 891a ldrh r2, [r3, #8] 8020d0c: 687b ldr r3, [r7, #4] 8020d0e: 8e5b ldrh r3, [r3, #50] @ 0x32 8020d10: 429a cmp r2, r3 8020d12: d209 bcs.n 8020d28 8020d14: 687b ldr r3, [r7, #4] 8020d16: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8020d1a: 2b00 cmp r3, #0 8020d1c: d004 beq.n 8020d28 8020d1e: 687b ldr r3, [r7, #4] 8020d20: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020d24: 2b0f cmp r3, #15 8020d26: d901 bls.n 8020d2c 8020d28: 2301 movs r3, #1 8020d2a: e000 b.n 8020d2e 8020d2c: 2300 movs r3, #0 8020d2e: 2b00 cmp r3, #0 8020d30: d106 bne.n 8020d40 ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { 8020d32: 687b ldr r3, [r7, #4] 8020d34: 8b5b ldrh r3, [r3, #26] 8020d36: f003 03a0 and.w r3, r3, #160 @ 0xa0 if ((tcp_do_output_nagle(pcb) == 0) && 8020d3a: 2b00 cmp r3, #0 8020d3c: f000 80e7 beq.w 8020f0e pcb->lastack, lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ if (pcb->state != SYN_SENT) { 8020d40: 687b ldr r3, [r7, #4] 8020d42: 7d1b ldrb r3, [r3, #20] 8020d44: 2b02 cmp r3, #2 8020d46: d00d beq.n 8020d64 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8020d48: 6a7b ldr r3, [r7, #36] @ 0x24 8020d4a: 691b ldr r3, [r3, #16] 8020d4c: 899b ldrh r3, [r3, #12] 8020d4e: b29c uxth r4, r3 8020d50: 2010 movs r0, #16 8020d52: f7f8 fe31 bl 80199b8 8020d56: 4603 mov r3, r0 8020d58: 461a mov r2, r3 8020d5a: 6a7b ldr r3, [r7, #36] @ 0x24 8020d5c: 691b ldr r3, [r3, #16] 8020d5e: 4322 orrs r2, r4 8020d60: b292 uxth r2, r2 8020d62: 819a strh r2, [r3, #12] } err = tcp_output_segment(seg, pcb, netif); 8020d64: 697a ldr r2, [r7, #20] 8020d66: 6879 ldr r1, [r7, #4] 8020d68: 6a78 ldr r0, [r7, #36] @ 0x24 8020d6a: f000 f90b bl 8020f84 8020d6e: 4603 mov r3, r0 8020d70: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8020d72: f997 300f ldrsb.w r3, [r7, #15] 8020d76: 2b00 cmp r3, #0 8020d78: d016 beq.n 8020da8 /* segment could not be sent, for whatever reason */ tcp_set_flags(pcb, TF_NAGLEMEMERR); 8020d7a: 687b ldr r3, [r7, #4] 8020d7c: 8b5b ldrh r3, [r3, #26] 8020d7e: f043 0380 orr.w r3, r3, #128 @ 0x80 8020d82: b29a uxth r2, r3 8020d84: 687b ldr r3, [r7, #4] 8020d86: 835a strh r2, [r3, #26] return err; 8020d88: f997 300f ldrsb.w r3, [r7, #15] 8020d8c: e0d6 b.n 8020f3c 8020d8e: bf00 nop 8020d90: 08030190 .word 0x08030190 8020d94: 08030730 .word 0x08030730 8020d98: 080301e4 .word 0x080301e4 8020d9c: 08030748 .word 0x08030748 8020da0: 2402afb8 .word 0x2402afb8 8020da4: 08030770 .word 0x08030770 } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 8020da8: 6a7b ldr r3, [r7, #36] @ 0x24 8020daa: 2200 movs r2, #0 8020dac: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; 8020dae: 6a7b ldr r3, [r7, #36] @ 0x24 8020db0: 681a ldr r2, [r3, #0] 8020db2: 687b ldr r3, [r7, #4] 8020db4: 66da str r2, [r3, #108] @ 0x6c if (pcb->state != SYN_SENT) { 8020db6: 687b ldr r3, [r7, #4] 8020db8: 7d1b ldrb r3, [r3, #20] 8020dba: 2b02 cmp r3, #2 8020dbc: d006 beq.n 8020dcc tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8020dbe: 687b ldr r3, [r7, #4] 8020dc0: 8b5b ldrh r3, [r3, #26] 8020dc2: f023 0303 bic.w r3, r3, #3 8020dc6: b29a uxth r2, r3 8020dc8: 687b ldr r3, [r7, #4] 8020dca: 835a strh r2, [r3, #26] } snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8020dcc: 6a7b ldr r3, [r7, #36] @ 0x24 8020dce: 691b ldr r3, [r3, #16] 8020dd0: 685b ldr r3, [r3, #4] 8020dd2: 4618 mov r0, r3 8020dd4: f7f8 fe05 bl 80199e2 8020dd8: 4604 mov r4, r0 8020dda: 6a7b ldr r3, [r7, #36] @ 0x24 8020ddc: 891b ldrh r3, [r3, #8] 8020dde: 461d mov r5, r3 8020de0: 6a7b ldr r3, [r7, #36] @ 0x24 8020de2: 691b ldr r3, [r3, #16] 8020de4: 899b ldrh r3, [r3, #12] 8020de6: b29b uxth r3, r3 8020de8: 4618 mov r0, r3 8020dea: f7f8 fde5 bl 80199b8 8020dee: 4603 mov r3, r0 8020df0: b2db uxtb r3, r3 8020df2: f003 0303 and.w r3, r3, #3 8020df6: 2b00 cmp r3, #0 8020df8: d001 beq.n 8020dfe 8020dfa: 2301 movs r3, #1 8020dfc: e000 b.n 8020e00 8020dfe: 2300 movs r3, #0 8020e00: 442b add r3, r5 8020e02: 4423 add r3, r4 8020e04: 60bb str r3, [r7, #8] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8020e06: 687b ldr r3, [r7, #4] 8020e08: 6d1a ldr r2, [r3, #80] @ 0x50 8020e0a: 68bb ldr r3, [r7, #8] 8020e0c: 1ad3 subs r3, r2, r3 8020e0e: 2b00 cmp r3, #0 8020e10: da02 bge.n 8020e18 pcb->snd_nxt = snd_nxt; 8020e12: 687b ldr r3, [r7, #4] 8020e14: 68ba ldr r2, [r7, #8] 8020e16: 651a str r2, [r3, #80] @ 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 8020e18: 6a7b ldr r3, [r7, #36] @ 0x24 8020e1a: 891b ldrh r3, [r3, #8] 8020e1c: 461c mov r4, r3 8020e1e: 6a7b ldr r3, [r7, #36] @ 0x24 8020e20: 691b ldr r3, [r3, #16] 8020e22: 899b ldrh r3, [r3, #12] 8020e24: b29b uxth r3, r3 8020e26: 4618 mov r0, r3 8020e28: f7f8 fdc6 bl 80199b8 8020e2c: 4603 mov r3, r0 8020e2e: b2db uxtb r3, r3 8020e30: f003 0303 and.w r3, r3, #3 8020e34: 2b00 cmp r3, #0 8020e36: d001 beq.n 8020e3c 8020e38: 2301 movs r3, #1 8020e3a: e000 b.n 8020e3e 8020e3c: 2300 movs r3, #0 8020e3e: 4423 add r3, r4 8020e40: 2b00 cmp r3, #0 8020e42: d049 beq.n 8020ed8 seg->next = NULL; 8020e44: 6a7b ldr r3, [r7, #36] @ 0x24 8020e46: 2200 movs r2, #0 8020e48: 601a str r2, [r3, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 8020e4a: 687b ldr r3, [r7, #4] 8020e4c: 6f1b ldr r3, [r3, #112] @ 0x70 8020e4e: 2b00 cmp r3, #0 8020e50: d105 bne.n 8020e5e pcb->unacked = seg; 8020e52: 687b ldr r3, [r7, #4] 8020e54: 6a7a ldr r2, [r7, #36] @ 0x24 8020e56: 671a str r2, [r3, #112] @ 0x70 useg = seg; 8020e58: 6a7b ldr r3, [r7, #36] @ 0x24 8020e5a: 623b str r3, [r7, #32] 8020e5c: e03f b.n 8020ede /* 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))) { 8020e5e: 6a7b ldr r3, [r7, #36] @ 0x24 8020e60: 691b ldr r3, [r3, #16] 8020e62: 685b ldr r3, [r3, #4] 8020e64: 4618 mov r0, r3 8020e66: f7f8 fdbc bl 80199e2 8020e6a: 4604 mov r4, r0 8020e6c: 6a3b ldr r3, [r7, #32] 8020e6e: 691b ldr r3, [r3, #16] 8020e70: 685b ldr r3, [r3, #4] 8020e72: 4618 mov r0, r3 8020e74: f7f8 fdb5 bl 80199e2 8020e78: 4603 mov r3, r0 8020e7a: 1ae3 subs r3, r4, r3 8020e7c: 2b00 cmp r3, #0 8020e7e: da24 bge.n 8020eca /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 8020e80: 687b ldr r3, [r7, #4] 8020e82: 3370 adds r3, #112 @ 0x70 8020e84: 61fb str r3, [r7, #28] while (*cur_seg && 8020e86: e002 b.n 8020e8e TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8020e88: 69fb ldr r3, [r7, #28] 8020e8a: 681b ldr r3, [r3, #0] 8020e8c: 61fb str r3, [r7, #28] while (*cur_seg && 8020e8e: 69fb ldr r3, [r7, #28] 8020e90: 681b ldr r3, [r3, #0] 8020e92: 2b00 cmp r3, #0 8020e94: d011 beq.n 8020eba TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 8020e96: 69fb ldr r3, [r7, #28] 8020e98: 681b ldr r3, [r3, #0] 8020e9a: 691b ldr r3, [r3, #16] 8020e9c: 685b ldr r3, [r3, #4] 8020e9e: 4618 mov r0, r3 8020ea0: f7f8 fd9f bl 80199e2 8020ea4: 4604 mov r4, r0 8020ea6: 6a7b ldr r3, [r7, #36] @ 0x24 8020ea8: 691b ldr r3, [r3, #16] 8020eaa: 685b ldr r3, [r3, #4] 8020eac: 4618 mov r0, r3 8020eae: f7f8 fd98 bl 80199e2 8020eb2: 4603 mov r3, r0 8020eb4: 1ae3 subs r3, r4, r3 while (*cur_seg && 8020eb6: 2b00 cmp r3, #0 8020eb8: dbe6 blt.n 8020e88 } seg->next = (*cur_seg); 8020eba: 69fb ldr r3, [r7, #28] 8020ebc: 681a ldr r2, [r3, #0] 8020ebe: 6a7b ldr r3, [r7, #36] @ 0x24 8020ec0: 601a str r2, [r3, #0] (*cur_seg) = seg; 8020ec2: 69fb ldr r3, [r7, #28] 8020ec4: 6a7a ldr r2, [r7, #36] @ 0x24 8020ec6: 601a str r2, [r3, #0] 8020ec8: e009 b.n 8020ede } else { /* add segment to tail of unacked list */ useg->next = seg; 8020eca: 6a3b ldr r3, [r7, #32] 8020ecc: 6a7a ldr r2, [r7, #36] @ 0x24 8020ece: 601a str r2, [r3, #0] useg = useg->next; 8020ed0: 6a3b ldr r3, [r7, #32] 8020ed2: 681b ldr r3, [r3, #0] 8020ed4: 623b str r3, [r7, #32] 8020ed6: e002 b.n 8020ede } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 8020ed8: 6a78 ldr r0, [r7, #36] @ 0x24 8020eda: f7fb fea8 bl 801cc2e } seg = pcb->unsent; 8020ede: 687b ldr r3, [r7, #4] 8020ee0: 6edb ldr r3, [r3, #108] @ 0x6c 8020ee2: 627b str r3, [r7, #36] @ 0x24 while (seg != NULL && 8020ee4: 6a7b ldr r3, [r7, #36] @ 0x24 8020ee6: 2b00 cmp r3, #0 8020ee8: d012 beq.n 8020f10 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 8020eea: 6a7b ldr r3, [r7, #36] @ 0x24 8020eec: 691b ldr r3, [r3, #16] 8020eee: 685b ldr r3, [r3, #4] 8020ef0: 4618 mov r0, r3 8020ef2: f7f8 fd76 bl 80199e2 8020ef6: 4602 mov r2, r0 8020ef8: 687b ldr r3, [r7, #4] 8020efa: 6c5b ldr r3, [r3, #68] @ 0x44 8020efc: 1ad3 subs r3, r2, r3 8020efe: 6a7a ldr r2, [r7, #36] @ 0x24 8020f00: 8912 ldrh r2, [r2, #8] 8020f02: 4413 add r3, r2 while (seg != NULL && 8020f04: 69ba ldr r2, [r7, #24] 8020f06: 429a cmp r2, r3 8020f08: f4bf aed6 bcs.w 8020cb8 8020f0c: e000 b.n 8020f10 break; 8020f0e: bf00 nop } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8020f10: 687b ldr r3, [r7, #4] 8020f12: 6edb ldr r3, [r3, #108] @ 0x6c 8020f14: 2b00 cmp r3, #0 8020f16: d108 bne.n 8020f2a /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 8020f18: 687b ldr r3, [r7, #4] 8020f1a: 2200 movs r2, #0 8020f1c: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 8020f20: e004 b.n 8020f2c goto output_done; 8020f22: bf00 nop 8020f24: e002 b.n 8020f2c goto output_done; 8020f26: bf00 nop 8020f28: e000 b.n 8020f2c } #endif /* TCP_OVERSIZE */ output_done: 8020f2a: bf00 nop tcp_clear_flags(pcb, TF_NAGLEMEMERR); 8020f2c: 687b ldr r3, [r7, #4] 8020f2e: 8b5b ldrh r3, [r3, #26] 8020f30: f023 0380 bic.w r3, r3, #128 @ 0x80 8020f34: b29a uxth r2, r3 8020f36: 687b ldr r3, [r7, #4] 8020f38: 835a strh r2, [r3, #26] return ERR_OK; 8020f3a: 2300 movs r3, #0 } 8020f3c: 4618 mov r0, r3 8020f3e: 3728 adds r7, #40 @ 0x28 8020f40: 46bd mov sp, r7 8020f42: bdb0 pop {r4, r5, r7, pc} 08020f44 : * @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) { 8020f44: b580 push {r7, lr} 8020f46: b082 sub sp, #8 8020f48: af00 add r7, sp, #0 8020f4a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 8020f4c: 687b ldr r3, [r7, #4] 8020f4e: 2b00 cmp r3, #0 8020f50: d106 bne.n 8020f60 8020f52: 4b09 ldr r3, [pc, #36] @ (8020f78 ) 8020f54: f240 529a movw r2, #1434 @ 0x59a 8020f58: 4908 ldr r1, [pc, #32] @ (8020f7c ) 8020f5a: 4809 ldr r0, [pc, #36] @ (8020f80 ) 8020f5c: f009 fc86 bl 802a86c /* 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) { 8020f60: 687b ldr r3, [r7, #4] 8020f62: 685b ldr r3, [r3, #4] 8020f64: 7b9b ldrb r3, [r3, #14] 8020f66: 2b01 cmp r3, #1 8020f68: d001 beq.n 8020f6e /* other reference found */ return 1; 8020f6a: 2301 movs r3, #1 8020f6c: e000 b.n 8020f70 } /* no other references found */ return 0; 8020f6e: 2300 movs r3, #0 } 8020f70: 4618 mov r0, r3 8020f72: 3708 adds r7, #8 8020f74: 46bd mov sp, r7 8020f76: bd80 pop {r7, pc} 8020f78: 08030190 .word 0x08030190 8020f7c: 08030788 .word 0x08030788 8020f80: 080301e4 .word 0x080301e4 08020f84 : * @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) { 8020f84: b5b0 push {r4, r5, r7, lr} 8020f86: b08c sub sp, #48 @ 0x30 8020f88: af04 add r7, sp, #16 8020f8a: 60f8 str r0, [r7, #12] 8020f8c: 60b9 str r1, [r7, #8] 8020f8e: 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); 8020f90: 68fb ldr r3, [r7, #12] 8020f92: 2b00 cmp r3, #0 8020f94: d106 bne.n 8020fa4 8020f96: 4b64 ldr r3, [pc, #400] @ (8021128 ) 8020f98: f44f 62b7 mov.w r2, #1464 @ 0x5b8 8020f9c: 4963 ldr r1, [pc, #396] @ (802112c ) 8020f9e: 4864 ldr r0, [pc, #400] @ (8021130 ) 8020fa0: f009 fc64 bl 802a86c LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 8020fa4: 68bb ldr r3, [r7, #8] 8020fa6: 2b00 cmp r3, #0 8020fa8: d106 bne.n 8020fb8 8020faa: 4b5f ldr r3, [pc, #380] @ (8021128 ) 8020fac: f240 52b9 movw r2, #1465 @ 0x5b9 8020fb0: 4960 ldr r1, [pc, #384] @ (8021134 ) 8020fb2: 485f ldr r0, [pc, #380] @ (8021130 ) 8020fb4: f009 fc5a bl 802a86c LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 8020fb8: 687b ldr r3, [r7, #4] 8020fba: 2b00 cmp r3, #0 8020fbc: d106 bne.n 8020fcc 8020fbe: 4b5a ldr r3, [pc, #360] @ (8021128 ) 8020fc0: f240 52ba movw r2, #1466 @ 0x5ba 8020fc4: 495c ldr r1, [pc, #368] @ (8021138 ) 8020fc6: 485a ldr r0, [pc, #360] @ (8021130 ) 8020fc8: f009 fc50 bl 802a86c if (tcp_output_segment_busy(seg)) { 8020fcc: 68f8 ldr r0, [r7, #12] 8020fce: f7ff ffb9 bl 8020f44 8020fd2: 4603 mov r3, r0 8020fd4: 2b00 cmp r3, #0 8020fd6: d001 beq.n 8020fdc /* 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; 8020fd8: 2300 movs r3, #0 8020fda: e0a1 b.n 8021120 } /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); 8020fdc: 68bb ldr r3, [r7, #8] 8020fde: 6a5a ldr r2, [r3, #36] @ 0x24 8020fe0: 68fb ldr r3, [r7, #12] 8020fe2: 691c ldr r4, [r3, #16] 8020fe4: 4610 mov r0, r2 8020fe6: f7f8 fcfc bl 80199e2 8020fea: 4603 mov r3, r0 8020fec: 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))); 8020fee: 68bb ldr r3, [r7, #8] 8020ff0: 8d5a ldrh r2, [r3, #42] @ 0x2a 8020ff2: 68fb ldr r3, [r7, #12] 8020ff4: 691c ldr r4, [r3, #16] 8020ff6: 4610 mov r0, r2 8020ff8: f7f8 fcde bl 80199b8 8020ffc: 4603 mov r3, r0 8020ffe: 81e3 strh r3, [r4, #14] } pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8021000: 68bb ldr r3, [r7, #8] 8021002: 6a5b ldr r3, [r3, #36] @ 0x24 8021004: 68ba ldr r2, [r7, #8] 8021006: 8d52 ldrh r2, [r2, #42] @ 0x2a 8021008: 441a add r2, r3 802100a: 68bb ldr r3, [r7, #8] 802100c: 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); 802100e: 68fb ldr r3, [r7, #12] 8021010: 691b ldr r3, [r3, #16] 8021012: 3314 adds r3, #20 8021014: 61fb str r3, [r7, #28] if (seg->flags & TF_SEG_OPTS_MSS) { 8021016: 68fb ldr r3, [r7, #12] 8021018: 7b1b ldrb r3, [r3, #12] 802101a: f003 0301 and.w r3, r3, #1 802101e: 2b00 cmp r3, #0 8021020: d015 beq.n 802104e u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); 8021022: 68bb ldr r3, [r7, #8] 8021024: 3304 adds r3, #4 8021026: 461a mov r2, r3 8021028: 6879 ldr r1, [r7, #4] 802102a: f240 50b4 movw r0, #1460 @ 0x5b4 802102e: f7fc f9cd bl 801d3cc 8021032: 4603 mov r3, r0 8021034: 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); 8021036: 8b7b ldrh r3, [r7, #26] 8021038: f043 7301 orr.w r3, r3, #33816576 @ 0x2040000 802103c: 4618 mov r0, r3 802103e: f7f8 fcd0 bl 80199e2 8021042: 4602 mov r2, r0 8021044: 69fb ldr r3, [r7, #28] 8021046: 601a str r2, [r3, #0] opts += 1; 8021048: 69fb ldr r3, [r7, #28] 802104a: 3304 adds r3, #4 802104c: 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) { 802104e: 68bb ldr r3, [r7, #8] 8021050: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 8021054: 2b00 cmp r3, #0 8021056: da02 bge.n 802105e pcb->rtime = 0; 8021058: 68bb ldr r3, [r7, #8] 802105a: 2200 movs r2, #0 802105c: 861a strh r2, [r3, #48] @ 0x30 } if (pcb->rttest == 0) { 802105e: 68bb ldr r3, [r7, #8] 8021060: 6b5b ldr r3, [r3, #52] @ 0x34 8021062: 2b00 cmp r3, #0 8021064: d10c bne.n 8021080 pcb->rttest = tcp_ticks; 8021066: 4b35 ldr r3, [pc, #212] @ (802113c ) 8021068: 681a ldr r2, [r3, #0] 802106a: 68bb ldr r3, [r7, #8] 802106c: 635a str r2, [r3, #52] @ 0x34 pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); 802106e: 68fb ldr r3, [r7, #12] 8021070: 691b ldr r3, [r3, #16] 8021072: 685b ldr r3, [r3, #4] 8021074: 4618 mov r0, r3 8021076: f7f8 fcb4 bl 80199e2 802107a: 4602 mov r2, r0 802107c: 68bb ldr r3, [r7, #8] 802107e: 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); 8021080: 68fb ldr r3, [r7, #12] 8021082: 691a ldr r2, [r3, #16] 8021084: 68fb ldr r3, [r7, #12] 8021086: 685b ldr r3, [r3, #4] 8021088: 685b ldr r3, [r3, #4] 802108a: 1ad3 subs r3, r2, r3 802108c: 833b strh r3, [r7, #24] if (len == 0) { /** Exclude retransmitted segments from this count. */ MIB2_STATS_INC(mib2.tcpoutsegs); } seg->p->len -= len; 802108e: 68fb ldr r3, [r7, #12] 8021090: 685b ldr r3, [r3, #4] 8021092: 8959 ldrh r1, [r3, #10] 8021094: 68fb ldr r3, [r7, #12] 8021096: 685b ldr r3, [r3, #4] 8021098: 8b3a ldrh r2, [r7, #24] 802109a: 1a8a subs r2, r1, r2 802109c: b292 uxth r2, r2 802109e: 815a strh r2, [r3, #10] seg->p->tot_len -= len; 80210a0: 68fb ldr r3, [r7, #12] 80210a2: 685b ldr r3, [r3, #4] 80210a4: 8919 ldrh r1, [r3, #8] 80210a6: 68fb ldr r3, [r7, #12] 80210a8: 685b ldr r3, [r3, #4] 80210aa: 8b3a ldrh r2, [r7, #24] 80210ac: 1a8a subs r2, r1, r2 80210ae: b292 uxth r2, r2 80210b0: 811a strh r2, [r3, #8] seg->p->payload = seg->tcphdr; 80210b2: 68fb ldr r3, [r7, #12] 80210b4: 685b ldr r3, [r3, #4] 80210b6: 68fa ldr r2, [r7, #12] 80210b8: 6912 ldr r2, [r2, #16] 80210ba: 605a str r2, [r3, #4] seg->tcphdr->chksum = 0; 80210bc: 68fb ldr r3, [r7, #12] 80210be: 691b ldr r3, [r3, #16] 80210c0: 2200 movs r2, #0 80210c2: 741a strb r2, [r3, #16] 80210c4: 2200 movs r2, #0 80210c6: 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)); 80210c8: 68fb ldr r3, [r7, #12] 80210ca: 691a ldr r2, [r3, #16] 80210cc: 68fb ldr r3, [r7, #12] 80210ce: 7b1b ldrb r3, [r3, #12] 80210d0: f003 0301 and.w r3, r3, #1 80210d4: 2b00 cmp r3, #0 80210d6: d001 beq.n 80210dc 80210d8: 2318 movs r3, #24 80210da: e000 b.n 80210de 80210dc: 2314 movs r3, #20 80210de: 4413 add r3, r2 80210e0: 69fa ldr r2, [r7, #28] 80210e2: 429a cmp r2, r3 80210e4: d006 beq.n 80210f4 80210e6: 4b10 ldr r3, [pc, #64] @ (8021128 ) 80210e8: f240 621c movw r2, #1564 @ 0x61c 80210ec: 4914 ldr r1, [pc, #80] @ (8021140 ) 80210ee: 4810 ldr r0, [pc, #64] @ (8021130 ) 80210f0: f009 fbbc bl 802a86c } #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, 80210f4: 68fb ldr r3, [r7, #12] 80210f6: 6858 ldr r0, [r3, #4] 80210f8: 68b9 ldr r1, [r7, #8] 80210fa: 68bb ldr r3, [r7, #8] 80210fc: 1d1c adds r4, r3, #4 80210fe: 68bb ldr r3, [r7, #8] 8021100: 7add ldrb r5, [r3, #11] 8021102: 68bb ldr r3, [r7, #8] 8021104: 7a9b ldrb r3, [r3, #10] 8021106: 687a ldr r2, [r7, #4] 8021108: 9202 str r2, [sp, #8] 802110a: 2206 movs r2, #6 802110c: 9201 str r2, [sp, #4] 802110e: 9300 str r3, [sp, #0] 8021110: 462b mov r3, r5 8021112: 4622 mov r2, r4 8021114: f004 fd7a bl 8025c0c 8021118: 4603 mov r3, r0 802111a: 75fb strb r3, [r7, #23] seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); seg->chksum_swapped = 1; } #endif return err; 802111c: f997 3017 ldrsb.w r3, [r7, #23] } 8021120: 4618 mov r0, r3 8021122: 3720 adds r7, #32 8021124: 46bd mov sp, r7 8021126: bdb0 pop {r4, r5, r7, pc} 8021128: 08030190 .word 0x08030190 802112c: 080307b0 .word 0x080307b0 8021130: 080301e4 .word 0x080301e4 8021134: 080307d0 .word 0x080307d0 8021138: 080307f0 .word 0x080307f0 802113c: 2402af68 .word 0x2402af68 8021140: 08030814 .word 0x08030814 08021144 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb) { 8021144: b5b0 push {r4, r5, r7, lr} 8021146: b084 sub sp, #16 8021148: af00 add r7, sp, #0 802114a: 6078 str r0, [r7, #4] struct tcp_seg *seg; LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 802114c: 687b ldr r3, [r7, #4] 802114e: 2b00 cmp r3, #0 8021150: d106 bne.n 8021160 8021152: 4b36 ldr r3, [pc, #216] @ (802122c ) 8021154: f240 6263 movw r2, #1635 @ 0x663 8021158: 4935 ldr r1, [pc, #212] @ (8021230 ) 802115a: 4836 ldr r0, [pc, #216] @ (8021234 ) 802115c: f009 fb86 bl 802a86c if (pcb->unacked == NULL) { 8021160: 687b ldr r3, [r7, #4] 8021162: 6f1b ldr r3, [r3, #112] @ 0x70 8021164: 2b00 cmp r3, #0 8021166: d102 bne.n 802116e return ERR_VAL; 8021168: f06f 0305 mvn.w r3, #5 802116c: e059 b.n 8021222 /* 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) { 802116e: 687b ldr r3, [r7, #4] 8021170: 6f1b ldr r3, [r3, #112] @ 0x70 8021172: 60fb str r3, [r7, #12] 8021174: e00b b.n 802118e if (tcp_output_segment_busy(seg)) { 8021176: 68f8 ldr r0, [r7, #12] 8021178: f7ff fee4 bl 8020f44 802117c: 4603 mov r3, r0 802117e: 2b00 cmp r3, #0 8021180: d002 beq.n 8021188 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 8021182: f06f 0305 mvn.w r3, #5 8021186: e04c b.n 8021222 for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 8021188: 68fb ldr r3, [r7, #12] 802118a: 681b ldr r3, [r3, #0] 802118c: 60fb str r3, [r7, #12] 802118e: 68fb ldr r3, [r7, #12] 8021190: 681b ldr r3, [r3, #0] 8021192: 2b00 cmp r3, #0 8021194: d1ef bne.n 8021176 } } if (tcp_output_segment_busy(seg)) { 8021196: 68f8 ldr r0, [r7, #12] 8021198: f7ff fed4 bl 8020f44 802119c: 4603 mov r3, r0 802119e: 2b00 cmp r3, #0 80211a0: d002 beq.n 80211a8 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 80211a2: f06f 0305 mvn.w r3, #5 80211a6: e03c b.n 8021222 } /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 80211a8: 687b ldr r3, [r7, #4] 80211aa: 6eda ldr r2, [r3, #108] @ 0x6c 80211ac: 68fb ldr r3, [r7, #12] 80211ae: 601a str r2, [r3, #0] #if TCP_OVERSIZE_DBGCHECK /* if last unsent changed, we need to update unsent_oversize */ if (pcb->unsent == NULL) { 80211b0: 687b ldr r3, [r7, #4] 80211b2: 6edb ldr r3, [r3, #108] @ 0x6c 80211b4: 2b00 cmp r3, #0 80211b6: d104 bne.n 80211c2 pcb->unsent_oversize = seg->oversize_left; 80211b8: 68fb ldr r3, [r7, #12] 80211ba: 895a ldrh r2, [r3, #10] 80211bc: 687b ldr r3, [r7, #4] 80211be: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE_DBGCHECK */ /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 80211c2: 687b ldr r3, [r7, #4] 80211c4: 6f1a ldr r2, [r3, #112] @ 0x70 80211c6: 687b ldr r3, [r7, #4] 80211c8: 66da str r2, [r3, #108] @ 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; 80211ca: 687b ldr r3, [r7, #4] 80211cc: 2200 movs r2, #0 80211ce: 671a str r2, [r3, #112] @ 0x70 /* Mark RTO in-progress */ tcp_set_flags(pcb, TF_RTO); 80211d0: 687b ldr r3, [r7, #4] 80211d2: 8b5b ldrh r3, [r3, #26] 80211d4: f443 6300 orr.w r3, r3, #2048 @ 0x800 80211d8: b29a uxth r2, r3 80211da: 687b ldr r3, [r7, #4] 80211dc: 835a strh r2, [r3, #26] /* Record the next byte following retransmit */ pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 80211de: 68fb ldr r3, [r7, #12] 80211e0: 691b ldr r3, [r3, #16] 80211e2: 685b ldr r3, [r3, #4] 80211e4: 4618 mov r0, r3 80211e6: f7f8 fbfc bl 80199e2 80211ea: 4604 mov r4, r0 80211ec: 68fb ldr r3, [r7, #12] 80211ee: 891b ldrh r3, [r3, #8] 80211f0: 461d mov r5, r3 80211f2: 68fb ldr r3, [r7, #12] 80211f4: 691b ldr r3, [r3, #16] 80211f6: 899b ldrh r3, [r3, #12] 80211f8: b29b uxth r3, r3 80211fa: 4618 mov r0, r3 80211fc: f7f8 fbdc bl 80199b8 8021200: 4603 mov r3, r0 8021202: b2db uxtb r3, r3 8021204: f003 0303 and.w r3, r3, #3 8021208: 2b00 cmp r3, #0 802120a: d001 beq.n 8021210 802120c: 2301 movs r3, #1 802120e: e000 b.n 8021212 8021210: 2300 movs r3, #0 8021212: 442b add r3, r5 8021214: 18e2 adds r2, r4, r3 8021216: 687b ldr r3, [r7, #4] 8021218: 64da str r2, [r3, #76] @ 0x4c /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 802121a: 687b ldr r3, [r7, #4] 802121c: 2200 movs r2, #0 802121e: 635a str r2, [r3, #52] @ 0x34 return ERR_OK; 8021220: 2300 movs r3, #0 } 8021222: 4618 mov r0, r3 8021224: 3710 adds r7, #16 8021226: 46bd mov sp, r7 8021228: bdb0 pop {r4, r5, r7, pc} 802122a: bf00 nop 802122c: 08030190 .word 0x08030190 8021230: 08030828 .word 0x08030828 8021234: 080301e4 .word 0x080301e4 08021238 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto_commit(struct tcp_pcb *pcb) { 8021238: b580 push {r7, lr} 802123a: b082 sub sp, #8 802123c: af00 add r7, sp, #0 802123e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 8021240: 687b ldr r3, [r7, #4] 8021242: 2b00 cmp r3, #0 8021244: d106 bne.n 8021254 8021246: 4b0d ldr r3, [pc, #52] @ (802127c ) 8021248: f44f 62d3 mov.w r2, #1688 @ 0x698 802124c: 490c ldr r1, [pc, #48] @ (8021280 ) 802124e: 480d ldr r0, [pc, #52] @ (8021284 ) 8021250: f009 fb0c bl 802a86c /* increment number of retransmissions */ if (pcb->nrtx < 0xFF) { 8021254: 687b ldr r3, [r7, #4] 8021256: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 802125a: 2bff cmp r3, #255 @ 0xff 802125c: d007 beq.n 802126e ++pcb->nrtx; 802125e: 687b ldr r3, [r7, #4] 8021260: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 8021264: 3301 adds r3, #1 8021266: b2da uxtb r2, r3 8021268: 687b ldr r3, [r7, #4] 802126a: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Do the actual retransmission */ tcp_output(pcb); 802126e: 6878 ldr r0, [r7, #4] 8021270: f7ff fc70 bl 8020b54 } 8021274: bf00 nop 8021276: 3708 adds r7, #8 8021278: 46bd mov sp, r7 802127a: bd80 pop {r7, pc} 802127c: 08030190 .word 0x08030190 8021280: 0803084c .word 0x0803084c 8021284: 080301e4 .word 0x080301e4 08021288 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 8021288: b580 push {r7, lr} 802128a: b082 sub sp, #8 802128c: af00 add r7, sp, #0 802128e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 8021290: 687b ldr r3, [r7, #4] 8021292: 2b00 cmp r3, #0 8021294: d106 bne.n 80212a4 8021296: 4b0a ldr r3, [pc, #40] @ (80212c0 ) 8021298: f240 62ad movw r2, #1709 @ 0x6ad 802129c: 4909 ldr r1, [pc, #36] @ (80212c4 ) 802129e: 480a ldr r0, [pc, #40] @ (80212c8 ) 80212a0: f009 fae4 bl 802a86c if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { 80212a4: 6878 ldr r0, [r7, #4] 80212a6: f7ff ff4d bl 8021144 80212aa: 4603 mov r3, r0 80212ac: 2b00 cmp r3, #0 80212ae: d102 bne.n 80212b6 tcp_rexmit_rto_commit(pcb); 80212b0: 6878 ldr r0, [r7, #4] 80212b2: f7ff ffc1 bl 8021238 } } 80212b6: bf00 nop 80212b8: 3708 adds r7, #8 80212ba: 46bd mov sp, r7 80212bc: bd80 pop {r7, pc} 80212be: bf00 nop 80212c0: 08030190 .word 0x08030190 80212c4: 08030870 .word 0x08030870 80212c8: 080301e4 .word 0x080301e4 080212cc : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ err_t tcp_rexmit(struct tcp_pcb *pcb) { 80212cc: b590 push {r4, r7, lr} 80212ce: b085 sub sp, #20 80212d0: af00 add r7, sp, #0 80212d2: 6078 str r0, [r7, #4] struct tcp_seg *seg; struct tcp_seg **cur_seg; LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 80212d4: 687b ldr r3, [r7, #4] 80212d6: 2b00 cmp r3, #0 80212d8: d106 bne.n 80212e8 80212da: 4b2f ldr r3, [pc, #188] @ (8021398 ) 80212dc: f240 62c1 movw r2, #1729 @ 0x6c1 80212e0: 492e ldr r1, [pc, #184] @ (802139c ) 80212e2: 482f ldr r0, [pc, #188] @ (80213a0 ) 80212e4: f009 fac2 bl 802a86c if (pcb->unacked == NULL) { 80212e8: 687b ldr r3, [r7, #4] 80212ea: 6f1b ldr r3, [r3, #112] @ 0x70 80212ec: 2b00 cmp r3, #0 80212ee: d102 bne.n 80212f6 return ERR_VAL; 80212f0: f06f 0305 mvn.w r3, #5 80212f4: e04c b.n 8021390 } seg = pcb->unacked; 80212f6: 687b ldr r3, [r7, #4] 80212f8: 6f1b ldr r3, [r3, #112] @ 0x70 80212fa: 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)) { 80212fc: 68b8 ldr r0, [r7, #8] 80212fe: f7ff fe21 bl 8020f44 8021302: 4603 mov r3, r0 8021304: 2b00 cmp r3, #0 8021306: d002 beq.n 802130e LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n")); return ERR_VAL; 8021308: f06f 0305 mvn.w r3, #5 802130c: e040 b.n 8021390 } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ pcb->unacked = seg->next; 802130e: 68bb ldr r3, [r7, #8] 8021310: 681a ldr r2, [r3, #0] 8021312: 687b ldr r3, [r7, #4] 8021314: 671a str r2, [r3, #112] @ 0x70 cur_seg = &(pcb->unsent); 8021316: 687b ldr r3, [r7, #4] 8021318: 336c adds r3, #108 @ 0x6c 802131a: 60fb str r3, [r7, #12] while (*cur_seg && 802131c: e002 b.n 8021324 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802131e: 68fb ldr r3, [r7, #12] 8021320: 681b ldr r3, [r3, #0] 8021322: 60fb str r3, [r7, #12] while (*cur_seg && 8021324: 68fb ldr r3, [r7, #12] 8021326: 681b ldr r3, [r3, #0] 8021328: 2b00 cmp r3, #0 802132a: d011 beq.n 8021350 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 802132c: 68fb ldr r3, [r7, #12] 802132e: 681b ldr r3, [r3, #0] 8021330: 691b ldr r3, [r3, #16] 8021332: 685b ldr r3, [r3, #4] 8021334: 4618 mov r0, r3 8021336: f7f8 fb54 bl 80199e2 802133a: 4604 mov r4, r0 802133c: 68bb ldr r3, [r7, #8] 802133e: 691b ldr r3, [r3, #16] 8021340: 685b ldr r3, [r3, #4] 8021342: 4618 mov r0, r3 8021344: f7f8 fb4d bl 80199e2 8021348: 4603 mov r3, r0 802134a: 1ae3 subs r3, r4, r3 while (*cur_seg && 802134c: 2b00 cmp r3, #0 802134e: dbe6 blt.n 802131e } seg->next = *cur_seg; 8021350: 68fb ldr r3, [r7, #12] 8021352: 681a ldr r2, [r3, #0] 8021354: 68bb ldr r3, [r7, #8] 8021356: 601a str r2, [r3, #0] *cur_seg = seg; 8021358: 68fb ldr r3, [r7, #12] 802135a: 68ba ldr r2, [r7, #8] 802135c: 601a str r2, [r3, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 802135e: 68bb ldr r3, [r7, #8] 8021360: 681b ldr r3, [r3, #0] 8021362: 2b00 cmp r3, #0 8021364: d103 bne.n 802136e /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 8021366: 687b ldr r3, [r7, #4] 8021368: 2200 movs r2, #0 802136a: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ if (pcb->nrtx < 0xFF) { 802136e: 687b ldr r3, [r7, #4] 8021370: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 8021374: 2bff cmp r3, #255 @ 0xff 8021376: d007 beq.n 8021388 ++pcb->nrtx; 8021378: 687b ldr r3, [r7, #4] 802137a: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 802137e: 3301 adds r3, #1 8021380: b2da uxtb r2, r3 8021382: 687b ldr r3, [r7, #4] 8021384: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 8021388: 687b ldr r3, [r7, #4] 802138a: 2200 movs r2, #0 802138c: 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; 802138e: 2300 movs r3, #0 } 8021390: 4618 mov r0, r3 8021392: 3714 adds r7, #20 8021394: 46bd mov sp, r7 8021396: bd90 pop {r4, r7, pc} 8021398: 08030190 .word 0x08030190 802139c: 0803088c .word 0x0803088c 80213a0: 080301e4 .word 0x080301e4 080213a4 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 80213a4: b580 push {r7, lr} 80213a6: b082 sub sp, #8 80213a8: af00 add r7, sp, #0 80213aa: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 80213ac: 687b ldr r3, [r7, #4] 80213ae: 2b00 cmp r3, #0 80213b0: d106 bne.n 80213c0 80213b2: 4b2a ldr r3, [pc, #168] @ (802145c ) 80213b4: f240 62f9 movw r2, #1785 @ 0x6f9 80213b8: 4929 ldr r1, [pc, #164] @ (8021460 ) 80213ba: 482a ldr r0, [pc, #168] @ (8021464 ) 80213bc: f009 fa56 bl 802a86c if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 80213c0: 687b ldr r3, [r7, #4] 80213c2: 6f1b ldr r3, [r3, #112] @ 0x70 80213c4: 2b00 cmp r3, #0 80213c6: d045 beq.n 8021454 80213c8: 687b ldr r3, [r7, #4] 80213ca: 8b5b ldrh r3, [r3, #26] 80213cc: f003 0304 and.w r3, r3, #4 80213d0: 2b00 cmp r3, #0 80213d2: d13f bne.n 8021454 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) { 80213d4: 6878 ldr r0, [r7, #4] 80213d6: f7ff ff79 bl 80212cc 80213da: 4603 mov r3, r0 80213dc: 2b00 cmp r3, #0 80213de: d139 bne.n 8021454 /* 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; 80213e0: 687b ldr r3, [r7, #4] 80213e2: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 80213e6: 687b ldr r3, [r7, #4] 80213e8: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 80213ec: 4293 cmp r3, r2 80213ee: bf28 it cs 80213f0: 4613 movcs r3, r2 80213f2: b29b uxth r3, r3 80213f4: 2b00 cmp r3, #0 80213f6: da00 bge.n 80213fa 80213f8: 3301 adds r3, #1 80213fa: 105b asrs r3, r3, #1 80213fc: b29a uxth r2, r3 80213fe: 687b ldr r3, [r7, #4] 8021400: f8a3 204a strh.w r2, [r3, #74] @ 0x4a /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < (2U * pcb->mss)) { 8021404: 687b ldr r3, [r7, #4] 8021406: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 802140a: 461a mov r2, r3 802140c: 687b ldr r3, [r7, #4] 802140e: 8e5b ldrh r3, [r3, #50] @ 0x32 8021410: 005b lsls r3, r3, #1 8021412: 429a cmp r2, r3 8021414: d206 bcs.n 8021424 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; 8021416: 687b ldr r3, [r7, #4] 8021418: 8e5b ldrh r3, [r3, #50] @ 0x32 802141a: 005b lsls r3, r3, #1 802141c: b29a uxth r2, r3 802141e: 687b ldr r3, [r7, #4] 8021420: f8a3 204a strh.w r2, [r3, #74] @ 0x4a } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8021424: 687b ldr r3, [r7, #4] 8021426: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 802142a: 687b ldr r3, [r7, #4] 802142c: 8e5b ldrh r3, [r3, #50] @ 0x32 802142e: 4619 mov r1, r3 8021430: 0049 lsls r1, r1, #1 8021432: 440b add r3, r1 8021434: b29b uxth r3, r3 8021436: 4413 add r3, r2 8021438: b29a uxth r2, r3 802143a: 687b ldr r3, [r7, #4] 802143c: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 tcp_set_flags(pcb, TF_INFR); 8021440: 687b ldr r3, [r7, #4] 8021442: 8b5b ldrh r3, [r3, #26] 8021444: f043 0304 orr.w r3, r3, #4 8021448: b29a uxth r2, r3 802144a: 687b ldr r3, [r7, #4] 802144c: 835a strh r2, [r3, #26] /* Reset the retransmission timer to prevent immediate rto retransmissions */ pcb->rtime = 0; 802144e: 687b ldr r3, [r7, #4] 8021450: 2200 movs r2, #0 8021452: 861a strh r2, [r3, #48] @ 0x30 } } } 8021454: bf00 nop 8021456: 3708 adds r7, #8 8021458: 46bd mov sp, r7 802145a: bd80 pop {r7, pc} 802145c: 08030190 .word 0x08030190 8021460: 080308a4 .word 0x080308a4 8021464: 080301e4 .word 0x080301e4 08021468 : 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) { 8021468: b580 push {r7, lr} 802146a: b086 sub sp, #24 802146c: af00 add r7, sp, #0 802146e: 60f8 str r0, [r7, #12] 8021470: 607b str r3, [r7, #4] 8021472: 460b mov r3, r1 8021474: 817b strh r3, [r7, #10] 8021476: 4613 mov r3, r2 8021478: 813b strh r3, [r7, #8] struct tcp_hdr *tcphdr; struct pbuf *p; p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 802147a: 897a ldrh r2, [r7, #10] 802147c: 893b ldrh r3, [r7, #8] 802147e: 4413 add r3, r2 8021480: b29b uxth r3, r3 8021482: 3314 adds r3, #20 8021484: b29b uxth r3, r3 8021486: f44f 7220 mov.w r2, #640 @ 0x280 802148a: 4619 mov r1, r3 802148c: 2022 movs r0, #34 @ 0x22 802148e: f7f9 fc5f bl 801ad50 8021492: 6178 str r0, [r7, #20] if (p != NULL) { 8021494: 697b ldr r3, [r7, #20] 8021496: 2b00 cmp r3, #0 8021498: d04d beq.n 8021536 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 802149a: 897b ldrh r3, [r7, #10] 802149c: 3313 adds r3, #19 802149e: 697a ldr r2, [r7, #20] 80214a0: 8952 ldrh r2, [r2, #10] 80214a2: 4293 cmp r3, r2 80214a4: db06 blt.n 80214b4 80214a6: 4b26 ldr r3, [pc, #152] @ (8021540 ) 80214a8: f240 7223 movw r2, #1827 @ 0x723 80214ac: 4925 ldr r1, [pc, #148] @ (8021544 ) 80214ae: 4826 ldr r0, [pc, #152] @ (8021548 ) 80214b0: f009 f9dc bl 802a86c (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 80214b4: 697b ldr r3, [r7, #20] 80214b6: 685b ldr r3, [r3, #4] 80214b8: 613b str r3, [r7, #16] tcphdr->src = lwip_htons(src_port); 80214ba: 8c3b ldrh r3, [r7, #32] 80214bc: 4618 mov r0, r3 80214be: f7f8 fa7b bl 80199b8 80214c2: 4603 mov r3, r0 80214c4: 461a mov r2, r3 80214c6: 693b ldr r3, [r7, #16] 80214c8: 801a strh r2, [r3, #0] tcphdr->dest = lwip_htons(dst_port); 80214ca: 8cbb ldrh r3, [r7, #36] @ 0x24 80214cc: 4618 mov r0, r3 80214ce: f7f8 fa73 bl 80199b8 80214d2: 4603 mov r3, r0 80214d4: 461a mov r2, r3 80214d6: 693b ldr r3, [r7, #16] 80214d8: 805a strh r2, [r3, #2] tcphdr->seqno = seqno_be; 80214da: 693b ldr r3, [r7, #16] 80214dc: 687a ldr r2, [r7, #4] 80214de: 605a str r2, [r3, #4] tcphdr->ackno = lwip_htonl(ackno); 80214e0: 68f8 ldr r0, [r7, #12] 80214e2: f7f8 fa7e bl 80199e2 80214e6: 4602 mov r2, r0 80214e8: 693b ldr r3, [r7, #16] 80214ea: 609a str r2, [r3, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); 80214ec: 897b ldrh r3, [r7, #10] 80214ee: 089b lsrs r3, r3, #2 80214f0: b29b uxth r3, r3 80214f2: 3305 adds r3, #5 80214f4: b29b uxth r3, r3 80214f6: 031b lsls r3, r3, #12 80214f8: b29a uxth r2, r3 80214fa: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 80214fe: b29b uxth r3, r3 8021500: 4313 orrs r3, r2 8021502: b29b uxth r3, r3 8021504: 4618 mov r0, r3 8021506: f7f8 fa57 bl 80199b8 802150a: 4603 mov r3, r0 802150c: 461a mov r2, r3 802150e: 693b ldr r3, [r7, #16] 8021510: 819a strh r2, [r3, #12] tcphdr->wnd = lwip_htons(wnd); 8021512: 8dbb ldrh r3, [r7, #44] @ 0x2c 8021514: 4618 mov r0, r3 8021516: f7f8 fa4f bl 80199b8 802151a: 4603 mov r3, r0 802151c: 461a mov r2, r3 802151e: 693b ldr r3, [r7, #16] 8021520: 81da strh r2, [r3, #14] tcphdr->chksum = 0; 8021522: 693b ldr r3, [r7, #16] 8021524: 2200 movs r2, #0 8021526: 741a strb r2, [r3, #16] 8021528: 2200 movs r2, #0 802152a: 745a strb r2, [r3, #17] tcphdr->urgp = 0; 802152c: 693b ldr r3, [r7, #16] 802152e: 2200 movs r2, #0 8021530: 749a strb r2, [r3, #18] 8021532: 2200 movs r2, #0 8021534: 74da strb r2, [r3, #19] } return p; 8021536: 697b ldr r3, [r7, #20] } 8021538: 4618 mov r0, r3 802153a: 3718 adds r7, #24 802153c: 46bd mov sp, r7 802153e: bd80 pop {r7, pc} 8021540: 08030190 .word 0x08030190 8021544: 080308c4 .word 0x080308c4 8021548: 080301e4 .word 0x080301e4 0802154c : * @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 */) { 802154c: b5b0 push {r4, r5, r7, lr} 802154e: b08a sub sp, #40 @ 0x28 8021550: af04 add r7, sp, #16 8021552: 60f8 str r0, [r7, #12] 8021554: 607b str r3, [r7, #4] 8021556: 460b mov r3, r1 8021558: 817b strh r3, [r7, #10] 802155a: 4613 mov r3, r2 802155c: 813b strh r3, [r7, #8] struct pbuf *p; LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 802155e: 68fb ldr r3, [r7, #12] 8021560: 2b00 cmp r3, #0 8021562: d106 bne.n 8021572 8021564: 4b15 ldr r3, [pc, #84] @ (80215bc ) 8021566: f240 7242 movw r2, #1858 @ 0x742 802156a: 4915 ldr r1, [pc, #84] @ (80215c0 ) 802156c: 4815 ldr r0, [pc, #84] @ (80215c4 ) 802156e: f009 f97d bl 802a86c p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, 8021572: 68fb ldr r3, [r7, #12] 8021574: 6a58 ldr r0, [r3, #36] @ 0x24 8021576: 68fb ldr r3, [r7, #12] 8021578: 8adb ldrh r3, [r3, #22] 802157a: 68fa ldr r2, [r7, #12] 802157c: 8b12 ldrh r2, [r2, #24] 802157e: 68f9 ldr r1, [r7, #12] 8021580: 8d49 ldrh r1, [r1, #42] @ 0x2a 8021582: 893d ldrh r5, [r7, #8] 8021584: 897c ldrh r4, [r7, #10] 8021586: 9103 str r1, [sp, #12] 8021588: 2110 movs r1, #16 802158a: 9102 str r1, [sp, #8] 802158c: 9201 str r2, [sp, #4] 802158e: 9300 str r3, [sp, #0] 8021590: 687b ldr r3, [r7, #4] 8021592: 462a mov r2, r5 8021594: 4621 mov r1, r4 8021596: f7ff ff67 bl 8021468 802159a: 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) { 802159c: 697b ldr r3, [r7, #20] 802159e: 2b00 cmp r3, #0 80215a0: d006 beq.n 80215b0 /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 80215a2: 68fb ldr r3, [r7, #12] 80215a4: 6a5b ldr r3, [r3, #36] @ 0x24 80215a6: 68fa ldr r2, [r7, #12] 80215a8: 8d52 ldrh r2, [r2, #42] @ 0x2a 80215aa: 441a add r2, r3 80215ac: 68fb ldr r3, [r7, #12] 80215ae: 62da str r2, [r3, #44] @ 0x2c } return p; 80215b0: 697b ldr r3, [r7, #20] } 80215b2: 4618 mov r0, r3 80215b4: 3718 adds r7, #24 80215b6: 46bd mov sp, r7 80215b8: bdb0 pop {r4, r5, r7, pc} 80215ba: bf00 nop 80215bc: 08030190 .word 0x08030190 80215c0: 080308f4 .word 0x080308f4 80215c4: 080301e4 .word 0x080301e4 080215c8 : /* 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) { 80215c8: b580 push {r7, lr} 80215ca: b088 sub sp, #32 80215cc: af00 add r7, sp, #0 80215ce: 60f8 str r0, [r7, #12] 80215d0: 60b9 str r1, [r7, #8] 80215d2: 4611 mov r1, r2 80215d4: 461a mov r2, r3 80215d6: 460b mov r3, r1 80215d8: 71fb strb r3, [r7, #7] 80215da: 4613 mov r3, r2 80215dc: 71bb strb r3, [r7, #6] struct tcp_hdr *tcphdr; u32_t *opts; u16_t sacks_len = 0; 80215de: 2300 movs r3, #0 80215e0: 83fb strh r3, [r7, #30] LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 80215e2: 68bb ldr r3, [r7, #8] 80215e4: 2b00 cmp r3, #0 80215e6: d106 bne.n 80215f6 80215e8: 4b12 ldr r3, [pc, #72] @ (8021634 ) 80215ea: f240 7256 movw r2, #1878 @ 0x756 80215ee: 4912 ldr r1, [pc, #72] @ (8021638 ) 80215f0: 4812 ldr r0, [pc, #72] @ (802163c ) 80215f2: f009 f93b bl 802a86c tcphdr = (struct tcp_hdr *)p->payload; 80215f6: 68bb ldr r3, [r7, #8] 80215f8: 685b ldr r3, [r3, #4] 80215fa: 61bb str r3, [r7, #24] opts = (u32_t *)(void *)(tcphdr + 1); 80215fc: 69bb ldr r3, [r7, #24] 80215fe: 3314 adds r3, #20 8021600: 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)); 8021602: 8bfb ldrh r3, [r7, #30] 8021604: 009b lsls r3, r3, #2 8021606: 461a mov r2, r3 8021608: 79fb ldrb r3, [r7, #7] 802160a: 009b lsls r3, r3, #2 802160c: f003 0304 and.w r3, r3, #4 8021610: 4413 add r3, r2 8021612: 3314 adds r3, #20 8021614: 69ba ldr r2, [r7, #24] 8021616: 4413 add r3, r2 8021618: 697a ldr r2, [r7, #20] 802161a: 429a cmp r2, r3 802161c: d006 beq.n 802162c 802161e: 4b05 ldr r3, [pc, #20] @ (8021634 ) 8021620: f240 7275 movw r2, #1909 @ 0x775 8021624: 4906 ldr r1, [pc, #24] @ (8021640 ) 8021626: 4805 ldr r0, [pc, #20] @ (802163c ) 8021628: f009 f920 bl 802a86c LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ } 802162c: bf00 nop 802162e: 3720 adds r7, #32 8021630: 46bd mov sp, r7 8021632: bd80 pop {r7, pc} 8021634: 08030190 .word 0x08030190 8021638: 0803091c .word 0x0803091c 802163c: 080301e4 .word 0x080301e4 8021640: 08030814 .word 0x08030814 08021644 : * 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) { 8021644: b580 push {r7, lr} 8021646: b08a sub sp, #40 @ 0x28 8021648: af04 add r7, sp, #16 802164a: 60f8 str r0, [r7, #12] 802164c: 60b9 str r1, [r7, #8] 802164e: 607a str r2, [r7, #4] 8021650: 603b str r3, [r7, #0] err_t err; struct netif *netif; LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 8021652: 68bb ldr r3, [r7, #8] 8021654: 2b00 cmp r3, #0 8021656: d106 bne.n 8021666 8021658: 4b1c ldr r3, [pc, #112] @ (80216cc ) 802165a: f240 7287 movw r2, #1927 @ 0x787 802165e: 491c ldr r1, [pc, #112] @ (80216d0 ) 8021660: 481c ldr r0, [pc, #112] @ (80216d4 ) 8021662: f009 f903 bl 802a86c netif = tcp_route(pcb, src, dst); 8021666: 683a ldr r2, [r7, #0] 8021668: 6879 ldr r1, [r7, #4] 802166a: 68f8 ldr r0, [r7, #12] 802166c: f7fe fa78 bl 801fb60 8021670: 6138 str r0, [r7, #16] if (netif == NULL) { 8021672: 693b ldr r3, [r7, #16] 8021674: 2b00 cmp r3, #0 8021676: d102 bne.n 802167e err = ERR_RTE; 8021678: 23fc movs r3, #252 @ 0xfc 802167a: 75fb strb r3, [r7, #23] 802167c: e01c b.n 80216b8 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) { 802167e: 68fb ldr r3, [r7, #12] 8021680: 2b00 cmp r3, #0 8021682: d006 beq.n 8021692 NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); ttl = pcb->ttl; 8021684: 68fb ldr r3, [r7, #12] 8021686: 7adb ldrb r3, [r3, #11] 8021688: 75bb strb r3, [r7, #22] tos = pcb->tos; 802168a: 68fb ldr r3, [r7, #12] 802168c: 7a9b ldrb r3, [r3, #10] 802168e: 757b strb r3, [r7, #21] 8021690: e003 b.n 802169a } else { /* Send output with hardcoded TTL/HL since we have no access to the pcb */ ttl = TCP_TTL; 8021692: 23ff movs r3, #255 @ 0xff 8021694: 75bb strb r3, [r7, #22] tos = 0; 8021696: 2300 movs r3, #0 8021698: 757b strb r3, [r7, #21] } TCP_STATS_INC(tcp.xmit); err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); 802169a: 7dba ldrb r2, [r7, #22] 802169c: 693b ldr r3, [r7, #16] 802169e: 9302 str r3, [sp, #8] 80216a0: 2306 movs r3, #6 80216a2: 9301 str r3, [sp, #4] 80216a4: 7d7b ldrb r3, [r7, #21] 80216a6: 9300 str r3, [sp, #0] 80216a8: 4613 mov r3, r2 80216aa: 683a ldr r2, [r7, #0] 80216ac: 6879 ldr r1, [r7, #4] 80216ae: 68b8 ldr r0, [r7, #8] 80216b0: f004 faac bl 8025c0c 80216b4: 4603 mov r3, r0 80216b6: 75fb strb r3, [r7, #23] NETIF_RESET_HINTS(netif); } pbuf_free(p); 80216b8: 68b8 ldr r0, [r7, #8] 80216ba: f7f9 fe5f bl 801b37c return err; 80216be: f997 3017 ldrsb.w r3, [r7, #23] } 80216c2: 4618 mov r0, r3 80216c4: 3718 adds r7, #24 80216c6: 46bd mov sp, r7 80216c8: bd80 pop {r7, pc} 80216ca: bf00 nop 80216cc: 08030190 .word 0x08030190 80216d0: 08030944 .word 0x08030944 80216d4: 080301e4 .word 0x080301e4 080216d8 : */ 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) { 80216d8: b590 push {r4, r7, lr} 80216da: b08b sub sp, #44 @ 0x2c 80216dc: af04 add r7, sp, #16 80216de: 60f8 str r0, [r7, #12] 80216e0: 60b9 str r1, [r7, #8] 80216e2: 607a str r2, [r7, #4] 80216e4: 603b str r3, [r7, #0] struct pbuf *p; u16_t wnd; u8_t optlen; LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 80216e6: 683b ldr r3, [r7, #0] 80216e8: 2b00 cmp r3, #0 80216ea: d106 bne.n 80216fa 80216ec: 4b1f ldr r3, [pc, #124] @ (802176c ) 80216ee: f240 72c4 movw r2, #1988 @ 0x7c4 80216f2: 491f ldr r1, [pc, #124] @ (8021770 ) 80216f4: 481f ldr r0, [pc, #124] @ (8021774 ) 80216f6: f009 f8b9 bl 802a86c LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 80216fa: 6abb ldr r3, [r7, #40] @ 0x28 80216fc: 2b00 cmp r3, #0 80216fe: d106 bne.n 802170e 8021700: 4b1a ldr r3, [pc, #104] @ (802176c ) 8021702: f240 72c5 movw r2, #1989 @ 0x7c5 8021706: 491c ldr r1, [pc, #112] @ (8021778 ) 8021708: 481a ldr r0, [pc, #104] @ (8021774 ) 802170a: f009 f8af bl 802a86c optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 802170e: 2300 movs r3, #0 8021710: 75fb strb r3, [r7, #23] #if LWIP_WND_SCALE wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); #else wnd = PP_HTONS(TCP_WND); 8021712: f24d 0316 movw r3, #53270 @ 0xd016 8021716: 82bb strh r3, [r7, #20] #endif p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, 8021718: 7dfb ldrb r3, [r7, #23] 802171a: b29c uxth r4, r3 802171c: 68b8 ldr r0, [r7, #8] 802171e: f7f8 f960 bl 80199e2 8021722: 4602 mov r2, r0 8021724: 8abb ldrh r3, [r7, #20] 8021726: 9303 str r3, [sp, #12] 8021728: 2314 movs r3, #20 802172a: 9302 str r3, [sp, #8] 802172c: 8e3b ldrh r3, [r7, #48] @ 0x30 802172e: 9301 str r3, [sp, #4] 8021730: 8dbb ldrh r3, [r7, #44] @ 0x2c 8021732: 9300 str r3, [sp, #0] 8021734: 4613 mov r3, r2 8021736: 2200 movs r2, #0 8021738: 4621 mov r1, r4 802173a: 6878 ldr r0, [r7, #4] 802173c: f7ff fe94 bl 8021468 8021740: 6138 str r0, [r7, #16] remote_port, TCP_RST | TCP_ACK, wnd); if (p == NULL) { 8021742: 693b ldr r3, [r7, #16] 8021744: 2b00 cmp r3, #0 8021746: d00c beq.n 8021762 LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); return; } tcp_output_fill_options(pcb, p, 0, optlen); 8021748: 7dfb ldrb r3, [r7, #23] 802174a: 2200 movs r2, #0 802174c: 6939 ldr r1, [r7, #16] 802174e: 68f8 ldr r0, [r7, #12] 8021750: f7ff ff3a bl 80215c8 MIB2_STATS_INC(mib2.tcpoutrsts); tcp_output_control_segment(pcb, p, local_ip, remote_ip); 8021754: 6abb ldr r3, [r7, #40] @ 0x28 8021756: 683a ldr r2, [r7, #0] 8021758: 6939 ldr r1, [r7, #16] 802175a: 68f8 ldr r0, [r7, #12] 802175c: f7ff ff72 bl 8021644 8021760: e000 b.n 8021764 return; 8021762: bf00 nop LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8021764: 371c adds r7, #28 8021766: 46bd mov sp, r7 8021768: bd90 pop {r4, r7, pc} 802176a: bf00 nop 802176c: 08030190 .word 0x08030190 8021770: 08030970 .word 0x08030970 8021774: 080301e4 .word 0x080301e4 8021778: 0803098c .word 0x0803098c 0802177c : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 802177c: b590 push {r4, r7, lr} 802177e: b087 sub sp, #28 8021780: af00 add r7, sp, #0 8021782: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen, optflags = 0; 8021784: 2300 movs r3, #0 8021786: 75fb strb r3, [r7, #23] u8_t num_sacks = 0; 8021788: 2300 movs r3, #0 802178a: 75bb strb r3, [r7, #22] LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 802178c: 687b ldr r3, [r7, #4] 802178e: 2b00 cmp r3, #0 8021790: d106 bne.n 80217a0 8021792: 4b28 ldr r3, [pc, #160] @ (8021834 ) 8021794: f240 72ea movw r2, #2026 @ 0x7ea 8021798: 4927 ldr r1, [pc, #156] @ (8021838 ) 802179a: 4828 ldr r0, [pc, #160] @ (802183c ) 802179c: f009 f866 bl 802a86c #if LWIP_TCP_TIMESTAMPS if (pcb->flags & TF_TIMESTAMP) { optflags = TF_SEG_OPTS_TS; } #endif optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 80217a0: 7dfb ldrb r3, [r7, #23] 80217a2: 009b lsls r3, r3, #2 80217a4: b2db uxtb r3, r3 80217a6: f003 0304 and.w r3, r3, #4 80217aa: 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)); 80217ac: 7d7b ldrb r3, [r7, #21] 80217ae: b29c uxth r4, r3 80217b0: 687b ldr r3, [r7, #4] 80217b2: 6d1b ldr r3, [r3, #80] @ 0x50 80217b4: 4618 mov r0, r3 80217b6: f7f8 f914 bl 80199e2 80217ba: 4603 mov r3, r0 80217bc: 2200 movs r2, #0 80217be: 4621 mov r1, r4 80217c0: 6878 ldr r0, [r7, #4] 80217c2: f7ff fec3 bl 802154c 80217c6: 6138 str r0, [r7, #16] if (p == NULL) { 80217c8: 693b ldr r3, [r7, #16] 80217ca: 2b00 cmp r3, #0 80217cc: d109 bne.n 80217e2 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 80217ce: 687b ldr r3, [r7, #4] 80217d0: 8b5b ldrh r3, [r3, #26] 80217d2: f043 0303 orr.w r3, r3, #3 80217d6: b29a uxth r2, r3 80217d8: 687b ldr r3, [r7, #4] 80217da: 835a strh r2, [r3, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 80217dc: f06f 0301 mvn.w r3, #1 80217e0: e023 b.n 802182a } tcp_output_fill_options(pcb, p, optflags, num_sacks); 80217e2: 7dbb ldrb r3, [r7, #22] 80217e4: 7dfa ldrb r2, [r7, #23] 80217e6: 6939 ldr r1, [r7, #16] 80217e8: 6878 ldr r0, [r7, #4] 80217ea: f7ff feed bl 80215c8 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); 80217ee: 687a ldr r2, [r7, #4] 80217f0: 687b ldr r3, [r7, #4] 80217f2: 3304 adds r3, #4 80217f4: 6939 ldr r1, [r7, #16] 80217f6: 6878 ldr r0, [r7, #4] 80217f8: f7ff ff24 bl 8021644 80217fc: 4603 mov r3, r0 80217fe: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8021800: f997 300f ldrsb.w r3, [r7, #15] 8021804: 2b00 cmp r3, #0 8021806: d007 beq.n 8021818 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8021808: 687b ldr r3, [r7, #4] 802180a: 8b5b ldrh r3, [r3, #26] 802180c: f043 0303 orr.w r3, r3, #3 8021810: b29a uxth r2, r3 8021812: 687b ldr r3, [r7, #4] 8021814: 835a strh r2, [r3, #26] 8021816: e006 b.n 8021826 } else { /* remove ACK flags from the PCB, as we sent an empty ACK now */ tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8021818: 687b ldr r3, [r7, #4] 802181a: 8b5b ldrh r3, [r3, #26] 802181c: f023 0303 bic.w r3, r3, #3 8021820: b29a uxth r2, r3 8021822: 687b ldr r3, [r7, #4] 8021824: 835a strh r2, [r3, #26] } return err; 8021826: f997 300f ldrsb.w r3, [r7, #15] } 802182a: 4618 mov r0, r3 802182c: 371c adds r7, #28 802182e: 46bd mov sp, r7 8021830: bd90 pop {r4, r7, pc} 8021832: bf00 nop 8021834: 08030190 .word 0x08030190 8021838: 080309a8 .word 0x080309a8 802183c: 080301e4 .word 0x080301e4 08021840 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ err_t tcp_keepalive(struct tcp_pcb *pcb) { 8021840: b590 push {r4, r7, lr} 8021842: b085 sub sp, #20 8021844: af00 add r7, sp, #0 8021846: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 8021848: 2300 movs r3, #0 802184a: 72bb strb r3, [r7, #10] LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 802184c: 687b ldr r3, [r7, #4] 802184e: 2b00 cmp r3, #0 8021850: d106 bne.n 8021860 8021852: 4b18 ldr r3, [pc, #96] @ (80218b4 ) 8021854: f640 0224 movw r2, #2084 @ 0x824 8021858: 4917 ldr r1, [pc, #92] @ (80218b8 ) 802185a: 4818 ldr r0, [pc, #96] @ (80218bc ) 802185c: f009 f806 bl 802a86c 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)); 8021860: 7abb ldrb r3, [r7, #10] 8021862: b29c uxth r4, r3 8021864: 687b ldr r3, [r7, #4] 8021866: 6d1b ldr r3, [r3, #80] @ 0x50 8021868: 3b01 subs r3, #1 802186a: 4618 mov r0, r3 802186c: f7f8 f8b9 bl 80199e2 8021870: 4603 mov r3, r0 8021872: 2200 movs r2, #0 8021874: 4621 mov r1, r4 8021876: 6878 ldr r0, [r7, #4] 8021878: f7ff fe68 bl 802154c 802187c: 60f8 str r0, [r7, #12] if (p == NULL) { 802187e: 68fb ldr r3, [r7, #12] 8021880: 2b00 cmp r3, #0 8021882: d102 bne.n 802188a LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; 8021884: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021888: e010 b.n 80218ac } tcp_output_fill_options(pcb, p, 0, optlen); 802188a: 7abb ldrb r3, [r7, #10] 802188c: 2200 movs r2, #0 802188e: 68f9 ldr r1, [r7, #12] 8021890: 6878 ldr r0, [r7, #4] 8021892: f7ff fe99 bl 80215c8 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 8021896: 687a ldr r2, [r7, #4] 8021898: 687b ldr r3, [r7, #4] 802189a: 3304 adds r3, #4 802189c: 68f9 ldr r1, [r7, #12] 802189e: 6878 ldr r0, [r7, #4] 80218a0: f7ff fed0 bl 8021644 80218a4: 4603 mov r3, r0 80218a6: 72fb strb r3, [r7, #11] 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; 80218a8: f997 300b ldrsb.w r3, [r7, #11] } 80218ac: 4618 mov r0, r3 80218ae: 3714 adds r7, #20 80218b0: 46bd mov sp, r7 80218b2: bd90 pop {r4, r7, pc} 80218b4: 08030190 .word 0x08030190 80218b8: 080309c8 .word 0x080309c8 80218bc: 080301e4 .word 0x080301e4 080218c0 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ err_t tcp_zero_window_probe(struct tcp_pcb *pcb) { 80218c0: b590 push {r4, r7, lr} 80218c2: b08b sub sp, #44 @ 0x2c 80218c4: af00 add r7, sp, #0 80218c6: 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); 80218c8: 2300 movs r3, #0 80218ca: 74fb strb r3, [r7, #19] LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 80218cc: 687b ldr r3, [r7, #4] 80218ce: 2b00 cmp r3, #0 80218d0: d106 bne.n 80218e0 80218d2: 4b4d ldr r3, [pc, #308] @ (8021a08 ) 80218d4: f640 024f movw r2, #2127 @ 0x84f 80218d8: 494c ldr r1, [pc, #304] @ (8021a0c ) 80218da: 484d ldr r0, [pc, #308] @ (8021a10 ) 80218dc: f008 ffc6 bl 802a86c ("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; 80218e0: 687b ldr r3, [r7, #4] 80218e2: 6edb ldr r3, [r3, #108] @ 0x6c 80218e4: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 80218e6: 6a7b ldr r3, [r7, #36] @ 0x24 80218e8: 2b00 cmp r3, #0 80218ea: d101 bne.n 80218f0 /* Not expected, persist timer should be off when the send buffer is empty */ return ERR_OK; 80218ec: 2300 movs r3, #0 80218ee: e087 b.n 8021a00 /* 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) { 80218f0: 687b ldr r3, [r7, #4] 80218f2: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 80218f6: 2bff cmp r3, #255 @ 0xff 80218f8: d007 beq.n 802190a ++pcb->persist_probe; 80218fa: 687b ldr r3, [r7, #4] 80218fc: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 8021900: 3301 adds r3, #1 8021902: b2da uxtb r2, r3 8021904: 687b ldr r3, [r7, #4] 8021906: f883 209a strb.w r2, [r3, #154] @ 0x9a } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802190a: 6a7b ldr r3, [r7, #36] @ 0x24 802190c: 691b ldr r3, [r3, #16] 802190e: 899b ldrh r3, [r3, #12] 8021910: b29b uxth r3, r3 8021912: 4618 mov r0, r3 8021914: f7f8 f850 bl 80199b8 8021918: 4603 mov r3, r0 802191a: b2db uxtb r3, r3 802191c: f003 0301 and.w r3, r3, #1 8021920: 2b00 cmp r3, #0 8021922: d005 beq.n 8021930 8021924: 6a7b ldr r3, [r7, #36] @ 0x24 8021926: 891b ldrh r3, [r3, #8] 8021928: 2b00 cmp r3, #0 802192a: d101 bne.n 8021930 802192c: 2301 movs r3, #1 802192e: e000 b.n 8021932 8021930: 2300 movs r3, #0 8021932: f887 3023 strb.w r3, [r7, #35] @ 0x23 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; 8021936: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802193a: 2b00 cmp r3, #0 802193c: bf0c ite eq 802193e: 2301 moveq r3, #1 8021940: 2300 movne r3, #0 8021942: b2db uxtb r3, r3 8021944: 843b strh r3, [r7, #32] p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); 8021946: 7cfb ldrb r3, [r7, #19] 8021948: b299 uxth r1, r3 802194a: 6a7b ldr r3, [r7, #36] @ 0x24 802194c: 691b ldr r3, [r3, #16] 802194e: 685b ldr r3, [r3, #4] 8021950: 8c3a ldrh r2, [r7, #32] 8021952: 6878 ldr r0, [r7, #4] 8021954: f7ff fdfa bl 802154c 8021958: 61f8 str r0, [r7, #28] if (p == NULL) { 802195a: 69fb ldr r3, [r7, #28] 802195c: 2b00 cmp r3, #0 802195e: d102 bne.n 8021966 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; 8021960: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021964: e04c b.n 8021a00 } tcphdr = (struct tcp_hdr *)p->payload; 8021966: 69fb ldr r3, [r7, #28] 8021968: 685b ldr r3, [r3, #4] 802196a: 61bb str r3, [r7, #24] if (is_fin) { 802196c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8021970: 2b00 cmp r3, #0 8021972: d011 beq.n 8021998 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 8021974: 69bb ldr r3, [r7, #24] 8021976: 899b ldrh r3, [r3, #12] 8021978: b29b uxth r3, r3 802197a: b21b sxth r3, r3 802197c: f423 537c bic.w r3, r3, #16128 @ 0x3f00 8021980: b21c sxth r4, r3 8021982: 2011 movs r0, #17 8021984: f7f8 f818 bl 80199b8 8021988: 4603 mov r3, r0 802198a: b21b sxth r3, r3 802198c: 4323 orrs r3, r4 802198e: b21b sxth r3, r3 8021990: b29a uxth r2, r3 8021992: 69bb ldr r3, [r7, #24] 8021994: 819a strh r2, [r3, #12] 8021996: e010 b.n 80219ba } else { /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); 8021998: 69fb ldr r3, [r7, #28] 802199a: 685b ldr r3, [r3, #4] 802199c: 3314 adds r3, #20 802199e: 617b str r3, [r7, #20] /* 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); 80219a0: 6a7b ldr r3, [r7, #36] @ 0x24 80219a2: 6858 ldr r0, [r3, #4] 80219a4: 6a7b ldr r3, [r7, #36] @ 0x24 80219a6: 685b ldr r3, [r3, #4] 80219a8: 891a ldrh r2, [r3, #8] 80219aa: 6a7b ldr r3, [r7, #36] @ 0x24 80219ac: 891b ldrh r3, [r3, #8] 80219ae: 1ad3 subs r3, r2, r3 80219b0: b29b uxth r3, r3 80219b2: 2201 movs r2, #1 80219b4: 6979 ldr r1, [r7, #20] 80219b6: f7f9 fee7 bl 801b788 } /* The byte may be acknowledged without the window being opened. */ snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; 80219ba: 6a7b ldr r3, [r7, #36] @ 0x24 80219bc: 691b ldr r3, [r3, #16] 80219be: 685b ldr r3, [r3, #4] 80219c0: 4618 mov r0, r3 80219c2: f7f8 f80e bl 80199e2 80219c6: 4603 mov r3, r0 80219c8: 3301 adds r3, #1 80219ca: 60fb str r3, [r7, #12] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 80219cc: 687b ldr r3, [r7, #4] 80219ce: 6d1a ldr r2, [r3, #80] @ 0x50 80219d0: 68fb ldr r3, [r7, #12] 80219d2: 1ad3 subs r3, r2, r3 80219d4: 2b00 cmp r3, #0 80219d6: da02 bge.n 80219de pcb->snd_nxt = snd_nxt; 80219d8: 687b ldr r3, [r7, #4] 80219da: 68fa ldr r2, [r7, #12] 80219dc: 651a str r2, [r3, #80] @ 0x50 } tcp_output_fill_options(pcb, p, 0, optlen); 80219de: 7cfb ldrb r3, [r7, #19] 80219e0: 2200 movs r2, #0 80219e2: 69f9 ldr r1, [r7, #28] 80219e4: 6878 ldr r0, [r7, #4] 80219e6: f7ff fdef bl 80215c8 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 80219ea: 687a ldr r2, [r7, #4] 80219ec: 687b ldr r3, [r7, #4] 80219ee: 3304 adds r3, #4 80219f0: 69f9 ldr r1, [r7, #28] 80219f2: 6878 ldr r0, [r7, #4] 80219f4: f7ff fe26 bl 8021644 80219f8: 4603 mov r3, r0 80219fa: 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; 80219fc: f997 300b ldrsb.w r3, [r7, #11] } 8021a00: 4618 mov r0, r3 8021a02: 372c adds r7, #44 @ 0x2c 8021a04: 46bd mov sp, r7 8021a06: bd90 pop {r4, r7, pc} 8021a08: 08030190 .word 0x08030190 8021a0c: 080309e4 .word 0x080309e4 8021a10: 080301e4 .word 0x080301e4 08021a14 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8021a14: b580 push {r7, lr} 8021a16: b082 sub sp, #8 8021a18: af00 add r7, sp, #0 8021a1a: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 8021a1c: f7f9 ffa2 bl 801b964 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 8021a20: 4b0a ldr r3, [pc, #40] @ (8021a4c ) 8021a22: 681b ldr r3, [r3, #0] 8021a24: 2b00 cmp r3, #0 8021a26: d103 bne.n 8021a30 8021a28: 4b09 ldr r3, [pc, #36] @ (8021a50 ) 8021a2a: 681b ldr r3, [r3, #0] 8021a2c: 2b00 cmp r3, #0 8021a2e: d005 beq.n 8021a3c /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8021a30: 2200 movs r2, #0 8021a32: 4908 ldr r1, [pc, #32] @ (8021a54 ) 8021a34: 20fa movs r0, #250 @ 0xfa 8021a36: f000 f8f5 bl 8021c24 8021a3a: e003 b.n 8021a44 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8021a3c: 4b06 ldr r3, [pc, #24] @ (8021a58 ) 8021a3e: 2200 movs r2, #0 8021a40: 601a str r2, [r3, #0] } } 8021a42: bf00 nop 8021a44: bf00 nop 8021a46: 3708 adds r7, #8 8021a48: 46bd mov sp, r7 8021a4a: bd80 pop {r7, pc} 8021a4c: 2402af74 .word 0x2402af74 8021a50: 2402af78 .word 0x2402af78 8021a54: 08021a15 .word 0x08021a15 8021a58: 2402afc4 .word 0x2402afc4 08021a5c : * the reason is to have the TCP timer only running when * there are active (or time-wait) PCBs. */ void tcp_timer_needed(void) { 8021a5c: b580 push {r7, lr} 8021a5e: af00 add r7, sp, #0 LWIP_ASSERT_CORE_LOCKED(); 8021a60: f7ef fadc bl 801101c /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8021a64: 4b0a ldr r3, [pc, #40] @ (8021a90 ) 8021a66: 681b ldr r3, [r3, #0] 8021a68: 2b00 cmp r3, #0 8021a6a: d10f bne.n 8021a8c 8021a6c: 4b09 ldr r3, [pc, #36] @ (8021a94 ) 8021a6e: 681b ldr r3, [r3, #0] 8021a70: 2b00 cmp r3, #0 8021a72: d103 bne.n 8021a7c 8021a74: 4b08 ldr r3, [pc, #32] @ (8021a98 ) 8021a76: 681b ldr r3, [r3, #0] 8021a78: 2b00 cmp r3, #0 8021a7a: d007 beq.n 8021a8c /* enable and start timer */ tcpip_tcp_timer_active = 1; 8021a7c: 4b04 ldr r3, [pc, #16] @ (8021a90 ) 8021a7e: 2201 movs r2, #1 8021a80: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8021a82: 2200 movs r2, #0 8021a84: 4905 ldr r1, [pc, #20] @ (8021a9c ) 8021a86: 20fa movs r0, #250 @ 0xfa 8021a88: f000 f8cc bl 8021c24 } } 8021a8c: bf00 nop 8021a8e: bd80 pop {r7, pc} 8021a90: 2402afc4 .word 0x2402afc4 8021a94: 2402af74 .word 0x2402af74 8021a98: 2402af78 .word 0x2402af78 8021a9c: 08021a15 .word 0x08021a15 08021aa0 : #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 { 8021aa0: b580 push {r7, lr} 8021aa2: b086 sub sp, #24 8021aa4: af00 add r7, sp, #0 8021aa6: 60f8 str r0, [r7, #12] 8021aa8: 60b9 str r1, [r7, #8] 8021aaa: 607a str r2, [r7, #4] struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8021aac: 200a movs r0, #10 8021aae: f7f8 fd01 bl 801a4b4 8021ab2: 6138 str r0, [r7, #16] if (timeout == NULL) { 8021ab4: 693b ldr r3, [r7, #16] 8021ab6: 2b00 cmp r3, #0 8021ab8: d109 bne.n 8021ace LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); 8021aba: 693b ldr r3, [r7, #16] 8021abc: 2b00 cmp r3, #0 8021abe: d151 bne.n 8021b64 8021ac0: 4b2a ldr r3, [pc, #168] @ (8021b6c ) 8021ac2: 22be movs r2, #190 @ 0xbe 8021ac4: 492a ldr r1, [pc, #168] @ (8021b70 ) 8021ac6: 482b ldr r0, [pc, #172] @ (8021b74 ) 8021ac8: f008 fed0 bl 802a86c return; 8021acc: e04a b.n 8021b64 } timeout->next = NULL; 8021ace: 693b ldr r3, [r7, #16] 8021ad0: 2200 movs r2, #0 8021ad2: 601a str r2, [r3, #0] timeout->h = handler; 8021ad4: 693b ldr r3, [r7, #16] 8021ad6: 68ba ldr r2, [r7, #8] 8021ad8: 609a str r2, [r3, #8] timeout->arg = arg; 8021ada: 693b ldr r3, [r7, #16] 8021adc: 687a ldr r2, [r7, #4] 8021ade: 60da str r2, [r3, #12] timeout->time = abs_time; 8021ae0: 693b ldr r3, [r7, #16] 8021ae2: 68fa ldr r2, [r7, #12] 8021ae4: 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) { 8021ae6: 4b24 ldr r3, [pc, #144] @ (8021b78 ) 8021ae8: 681b ldr r3, [r3, #0] 8021aea: 2b00 cmp r3, #0 8021aec: d103 bne.n 8021af6 next_timeout = timeout; 8021aee: 4a22 ldr r2, [pc, #136] @ (8021b78 ) 8021af0: 693b ldr r3, [r7, #16] 8021af2: 6013 str r3, [r2, #0] return; 8021af4: e037 b.n 8021b66 } if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { 8021af6: 693b ldr r3, [r7, #16] 8021af8: 685a ldr r2, [r3, #4] 8021afa: 4b1f ldr r3, [pc, #124] @ (8021b78 ) 8021afc: 681b ldr r3, [r3, #0] 8021afe: 685b ldr r3, [r3, #4] 8021b00: 1ad3 subs r3, r2, r3 8021b02: 0fdb lsrs r3, r3, #31 8021b04: f003 0301 and.w r3, r3, #1 8021b08: b2db uxtb r3, r3 8021b0a: 2b00 cmp r3, #0 8021b0c: d007 beq.n 8021b1e timeout->next = next_timeout; 8021b0e: 4b1a ldr r3, [pc, #104] @ (8021b78 ) 8021b10: 681a ldr r2, [r3, #0] 8021b12: 693b ldr r3, [r7, #16] 8021b14: 601a str r2, [r3, #0] next_timeout = timeout; 8021b16: 4a18 ldr r2, [pc, #96] @ (8021b78 ) 8021b18: 693b ldr r3, [r7, #16] 8021b1a: 6013 str r3, [r2, #0] 8021b1c: e023 b.n 8021b66 } else { for (t = next_timeout; t != NULL; t = t->next) { 8021b1e: 4b16 ldr r3, [pc, #88] @ (8021b78 ) 8021b20: 681b ldr r3, [r3, #0] 8021b22: 617b str r3, [r7, #20] 8021b24: e01a b.n 8021b5c if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { 8021b26: 697b ldr r3, [r7, #20] 8021b28: 681b ldr r3, [r3, #0] 8021b2a: 2b00 cmp r3, #0 8021b2c: d00b beq.n 8021b46 8021b2e: 693b ldr r3, [r7, #16] 8021b30: 685a ldr r2, [r3, #4] 8021b32: 697b ldr r3, [r7, #20] 8021b34: 681b ldr r3, [r3, #0] 8021b36: 685b ldr r3, [r3, #4] 8021b38: 1ad3 subs r3, r2, r3 8021b3a: 0fdb lsrs r3, r3, #31 8021b3c: f003 0301 and.w r3, r3, #1 8021b40: b2db uxtb r3, r3 8021b42: 2b00 cmp r3, #0 8021b44: d007 beq.n 8021b56 timeout->next = t->next; 8021b46: 697b ldr r3, [r7, #20] 8021b48: 681a ldr r2, [r3, #0] 8021b4a: 693b ldr r3, [r7, #16] 8021b4c: 601a str r2, [r3, #0] t->next = timeout; 8021b4e: 697b ldr r3, [r7, #20] 8021b50: 693a ldr r2, [r7, #16] 8021b52: 601a str r2, [r3, #0] break; 8021b54: e007 b.n 8021b66 for (t = next_timeout; t != NULL; t = t->next) { 8021b56: 697b ldr r3, [r7, #20] 8021b58: 681b ldr r3, [r3, #0] 8021b5a: 617b str r3, [r7, #20] 8021b5c: 697b ldr r3, [r7, #20] 8021b5e: 2b00 cmp r3, #0 8021b60: d1e1 bne.n 8021b26 8021b62: e000 b.n 8021b66 return; 8021b64: bf00 nop } } } } 8021b66: 3718 adds r7, #24 8021b68: 46bd mov sp, r7 8021b6a: bd80 pop {r7, pc} 8021b6c: 08030a08 .word 0x08030a08 8021b70: 08030a3c .word 0x08030a3c 8021b74: 08030a7c .word 0x08030a7c 8021b78: 2402afbc .word 0x2402afbc 08021b7c : #if !LWIP_TESTMODE static #endif void lwip_cyclic_timer(void *arg) { 8021b7c: b580 push {r7, lr} 8021b7e: b086 sub sp, #24 8021b80: af00 add r7, sp, #0 8021b82: 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; 8021b84: 687b ldr r3, [r7, #4] 8021b86: 617b str r3, [r7, #20] #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); 8021b88: 697b ldr r3, [r7, #20] 8021b8a: 685b ldr r3, [r3, #4] 8021b8c: 4798 blx r3 now = sys_now(); 8021b8e: f7ee ffa9 bl 8010ae4 8021b92: 6138 str r0, [r7, #16] next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ 8021b94: 697b ldr r3, [r7, #20] 8021b96: 681a ldr r2, [r3, #0] 8021b98: 4b0f ldr r3, [pc, #60] @ (8021bd8 ) 8021b9a: 681b ldr r3, [r3, #0] 8021b9c: 4413 add r3, r2 8021b9e: 60fb str r3, [r7, #12] if (TIME_LESS_THAN(next_timeout_time, now)) { 8021ba0: 68fa ldr r2, [r7, #12] 8021ba2: 693b ldr r3, [r7, #16] 8021ba4: 1ad3 subs r3, r2, r3 8021ba6: 0fdb lsrs r3, r3, #31 8021ba8: f003 0301 and.w r3, r3, #1 8021bac: b2db uxtb r3, r3 8021bae: 2b00 cmp r3, #0 8021bb0: d009 beq.n 8021bc6 /* 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); 8021bb2: 697b ldr r3, [r7, #20] 8021bb4: 681a ldr r2, [r3, #0] 8021bb6: 693b ldr r3, [r7, #16] 8021bb8: 4413 add r3, r2 8021bba: 687a ldr r2, [r7, #4] 8021bbc: 4907 ldr r1, [pc, #28] @ (8021bdc ) 8021bbe: 4618 mov r0, r3 8021bc0: f7ff ff6e bl 8021aa0 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 } } 8021bc4: e004 b.n 8021bd0 sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); 8021bc6: 687a ldr r2, [r7, #4] 8021bc8: 4904 ldr r1, [pc, #16] @ (8021bdc ) 8021bca: 68f8 ldr r0, [r7, #12] 8021bcc: f7ff ff68 bl 8021aa0 } 8021bd0: bf00 nop 8021bd2: 3718 adds r7, #24 8021bd4: 46bd mov sp, r7 8021bd6: bd80 pop {r7, pc} 8021bd8: 2402afc0 .word 0x2402afc0 8021bdc: 08021b7d .word 0x08021b7d 08021be0 : /** Initialize this module */ void sys_timeouts_init(void) { 8021be0: b580 push {r7, lr} 8021be2: b082 sub sp, #8 8021be4: 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++) { 8021be6: 2301 movs r3, #1 8021be8: 607b str r3, [r7, #4] 8021bea: e00e b.n 8021c0a /* 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])); 8021bec: 4a0b ldr r2, [pc, #44] @ (8021c1c ) 8021bee: 687b ldr r3, [r7, #4] 8021bf0: f852 0033 ldr.w r0, [r2, r3, lsl #3] 8021bf4: 687b ldr r3, [r7, #4] 8021bf6: 00db lsls r3, r3, #3 8021bf8: 4a08 ldr r2, [pc, #32] @ (8021c1c ) 8021bfa: 4413 add r3, r2 8021bfc: 461a mov r2, r3 8021bfe: 4908 ldr r1, [pc, #32] @ (8021c20 ) 8021c00: f000 f810 bl 8021c24 for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 8021c04: 687b ldr r3, [r7, #4] 8021c06: 3301 adds r3, #1 8021c08: 607b str r3, [r7, #4] 8021c0a: 687b ldr r3, [r7, #4] 8021c0c: 2b04 cmp r3, #4 8021c0e: d9ed bls.n 8021bec } } 8021c10: bf00 nop 8021c12: bf00 nop 8021c14: 3708 adds r7, #8 8021c16: 46bd mov sp, r7 8021c18: bd80 pop {r7, pc} 8021c1a: bf00 nop 8021c1c: 08031c50 .word 0x08031c50 8021c20: 08021b7d .word 0x08021b7d 08021c24 : 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 */ { 8021c24: b580 push {r7, lr} 8021c26: b086 sub sp, #24 8021c28: af00 add r7, sp, #0 8021c2a: 60f8 str r0, [r7, #12] 8021c2c: 60b9 str r1, [r7, #8] 8021c2e: 607a str r2, [r7, #4] u32_t next_timeout_time; LWIP_ASSERT_CORE_LOCKED(); 8021c30: f7ef f9f4 bl 801101c LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); 8021c34: 68fb ldr r3, [r7, #12] 8021c36: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 8021c3a: d306 bcc.n 8021c4a 8021c3c: 4b0a ldr r3, [pc, #40] @ (8021c68 ) 8021c3e: f240 1229 movw r2, #297 @ 0x129 8021c42: 490a ldr r1, [pc, #40] @ (8021c6c ) 8021c44: 480a ldr r0, [pc, #40] @ (8021c70 ) 8021c46: f008 fe11 bl 802a86c next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ 8021c4a: f7ee ff4b bl 8010ae4 8021c4e: 4602 mov r2, r0 8021c50: 68fb ldr r3, [r7, #12] 8021c52: 4413 add r3, r2 8021c54: 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); 8021c56: 687a ldr r2, [r7, #4] 8021c58: 68b9 ldr r1, [r7, #8] 8021c5a: 6978 ldr r0, [r7, #20] 8021c5c: f7ff ff20 bl 8021aa0 #endif } 8021c60: bf00 nop 8021c62: 3718 adds r7, #24 8021c64: 46bd mov sp, r7 8021c66: bd80 pop {r7, pc} 8021c68: 08030a08 .word 0x08030a08 8021c6c: 08030aa4 .word 0x08030aa4 8021c70: 08030a7c .word 0x08030a7c 08021c74 : * * Must be called periodically from your main loop. */ void sys_check_timeouts(void) { 8021c74: b580 push {r7, lr} 8021c76: b084 sub sp, #16 8021c78: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8021c7a: f7ef f9cf bl 801101c /* Process only timers expired at the start of the function. */ now = sys_now(); 8021c7e: f7ee ff31 bl 8010ae4 8021c82: 60f8 str r0, [r7, #12] sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); tmptimeout = next_timeout; 8021c84: 4b17 ldr r3, [pc, #92] @ (8021ce4 ) 8021c86: 681b ldr r3, [r3, #0] 8021c88: 60bb str r3, [r7, #8] if (tmptimeout == NULL) { 8021c8a: 68bb ldr r3, [r7, #8] 8021c8c: 2b00 cmp r3, #0 8021c8e: d022 beq.n 8021cd6 return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { 8021c90: 68bb ldr r3, [r7, #8] 8021c92: 685b ldr r3, [r3, #4] 8021c94: 68fa ldr r2, [r7, #12] 8021c96: 1ad3 subs r3, r2, r3 8021c98: 0fdb lsrs r3, r3, #31 8021c9a: f003 0301 and.w r3, r3, #1 8021c9e: b2db uxtb r3, r3 8021ca0: 2b00 cmp r3, #0 8021ca2: d11a bne.n 8021cda return; } /* Timeout has expired */ next_timeout = tmptimeout->next; 8021ca4: 68bb ldr r3, [r7, #8] 8021ca6: 681b ldr r3, [r3, #0] 8021ca8: 4a0e ldr r2, [pc, #56] @ (8021ce4 ) 8021caa: 6013 str r3, [r2, #0] handler = tmptimeout->h; 8021cac: 68bb ldr r3, [r7, #8] 8021cae: 689b ldr r3, [r3, #8] 8021cb0: 607b str r3, [r7, #4] arg = tmptimeout->arg; 8021cb2: 68bb ldr r3, [r7, #8] 8021cb4: 68db ldr r3, [r3, #12] 8021cb6: 603b str r3, [r7, #0] current_timeout_due_time = tmptimeout->time; 8021cb8: 68bb ldr r3, [r7, #8] 8021cba: 685b ldr r3, [r3, #4] 8021cbc: 4a0a ldr r2, [pc, #40] @ (8021ce8 ) 8021cbe: 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); 8021cc0: 68b9 ldr r1, [r7, #8] 8021cc2: 200a movs r0, #10 8021cc4: f7f8 fc6c bl 801a5a0 if (handler != NULL) { 8021cc8: 687b ldr r3, [r7, #4] 8021cca: 2b00 cmp r3, #0 8021ccc: d0da beq.n 8021c84 handler(arg); 8021cce: 687b ldr r3, [r7, #4] 8021cd0: 6838 ldr r0, [r7, #0] 8021cd2: 4798 blx r3 do { 8021cd4: e7d6 b.n 8021c84 return; 8021cd6: bf00 nop 8021cd8: e000 b.n 8021cdc return; 8021cda: bf00 nop } LWIP_TCPIP_THREAD_ALIVE(); /* Repeat until all expired timers have been called */ } while (1); } 8021cdc: 3710 adds r7, #16 8021cde: 46bd mov sp, r7 8021ce0: bd80 pop {r7, pc} 8021ce2: bf00 nop 8021ce4: 2402afbc .word 0x2402afbc 8021ce8: 2402afc0 .word 0x2402afc0 08021cec : /** Return the time left before the next timeout is due. If no timeouts are * enqueued, returns 0xffffffff */ u32_t sys_timeouts_sleeptime(void) { 8021cec: b580 push {r7, lr} 8021cee: b082 sub sp, #8 8021cf0: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8021cf2: f7ef f993 bl 801101c if (next_timeout == NULL) { 8021cf6: 4b16 ldr r3, [pc, #88] @ (8021d50 ) 8021cf8: 681b ldr r3, [r3, #0] 8021cfa: 2b00 cmp r3, #0 8021cfc: d102 bne.n 8021d04 return SYS_TIMEOUTS_SLEEPTIME_INFINITE; 8021cfe: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021d02: e020 b.n 8021d46 } now = sys_now(); 8021d04: f7ee feee bl 8010ae4 8021d08: 6078 str r0, [r7, #4] if (TIME_LESS_THAN(next_timeout->time, now)) { 8021d0a: 4b11 ldr r3, [pc, #68] @ (8021d50 ) 8021d0c: 681b ldr r3, [r3, #0] 8021d0e: 685a ldr r2, [r3, #4] 8021d10: 687b ldr r3, [r7, #4] 8021d12: 1ad3 subs r3, r2, r3 8021d14: 0fdb lsrs r3, r3, #31 8021d16: f003 0301 and.w r3, r3, #1 8021d1a: b2db uxtb r3, r3 8021d1c: 2b00 cmp r3, #0 8021d1e: d001 beq.n 8021d24 return 0; 8021d20: 2300 movs r3, #0 8021d22: e010 b.n 8021d46 } else { u32_t ret = (u32_t)(next_timeout->time - now); 8021d24: 4b0a ldr r3, [pc, #40] @ (8021d50 ) 8021d26: 681b ldr r3, [r3, #0] 8021d28: 685a ldr r2, [r3, #4] 8021d2a: 687b ldr r3, [r7, #4] 8021d2c: 1ad3 subs r3, r2, r3 8021d2e: 603b str r3, [r7, #0] LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT); 8021d30: 683b ldr r3, [r7, #0] 8021d32: 2b00 cmp r3, #0 8021d34: da06 bge.n 8021d44 8021d36: 4b07 ldr r3, [pc, #28] @ (8021d54 ) 8021d38: f44f 72dc mov.w r2, #440 @ 0x1b8 8021d3c: 4906 ldr r1, [pc, #24] @ (8021d58 ) 8021d3e: 4807 ldr r0, [pc, #28] @ (8021d5c ) 8021d40: f008 fd94 bl 802a86c return ret; 8021d44: 683b ldr r3, [r7, #0] } } 8021d46: 4618 mov r0, r3 8021d48: 3708 adds r7, #8 8021d4a: 46bd mov sp, r7 8021d4c: bd80 pop {r7, pc} 8021d4e: bf00 nop 8021d50: 2402afbc .word 0x2402afbc 8021d54: 08030a08 .word 0x08030a08 8021d58: 08030adc .word 0x08030adc 8021d5c: 08030a7c .word 0x08030a7c 08021d60 : /** * Initialize this module. */ void udp_init(void) { 8021d60: b580 push {r7, lr} 8021d62: af00 add r7, sp, #0 #ifdef LWIP_RAND udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 8021d64: f007 fa58 bl 8029218 8021d68: 4603 mov r3, r0 8021d6a: b29b uxth r3, r3 8021d6c: f3c3 030d ubfx r3, r3, #0, #14 8021d70: b29b uxth r3, r3 8021d72: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 8021d76: b29a uxth r2, r3 8021d78: 4b01 ldr r3, [pc, #4] @ (8021d80 ) 8021d7a: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 8021d7c: bf00 nop 8021d7e: bd80 pop {r7, pc} 8021d80: 24000054 .word 0x24000054 08021d84 : * * @return a new (free) local UDP port number */ static u16_t udp_new_port(void) { 8021d84: b480 push {r7} 8021d86: b083 sub sp, #12 8021d88: af00 add r7, sp, #0 u16_t n = 0; 8021d8a: 2300 movs r3, #0 8021d8c: 80fb strh r3, [r7, #6] struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8021d8e: 4b17 ldr r3, [pc, #92] @ (8021dec ) 8021d90: 881b ldrh r3, [r3, #0] 8021d92: 1c5a adds r2, r3, #1 8021d94: b291 uxth r1, r2 8021d96: 4a15 ldr r2, [pc, #84] @ (8021dec ) 8021d98: 8011 strh r1, [r2, #0] 8021d9a: f64f 72ff movw r2, #65535 @ 0xffff 8021d9e: 4293 cmp r3, r2 8021da0: d103 bne.n 8021daa udp_port = UDP_LOCAL_PORT_RANGE_START; 8021da2: 4b12 ldr r3, [pc, #72] @ (8021dec ) 8021da4: f44f 4240 mov.w r2, #49152 @ 0xc000 8021da8: 801a strh r2, [r3, #0] } /* Check all PCBs. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021daa: 4b11 ldr r3, [pc, #68] @ (8021df0 ) 8021dac: 681b ldr r3, [r3, #0] 8021dae: 603b str r3, [r7, #0] 8021db0: e011 b.n 8021dd6 if (pcb->local_port == udp_port) { 8021db2: 683b ldr r3, [r7, #0] 8021db4: 8a5a ldrh r2, [r3, #18] 8021db6: 4b0d ldr r3, [pc, #52] @ (8021dec ) 8021db8: 881b ldrh r3, [r3, #0] 8021dba: 429a cmp r2, r3 8021dbc: d108 bne.n 8021dd0 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8021dbe: 88fb ldrh r3, [r7, #6] 8021dc0: 3301 adds r3, #1 8021dc2: 80fb strh r3, [r7, #6] 8021dc4: 88fb ldrh r3, [r7, #6] 8021dc6: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 8021dca: d3e0 bcc.n 8021d8e return 0; 8021dcc: 2300 movs r3, #0 8021dce: e007 b.n 8021de0 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021dd0: 683b ldr r3, [r7, #0] 8021dd2: 68db ldr r3, [r3, #12] 8021dd4: 603b str r3, [r7, #0] 8021dd6: 683b ldr r3, [r7, #0] 8021dd8: 2b00 cmp r3, #0 8021dda: d1ea bne.n 8021db2 } goto again; } } return udp_port; 8021ddc: 4b03 ldr r3, [pc, #12] @ (8021dec ) 8021dde: 881b ldrh r3, [r3, #0] } 8021de0: 4618 mov r0, r3 8021de2: 370c adds r7, #12 8021de4: 46bd mov sp, r7 8021de6: f85d 7b04 ldr.w r7, [sp], #4 8021dea: 4770 bx lr 8021dec: 24000054 .word 0x24000054 8021df0: 2402afc8 .word 0x2402afc8 08021df4 : * @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) { 8021df4: b580 push {r7, lr} 8021df6: b084 sub sp, #16 8021df8: af00 add r7, sp, #0 8021dfa: 60f8 str r0, [r7, #12] 8021dfc: 60b9 str r1, [r7, #8] 8021dfe: 4613 mov r3, r2 8021e00: 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); 8021e02: 68fb ldr r3, [r7, #12] 8021e04: 2b00 cmp r3, #0 8021e06: d105 bne.n 8021e14 8021e08: 4b27 ldr r3, [pc, #156] @ (8021ea8 ) 8021e0a: 2287 movs r2, #135 @ 0x87 8021e0c: 4927 ldr r1, [pc, #156] @ (8021eac ) 8021e0e: 4828 ldr r0, [pc, #160] @ (8021eb0 ) 8021e10: f008 fd2c bl 802a86c LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 8021e14: 68bb ldr r3, [r7, #8] 8021e16: 2b00 cmp r3, #0 8021e18: d105 bne.n 8021e26 8021e1a: 4b23 ldr r3, [pc, #140] @ (8021ea8 ) 8021e1c: 2288 movs r2, #136 @ 0x88 8021e1e: 4925 ldr r1, [pc, #148] @ (8021eb4 ) 8021e20: 4823 ldr r0, [pc, #140] @ (8021eb0 ) 8021e22: f008 fd23 bl 802a86c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 8021e26: 68fb ldr r3, [r7, #12] 8021e28: 7a1b ldrb r3, [r3, #8] 8021e2a: 2b00 cmp r3, #0 8021e2c: d00b beq.n 8021e46 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 8021e2e: 68fb ldr r3, [r7, #12] 8021e30: 7a1a ldrb r2, [r3, #8] 8021e32: 4b21 ldr r3, [pc, #132] @ (8021eb8 ) 8021e34: 685b ldr r3, [r3, #4] 8021e36: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8021e3a: 3301 adds r3, #1 8021e3c: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 8021e3e: 429a cmp r2, r3 8021e40: d001 beq.n 8021e46 return 0; 8021e42: 2300 movs r3, #0 8021e44: e02b b.n 8021e9e /* 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) { 8021e46: 79fb ldrb r3, [r7, #7] 8021e48: 2b00 cmp r3, #0 8021e4a: d018 beq.n 8021e7e #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)) || 8021e4c: 68fb ldr r3, [r7, #12] 8021e4e: 2b00 cmp r3, #0 8021e50: d013 beq.n 8021e7a 8021e52: 68fb ldr r3, [r7, #12] 8021e54: 681b ldr r3, [r3, #0] 8021e56: 2b00 cmp r3, #0 8021e58: d00f beq.n 8021e7a ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8021e5a: 4b17 ldr r3, [pc, #92] @ (8021eb8 ) 8021e5c: 695b ldr r3, [r3, #20] if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8021e5e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8021e62: d00a beq.n 8021e7a ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { 8021e64: 68fb ldr r3, [r7, #12] 8021e66: 681a ldr r2, [r3, #0] 8021e68: 4b13 ldr r3, [pc, #76] @ (8021eb8 ) 8021e6a: 695b ldr r3, [r3, #20] 8021e6c: 405a eors r2, r3 8021e6e: 68bb ldr r3, [r7, #8] 8021e70: 3308 adds r3, #8 8021e72: 681b ldr r3, [r3, #0] 8021e74: 4013 ands r3, r2 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8021e76: 2b00 cmp r3, #0 8021e78: d110 bne.n 8021e9c return 1; 8021e7a: 2301 movs r3, #1 8021e7c: e00f b.n 8021e9e } } } 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())) { 8021e7e: 68fb ldr r3, [r7, #12] 8021e80: 2b00 cmp r3, #0 8021e82: d009 beq.n 8021e98 8021e84: 68fb ldr r3, [r7, #12] 8021e86: 681b ldr r3, [r3, #0] 8021e88: 2b00 cmp r3, #0 8021e8a: d005 beq.n 8021e98 8021e8c: 68fb ldr r3, [r7, #12] 8021e8e: 681a ldr r2, [r3, #0] 8021e90: 4b09 ldr r3, [pc, #36] @ (8021eb8 ) 8021e92: 695b ldr r3, [r3, #20] 8021e94: 429a cmp r2, r3 8021e96: d101 bne.n 8021e9c return 1; 8021e98: 2301 movs r3, #1 8021e9a: e000 b.n 8021e9e } } return 0; 8021e9c: 2300 movs r3, #0 } 8021e9e: 4618 mov r0, r3 8021ea0: 3710 adds r7, #16 8021ea2: 46bd mov sp, r7 8021ea4: bd80 pop {r7, pc} 8021ea6: bf00 nop 8021ea8: 08030af0 .word 0x08030af0 8021eac: 08030b20 .word 0x08030b20 8021eb0: 08030b44 .word 0x08030b44 8021eb4: 08030b6c .word 0x08030b6c 8021eb8: 24024418 .word 0x24024418 08021ebc : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8021ebc: b590 push {r4, r7, lr} 8021ebe: b08d sub sp, #52 @ 0x34 8021ec0: af02 add r7, sp, #8 8021ec2: 6078 str r0, [r7, #4] 8021ec4: 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; 8021ec6: 2300 movs r3, #0 8021ec8: 77fb strb r3, [r7, #31] LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 8021eca: f7ef f8a7 bl 801101c LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 8021ece: 687b ldr r3, [r7, #4] 8021ed0: 2b00 cmp r3, #0 8021ed2: d105 bne.n 8021ee0 8021ed4: 4b7c ldr r3, [pc, #496] @ (80220c8 ) 8021ed6: 22cf movs r2, #207 @ 0xcf 8021ed8: 497c ldr r1, [pc, #496] @ (80220cc ) 8021eda: 487d ldr r0, [pc, #500] @ (80220d0 ) 8021edc: f008 fcc6 bl 802a86c LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 8021ee0: 683b ldr r3, [r7, #0] 8021ee2: 2b00 cmp r3, #0 8021ee4: d105 bne.n 8021ef2 8021ee6: 4b78 ldr r3, [pc, #480] @ (80220c8 ) 8021ee8: 22d0 movs r2, #208 @ 0xd0 8021eea: 497a ldr r1, [pc, #488] @ (80220d4 ) 8021eec: 4878 ldr r0, [pc, #480] @ (80220d0 ) 8021eee: f008 fcbd bl 802a86c PERF_START; UDP_STATS_INC(udp.recv); /* Check minimum length (UDP header) */ if (p->len < UDP_HLEN) { 8021ef2: 687b ldr r3, [r7, #4] 8021ef4: 895b ldrh r3, [r3, #10] 8021ef6: 2b07 cmp r3, #7 8021ef8: d803 bhi.n 8021f02 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); 8021efa: 6878 ldr r0, [r7, #4] 8021efc: f7f9 fa3e bl 801b37c goto end; 8021f00: e0de b.n 80220c0 } udphdr = (struct udp_hdr *)p->payload; 8021f02: 687b ldr r3, [r7, #4] 8021f04: 685b ldr r3, [r3, #4] 8021f06: 617b str r3, [r7, #20] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); 8021f08: 4b73 ldr r3, [pc, #460] @ (80220d8 ) 8021f0a: 695b ldr r3, [r3, #20] 8021f0c: 4a72 ldr r2, [pc, #456] @ (80220d8 ) 8021f0e: 6812 ldr r2, [r2, #0] 8021f10: 4611 mov r1, r2 8021f12: 4618 mov r0, r3 8021f14: f003 ff54 bl 8025dc0 8021f18: 4603 mov r3, r0 8021f1a: 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); 8021f1c: 697b ldr r3, [r7, #20] 8021f1e: 881b ldrh r3, [r3, #0] 8021f20: b29b uxth r3, r3 8021f22: 4618 mov r0, r3 8021f24: f7f7 fd48 bl 80199b8 8021f28: 4603 mov r3, r0 8021f2a: 823b strh r3, [r7, #16] dest = lwip_ntohs(udphdr->dest); 8021f2c: 697b ldr r3, [r7, #20] 8021f2e: 885b ldrh r3, [r3, #2] 8021f30: b29b uxth r3, r3 8021f32: 4618 mov r0, r3 8021f34: f7f7 fd40 bl 80199b8 8021f38: 4603 mov r3, r0 8021f3a: 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; 8021f3c: 2300 movs r3, #0 8021f3e: 623b str r3, [r7, #32] prev = NULL; 8021f40: 2300 movs r3, #0 8021f42: 627b str r3, [r7, #36] @ 0x24 uncon_pcb = NULL; 8021f44: 2300 movs r3, #0 8021f46: 61bb str r3, [r7, #24] /* 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) { 8021f48: 4b64 ldr r3, [pc, #400] @ (80220dc ) 8021f4a: 681b ldr r3, [r3, #0] 8021f4c: 623b str r3, [r7, #32] 8021f4e: e054 b.n 8021ffa 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) && 8021f50: 6a3b ldr r3, [r7, #32] 8021f52: 8a5b ldrh r3, [r3, #18] 8021f54: 89fa ldrh r2, [r7, #14] 8021f56: 429a cmp r2, r3 8021f58: d14a bne.n 8021ff0 (udp_input_local_match(pcb, inp, broadcast) != 0)) { 8021f5a: 7cfb ldrb r3, [r7, #19] 8021f5c: 461a mov r2, r3 8021f5e: 6839 ldr r1, [r7, #0] 8021f60: 6a38 ldr r0, [r7, #32] 8021f62: f7ff ff47 bl 8021df4 8021f66: 4603 mov r3, r0 if ((pcb->local_port == dest) && 8021f68: 2b00 cmp r3, #0 8021f6a: d041 beq.n 8021ff0 if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { 8021f6c: 6a3b ldr r3, [r7, #32] 8021f6e: 7c1b ldrb r3, [r3, #16] 8021f70: f003 0304 and.w r3, r3, #4 8021f74: 2b00 cmp r3, #0 8021f76: d11d bne.n 8021fb4 if (uncon_pcb == NULL) { 8021f78: 69bb ldr r3, [r7, #24] 8021f7a: 2b00 cmp r3, #0 8021f7c: d102 bne.n 8021f84 /* the first unconnected matching PCB */ uncon_pcb = pcb; 8021f7e: 6a3b ldr r3, [r7, #32] 8021f80: 61bb str r3, [r7, #24] 8021f82: e017 b.n 8021fb4 #if LWIP_IPV4 } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { 8021f84: 7cfb ldrb r3, [r7, #19] 8021f86: 2b00 cmp r3, #0 8021f88: d014 beq.n 8021fb4 8021f8a: 4b53 ldr r3, [pc, #332] @ (80220d8 ) 8021f8c: 695b ldr r3, [r3, #20] 8021f8e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8021f92: d10f bne.n 8021fb4 /* 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))) { 8021f94: 69bb ldr r3, [r7, #24] 8021f96: 681a ldr r2, [r3, #0] 8021f98: 683b ldr r3, [r7, #0] 8021f9a: 3304 adds r3, #4 8021f9c: 681b ldr r3, [r3, #0] 8021f9e: 429a cmp r2, r3 8021fa0: d008 beq.n 8021fb4 /* 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))) { 8021fa2: 6a3b ldr r3, [r7, #32] 8021fa4: 681a ldr r2, [r3, #0] 8021fa6: 683b ldr r3, [r7, #0] 8021fa8: 3304 adds r3, #4 8021faa: 681b ldr r3, [r3, #0] 8021fac: 429a cmp r2, r3 8021fae: d101 bne.n 8021fb4 /* better match */ uncon_pcb = pcb; 8021fb0: 6a3b ldr r3, [r7, #32] 8021fb2: 61bb str r3, [r7, #24] } #endif /* SO_REUSE */ } /* compare PCB remote addr+port to UDP source addr+port */ if ((pcb->remote_port == src) && 8021fb4: 6a3b ldr r3, [r7, #32] 8021fb6: 8a9b ldrh r3, [r3, #20] 8021fb8: 8a3a ldrh r2, [r7, #16] 8021fba: 429a cmp r2, r3 8021fbc: d118 bne.n 8021ff0 (ip_addr_isany_val(pcb->remote_ip) || 8021fbe: 6a3b ldr r3, [r7, #32] 8021fc0: 685b ldr r3, [r3, #4] if ((pcb->remote_port == src) && 8021fc2: 2b00 cmp r3, #0 8021fc4: d005 beq.n 8021fd2 ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { 8021fc6: 6a3b ldr r3, [r7, #32] 8021fc8: 685a ldr r2, [r3, #4] 8021fca: 4b43 ldr r3, [pc, #268] @ (80220d8 ) 8021fcc: 691b ldr r3, [r3, #16] (ip_addr_isany_val(pcb->remote_ip) || 8021fce: 429a cmp r2, r3 8021fd0: d10e bne.n 8021ff0 /* the first fully matching PCB */ if (prev != NULL) { 8021fd2: 6a7b ldr r3, [r7, #36] @ 0x24 8021fd4: 2b00 cmp r3, #0 8021fd6: d014 beq.n 8022002 /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 8021fd8: 6a3b ldr r3, [r7, #32] 8021fda: 68da ldr r2, [r3, #12] 8021fdc: 6a7b ldr r3, [r7, #36] @ 0x24 8021fde: 60da str r2, [r3, #12] pcb->next = udp_pcbs; 8021fe0: 4b3e ldr r3, [pc, #248] @ (80220dc ) 8021fe2: 681a ldr r2, [r3, #0] 8021fe4: 6a3b ldr r3, [r7, #32] 8021fe6: 60da str r2, [r3, #12] udp_pcbs = pcb; 8021fe8: 4a3c ldr r2, [pc, #240] @ (80220dc ) 8021fea: 6a3b ldr r3, [r7, #32] 8021fec: 6013 str r3, [r2, #0] } else { UDP_STATS_INC(udp.cachehit); } break; 8021fee: e008 b.n 8022002 } } prev = pcb; 8021ff0: 6a3b ldr r3, [r7, #32] 8021ff2: 627b str r3, [r7, #36] @ 0x24 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021ff4: 6a3b ldr r3, [r7, #32] 8021ff6: 68db ldr r3, [r3, #12] 8021ff8: 623b str r3, [r7, #32] 8021ffa: 6a3b ldr r3, [r7, #32] 8021ffc: 2b00 cmp r3, #0 8021ffe: d1a7 bne.n 8021f50 8022000: e000 b.n 8022004 break; 8022002: bf00 nop } /* no fully matching pcb found? then look for an unconnected pcb */ if (pcb == NULL) { 8022004: 6a3b ldr r3, [r7, #32] 8022006: 2b00 cmp r3, #0 8022008: d101 bne.n 802200e pcb = uncon_pcb; 802200a: 69bb ldr r3, [r7, #24] 802200c: 623b str r3, [r7, #32] } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL) { 802200e: 6a3b ldr r3, [r7, #32] 8022010: 2b00 cmp r3, #0 8022012: d002 beq.n 802201a for_us = 1; 8022014: 2301 movs r3, #1 8022016: 77fb strb r3, [r7, #31] 8022018: e00a b.n 8022030 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()); 802201a: 683b ldr r3, [r7, #0] 802201c: 3304 adds r3, #4 802201e: 681a ldr r2, [r3, #0] 8022020: 4b2d ldr r3, [pc, #180] @ (80220d8 ) 8022022: 695b ldr r3, [r3, #20] 8022024: 429a cmp r2, r3 8022026: bf0c ite eq 8022028: 2301 moveq r3, #1 802202a: 2300 movne r3, #0 802202c: b2db uxtb r3, r3 802202e: 77fb strb r3, [r7, #31] } #endif /* LWIP_IPV4 */ } if (for_us) { 8022030: 7ffb ldrb r3, [r7, #31] 8022032: 2b00 cmp r3, #0 8022034: d041 beq.n 80220ba } } } } #endif /* CHECKSUM_CHECK_UDP */ if (pbuf_remove_header(p, UDP_HLEN)) { 8022036: 2108 movs r1, #8 8022038: 6878 ldr r0, [r7, #4] 802203a: f7f9 f8e7 bl 801b20c 802203e: 4603 mov r3, r0 8022040: 2b00 cmp r3, #0 8022042: d00a beq.n 802205a /* Can we cope with this failing? Just assert for now */ LWIP_ASSERT("pbuf_remove_header failed\n", 0); 8022044: 4b20 ldr r3, [pc, #128] @ (80220c8 ) 8022046: f44f 72b8 mov.w r2, #368 @ 0x170 802204a: 4925 ldr r1, [pc, #148] @ (80220e0 ) 802204c: 4820 ldr r0, [pc, #128] @ (80220d0 ) 802204e: f008 fc0d bl 802a86c UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); 8022052: 6878 ldr r0, [r7, #4] 8022054: f7f9 f992 bl 801b37c goto end; 8022058: e032 b.n 80220c0 } if (pcb != NULL) { 802205a: 6a3b ldr r3, [r7, #32] 802205c: 2b00 cmp r3, #0 802205e: d012 beq.n 8022086 } } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 8022060: 6a3b ldr r3, [r7, #32] 8022062: 699b ldr r3, [r3, #24] 8022064: 2b00 cmp r3, #0 8022066: d00a beq.n 802207e /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 8022068: 6a3b ldr r3, [r7, #32] 802206a: 699c ldr r4, [r3, #24] 802206c: 6a3b ldr r3, [r7, #32] 802206e: 69d8 ldr r0, [r3, #28] 8022070: 8a3b ldrh r3, [r7, #16] 8022072: 9300 str r3, [sp, #0] 8022074: 4b1b ldr r3, [pc, #108] @ (80220e4 ) 8022076: 687a ldr r2, [r7, #4] 8022078: 6a39 ldr r1, [r7, #32] 802207a: 47a0 blx r4 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); return; 802207c: e021 b.n 80220c2 pbuf_free(p); 802207e: 6878 ldr r0, [r7, #4] 8022080: f7f9 f97c bl 801b37c goto end; 8022084: e01c b.n 80220c0 if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { 8022086: 7cfb ldrb r3, [r7, #19] 8022088: 2b00 cmp r3, #0 802208a: d112 bne.n 80220b2 802208c: 4b12 ldr r3, [pc, #72] @ (80220d8 ) 802208e: 695b ldr r3, [r3, #20] 8022090: f003 03f0 and.w r3, r3, #240 @ 0xf0 8022094: 2be0 cmp r3, #224 @ 0xe0 8022096: d00c beq.n 80220b2 pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); 8022098: 4b0f ldr r3, [pc, #60] @ (80220d8 ) 802209a: 899b ldrh r3, [r3, #12] 802209c: 3308 adds r3, #8 802209e: b29b uxth r3, r3 80220a0: b21b sxth r3, r3 80220a2: 4619 mov r1, r3 80220a4: 6878 ldr r0, [r7, #4] 80220a6: f7f9 f924 bl 801b2f2 icmp_port_unreach(ip_current_is_v6(), p); 80220aa: 2103 movs r1, #3 80220ac: 6878 ldr r0, [r7, #4] 80220ae: f003 fb3b bl 8025728 pbuf_free(p); 80220b2: 6878 ldr r0, [r7, #4] 80220b4: f7f9 f962 bl 801b37c return; 80220b8: e003 b.n 80220c2 pbuf_free(p); 80220ba: 6878 ldr r0, [r7, #4] 80220bc: f7f9 f95e bl 801b37c return; 80220c0: bf00 nop UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); PERF_STOP("udp_input"); #endif /* CHECKSUM_CHECK_UDP */ } 80220c2: 372c adds r7, #44 @ 0x2c 80220c4: 46bd mov sp, r7 80220c6: bd90 pop {r4, r7, pc} 80220c8: 08030af0 .word 0x08030af0 80220cc: 08030b94 .word 0x08030b94 80220d0: 08030b44 .word 0x08030b44 80220d4: 08030bac .word 0x08030bac 80220d8: 24024418 .word 0x24024418 80220dc: 2402afc8 .word 0x2402afc8 80220e0: 08030bc8 .word 0x08030bc8 80220e4: 24024428 .word 0x24024428 080220e8 : * * @see udp_disconnect() udp_sendto() */ err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { 80220e8: b580 push {r7, lr} 80220ea: b082 sub sp, #8 80220ec: af00 add r7, sp, #0 80220ee: 6078 str r0, [r7, #4] 80220f0: 6039 str r1, [r7, #0] LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); 80220f2: 687b ldr r3, [r7, #4] 80220f4: 2b00 cmp r3, #0 80220f6: d109 bne.n 802210c 80220f8: 4b11 ldr r3, [pc, #68] @ (8022140 ) 80220fa: f240 12d5 movw r2, #469 @ 0x1d5 80220fe: 4911 ldr r1, [pc, #68] @ (8022144 ) 8022100: 4811 ldr r0, [pc, #68] @ (8022148 ) 8022102: f008 fbb3 bl 802a86c 8022106: f06f 030f mvn.w r3, #15 802210a: e015 b.n 8022138 LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); 802210c: 683b ldr r3, [r7, #0] 802210e: 2b00 cmp r3, #0 8022110: d109 bne.n 8022126 8022112: 4b0b ldr r3, [pc, #44] @ (8022140 ) 8022114: f44f 72eb mov.w r2, #470 @ 0x1d6 8022118: 490c ldr r1, [pc, #48] @ (802214c ) 802211a: 480b ldr r0, [pc, #44] @ (8022148 ) 802211c: f008 fba6 bl 802a86c 8022120: f06f 030f mvn.w r3, #15 8022124: e008 b.n 8022138 if (IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { return ERR_VAL; } /* send to the packet using remote ip and port stored in the pcb */ return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); 8022126: 687b ldr r3, [r7, #4] 8022128: 1d1a adds r2, r3, #4 802212a: 687b ldr r3, [r7, #4] 802212c: 8a9b ldrh r3, [r3, #20] 802212e: 6839 ldr r1, [r7, #0] 8022130: 6878 ldr r0, [r7, #4] 8022132: f000 f80d bl 8022150 8022136: 4603 mov r3, r0 } 8022138: 4618 mov r0, r3 802213a: 3708 adds r7, #8 802213c: 46bd mov sp, r7 802213e: bd80 pop {r7, pc} 8022140: 08030af0 .word 0x08030af0 8022144: 08030be4 .word 0x08030be4 8022148: 08030b44 .word 0x08030b44 802214c: 08030bfc .word 0x08030bfc 08022150 : * @see udp_disconnect() udp_send() */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port) { 8022150: b580 push {r7, lr} 8022152: b088 sub sp, #32 8022154: af02 add r7, sp, #8 8022156: 60f8 str r0, [r7, #12] 8022158: 60b9 str r1, [r7, #8] 802215a: 607a str r2, [r7, #4] 802215c: 807b strh r3, [r7, #2] u16_t dst_port, u8_t have_chksum, u16_t chksum) { #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ struct netif *netif; LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG); 802215e: 68fb ldr r3, [r7, #12] 8022160: 2b00 cmp r3, #0 8022162: d109 bne.n 8022178 8022164: 4b23 ldr r3, [pc, #140] @ (80221f4 ) 8022166: f44f 7206 mov.w r2, #536 @ 0x218 802216a: 4923 ldr r1, [pc, #140] @ (80221f8 ) 802216c: 4823 ldr r0, [pc, #140] @ (80221fc ) 802216e: f008 fb7d bl 802a86c 8022172: f06f 030f mvn.w r3, #15 8022176: e038 b.n 80221ea LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); 8022178: 68bb ldr r3, [r7, #8] 802217a: 2b00 cmp r3, #0 802217c: d109 bne.n 8022192 802217e: 4b1d ldr r3, [pc, #116] @ (80221f4 ) 8022180: f240 2219 movw r2, #537 @ 0x219 8022184: 491e ldr r1, [pc, #120] @ (8022200 ) 8022186: 481d ldr r0, [pc, #116] @ (80221fc ) 8022188: f008 fb70 bl 802a86c 802218c: f06f 030f mvn.w r3, #15 8022190: e02b b.n 80221ea LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8022192: 687b ldr r3, [r7, #4] 8022194: 2b00 cmp r3, #0 8022196: d109 bne.n 80221ac 8022198: 4b16 ldr r3, [pc, #88] @ (80221f4 ) 802219a: f240 221a movw r2, #538 @ 0x21a 802219e: 4919 ldr r1, [pc, #100] @ (8022204 ) 80221a0: 4816 ldr r0, [pc, #88] @ (80221fc ) 80221a2: f008 fb63 bl 802a86c 80221a6: f06f 030f mvn.w r3, #15 80221aa: e01e b.n 80221ea return ERR_VAL; } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); if (pcb->netif_idx != NETIF_NO_INDEX) { 80221ac: 68fb ldr r3, [r7, #12] 80221ae: 7a1b ldrb r3, [r3, #8] 80221b0: 2b00 cmp r3, #0 80221b2: d006 beq.n 80221c2 netif = netif_get_by_index(pcb->netif_idx); 80221b4: 68fb ldr r3, [r7, #12] 80221b6: 7a1b ldrb r3, [r3, #8] 80221b8: 4618 mov r0, r3 80221ba: f7f8 fd1f bl 801abfc 80221be: 6178 str r0, [r7, #20] 80221c0: e003 b.n 80221ca if (netif == NULL) #endif /* LWIP_MULTICAST_TX_OPTIONS */ { /* find the outgoing network interface for this packet */ netif = ip_route(&pcb->local_ip, dst_ip); 80221c2: 6878 ldr r0, [r7, #4] 80221c4: f003 fb44 bl 8025850 80221c8: 6178 str r0, [r7, #20] } } /* no outgoing network interface could be found? */ if (netif == NULL) { 80221ca: 697b ldr r3, [r7, #20] 80221cc: 2b00 cmp r3, #0 80221ce: d102 bne.n 80221d6 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to ")); ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, dst_ip); LWIP_DEBUGF(UDP_DEBUG, ("\n")); UDP_STATS_INC(udp.rterr); return ERR_RTE; 80221d0: f06f 0303 mvn.w r3, #3 80221d4: e009 b.n 80221ea } #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); #else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); 80221d6: 887a ldrh r2, [r7, #2] 80221d8: 697b ldr r3, [r7, #20] 80221da: 9300 str r3, [sp, #0] 80221dc: 4613 mov r3, r2 80221de: 687a ldr r2, [r7, #4] 80221e0: 68b9 ldr r1, [r7, #8] 80221e2: 68f8 ldr r0, [r7, #12] 80221e4: f000 f810 bl 8022208 80221e8: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 80221ea: 4618 mov r0, r3 80221ec: 3718 adds r7, #24 80221ee: 46bd mov sp, r7 80221f0: bd80 pop {r7, pc} 80221f2: bf00 nop 80221f4: 08030af0 .word 0x08030af0 80221f8: 08030c14 .word 0x08030c14 80221fc: 08030b44 .word 0x08030b44 8022200: 08030c2c .word 0x08030c2c 8022204: 08030c48 .word 0x08030c48 08022208 : * @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) { 8022208: b580 push {r7, lr} 802220a: b088 sub sp, #32 802220c: af02 add r7, sp, #8 802220e: 60f8 str r0, [r7, #12] 8022210: 60b9 str r1, [r7, #8] 8022212: 607a str r2, [r7, #4] 8022214: 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); 8022216: 68fb ldr r3, [r7, #12] 8022218: 2b00 cmp r3, #0 802221a: d109 bne.n 8022230 802221c: 4b2e ldr r3, [pc, #184] @ (80222d8 ) 802221e: f44f 7220 mov.w r2, #640 @ 0x280 8022222: 492e ldr r1, [pc, #184] @ (80222dc ) 8022224: 482e ldr r0, [pc, #184] @ (80222e0 ) 8022226: f008 fb21 bl 802a86c 802222a: f06f 030f mvn.w r3, #15 802222e: e04f b.n 80222d0 LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); 8022230: 68bb ldr r3, [r7, #8] 8022232: 2b00 cmp r3, #0 8022234: d109 bne.n 802224a 8022236: 4b28 ldr r3, [pc, #160] @ (80222d8 ) 8022238: f240 2281 movw r2, #641 @ 0x281 802223c: 4929 ldr r1, [pc, #164] @ (80222e4 ) 802223e: 4828 ldr r0, [pc, #160] @ (80222e0 ) 8022240: f008 fb14 bl 802a86c 8022244: f06f 030f mvn.w r3, #15 8022248: e042 b.n 80222d0 LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 802224a: 687b ldr r3, [r7, #4] 802224c: 2b00 cmp r3, #0 802224e: d109 bne.n 8022264 8022250: 4b21 ldr r3, [pc, #132] @ (80222d8 ) 8022252: f240 2282 movw r2, #642 @ 0x282 8022256: 4924 ldr r1, [pc, #144] @ (80222e8 ) 8022258: 4821 ldr r0, [pc, #132] @ (80222e0 ) 802225a: f008 fb07 bl 802a86c 802225e: f06f 030f mvn.w r3, #15 8022262: e035 b.n 80222d0 LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); 8022264: 6a3b ldr r3, [r7, #32] 8022266: 2b00 cmp r3, #0 8022268: d109 bne.n 802227e 802226a: 4b1b ldr r3, [pc, #108] @ (80222d8 ) 802226c: f240 2283 movw r2, #643 @ 0x283 8022270: 491e ldr r1, [pc, #120] @ (80222ec ) 8022272: 481b ldr r0, [pc, #108] @ (80222e0 ) 8022274: f008 fafa bl 802a86c 8022278: f06f 030f mvn.w r3, #15 802227c: e028 b.n 80222d0 #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)) || 802227e: 68fb ldr r3, [r7, #12] 8022280: 2b00 cmp r3, #0 8022282: d009 beq.n 8022298 8022284: 68fb ldr r3, [r7, #12] 8022286: 681b ldr r3, [r3, #0] 8022288: 2b00 cmp r3, #0 802228a: d005 beq.n 8022298 ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { 802228c: 68fb ldr r3, [r7, #12] 802228e: 681b ldr r3, [r3, #0] 8022290: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8022294: 2be0 cmp r3, #224 @ 0xe0 8022296: d103 bne.n 80222a0 /* if the local_ip is any or multicast * use the outgoing network interface IP address as source address */ src_ip = netif_ip_addr4(netif); 8022298: 6a3b ldr r3, [r7, #32] 802229a: 3304 adds r3, #4 802229c: 617b str r3, [r7, #20] 802229e: e00b b.n 80222b8 } 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))) { 80222a0: 68fb ldr r3, [r7, #12] 80222a2: 681a ldr r2, [r3, #0] 80222a4: 6a3b ldr r3, [r7, #32] 80222a6: 3304 adds r3, #4 80222a8: 681b ldr r3, [r3, #0] 80222aa: 429a cmp r2, r3 80222ac: d002 beq.n 80222b4 /* local_ip doesn't match, drop the packet */ return ERR_RTE; 80222ae: f06f 0303 mvn.w r3, #3 80222b2: e00d b.n 80222d0 } /* use UDP PCB local IP address as source address */ src_ip = &pcb->local_ip; 80222b4: 68fb ldr r3, [r7, #12] 80222b6: 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); 80222b8: 887a ldrh r2, [r7, #2] 80222ba: 697b ldr r3, [r7, #20] 80222bc: 9301 str r3, [sp, #4] 80222be: 6a3b ldr r3, [r7, #32] 80222c0: 9300 str r3, [sp, #0] 80222c2: 4613 mov r3, r2 80222c4: 687a ldr r2, [r7, #4] 80222c6: 68b9 ldr r1, [r7, #8] 80222c8: 68f8 ldr r0, [r7, #12] 80222ca: f000 f811 bl 80222f0 80222ce: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 80222d0: 4618 mov r0, r3 80222d2: 3718 adds r7, #24 80222d4: 46bd mov sp, r7 80222d6: bd80 pop {r7, pc} 80222d8: 08030af0 .word 0x08030af0 80222dc: 08030c64 .word 0x08030c64 80222e0: 08030b44 .word 0x08030b44 80222e4: 08030c80 .word 0x08030c80 80222e8: 08030c9c .word 0x08030c9c 80222ec: 08030cbc .word 0x08030cbc 080222f0 : /** @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) { 80222f0: b580 push {r7, lr} 80222f2: b08c sub sp, #48 @ 0x30 80222f4: af04 add r7, sp, #16 80222f6: 60f8 str r0, [r7, #12] 80222f8: 60b9 str r1, [r7, #8] 80222fa: 607a str r2, [r7, #4] 80222fc: 807b strh r3, [r7, #2] err_t err; struct pbuf *q; /* q will be sent down the stack */ u8_t ip_proto; u8_t ttl; LWIP_ASSERT_CORE_LOCKED(); 80222fe: f7ee fe8d bl 801101c LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); 8022302: 68fb ldr r3, [r7, #12] 8022304: 2b00 cmp r3, #0 8022306: d109 bne.n 802231c 8022308: 4b65 ldr r3, [pc, #404] @ (80224a0 ) 802230a: f240 22d1 movw r2, #721 @ 0x2d1 802230e: 4965 ldr r1, [pc, #404] @ (80224a4 ) 8022310: 4865 ldr r0, [pc, #404] @ (80224a8 ) 8022312: f008 faab bl 802a86c 8022316: f06f 030f mvn.w r3, #15 802231a: e0bc b.n 8022496 LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); 802231c: 68bb ldr r3, [r7, #8] 802231e: 2b00 cmp r3, #0 8022320: d109 bne.n 8022336 8022322: 4b5f ldr r3, [pc, #380] @ (80224a0 ) 8022324: f240 22d2 movw r2, #722 @ 0x2d2 8022328: 4960 ldr r1, [pc, #384] @ (80224ac ) 802232a: 485f ldr r0, [pc, #380] @ (80224a8 ) 802232c: f008 fa9e bl 802a86c 8022330: f06f 030f mvn.w r3, #15 8022334: e0af b.n 8022496 LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8022336: 687b ldr r3, [r7, #4] 8022338: 2b00 cmp r3, #0 802233a: d109 bne.n 8022350 802233c: 4b58 ldr r3, [pc, #352] @ (80224a0 ) 802233e: f240 22d3 movw r2, #723 @ 0x2d3 8022342: 495b ldr r1, [pc, #364] @ (80224b0 ) 8022344: 4858 ldr r0, [pc, #352] @ (80224a8 ) 8022346: f008 fa91 bl 802a86c 802234a: f06f 030f mvn.w r3, #15 802234e: e0a2 b.n 8022496 LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); 8022350: 6afb ldr r3, [r7, #44] @ 0x2c 8022352: 2b00 cmp r3, #0 8022354: d109 bne.n 802236a 8022356: 4b52 ldr r3, [pc, #328] @ (80224a0 ) 8022358: f44f 7235 mov.w r2, #724 @ 0x2d4 802235c: 4955 ldr r1, [pc, #340] @ (80224b4 ) 802235e: 4852 ldr r0, [pc, #328] @ (80224a8 ) 8022360: f008 fa84 bl 802a86c 8022364: f06f 030f mvn.w r3, #15 8022368: e095 b.n 8022496 LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); 802236a: 6abb ldr r3, [r7, #40] @ 0x28 802236c: 2b00 cmp r3, #0 802236e: d109 bne.n 8022384 8022370: 4b4b ldr r3, [pc, #300] @ (80224a0 ) 8022372: f240 22d5 movw r2, #725 @ 0x2d5 8022376: 4950 ldr r1, [pc, #320] @ (80224b8 ) 8022378: 484b ldr r0, [pc, #300] @ (80224a8 ) 802237a: f008 fa77 bl 802a86c 802237e: f06f 030f mvn.w r3, #15 8022382: e088 b.n 8022496 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) { 8022384: 68fb ldr r3, [r7, #12] 8022386: 8a5b ldrh r3, [r3, #18] 8022388: 2b00 cmp r3, #0 802238a: d10f bne.n 80223ac 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); 802238c: 68f9 ldr r1, [r7, #12] 802238e: 68fb ldr r3, [r7, #12] 8022390: 8a5b ldrh r3, [r3, #18] 8022392: 461a mov r2, r3 8022394: 68f8 ldr r0, [r7, #12] 8022396: f000 f893 bl 80224c0 802239a: 4603 mov r3, r0 802239c: 76fb strb r3, [r7, #27] if (err != ERR_OK) { 802239e: f997 301b ldrsb.w r3, [r7, #27] 80223a2: 2b00 cmp r3, #0 80223a4: d002 beq.n 80223ac LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); return err; 80223a6: f997 301b ldrsb.w r3, [r7, #27] 80223aa: e074 b.n 8022496 } } /* packet too large to add a UDP header without causing an overflow? */ if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) { 80223ac: 68bb ldr r3, [r7, #8] 80223ae: 891b ldrh r3, [r3, #8] 80223b0: f64f 72f7 movw r2, #65527 @ 0xfff7 80223b4: 4293 cmp r3, r2 80223b6: d902 bls.n 80223be return ERR_MEM; 80223b8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80223bc: e06b b.n 8022496 } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_add_header(p, UDP_HLEN)) { 80223be: 2108 movs r1, #8 80223c0: 68b8 ldr r0, [r7, #8] 80223c2: f7f8 ff13 bl 801b1ec 80223c6: 4603 mov r3, r0 80223c8: 2b00 cmp r3, #0 80223ca: d015 beq.n 80223f8 /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 80223cc: f44f 7220 mov.w r2, #640 @ 0x280 80223d0: 2108 movs r1, #8 80223d2: 2022 movs r0, #34 @ 0x22 80223d4: f7f8 fcbc bl 801ad50 80223d8: 61f8 str r0, [r7, #28] /* new header pbuf could not be allocated? */ if (q == NULL) { 80223da: 69fb ldr r3, [r7, #28] 80223dc: 2b00 cmp r3, #0 80223de: d102 bne.n 80223e6 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; 80223e0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80223e4: e057 b.n 8022496 } if (p->tot_len != 0) { 80223e6: 68bb ldr r3, [r7, #8] 80223e8: 891b ldrh r3, [r3, #8] 80223ea: 2b00 cmp r3, #0 80223ec: d006 beq.n 80223fc /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 80223ee: 68b9 ldr r1, [r7, #8] 80223f0: 69f8 ldr r0, [r7, #28] 80223f2: f7f9 f8e7 bl 801b5c4 80223f6: e001 b.n 80223fc 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; 80223f8: 68bb ldr r3, [r7, #8] 80223fa: 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", 80223fc: 69fb ldr r3, [r7, #28] 80223fe: 895b ldrh r3, [r3, #10] 8022400: 2b07 cmp r3, #7 8022402: d806 bhi.n 8022412 8022404: 4b26 ldr r3, [pc, #152] @ (80224a0 ) 8022406: f240 320d movw r2, #781 @ 0x30d 802240a: 492c ldr r1, [pc, #176] @ (80224bc ) 802240c: 4826 ldr r0, [pc, #152] @ (80224a8 ) 802240e: f008 fa2d bl 802a86c (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; 8022412: 69fb ldr r3, [r7, #28] 8022414: 685b ldr r3, [r3, #4] 8022416: 617b str r3, [r7, #20] udphdr->src = lwip_htons(pcb->local_port); 8022418: 68fb ldr r3, [r7, #12] 802241a: 8a5b ldrh r3, [r3, #18] 802241c: 4618 mov r0, r3 802241e: f7f7 facb bl 80199b8 8022422: 4603 mov r3, r0 8022424: 461a mov r2, r3 8022426: 697b ldr r3, [r7, #20] 8022428: 801a strh r2, [r3, #0] udphdr->dest = lwip_htons(dst_port); 802242a: 887b ldrh r3, [r7, #2] 802242c: 4618 mov r0, r3 802242e: f7f7 fac3 bl 80199b8 8022432: 4603 mov r3, r0 8022434: 461a mov r2, r3 8022436: 697b ldr r3, [r7, #20] 8022438: 805a strh r2, [r3, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 802243a: 697b ldr r3, [r7, #20] 802243c: 2200 movs r2, #0 802243e: 719a strb r2, [r3, #6] 8022440: 2200 movs r2, #0 8022442: 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); 8022444: 69fb ldr r3, [r7, #28] 8022446: 891b ldrh r3, [r3, #8] 8022448: 4618 mov r0, r3 802244a: f7f7 fab5 bl 80199b8 802244e: 4603 mov r3, r0 8022450: 461a mov r2, r3 8022452: 697b ldr r3, [r7, #20] 8022454: 809a strh r2, [r3, #4] } udphdr->chksum = udpchksum; } } #endif /* CHECKSUM_GEN_UDP */ ip_proto = IP_PROTO_UDP; 8022456: 2311 movs r3, #17 8022458: 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; 802245a: 68fb ldr r3, [r7, #12] 802245c: 7adb ldrb r3, [r3, #11] 802245e: 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); 8022460: 68fb ldr r3, [r7, #12] 8022462: 7a9b ldrb r3, [r3, #10] 8022464: 7cb9 ldrb r1, [r7, #18] 8022466: 6aba ldr r2, [r7, #40] @ 0x28 8022468: 9202 str r2, [sp, #8] 802246a: 7cfa ldrb r2, [r7, #19] 802246c: 9201 str r2, [sp, #4] 802246e: 9300 str r3, [sp, #0] 8022470: 460b mov r3, r1 8022472: 687a ldr r2, [r7, #4] 8022474: 6af9 ldr r1, [r7, #44] @ 0x2c 8022476: 69f8 ldr r0, [r7, #28] 8022478: f003 fbf2 bl 8025c60 802247c: 4603 mov r3, r0 802247e: 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) { 8022480: 69fa ldr r2, [r7, #28] 8022482: 68bb ldr r3, [r7, #8] 8022484: 429a cmp r2, r3 8022486: d004 beq.n 8022492 /* free the header pbuf */ pbuf_free(q); 8022488: 69f8 ldr r0, [r7, #28] 802248a: f7f8 ff77 bl 801b37c q = NULL; 802248e: 2300 movs r3, #0 8022490: 61fb str r3, [r7, #28] /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; 8022492: f997 301b ldrsb.w r3, [r7, #27] } 8022496: 4618 mov r0, r3 8022498: 3720 adds r7, #32 802249a: 46bd mov sp, r7 802249c: bd80 pop {r7, pc} 802249e: bf00 nop 80224a0: 08030af0 .word 0x08030af0 80224a4: 08030cdc .word 0x08030cdc 80224a8: 08030b44 .word 0x08030b44 80224ac: 08030cfc .word 0x08030cfc 80224b0: 08030d1c .word 0x08030d1c 80224b4: 08030d40 .word 0x08030d40 80224b8: 08030d64 .word 0x08030d64 80224bc: 08030d88 .word 0x08030d88 080224c0 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 80224c0: b580 push {r7, lr} 80224c2: b086 sub sp, #24 80224c4: af00 add r7, sp, #0 80224c6: 60f8 str r0, [r7, #12] 80224c8: 60b9 str r1, [r7, #8] 80224ca: 4613 mov r3, r2 80224cc: 80fb strh r3, [r7, #6] u8_t rebind; #if LWIP_IPV6 && LWIP_IPV6_SCOPES ip_addr_t zoned_ipaddr; #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ LWIP_ASSERT_CORE_LOCKED(); 80224ce: f7ee fda5 bl 801101c #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 80224d2: 68bb ldr r3, [r7, #8] 80224d4: 2b00 cmp r3, #0 80224d6: d101 bne.n 80224dc ipaddr = IP4_ADDR_ANY; 80224d8: 4b39 ldr r3, [pc, #228] @ (80225c0 ) 80224da: 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); 80224dc: 68fb ldr r3, [r7, #12] 80224de: 2b00 cmp r3, #0 80224e0: d109 bne.n 80224f6 80224e2: 4b38 ldr r3, [pc, #224] @ (80225c4 ) 80224e4: f240 32b7 movw r2, #951 @ 0x3b7 80224e8: 4937 ldr r1, [pc, #220] @ (80225c8 ) 80224ea: 4838 ldr r0, [pc, #224] @ (80225cc ) 80224ec: f008 f9be bl 802a86c 80224f0: f06f 030f mvn.w r3, #15 80224f4: e060 b.n 80225b8 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; 80224f6: 2300 movs r3, #0 80224f8: 74fb strb r3, [r7, #19] /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80224fa: 4b35 ldr r3, [pc, #212] @ (80225d0 ) 80224fc: 681b ldr r3, [r3, #0] 80224fe: 617b str r3, [r7, #20] 8022500: e009 b.n 8022516 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8022502: 68fa ldr r2, [r7, #12] 8022504: 697b ldr r3, [r7, #20] 8022506: 429a cmp r2, r3 8022508: d102 bne.n 8022510 rebind = 1; 802250a: 2301 movs r3, #1 802250c: 74fb strb r3, [r7, #19] break; 802250e: e005 b.n 802251c for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8022510: 697b ldr r3, [r7, #20] 8022512: 68db ldr r3, [r3, #12] 8022514: 617b str r3, [r7, #20] 8022516: 697b ldr r3, [r7, #20] 8022518: 2b00 cmp r3, #0 802251a: d1f2 bne.n 8022502 ipaddr = &zoned_ipaddr; } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ /* no port specified? */ if (port == 0) { 802251c: 88fb ldrh r3, [r7, #6] 802251e: 2b00 cmp r3, #0 8022520: d109 bne.n 8022536 port = udp_new_port(); 8022522: f7ff fc2f bl 8021d84 8022526: 4603 mov r3, r0 8022528: 80fb strh r3, [r7, #6] if (port == 0) { 802252a: 88fb ldrh r3, [r7, #6] 802252c: 2b00 cmp r3, #0 802252e: d12c bne.n 802258a /* no more ports available in local range */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); return ERR_USE; 8022530: f06f 0307 mvn.w r3, #7 8022534: e040 b.n 80225b8 } } else { for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8022536: 4b26 ldr r3, [pc, #152] @ (80225d0 ) 8022538: 681b ldr r3, [r3, #0] 802253a: 617b str r3, [r7, #20] 802253c: e022 b.n 8022584 if (pcb != ipcb) { 802253e: 68fa ldr r2, [r7, #12] 8022540: 697b ldr r3, [r7, #20] 8022542: 429a cmp r2, r3 8022544: d01b beq.n 802257e 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) && 8022546: 697b ldr r3, [r7, #20] 8022548: 8a5b ldrh r3, [r3, #18] 802254a: 88fa ldrh r2, [r7, #6] 802254c: 429a cmp r2, r3 802254e: d116 bne.n 802257e /* IP address matches or any IP used? */ (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 8022550: 697b ldr r3, [r7, #20] 8022552: 681a ldr r2, [r3, #0] 8022554: 68bb ldr r3, [r7, #8] 8022556: 681b ldr r3, [r3, #0] if ((ipcb->local_port == port) && 8022558: 429a cmp r2, r3 802255a: d00d beq.n 8022578 (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 802255c: 68bb ldr r3, [r7, #8] 802255e: 2b00 cmp r3, #0 8022560: d00a beq.n 8022578 8022562: 68bb ldr r3, [r7, #8] 8022564: 681b ldr r3, [r3, #0] 8022566: 2b00 cmp r3, #0 8022568: d006 beq.n 8022578 ip_addr_isany(&ipcb->local_ip))) { 802256a: 697b ldr r3, [r7, #20] (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 802256c: 2b00 cmp r3, #0 802256e: d003 beq.n 8022578 ip_addr_isany(&ipcb->local_ip))) { 8022570: 697b ldr r3, [r7, #20] 8022572: 681b ldr r3, [r3, #0] 8022574: 2b00 cmp r3, #0 8022576: d102 bne.n 802257e /* 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; 8022578: f06f 0307 mvn.w r3, #7 802257c: e01c b.n 80225b8 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802257e: 697b ldr r3, [r7, #20] 8022580: 68db ldr r3, [r3, #12] 8022582: 617b str r3, [r7, #20] 8022584: 697b ldr r3, [r7, #20] 8022586: 2b00 cmp r3, #0 8022588: d1d9 bne.n 802253e } } } } ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); 802258a: 68bb ldr r3, [r7, #8] 802258c: 2b00 cmp r3, #0 802258e: d002 beq.n 8022596 8022590: 68bb ldr r3, [r7, #8] 8022592: 681b ldr r3, [r3, #0] 8022594: e000 b.n 8022598 8022596: 2300 movs r3, #0 8022598: 68fa ldr r2, [r7, #12] 802259a: 6013 str r3, [r2, #0] pcb->local_port = port; 802259c: 68fb ldr r3, [r7, #12] 802259e: 88fa ldrh r2, [r7, #6] 80225a0: 825a strh r2, [r3, #18] mib2_udp_bind(pcb); /* pcb not active yet? */ if (rebind == 0) { 80225a2: 7cfb ldrb r3, [r7, #19] 80225a4: 2b00 cmp r3, #0 80225a6: d106 bne.n 80225b6 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 80225a8: 4b09 ldr r3, [pc, #36] @ (80225d0 ) 80225aa: 681a ldr r2, [r3, #0] 80225ac: 68fb ldr r3, [r7, #12] 80225ae: 60da str r2, [r3, #12] udp_pcbs = pcb; 80225b0: 4a07 ldr r2, [pc, #28] @ (80225d0 ) 80225b2: 68fb ldr r3, [r7, #12] 80225b4: 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; 80225b6: 2300 movs r3, #0 } 80225b8: 4618 mov r0, r3 80225ba: 3718 adds r7, #24 80225bc: 46bd mov sp, r7 80225be: bd80 pop {r7, pc} 80225c0: 08031c78 .word 0x08031c78 80225c4: 08030af0 .word 0x08030af0 80225c8: 08030db8 .word 0x08030db8 80225cc: 08030b44 .word 0x08030b44 80225d0: 2402afc8 .word 0x2402afc8 080225d4 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 80225d4: b580 push {r7, lr} 80225d6: b086 sub sp, #24 80225d8: af00 add r7, sp, #0 80225da: 60f8 str r0, [r7, #12] 80225dc: 60b9 str r1, [r7, #8] 80225de: 4613 mov r3, r2 80225e0: 80fb strh r3, [r7, #6] struct udp_pcb *ipcb; LWIP_ASSERT_CORE_LOCKED(); 80225e2: f7ee fd1b bl 801101c LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 80225e6: 68fb ldr r3, [r7, #12] 80225e8: 2b00 cmp r3, #0 80225ea: d109 bne.n 8022600 80225ec: 4b2c ldr r3, [pc, #176] @ (80226a0 ) 80225ee: f240 4235 movw r2, #1077 @ 0x435 80225f2: 492c ldr r1, [pc, #176] @ (80226a4 ) 80225f4: 482c ldr r0, [pc, #176] @ (80226a8 ) 80225f6: f008 f939 bl 802a86c 80225fa: f06f 030f mvn.w r3, #15 80225fe: e04b b.n 8022698 LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8022600: 68bb ldr r3, [r7, #8] 8022602: 2b00 cmp r3, #0 8022604: d109 bne.n 802261a 8022606: 4b26 ldr r3, [pc, #152] @ (80226a0 ) 8022608: f240 4236 movw r2, #1078 @ 0x436 802260c: 4927 ldr r1, [pc, #156] @ (80226ac ) 802260e: 4826 ldr r0, [pc, #152] @ (80226a8 ) 8022610: f008 f92c bl 802a86c 8022614: f06f 030f mvn.w r3, #15 8022618: e03e b.n 8022698 if (pcb->local_port == 0) { 802261a: 68fb ldr r3, [r7, #12] 802261c: 8a5b ldrh r3, [r3, #18] 802261e: 2b00 cmp r3, #0 8022620: d10f bne.n 8022642 err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 8022622: 68f9 ldr r1, [r7, #12] 8022624: 68fb ldr r3, [r7, #12] 8022626: 8a5b ldrh r3, [r3, #18] 8022628: 461a mov r2, r3 802262a: 68f8 ldr r0, [r7, #12] 802262c: f7ff ff48 bl 80224c0 8022630: 4603 mov r3, r0 8022632: 75fb strb r3, [r7, #23] if (err != ERR_OK) { 8022634: f997 3017 ldrsb.w r3, [r7, #23] 8022638: 2b00 cmp r3, #0 802263a: d002 beq.n 8022642 return err; 802263c: f997 3017 ldrsb.w r3, [r7, #23] 8022640: e02a b.n 8022698 } } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); 8022642: 68bb ldr r3, [r7, #8] 8022644: 2b00 cmp r3, #0 8022646: d002 beq.n 802264e 8022648: 68bb ldr r3, [r7, #8] 802264a: 681b ldr r3, [r3, #0] 802264c: e000 b.n 8022650 802264e: 2300 movs r3, #0 8022650: 68fa ldr r2, [r7, #12] 8022652: 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; 8022654: 68fb ldr r3, [r7, #12] 8022656: 88fa ldrh r2, [r7, #6] 8022658: 829a strh r2, [r3, #20] pcb->flags |= UDP_FLAGS_CONNECTED; 802265a: 68fb ldr r3, [r7, #12] 802265c: 7c1b ldrb r3, [r3, #16] 802265e: f043 0304 orr.w r3, r3, #4 8022662: b2da uxtb r2, r3 8022664: 68fb ldr r3, [r7, #12] 8022666: 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) { 8022668: 4b11 ldr r3, [pc, #68] @ (80226b0 ) 802266a: 681b ldr r3, [r3, #0] 802266c: 613b str r3, [r7, #16] 802266e: e008 b.n 8022682 if (pcb == ipcb) { 8022670: 68fa ldr r2, [r7, #12] 8022672: 693b ldr r3, [r7, #16] 8022674: 429a cmp r2, r3 8022676: d101 bne.n 802267c /* already on the list, just return */ return ERR_OK; 8022678: 2300 movs r3, #0 802267a: e00d b.n 8022698 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802267c: 693b ldr r3, [r7, #16] 802267e: 68db ldr r3, [r3, #12] 8022680: 613b str r3, [r7, #16] 8022682: 693b ldr r3, [r7, #16] 8022684: 2b00 cmp r3, #0 8022686: d1f3 bne.n 8022670 } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 8022688: 4b09 ldr r3, [pc, #36] @ (80226b0 ) 802268a: 681a ldr r2, [r3, #0] 802268c: 68fb ldr r3, [r7, #12] 802268e: 60da str r2, [r3, #12] udp_pcbs = pcb; 8022690: 4a07 ldr r2, [pc, #28] @ (80226b0 ) 8022692: 68fb ldr r3, [r7, #12] 8022694: 6013 str r3, [r2, #0] return ERR_OK; 8022696: 2300 movs r3, #0 } 8022698: 4618 mov r0, r3 802269a: 3718 adds r7, #24 802269c: 46bd mov sp, r7 802269e: bd80 pop {r7, pc} 80226a0: 08030af0 .word 0x08030af0 80226a4: 08030dd0 .word 0x08030dd0 80226a8: 08030b44 .word 0x08030b44 80226ac: 08030dec .word 0x08030dec 80226b0: 2402afc8 .word 0x2402afc8 080226b4 : * * @param pcb the udp pcb to disconnect. */ void udp_disconnect(struct udp_pcb *pcb) { 80226b4: b580 push {r7, lr} 80226b6: b082 sub sp, #8 80226b8: af00 add r7, sp, #0 80226ba: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 80226bc: f7ee fcae bl 801101c LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); 80226c0: 687b ldr r3, [r7, #4] 80226c2: 2b00 cmp r3, #0 80226c4: d107 bne.n 80226d6 80226c6: 4b0d ldr r3, [pc, #52] @ (80226fc ) 80226c8: f240 426a movw r2, #1130 @ 0x46a 80226cc: 490c ldr r1, [pc, #48] @ (8022700 ) 80226ce: 480d ldr r0, [pc, #52] @ (8022704 ) 80226d0: f008 f8cc bl 802a86c 80226d4: e00f b.n 80226f6 #if LWIP_IPV4 && LWIP_IPV6 if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { ip_addr_copy(pcb->remote_ip, *IP_ANY_TYPE); } else { #endif ip_addr_set_any(IP_IS_V6_VAL(pcb->remote_ip), &pcb->remote_ip); 80226d6: 687b ldr r3, [r7, #4] 80226d8: 2200 movs r2, #0 80226da: 605a str r2, [r3, #4] #if LWIP_IPV4 && LWIP_IPV6 } #endif pcb->remote_port = 0; 80226dc: 687b ldr r3, [r7, #4] 80226de: 2200 movs r2, #0 80226e0: 829a strh r2, [r3, #20] pcb->netif_idx = NETIF_NO_INDEX; 80226e2: 687b ldr r3, [r7, #4] 80226e4: 2200 movs r2, #0 80226e6: 721a strb r2, [r3, #8] /* mark PCB as unconnected */ udp_clear_flags(pcb, UDP_FLAGS_CONNECTED); 80226e8: 687b ldr r3, [r7, #4] 80226ea: 7c1b ldrb r3, [r3, #16] 80226ec: f023 0304 bic.w r3, r3, #4 80226f0: b2da uxtb r2, r3 80226f2: 687b ldr r3, [r7, #4] 80226f4: 741a strb r2, [r3, #16] } 80226f6: 3708 adds r7, #8 80226f8: 46bd mov sp, r7 80226fa: bd80 pop {r7, pc} 80226fc: 08030af0 .word 0x08030af0 8022700: 08030e08 .word 0x08030e08 8022704: 08030b44 .word 0x08030b44 08022708 : * @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) { 8022708: b580 push {r7, lr} 802270a: b084 sub sp, #16 802270c: af00 add r7, sp, #0 802270e: 60f8 str r0, [r7, #12] 8022710: 60b9 str r1, [r7, #8] 8022712: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8022714: f7ee fc82 bl 801101c LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); 8022718: 68fb ldr r3, [r7, #12] 802271a: 2b00 cmp r3, #0 802271c: d107 bne.n 802272e 802271e: 4b08 ldr r3, [pc, #32] @ (8022740 ) 8022720: f240 428a movw r2, #1162 @ 0x48a 8022724: 4907 ldr r1, [pc, #28] @ (8022744 ) 8022726: 4808 ldr r0, [pc, #32] @ (8022748 ) 8022728: f008 f8a0 bl 802a86c 802272c: e005 b.n 802273a /* remember recv() callback and user data */ pcb->recv = recv; 802272e: 68fb ldr r3, [r7, #12] 8022730: 68ba ldr r2, [r7, #8] 8022732: 619a str r2, [r3, #24] pcb->recv_arg = recv_arg; 8022734: 68fb ldr r3, [r7, #12] 8022736: 687a ldr r2, [r7, #4] 8022738: 61da str r2, [r3, #28] } 802273a: 3710 adds r7, #16 802273c: 46bd mov sp, r7 802273e: bd80 pop {r7, pc} 8022740: 08030af0 .word 0x08030af0 8022744: 08030e24 .word 0x08030e24 8022748: 08030b44 .word 0x08030b44 0802274c : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 802274c: b580 push {r7, lr} 802274e: b084 sub sp, #16 8022750: af00 add r7, sp, #0 8022752: 6078 str r0, [r7, #4] struct udp_pcb *pcb2; LWIP_ASSERT_CORE_LOCKED(); 8022754: f7ee fc62 bl 801101c LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); 8022758: 687b ldr r3, [r7, #4] 802275a: 2b00 cmp r3, #0 802275c: d107 bne.n 802276e 802275e: 4b19 ldr r3, [pc, #100] @ (80227c4 ) 8022760: f240 42a1 movw r2, #1185 @ 0x4a1 8022764: 4918 ldr r1, [pc, #96] @ (80227c8 ) 8022766: 4819 ldr r0, [pc, #100] @ (80227cc ) 8022768: f008 f880 bl 802a86c 802276c: e026 b.n 80227bc mib2_udp_unbind(pcb); /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 802276e: 4b18 ldr r3, [pc, #96] @ (80227d0 ) 8022770: 681b ldr r3, [r3, #0] 8022772: 687a ldr r2, [r7, #4] 8022774: 429a cmp r2, r3 8022776: d105 bne.n 8022784 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 8022778: 4b15 ldr r3, [pc, #84] @ (80227d0 ) 802277a: 681b ldr r3, [r3, #0] 802277c: 68db ldr r3, [r3, #12] 802277e: 4a14 ldr r2, [pc, #80] @ (80227d0 ) 8022780: 6013 str r3, [r2, #0] 8022782: e017 b.n 80227b4 /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 8022784: 4b12 ldr r3, [pc, #72] @ (80227d0 ) 8022786: 681b ldr r3, [r3, #0] 8022788: 60fb str r3, [r7, #12] 802278a: e010 b.n 80227ae /* find pcb in udp_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 802278c: 68fb ldr r3, [r7, #12] 802278e: 68db ldr r3, [r3, #12] 8022790: 2b00 cmp r3, #0 8022792: d009 beq.n 80227a8 8022794: 68fb ldr r3, [r7, #12] 8022796: 68db ldr r3, [r3, #12] 8022798: 687a ldr r2, [r7, #4] 802279a: 429a cmp r2, r3 802279c: d104 bne.n 80227a8 /* remove pcb from list */ pcb2->next = pcb->next; 802279e: 687b ldr r3, [r7, #4] 80227a0: 68da ldr r2, [r3, #12] 80227a2: 68fb ldr r3, [r7, #12] 80227a4: 60da str r2, [r3, #12] break; 80227a6: e005 b.n 80227b4 for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 80227a8: 68fb ldr r3, [r7, #12] 80227aa: 68db ldr r3, [r3, #12] 80227ac: 60fb str r3, [r7, #12] 80227ae: 68fb ldr r3, [r7, #12] 80227b0: 2b00 cmp r3, #0 80227b2: d1eb bne.n 802278c } } } memp_free(MEMP_UDP_PCB, pcb); 80227b4: 6879 ldr r1, [r7, #4] 80227b6: 2000 movs r0, #0 80227b8: f7f7 fef2 bl 801a5a0 } 80227bc: 3710 adds r7, #16 80227be: 46bd mov sp, r7 80227c0: bd80 pop {r7, pc} 80227c2: bf00 nop 80227c4: 08030af0 .word 0x08030af0 80227c8: 08030e3c .word 0x08030e3c 80227cc: 08030b44 .word 0x08030b44 80227d0: 2402afc8 .word 0x2402afc8 080227d4 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 80227d4: b580 push {r7, lr} 80227d6: b082 sub sp, #8 80227d8: af00 add r7, sp, #0 struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 80227da: f7ee fc1f bl 801101c pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 80227de: 2000 movs r0, #0 80227e0: f7f7 fe68 bl 801a4b4 80227e4: 6078 str r0, [r7, #4] /* could allocate UDP PCB? */ if (pcb != NULL) { 80227e6: 687b ldr r3, [r7, #4] 80227e8: 2b00 cmp r3, #0 80227ea: d007 beq.n 80227fc /* 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)); 80227ec: 2220 movs r2, #32 80227ee: 2100 movs r1, #0 80227f0: 6878 ldr r0, [r7, #4] 80227f2: f008 f9cd bl 802ab90 pcb->ttl = UDP_TTL; 80227f6: 687b ldr r3, [r7, #4] 80227f8: 22ff movs r2, #255 @ 0xff 80227fa: 72da strb r2, [r3, #11] #if LWIP_MULTICAST_TX_OPTIONS udp_set_multicast_ttl(pcb, UDP_TTL); #endif /* LWIP_MULTICAST_TX_OPTIONS */ } return pcb; 80227fc: 687b ldr r3, [r7, #4] } 80227fe: 4618 mov r0, r3 8022800: 3708 adds r7, #8 8022802: 46bd mov sp, r7 8022804: bd80 pop {r7, pc} 08022806 : * * @see udp_remove() */ struct udp_pcb * udp_new_ip_type(u8_t type) { 8022806: b580 push {r7, lr} 8022808: b084 sub sp, #16 802280a: af00 add r7, sp, #0 802280c: 4603 mov r3, r0 802280e: 71fb strb r3, [r7, #7] struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 8022810: f7ee fc04 bl 801101c pcb = udp_new(); 8022814: f7ff ffde bl 80227d4 8022818: 60f8 str r0, [r7, #12] IP_SET_TYPE_VAL(pcb->remote_ip, type); } #else LWIP_UNUSED_ARG(type); #endif /* LWIP_IPV4 && LWIP_IPV6 */ return pcb; 802281a: 68fb ldr r3, [r7, #12] } 802281c: 4618 mov r0, r3 802281e: 3710 adds r7, #16 8022820: 46bd mov sp, r7 8022822: bd80 pop {r7, pc} 08022824 : * * @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) { 8022824: b480 push {r7} 8022826: b085 sub sp, #20 8022828: af00 add r7, sp, #0 802282a: 6078 str r0, [r7, #4] 802282c: 6039 str r1, [r7, #0] struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { 802282e: 687b ldr r3, [r7, #4] 8022830: 2b00 cmp r3, #0 8022832: d01e beq.n 8022872 8022834: 687b ldr r3, [r7, #4] 8022836: 681b ldr r3, [r3, #0] 8022838: 2b00 cmp r3, #0 802283a: d01a beq.n 8022872 802283c: 683b ldr r3, [r7, #0] 802283e: 2b00 cmp r3, #0 8022840: d017 beq.n 8022872 8022842: 683b ldr r3, [r7, #0] 8022844: 681b ldr r3, [r3, #0] 8022846: 2b00 cmp r3, #0 8022848: d013 beq.n 8022872 for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 802284a: 4b0d ldr r3, [pc, #52] @ (8022880 ) 802284c: 681b ldr r3, [r3, #0] 802284e: 60fb str r3, [r7, #12] 8022850: e00c b.n 802286c /* PCB bound to current local interface address? */ if (ip_addr_cmp(&upcb->local_ip, old_addr)) { 8022852: 68fb ldr r3, [r7, #12] 8022854: 681a ldr r2, [r3, #0] 8022856: 687b ldr r3, [r7, #4] 8022858: 681b ldr r3, [r3, #0] 802285a: 429a cmp r2, r3 802285c: d103 bne.n 8022866 /* 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); 802285e: 683b ldr r3, [r7, #0] 8022860: 681a ldr r2, [r3, #0] 8022862: 68fb ldr r3, [r7, #12] 8022864: 601a str r2, [r3, #0] for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 8022866: 68fb ldr r3, [r7, #12] 8022868: 68db ldr r3, [r3, #12] 802286a: 60fb str r3, [r7, #12] 802286c: 68fb ldr r3, [r7, #12] 802286e: 2b00 cmp r3, #0 8022870: d1ef bne.n 8022852 } } } } 8022872: bf00 nop 8022874: 3714 adds r7, #20 8022876: 46bd mov sp, r7 8022878: f85d 7b04 ldr.w r7, [sp], #4 802287c: 4770 bx lr 802287e: bf00 nop 8022880: 2402afc8 .word 0x2402afc8 08022884 : 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) { 8022884: b580 push {r7, lr} 8022886: af00 add r7, sp, #0 if (dhcp_pcb_refcount == 0) { 8022888: 4b20 ldr r3, [pc, #128] @ (802290c ) 802288a: 781b ldrb r3, [r3, #0] 802288c: 2b00 cmp r3, #0 802288e: d133 bne.n 80228f8 LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); 8022890: 4b1f ldr r3, [pc, #124] @ (8022910 ) 8022892: 681b ldr r3, [r3, #0] 8022894: 2b00 cmp r3, #0 8022896: d005 beq.n 80228a4 8022898: 4b1e ldr r3, [pc, #120] @ (8022914 ) 802289a: 22e5 movs r2, #229 @ 0xe5 802289c: 491e ldr r1, [pc, #120] @ (8022918 ) 802289e: 481f ldr r0, [pc, #124] @ (802291c ) 80228a0: f007 ffe4 bl 802a86c /* allocate UDP PCB */ dhcp_pcb = udp_new(); 80228a4: f7ff ff96 bl 80227d4 80228a8: 4603 mov r3, r0 80228aa: 4a19 ldr r2, [pc, #100] @ (8022910 ) 80228ac: 6013 str r3, [r2, #0] if (dhcp_pcb == NULL) { 80228ae: 4b18 ldr r3, [pc, #96] @ (8022910 ) 80228b0: 681b ldr r3, [r3, #0] 80228b2: 2b00 cmp r3, #0 80228b4: d102 bne.n 80228bc return ERR_MEM; 80228b6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80228ba: e024 b.n 8022906 } ip_set_option(dhcp_pcb, SOF_BROADCAST); 80228bc: 4b14 ldr r3, [pc, #80] @ (8022910 ) 80228be: 681b ldr r3, [r3, #0] 80228c0: 7a5a ldrb r2, [r3, #9] 80228c2: 4b13 ldr r3, [pc, #76] @ (8022910 ) 80228c4: 681b ldr r3, [r3, #0] 80228c6: f042 0220 orr.w r2, r2, #32 80228ca: b2d2 uxtb r2, r2 80228cc: 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); 80228ce: 4b10 ldr r3, [pc, #64] @ (8022910 ) 80228d0: 681b ldr r3, [r3, #0] 80228d2: 2244 movs r2, #68 @ 0x44 80228d4: 4912 ldr r1, [pc, #72] @ (8022920 ) 80228d6: 4618 mov r0, r3 80228d8: f7ff fdf2 bl 80224c0 udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER); 80228dc: 4b0c ldr r3, [pc, #48] @ (8022910 ) 80228de: 681b ldr r3, [r3, #0] 80228e0: 2243 movs r2, #67 @ 0x43 80228e2: 490f ldr r1, [pc, #60] @ (8022920 ) 80228e4: 4618 mov r0, r3 80228e6: f7ff fe75 bl 80225d4 udp_recv(dhcp_pcb, dhcp_recv, NULL); 80228ea: 4b09 ldr r3, [pc, #36] @ (8022910 ) 80228ec: 681b ldr r3, [r3, #0] 80228ee: 2200 movs r2, #0 80228f0: 490c ldr r1, [pc, #48] @ (8022924 ) 80228f2: 4618 mov r0, r3 80228f4: f7ff ff08 bl 8022708 } dhcp_pcb_refcount++; 80228f8: 4b04 ldr r3, [pc, #16] @ (802290c ) 80228fa: 781b ldrb r3, [r3, #0] 80228fc: 3301 adds r3, #1 80228fe: b2da uxtb r2, r3 8022900: 4b02 ldr r3, [pc, #8] @ (802290c ) 8022902: 701a strb r2, [r3, #0] return ERR_OK; 8022904: 2300 movs r3, #0 } 8022906: 4618 mov r0, r3 8022908: bd80 pop {r7, pc} 802290a: bf00 nop 802290c: 2402aff8 .word 0x2402aff8 8022910: 2402aff4 .word 0x2402aff4 8022914: 08030e54 .word 0x08030e54 8022918: 08030e8c .word 0x08030e8c 802291c: 08030eb4 .word 0x08030eb4 8022920: 08031c78 .word 0x08031c78 8022924: 080241f5 .word 0x080241f5 08022928 : /** Free DHCP PCB if the last netif stops using it */ static void dhcp_dec_pcb_refcount(void) { 8022928: b580 push {r7, lr} 802292a: af00 add r7, sp, #0 LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); 802292c: 4b0e ldr r3, [pc, #56] @ (8022968 ) 802292e: 781b ldrb r3, [r3, #0] 8022930: 2b00 cmp r3, #0 8022932: d105 bne.n 8022940 8022934: 4b0d ldr r3, [pc, #52] @ (802296c ) 8022936: 22ff movs r2, #255 @ 0xff 8022938: 490d ldr r1, [pc, #52] @ (8022970 ) 802293a: 480e ldr r0, [pc, #56] @ (8022974 ) 802293c: f007 ff96 bl 802a86c dhcp_pcb_refcount--; 8022940: 4b09 ldr r3, [pc, #36] @ (8022968 ) 8022942: 781b ldrb r3, [r3, #0] 8022944: 3b01 subs r3, #1 8022946: b2da uxtb r2, r3 8022948: 4b07 ldr r3, [pc, #28] @ (8022968 ) 802294a: 701a strb r2, [r3, #0] if (dhcp_pcb_refcount == 0) { 802294c: 4b06 ldr r3, [pc, #24] @ (8022968 ) 802294e: 781b ldrb r3, [r3, #0] 8022950: 2b00 cmp r3, #0 8022952: d107 bne.n 8022964 udp_remove(dhcp_pcb); 8022954: 4b08 ldr r3, [pc, #32] @ (8022978 ) 8022956: 681b ldr r3, [r3, #0] 8022958: 4618 mov r0, r3 802295a: f7ff fef7 bl 802274c dhcp_pcb = NULL; 802295e: 4b06 ldr r3, [pc, #24] @ (8022978 ) 8022960: 2200 movs r2, #0 8022962: 601a str r2, [r3, #0] } } 8022964: bf00 nop 8022966: bd80 pop {r7, pc} 8022968: 2402aff8 .word 0x2402aff8 802296c: 08030e54 .word 0x08030e54 8022970: 08030edc .word 0x08030edc 8022974: 08030eb4 .word 0x08030eb4 8022978: 2402aff4 .word 0x2402aff4 0802297c : * * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { 802297c: b580 push {r7, lr} 802297e: b084 sub sp, #16 8022980: af00 add r7, sp, #0 8022982: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022984: 687b ldr r3, [r7, #4] 8022986: 6a5b ldr r3, [r3, #36] @ 0x24 8022988: 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); 802298a: 210c movs r1, #12 802298c: 68f8 ldr r0, [r7, #12] 802298e: f001 f862 bl 8023a56 /* 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); 8022992: 4b06 ldr r3, [pc, #24] @ (80229ac ) 8022994: 4a05 ldr r2, [pc, #20] @ (80229ac ) 8022996: 4905 ldr r1, [pc, #20] @ (80229ac ) 8022998: 6878 ldr r0, [r7, #4] 802299a: f7f7 ffa5 bl 801a8e8 /* We can immediately restart discovery */ dhcp_discover(netif); 802299e: 6878 ldr r0, [r7, #4] 80229a0: f000 fc4c bl 802323c } 80229a4: bf00 nop 80229a6: 3710 adds r7, #16 80229a8: 46bd mov sp, r7 80229aa: bd80 pop {r7, pc} 80229ac: 08031c78 .word 0x08031c78 080229b0 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 80229b0: b580 push {r7, lr} 80229b2: b084 sub sp, #16 80229b4: af00 add r7, sp, #0 80229b6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80229b8: 687b ldr r3, [r7, #4] 80229ba: 6a5b ldr r3, [r3, #36] @ 0x24 80229bc: 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); 80229be: 2108 movs r1, #8 80229c0: 68f8 ldr r0, [r7, #12] 80229c2: f001 f848 bl 8023a56 /* 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); 80229c6: 68fb ldr r3, [r7, #12] 80229c8: 331c adds r3, #28 80229ca: 2200 movs r2, #0 80229cc: 4619 mov r1, r3 80229ce: 6878 ldr r0, [r7, #4] 80229d0: f002 fb88 bl 80250e4 80229d4: 4603 mov r3, r0 80229d6: 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) { 80229d8: 68fb ldr r3, [r7, #12] 80229da: 799b ldrb r3, [r3, #6] 80229dc: 2bff cmp r3, #255 @ 0xff 80229de: d005 beq.n 80229ec dhcp->tries++; 80229e0: 68fb ldr r3, [r7, #12] 80229e2: 799b ldrb r3, [r3, #6] 80229e4: 3301 adds r3, #1 80229e6: b2da uxtb r2, r3 80229e8: 68fb ldr r3, [r7, #12] 80229ea: 719a strb r2, [r3, #6] } msecs = 500; 80229ec: f44f 73fa mov.w r3, #500 @ 0x1f4 80229f0: 813b strh r3, [r7, #8] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80229f2: 893b ldrh r3, [r7, #8] 80229f4: f203 13f3 addw r3, r3, #499 @ 0x1f3 80229f8: 4a06 ldr r2, [pc, #24] @ (8022a14 ) 80229fa: fb82 1203 smull r1, r2, r2, r3 80229fe: 1152 asrs r2, r2, #5 8022a00: 17db asrs r3, r3, #31 8022a02: 1ad3 subs r3, r2, r3 8022a04: b29a uxth r2, r3 8022a06: 68fb ldr r3, [r7, #12] 8022a08: 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)); } 8022a0a: bf00 nop 8022a0c: 3710 adds r7, #16 8022a0e: 46bd mov sp, r7 8022a10: bd80 pop {r7, pc} 8022a12: bf00 nop 8022a14: 10624dd3 .word 0x10624dd3 08022a18 : * * @param netif the netif under DHCP control */ static void dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in) { 8022a18: b580 push {r7, lr} 8022a1a: b084 sub sp, #16 8022a1c: af00 add r7, sp, #0 8022a1e: 6078 str r0, [r7, #4] 8022a20: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 8022a22: 687b ldr r3, [r7, #4] 8022a24: 6a5b ldr r3, [r3, #36] @ 0x24 8022a26: 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)) { 8022a28: 4b0c ldr r3, [pc, #48] @ (8022a5c ) 8022a2a: 789b ldrb r3, [r3, #2] 8022a2c: 2b00 cmp r3, #0 8022a2e: d011 beq.n 8022a54 dhcp->request_timeout = 0; /* stop timer */ 8022a30: 68fb ldr r3, [r7, #12] 8022a32: 2200 movs r2, #0 8022a34: 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))); 8022a36: 4b0a ldr r3, [pc, #40] @ (8022a60 ) 8022a38: 689b ldr r3, [r3, #8] 8022a3a: 4618 mov r0, r3 8022a3c: f7f6 ffd1 bl 80199e2 8022a40: 4602 mov r2, r0 8022a42: 68fb ldr r3, [r7, #12] 8022a44: 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); 8022a46: 683b ldr r3, [r7, #0] 8022a48: 691a ldr r2, [r3, #16] 8022a4a: 68fb ldr r3, [r7, #12] 8022a4c: 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); 8022a4e: 6878 ldr r0, [r7, #4] 8022a50: f000 f808 bl 8022a64 } 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)); } } 8022a54: bf00 nop 8022a56: 3710 adds r7, #16 8022a58: 46bd mov sp, r7 8022a5a: bd80 pop {r7, pc} 8022a5c: 2402afec .word 0x2402afec 8022a60: 2402afcc .word 0x2402afcc 08022a64 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 8022a64: b5b0 push {r4, r5, r7, lr} 8022a66: b08a sub sp, #40 @ 0x28 8022a68: af02 add r7, sp, #8 8022a6a: 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;); 8022a6c: 687b ldr r3, [r7, #4] 8022a6e: 2b00 cmp r3, #0 8022a70: d109 bne.n 8022a86 8022a72: 4b71 ldr r3, [pc, #452] @ (8022c38 ) 8022a74: f240 1277 movw r2, #375 @ 0x177 8022a78: 4970 ldr r1, [pc, #448] @ (8022c3c ) 8022a7a: 4871 ldr r0, [pc, #452] @ (8022c40 ) 8022a7c: f007 fef6 bl 802a86c 8022a80: f06f 030f mvn.w r3, #15 8022a84: e0d3 b.n 8022c2e dhcp = netif_dhcp_data(netif); 8022a86: 687b ldr r3, [r7, #4] 8022a88: 6a5b ldr r3, [r3, #36] @ 0x24 8022a8a: 61bb str r3, [r7, #24] LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8022a8c: 69bb ldr r3, [r7, #24] 8022a8e: 2b00 cmp r3, #0 8022a90: d109 bne.n 8022aa6 8022a92: 4b69 ldr r3, [pc, #420] @ (8022c38 ) 8022a94: f240 1279 movw r2, #377 @ 0x179 8022a98: 496a ldr r1, [pc, #424] @ (8022c44 ) 8022a9a: 4869 ldr r0, [pc, #420] @ (8022c40 ) 8022a9c: f007 fee6 bl 802a86c 8022aa0: f06f 0305 mvn.w r3, #5 8022aa4: e0c3 b.n 8022c2e 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); 8022aa6: 2101 movs r1, #1 8022aa8: 69b8 ldr r0, [r7, #24] 8022aaa: f000 ffd4 bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8022aae: f107 030c add.w r3, r7, #12 8022ab2: 2203 movs r2, #3 8022ab4: 69b9 ldr r1, [r7, #24] 8022ab6: 6878 ldr r0, [r7, #4] 8022ab8: f001 fc66 bl 8024388 8022abc: 6178 str r0, [r7, #20] if (p_out != NULL) { 8022abe: 697b ldr r3, [r7, #20] 8022ac0: 2b00 cmp r3, #0 8022ac2: f000 8085 beq.w 8022bd0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8022ac6: 697b ldr r3, [r7, #20] 8022ac8: 685b ldr r3, [r3, #4] 8022aca: 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); 8022acc: 89b8 ldrh r0, [r7, #12] 8022ace: 693b ldr r3, [r7, #16] 8022ad0: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022ad4: 2302 movs r3, #2 8022ad6: 2239 movs r2, #57 @ 0x39 8022ad8: f000 ffd8 bl 8023a8c 8022adc: 4603 mov r3, r0 8022ade: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 8022ae0: 89b8 ldrh r0, [r7, #12] 8022ae2: 693b ldr r3, [r7, #16] 8022ae4: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022ae8: 687b ldr r3, [r7, #4] 8022aea: 8d1b ldrh r3, [r3, #40] @ 0x28 8022aec: 461a mov r2, r3 8022aee: f001 f827 bl 8023b40 8022af2: 4603 mov r3, r0 8022af4: 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); 8022af6: 89b8 ldrh r0, [r7, #12] 8022af8: 693b ldr r3, [r7, #16] 8022afa: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022afe: 2304 movs r3, #4 8022b00: 2232 movs r2, #50 @ 0x32 8022b02: f000 ffc3 bl 8023a8c 8022b06: 4603 mov r3, r0 8022b08: 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))); 8022b0a: 89bc ldrh r4, [r7, #12] 8022b0c: 693b ldr r3, [r7, #16] 8022b0e: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022b12: 69bb ldr r3, [r7, #24] 8022b14: 69db ldr r3, [r3, #28] 8022b16: 4618 mov r0, r3 8022b18: f7f6 ff63 bl 80199e2 8022b1c: 4603 mov r3, r0 8022b1e: 461a mov r2, r3 8022b20: 4629 mov r1, r5 8022b22: 4620 mov r0, r4 8022b24: f001 f83e bl 8023ba4 8022b28: 4603 mov r3, r0 8022b2a: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 8022b2c: 89b8 ldrh r0, [r7, #12] 8022b2e: 693b ldr r3, [r7, #16] 8022b30: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b34: 2304 movs r3, #4 8022b36: 2236 movs r2, #54 @ 0x36 8022b38: f000 ffa8 bl 8023a8c 8022b3c: 4603 mov r3, r0 8022b3e: 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)))); 8022b40: 89bc ldrh r4, [r7, #12] 8022b42: 693b ldr r3, [r7, #16] 8022b44: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022b48: 69bb ldr r3, [r7, #24] 8022b4a: 699b ldr r3, [r3, #24] 8022b4c: 4618 mov r0, r3 8022b4e: f7f6 ff48 bl 80199e2 8022b52: 4603 mov r3, r0 8022b54: 461a mov r2, r3 8022b56: 4629 mov r1, r5 8022b58: 4620 mov r0, r4 8022b5a: f001 f823 bl 8023ba4 8022b5e: 4603 mov r3, r0 8022b60: 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)); 8022b62: 89b8 ldrh r0, [r7, #12] 8022b64: 693b ldr r3, [r7, #16] 8022b66: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b6a: 2303 movs r3, #3 8022b6c: 2237 movs r2, #55 @ 0x37 8022b6e: f000 ff8d bl 8023a8c 8022b72: 4603 mov r3, r0 8022b74: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022b76: 2300 movs r3, #0 8022b78: 77fb strb r3, [r7, #31] 8022b7a: e00e b.n 8022b9a options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8022b7c: 89b8 ldrh r0, [r7, #12] 8022b7e: 693b ldr r3, [r7, #16] 8022b80: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b84: 7ffb ldrb r3, [r7, #31] 8022b86: 4a30 ldr r2, [pc, #192] @ (8022c48 ) 8022b88: 5cd3 ldrb r3, [r2, r3] 8022b8a: 461a mov r2, r3 8022b8c: f000 ffb2 bl 8023af4 8022b90: 4603 mov r3, r0 8022b92: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022b94: 7ffb ldrb r3, [r7, #31] 8022b96: 3301 adds r3, #1 8022b98: 77fb strb r3, [r7, #31] 8022b9a: 7ffb ldrb r3, [r7, #31] 8022b9c: 2b02 cmp r3, #2 8022b9e: d9ed bls.n 8022b7c #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); 8022ba0: 89b8 ldrh r0, [r7, #12] 8022ba2: 693b ldr r3, [r7, #16] 8022ba4: 33f0 adds r3, #240 @ 0xf0 8022ba6: 697a ldr r2, [r7, #20] 8022ba8: 4619 mov r1, r3 8022baa: f001 fcc3 bl 8024534 /* 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); 8022bae: 4b27 ldr r3, [pc, #156] @ (8022c4c ) 8022bb0: 6818 ldr r0, [r3, #0] 8022bb2: 4b27 ldr r3, [pc, #156] @ (8022c50 ) 8022bb4: 9301 str r3, [sp, #4] 8022bb6: 687b ldr r3, [r7, #4] 8022bb8: 9300 str r3, [sp, #0] 8022bba: 2343 movs r3, #67 @ 0x43 8022bbc: 4a25 ldr r2, [pc, #148] @ (8022c54 ) 8022bbe: 6979 ldr r1, [r7, #20] 8022bc0: f7ff fb96 bl 80222f0 8022bc4: 4603 mov r3, r0 8022bc6: 77bb strb r3, [r7, #30] pbuf_free(p_out); 8022bc8: 6978 ldr r0, [r7, #20] 8022bca: f7f8 fbd7 bl 801b37c 8022bce: e001 b.n 8022bd4 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; 8022bd0: 23ff movs r3, #255 @ 0xff 8022bd2: 77bb strb r3, [r7, #30] } if (dhcp->tries < 255) { 8022bd4: 69bb ldr r3, [r7, #24] 8022bd6: 799b ldrb r3, [r3, #6] 8022bd8: 2bff cmp r3, #255 @ 0xff 8022bda: d005 beq.n 8022be8 dhcp->tries++; 8022bdc: 69bb ldr r3, [r7, #24] 8022bde: 799b ldrb r3, [r3, #6] 8022be0: 3301 adds r3, #1 8022be2: b2da uxtb r2, r3 8022be4: 69bb ldr r3, [r7, #24] 8022be6: 719a strb r2, [r3, #6] } msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 8022be8: 69bb ldr r3, [r7, #24] 8022bea: 799b ldrb r3, [r3, #6] 8022bec: 2b05 cmp r3, #5 8022bee: d80d bhi.n 8022c0c 8022bf0: 69bb ldr r3, [r7, #24] 8022bf2: 799b ldrb r3, [r3, #6] 8022bf4: 461a mov r2, r3 8022bf6: 2301 movs r3, #1 8022bf8: 4093 lsls r3, r2 8022bfa: b29b uxth r3, r3 8022bfc: 461a mov r2, r3 8022bfe: 0152 lsls r2, r2, #5 8022c00: 1ad2 subs r2, r2, r3 8022c02: 0092 lsls r2, r2, #2 8022c04: 4413 add r3, r2 8022c06: 00db lsls r3, r3, #3 8022c08: b29b uxth r3, r3 8022c0a: e001 b.n 8022c10 8022c0c: f64e 2360 movw r3, #60000 @ 0xea60 8022c10: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8022c12: 89fb ldrh r3, [r7, #14] 8022c14: f203 13f3 addw r3, r3, #499 @ 0x1f3 8022c18: 4a0f ldr r2, [pc, #60] @ (8022c58 ) 8022c1a: fb82 1203 smull r1, r2, r2, r3 8022c1e: 1152 asrs r2, r2, #5 8022c20: 17db asrs r3, r3, #31 8022c22: 1ad3 subs r3, r2, r3 8022c24: b29a uxth r2, r3 8022c26: 69bb ldr r3, [r7, #24] 8022c28: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; 8022c2a: f997 301e ldrsb.w r3, [r7, #30] } 8022c2e: 4618 mov r0, r3 8022c30: 3720 adds r7, #32 8022c32: 46bd mov sp, r7 8022c34: bdb0 pop {r4, r5, r7, pc} 8022c36: bf00 nop 8022c38: 08030e54 .word 0x08030e54 8022c3c: 08030f00 .word 0x08030f00 8022c40: 08030eb4 .word 0x08030eb4 8022c44: 08030f1c .word 0x08030f1c 8022c48: 24000058 .word 0x24000058 8022c4c: 2402aff4 .word 0x2402aff4 8022c50: 08031c78 .word 0x08031c78 8022c54: 08031c7c .word 0x08031c7c 8022c58: 10624dd3 .word 0x10624dd3 08022c5c : * 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) { 8022c5c: b580 push {r7, lr} 8022c5e: b082 sub sp, #8 8022c60: 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) { 8022c62: 4b27 ldr r3, [pc, #156] @ (8022d00 ) 8022c64: 681b ldr r3, [r3, #0] 8022c66: 607b str r3, [r7, #4] 8022c68: e042 b.n 8022cf0 /* only act on DHCP configured interfaces */ struct dhcp *dhcp = netif_dhcp_data(netif); 8022c6a: 687b ldr r3, [r7, #4] 8022c6c: 6a5b ldr r3, [r3, #36] @ 0x24 8022c6e: 603b str r3, [r7, #0] if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { 8022c70: 683b ldr r3, [r7, #0] 8022c72: 2b00 cmp r3, #0 8022c74: d039 beq.n 8022cea 8022c76: 683b ldr r3, [r7, #0] 8022c78: 795b ldrb r3, [r3, #5] 8022c7a: 2b00 cmp r3, #0 8022c7c: d035 beq.n 8022cea /* compare lease time to expire timeout */ if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { 8022c7e: 683b ldr r3, [r7, #0] 8022c80: 8a9b ldrh r3, [r3, #20] 8022c82: 2b00 cmp r3, #0 8022c84: d012 beq.n 8022cac 8022c86: 683b ldr r3, [r7, #0] 8022c88: 8a5b ldrh r3, [r3, #18] 8022c8a: 3301 adds r3, #1 8022c8c: b29a uxth r2, r3 8022c8e: 683b ldr r3, [r7, #0] 8022c90: 825a strh r2, [r3, #18] 8022c92: 683b ldr r3, [r7, #0] 8022c94: 8a5a ldrh r2, [r3, #18] 8022c96: 683b ldr r3, [r7, #0] 8022c98: 8a9b ldrh r3, [r3, #20] 8022c9a: 429a cmp r2, r3 8022c9c: d106 bne.n 8022cac 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); 8022c9e: 6878 ldr r0, [r7, #4] 8022ca0: f000 fe32 bl 8023908 dhcp_start(netif); 8022ca4: 6878 ldr r0, [r7, #4] 8022ca6: f000 f96b bl 8022f80 8022caa: e01e b.n 8022cea /* timer is active (non zero), and triggers (zeroes) now? */ } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { 8022cac: 683b ldr r3, [r7, #0] 8022cae: 8a1b ldrh r3, [r3, #16] 8022cb0: 2b00 cmp r3, #0 8022cb2: d00b beq.n 8022ccc 8022cb4: 683b ldr r3, [r7, #0] 8022cb6: 8a1b ldrh r3, [r3, #16] 8022cb8: 1e5a subs r2, r3, #1 8022cba: b291 uxth r1, r2 8022cbc: 683a ldr r2, [r7, #0] 8022cbe: 8211 strh r1, [r2, #16] 8022cc0: 2b01 cmp r3, #1 8022cc2: d103 bne.n 8022ccc 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); 8022cc4: 6878 ldr r0, [r7, #4] 8022cc6: f000 f8c7 bl 8022e58 8022cca: e00e b.n 8022cea /* timer is active (non zero), and triggers (zeroes) now */ } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { 8022ccc: 683b ldr r3, [r7, #0] 8022cce: 89db ldrh r3, [r3, #14] 8022cd0: 2b00 cmp r3, #0 8022cd2: d00a beq.n 8022cea 8022cd4: 683b ldr r3, [r7, #0] 8022cd6: 89db ldrh r3, [r3, #14] 8022cd8: 1e5a subs r2, r3, #1 8022cda: b291 uxth r1, r2 8022cdc: 683a ldr r2, [r7, #0] 8022cde: 81d1 strh r1, [r2, #14] 8022ce0: 2b01 cmp r3, #1 8022ce2: d102 bne.n 8022cea 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); 8022ce4: 6878 ldr r0, [r7, #4] 8022ce6: f000 f888 bl 8022dfa NETIF_FOREACH(netif) { 8022cea: 687b ldr r3, [r7, #4] 8022cec: 681b ldr r3, [r3, #0] 8022cee: 607b str r3, [r7, #4] 8022cf0: 687b ldr r3, [r7, #4] 8022cf2: 2b00 cmp r3, #0 8022cf4: d1b9 bne.n 8022c6a } } } } 8022cf6: bf00 nop 8022cf8: bf00 nop 8022cfa: 3708 adds r7, #8 8022cfc: 46bd mov sp, r7 8022cfe: bd80 pop {r7, pc} 8022d00: 2402af5c .word 0x2402af5c 08022d04 : * 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) { 8022d04: b580 push {r7, lr} 8022d06: b082 sub sp, #8 8022d08: af00 add r7, sp, #0 struct netif *netif; /* loop through netif's */ NETIF_FOREACH(netif) { 8022d0a: 4b16 ldr r3, [pc, #88] @ (8022d64 ) 8022d0c: 681b ldr r3, [r3, #0] 8022d0e: 607b str r3, [r7, #4] 8022d10: e020 b.n 8022d54 struct dhcp *dhcp = netif_dhcp_data(netif); 8022d12: 687b ldr r3, [r7, #4] 8022d14: 6a5b ldr r3, [r3, #36] @ 0x24 8022d16: 603b str r3, [r7, #0] /* only act on DHCP configured interfaces */ if (dhcp != NULL) { 8022d18: 683b ldr r3, [r7, #0] 8022d1a: 2b00 cmp r3, #0 8022d1c: d017 beq.n 8022d4e /* timer is active (non zero), and is about to trigger now */ if (dhcp->request_timeout > 1) { 8022d1e: 683b ldr r3, [r7, #0] 8022d20: 891b ldrh r3, [r3, #8] 8022d22: 2b01 cmp r3, #1 8022d24: d906 bls.n 8022d34 dhcp->request_timeout--; 8022d26: 683b ldr r3, [r7, #0] 8022d28: 891b ldrh r3, [r3, #8] 8022d2a: 3b01 subs r3, #1 8022d2c: b29a uxth r2, r3 8022d2e: 683b ldr r3, [r7, #0] 8022d30: 811a strh r2, [r3, #8] 8022d32: e00c b.n 8022d4e } else if (dhcp->request_timeout == 1) { 8022d34: 683b ldr r3, [r7, #0] 8022d36: 891b ldrh r3, [r3, #8] 8022d38: 2b01 cmp r3, #1 8022d3a: d108 bne.n 8022d4e dhcp->request_timeout--; 8022d3c: 683b ldr r3, [r7, #0] 8022d3e: 891b ldrh r3, [r3, #8] 8022d40: 3b01 subs r3, #1 8022d42: b29a uxth r2, r3 8022d44: 683b ldr r3, [r7, #0] 8022d46: 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); 8022d48: 6878 ldr r0, [r7, #4] 8022d4a: f000 f80d bl 8022d68 NETIF_FOREACH(netif) { 8022d4e: 687b ldr r3, [r7, #4] 8022d50: 681b ldr r3, [r3, #0] 8022d52: 607b str r3, [r7, #4] 8022d54: 687b ldr r3, [r7, #4] 8022d56: 2b00 cmp r3, #0 8022d58: d1db bne.n 8022d12 } } } } 8022d5a: bf00 nop 8022d5c: bf00 nop 8022d5e: 3708 adds r7, #8 8022d60: 46bd mov sp, r7 8022d62: bd80 pop {r7, pc} 8022d64: 2402af5c .word 0x2402af5c 08022d68 : * * @param netif the netif under DHCP control */ static void dhcp_timeout(struct netif *netif) { 8022d68: b580 push {r7, lr} 8022d6a: b084 sub sp, #16 8022d6c: af00 add r7, sp, #0 8022d6e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022d70: 687b ldr r3, [r7, #4] 8022d72: 6a5b ldr r3, [r3, #36] @ 0x24 8022d74: 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)) { 8022d76: 68fb ldr r3, [r7, #12] 8022d78: 795b ldrb r3, [r3, #5] 8022d7a: 2b0c cmp r3, #12 8022d7c: d003 beq.n 8022d86 8022d7e: 68fb ldr r3, [r7, #12] 8022d80: 795b ldrb r3, [r3, #5] 8022d82: 2b06 cmp r3, #6 8022d84: d103 bne.n 8022d8e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); 8022d86: 6878 ldr r0, [r7, #4] 8022d88: f000 fa58 bl 802323c dhcp_reboot(netif); } else { dhcp_discover(netif); } } } 8022d8c: e031 b.n 8022df2 } else if (dhcp->state == DHCP_STATE_REQUESTING) { 8022d8e: 68fb ldr r3, [r7, #12] 8022d90: 795b ldrb r3, [r3, #5] 8022d92: 2b01 cmp r3, #1 8022d94: d10e bne.n 8022db4 if (dhcp->tries <= 5) { 8022d96: 68fb ldr r3, [r7, #12] 8022d98: 799b ldrb r3, [r3, #6] 8022d9a: 2b05 cmp r3, #5 8022d9c: d803 bhi.n 8022da6 dhcp_select(netif); 8022d9e: 6878 ldr r0, [r7, #4] 8022da0: f7ff fe60 bl 8022a64 } 8022da4: e025 b.n 8022df2 dhcp_release_and_stop(netif); 8022da6: 6878 ldr r0, [r7, #4] 8022da8: f000 fdae bl 8023908 dhcp_start(netif); 8022dac: 6878 ldr r0, [r7, #4] 8022dae: f000 f8e7 bl 8022f80 } 8022db2: e01e b.n 8022df2 } else if (dhcp->state == DHCP_STATE_CHECKING) { 8022db4: 68fb ldr r3, [r7, #12] 8022db6: 795b ldrb r3, [r3, #5] 8022db8: 2b08 cmp r3, #8 8022dba: d10b bne.n 8022dd4 if (dhcp->tries <= 1) { 8022dbc: 68fb ldr r3, [r7, #12] 8022dbe: 799b ldrb r3, [r3, #6] 8022dc0: 2b01 cmp r3, #1 8022dc2: d803 bhi.n 8022dcc dhcp_check(netif); 8022dc4: 6878 ldr r0, [r7, #4] 8022dc6: f7ff fdf3 bl 80229b0 } 8022dca: e012 b.n 8022df2 dhcp_bind(netif); 8022dcc: 6878 ldr r0, [r7, #4] 8022dce: f000 fad7 bl 8023380 } 8022dd2: e00e b.n 8022df2 } else if (dhcp->state == DHCP_STATE_REBOOTING) { 8022dd4: 68fb ldr r3, [r7, #12] 8022dd6: 795b ldrb r3, [r3, #5] 8022dd8: 2b03 cmp r3, #3 8022dda: d10a bne.n 8022df2 if (dhcp->tries < REBOOT_TRIES) { 8022ddc: 68fb ldr r3, [r7, #12] 8022dde: 799b ldrb r3, [r3, #6] 8022de0: 2b01 cmp r3, #1 8022de2: d803 bhi.n 8022dec dhcp_reboot(netif); 8022de4: 6878 ldr r0, [r7, #4] 8022de6: f000 fcdb bl 80237a0 } 8022dea: e002 b.n 8022df2 dhcp_discover(netif); 8022dec: 6878 ldr r0, [r7, #4] 8022dee: f000 fa25 bl 802323c } 8022df2: bf00 nop 8022df4: 3710 adds r7, #16 8022df6: 46bd mov sp, r7 8022df8: bd80 pop {r7, pc} 08022dfa : * * @param netif the netif under DHCP control */ static void dhcp_t1_timeout(struct netif *netif) { 8022dfa: b580 push {r7, lr} 8022dfc: b084 sub sp, #16 8022dfe: af00 add r7, sp, #0 8022e00: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022e02: 687b ldr r3, [r7, #4] 8022e04: 6a5b ldr r3, [r3, #36] @ 0x24 8022e06: 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) || 8022e08: 68fb ldr r3, [r7, #12] 8022e0a: 795b ldrb r3, [r3, #5] 8022e0c: 2b01 cmp r3, #1 8022e0e: d007 beq.n 8022e20 8022e10: 68fb ldr r3, [r7, #12] 8022e12: 795b ldrb r3, [r3, #5] 8022e14: 2b0a cmp r3, #10 8022e16: d003 beq.n 8022e20 (dhcp->state == DHCP_STATE_RENEWING)) { 8022e18: 68fb ldr r3, [r7, #12] 8022e1a: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8022e1c: 2b05 cmp r3, #5 8022e1e: d117 bne.n 8022e50 * 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); 8022e20: 6878 ldr r0, [r7, #4] 8022e22: f000 fb87 bl 8023534 /* Calculate next timeout */ if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8022e26: 68fb ldr r3, [r7, #12] 8022e28: 899b ldrh r3, [r3, #12] 8022e2a: 461a mov r2, r3 8022e2c: 68fb ldr r3, [r7, #12] 8022e2e: 8a5b ldrh r3, [r3, #18] 8022e30: 1ad3 subs r3, r2, r3 8022e32: 2b01 cmp r3, #1 8022e34: dd0c ble.n 8022e50 dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); 8022e36: 68fb ldr r3, [r7, #12] 8022e38: 899b ldrh r3, [r3, #12] 8022e3a: 461a mov r2, r3 8022e3c: 68fb ldr r3, [r7, #12] 8022e3e: 8a5b ldrh r3, [r3, #18] 8022e40: 1ad3 subs r3, r2, r3 8022e42: 2b00 cmp r3, #0 8022e44: da00 bge.n 8022e48 8022e46: 3301 adds r3, #1 8022e48: 105b asrs r3, r3, #1 8022e4a: b29a uxth r2, r3 8022e4c: 68fb ldr r3, [r7, #12] 8022e4e: 81da strh r2, [r3, #14] } } } 8022e50: bf00 nop 8022e52: 3710 adds r7, #16 8022e54: 46bd mov sp, r7 8022e56: bd80 pop {r7, pc} 08022e58 : * * @param netif the netif under DHCP control */ static void dhcp_t2_timeout(struct netif *netif) { 8022e58: b580 push {r7, lr} 8022e5a: b084 sub sp, #16 8022e5c: af00 add r7, sp, #0 8022e5e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022e60: 687b ldr r3, [r7, #4] 8022e62: 6a5b ldr r3, [r3, #36] @ 0x24 8022e64: 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) || 8022e66: 68fb ldr r3, [r7, #12] 8022e68: 795b ldrb r3, [r3, #5] 8022e6a: 2b01 cmp r3, #1 8022e6c: d00b beq.n 8022e86 8022e6e: 68fb ldr r3, [r7, #12] 8022e70: 795b ldrb r3, [r3, #5] 8022e72: 2b0a cmp r3, #10 8022e74: d007 beq.n 8022e86 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8022e76: 68fb ldr r3, [r7, #12] 8022e78: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8022e7a: 2b05 cmp r3, #5 8022e7c: d003 beq.n 8022e86 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8022e7e: 68fb ldr r3, [r7, #12] 8022e80: 795b ldrb r3, [r3, #5] 8022e82: 2b04 cmp r3, #4 8022e84: d117 bne.n 8022eb6 /* 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); 8022e86: 6878 ldr r0, [r7, #4] 8022e88: f000 fbf0 bl 802366c /* Calculate next timeout */ if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8022e8c: 68fb ldr r3, [r7, #12] 8022e8e: 8a9b ldrh r3, [r3, #20] 8022e90: 461a mov r2, r3 8022e92: 68fb ldr r3, [r7, #12] 8022e94: 8a5b ldrh r3, [r3, #18] 8022e96: 1ad3 subs r3, r2, r3 8022e98: 2b01 cmp r3, #1 8022e9a: dd0c ble.n 8022eb6 dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); 8022e9c: 68fb ldr r3, [r7, #12] 8022e9e: 8a9b ldrh r3, [r3, #20] 8022ea0: 461a mov r2, r3 8022ea2: 68fb ldr r3, [r7, #12] 8022ea4: 8a5b ldrh r3, [r3, #18] 8022ea6: 1ad3 subs r3, r2, r3 8022ea8: 2b00 cmp r3, #0 8022eaa: da00 bge.n 8022eae 8022eac: 3301 adds r3, #1 8022eae: 105b asrs r3, r3, #1 8022eb0: b29a uxth r2, r3 8022eb2: 68fb ldr r3, [r7, #12] 8022eb4: 821a strh r2, [r3, #16] } } } 8022eb6: bf00 nop 8022eb8: 3710 adds r7, #16 8022eba: 46bd mov sp, r7 8022ebc: bd80 pop {r7, pc} ... 08022ec0 : * * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in) { 8022ec0: b580 push {r7, lr} 8022ec2: b084 sub sp, #16 8022ec4: af00 add r7, sp, #0 8022ec6: 6078 str r0, [r7, #4] 8022ec8: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 8022eca: 687b ldr r3, [r7, #4] 8022ecc: 6a5b ldr r3, [r3, #36] @ 0x24 8022ece: 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); 8022ed0: 68fb ldr r3, [r7, #12] 8022ed2: 2200 movs r2, #0 8022ed4: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8022ed6: 68fb ldr r3, [r7, #12] 8022ed8: 2200 movs r2, #0 8022eda: 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)) { 8022edc: 4b26 ldr r3, [pc, #152] @ (8022f78 ) 8022ede: 78db ldrb r3, [r3, #3] 8022ee0: 2b00 cmp r3, #0 8022ee2: d003 beq.n 8022eec /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 8022ee4: 4b25 ldr r3, [pc, #148] @ (8022f7c ) 8022ee6: 68da ldr r2, [r3, #12] 8022ee8: 68fb ldr r3, [r7, #12] 8022eea: 629a str r2, [r3, #40] @ 0x28 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 8022eec: 4b22 ldr r3, [pc, #136] @ (8022f78 ) 8022eee: 791b ldrb r3, [r3, #4] 8022ef0: 2b00 cmp r3, #0 8022ef2: d004 beq.n 8022efe /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 8022ef4: 4b21 ldr r3, [pc, #132] @ (8022f7c ) 8022ef6: 691a ldr r2, [r3, #16] 8022ef8: 68fb ldr r3, [r7, #12] 8022efa: 62da str r2, [r3, #44] @ 0x2c 8022efc: e004 b.n 8022f08 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 8022efe: 68fb ldr r3, [r7, #12] 8022f00: 6a9b ldr r3, [r3, #40] @ 0x28 8022f02: 085a lsrs r2, r3, #1 8022f04: 68fb ldr r3, [r7, #12] 8022f06: 62da str r2, [r3, #44] @ 0x2c } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 8022f08: 4b1b ldr r3, [pc, #108] @ (8022f78 ) 8022f0a: 795b ldrb r3, [r3, #5] 8022f0c: 2b00 cmp r3, #0 8022f0e: d004 beq.n 8022f1a /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 8022f10: 4b1a ldr r3, [pc, #104] @ (8022f7c ) 8022f12: 695a ldr r2, [r3, #20] 8022f14: 68fb ldr r3, [r7, #12] 8022f16: 631a str r2, [r3, #48] @ 0x30 8022f18: e007 b.n 8022f2a } else { /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; 8022f1a: 68fb ldr r3, [r7, #12] 8022f1c: 6a9a ldr r2, [r3, #40] @ 0x28 8022f1e: 4613 mov r3, r2 8022f20: 00db lsls r3, r3, #3 8022f22: 1a9b subs r3, r3, r2 8022f24: 08da lsrs r2, r3, #3 8022f26: 68fb ldr r3, [r7, #12] 8022f28: 631a str r2, [r3, #48] @ 0x30 } /* (y)our internet address */ ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); 8022f2a: 683b ldr r3, [r7, #0] 8022f2c: 691a ldr r2, [r3, #16] 8022f2e: 68fb ldr r3, [r7, #12] 8022f30: 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)) { 8022f32: 4b11 ldr r3, [pc, #68] @ (8022f78 ) 8022f34: 799b ldrb r3, [r3, #6] 8022f36: 2b00 cmp r3, #0 8022f38: d00b beq.n 8022f52 /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 8022f3a: 4b10 ldr r3, [pc, #64] @ (8022f7c ) 8022f3c: 699b ldr r3, [r3, #24] 8022f3e: 4618 mov r0, r3 8022f40: f7f6 fd4f bl 80199e2 8022f44: 4602 mov r2, r0 8022f46: 68fb ldr r3, [r7, #12] 8022f48: 621a str r2, [r3, #32] dhcp->subnet_mask_given = 1; 8022f4a: 68fb ldr r3, [r7, #12] 8022f4c: 2201 movs r2, #1 8022f4e: 71da strb r2, [r3, #7] 8022f50: e002 b.n 8022f58 } else { dhcp->subnet_mask_given = 0; 8022f52: 68fb ldr r3, [r7, #12] 8022f54: 2200 movs r2, #0 8022f56: 71da strb r2, [r3, #7] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 8022f58: 4b07 ldr r3, [pc, #28] @ (8022f78 ) 8022f5a: 79db ldrb r3, [r3, #7] 8022f5c: 2b00 cmp r3, #0 8022f5e: d007 beq.n 8022f70 ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 8022f60: 4b06 ldr r3, [pc, #24] @ (8022f7c ) 8022f62: 69db ldr r3, [r3, #28] 8022f64: 4618 mov r0, r3 8022f66: f7f6 fd3c bl 80199e2 8022f6a: 4602 mov r2, r0 8022f6c: 68fb ldr r3, [r7, #12] 8022f6e: 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 */ } 8022f70: bf00 nop 8022f72: 3710 adds r7, #16 8022f74: 46bd mov sp, r7 8022f76: bd80 pop {r7, pc} 8022f78: 2402afec .word 0x2402afec 8022f7c: 2402afcc .word 0x2402afcc 08022f80 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 8022f80: b580 push {r7, lr} 8022f82: b084 sub sp, #16 8022f84: af00 add r7, sp, #0 8022f86: 6078 str r0, [r7, #4] struct dhcp *dhcp; err_t result; LWIP_ASSERT_CORE_LOCKED(); 8022f88: f7ee f848 bl 801101c LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 8022f8c: 687b ldr r3, [r7, #4] 8022f8e: 2b00 cmp r3, #0 8022f90: d109 bne.n 8022fa6 8022f92: 4b37 ldr r3, [pc, #220] @ (8023070 ) 8022f94: f240 22e7 movw r2, #743 @ 0x2e7 8022f98: 4936 ldr r1, [pc, #216] @ (8023074 ) 8022f9a: 4837 ldr r0, [pc, #220] @ (8023078 ) 8022f9c: f007 fc66 bl 802a86c 8022fa0: f06f 030f mvn.w r3, #15 8022fa4: e060 b.n 8023068 LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); 8022fa6: 687b ldr r3, [r7, #4] 8022fa8: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8022fac: f003 0301 and.w r3, r3, #1 8022fb0: 2b00 cmp r3, #0 8022fb2: d109 bne.n 8022fc8 8022fb4: 4b2e ldr r3, [pc, #184] @ (8023070 ) 8022fb6: f44f 723a mov.w r2, #744 @ 0x2e8 8022fba: 4930 ldr r1, [pc, #192] @ (802307c ) 8022fbc: 482e ldr r0, [pc, #184] @ (8023078 ) 8022fbe: f007 fc55 bl 802a86c 8022fc2: f06f 030f mvn.w r3, #15 8022fc6: e04f b.n 8023068 dhcp = netif_dhcp_data(netif); 8022fc8: 687b ldr r3, [r7, #4] 8022fca: 6a5b ldr r3, [r3, #36] @ 0x24 8022fcc: 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) { 8022fce: 687b ldr r3, [r7, #4] 8022fd0: 8d1b ldrh r3, [r3, #40] @ 0x28 8022fd2: f5b3 7f10 cmp.w r3, #576 @ 0x240 8022fd6: d202 bcs.n 8022fde LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); return ERR_MEM; 8022fd8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022fdc: e044 b.n 8023068 } /* no DHCP client attached yet? */ if (dhcp == NULL) { 8022fde: 68fb ldr r3, [r7, #12] 8022fe0: 2b00 cmp r3, #0 8022fe2: d10d bne.n 8023000 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 8022fe4: 2034 movs r0, #52 @ 0x34 8022fe6: f7f7 f8c9 bl 801a17c 8022fea: 60f8 str r0, [r7, #12] if (dhcp == NULL) { 8022fec: 68fb ldr r3, [r7, #12] 8022fee: 2b00 cmp r3, #0 8022ff0: d102 bne.n 8022ff8 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); return ERR_MEM; 8022ff2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022ff6: e037 b.n 8023068 } /* store this dhcp client in the netif */ netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); 8022ff8: 687b ldr r3, [r7, #4] 8022ffa: 68fa ldr r2, [r7, #12] 8022ffc: 625a str r2, [r3, #36] @ 0x24 8022ffe: e005 b.n 802300c 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) { 8023000: 68fb ldr r3, [r7, #12] 8023002: 791b ldrb r3, [r3, #4] 8023004: 2b00 cmp r3, #0 8023006: d001 beq.n 802300c dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8023008: f7ff fc8e bl 8022928 } /* dhcp is cleared below, no need to reset flag*/ } /* clear data structure */ memset(dhcp, 0, sizeof(struct dhcp)); 802300c: 2234 movs r2, #52 @ 0x34 802300e: 2100 movs r1, #0 8023010: 68f8 ldr r0, [r7, #12] 8023012: f007 fdbd bl 802ab90 /* 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 */ 8023016: f7ff fc35 bl 8022884 802301a: 4603 mov r3, r0 802301c: 2b00 cmp r3, #0 802301e: d002 beq.n 8023026 return ERR_MEM; 8023020: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023024: e020 b.n 8023068 } dhcp->pcb_allocated = 1; 8023026: 68fb ldr r3, [r7, #12] 8023028: 2201 movs r2, #1 802302a: 711a strb r2, [r3, #4] if (!netif_is_link_up(netif)) { 802302c: 687b ldr r3, [r7, #4] 802302e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8023032: f003 0304 and.w r3, r3, #4 8023036: 2b00 cmp r3, #0 8023038: d105 bne.n 8023046 /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ dhcp_set_state(dhcp, DHCP_STATE_INIT); 802303a: 2102 movs r1, #2 802303c: 68f8 ldr r0, [r7, #12] 802303e: f000 fd0a bl 8023a56 return ERR_OK; 8023042: 2300 movs r3, #0 8023044: e010 b.n 8023068 } /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 8023046: 6878 ldr r0, [r7, #4] 8023048: f000 f8f8 bl 802323c 802304c: 4603 mov r3, r0 802304e: 72fb strb r3, [r7, #11] if (result != ERR_OK) { 8023050: f997 300b ldrsb.w r3, [r7, #11] 8023054: 2b00 cmp r3, #0 8023056: d005 beq.n 8023064 /* free resources allocated above */ dhcp_release_and_stop(netif); 8023058: 6878 ldr r0, [r7, #4] 802305a: f000 fc55 bl 8023908 return ERR_MEM; 802305e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023062: e001 b.n 8023068 } return result; 8023064: f997 300b ldrsb.w r3, [r7, #11] } 8023068: 4618 mov r0, r3 802306a: 3710 adds r7, #16 802306c: 46bd mov sp, r7 802306e: bd80 pop {r7, pc} 8023070: 08030e54 .word 0x08030e54 8023074: 08030f38 .word 0x08030f38 8023078: 08030eb4 .word 0x08030eb4 802307c: 08030f7c .word 0x08030f7c 08023080 : * This enters the REBOOTING state to verify that the currently bound * address is still valid. */ void dhcp_network_changed(struct netif *netif) { 8023080: b580 push {r7, lr} 8023082: b084 sub sp, #16 8023084: af00 add r7, sp, #0 8023086: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023088: 687b ldr r3, [r7, #4] 802308a: 6a5b ldr r3, [r3, #36] @ 0x24 802308c: 60fb str r3, [r7, #12] if (!dhcp) { 802308e: 68fb ldr r3, [r7, #12] 8023090: 2b00 cmp r3, #0 8023092: d025 beq.n 80230e0 return; } switch (dhcp->state) { 8023094: 68fb ldr r3, [r7, #12] 8023096: 795b ldrb r3, [r3, #5] 8023098: 2b0a cmp r3, #10 802309a: d008 beq.n 80230ae 802309c: 2b0a cmp r3, #10 802309e: dc0d bgt.n 80230bc 80230a0: 2b00 cmp r3, #0 80230a2: d01f beq.n 80230e4 80230a4: 2b00 cmp r3, #0 80230a6: db09 blt.n 80230bc 80230a8: 3b03 subs r3, #3 80230aa: 2b02 cmp r3, #2 80230ac: d806 bhi.n 80230bc case DHCP_STATE_REBINDING: case DHCP_STATE_RENEWING: case DHCP_STATE_BOUND: case DHCP_STATE_REBOOTING: dhcp->tries = 0; 80230ae: 68fb ldr r3, [r7, #12] 80230b0: 2200 movs r2, #0 80230b2: 719a strb r2, [r3, #6] dhcp_reboot(netif); 80230b4: 6878 ldr r0, [r7, #4] 80230b6: f000 fb73 bl 80237a0 break; 80230ba: e014 b.n 80230e6 case DHCP_STATE_OFF: /* stay off */ break; default: LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); 80230bc: 68fb ldr r3, [r7, #12] 80230be: 795b ldrb r3, [r3, #5] 80230c0: 2b0c cmp r3, #12 80230c2: d906 bls.n 80230d2 80230c4: 4b09 ldr r3, [pc, #36] @ (80230ec ) 80230c6: f240 326d movw r2, #877 @ 0x36d 80230ca: 4909 ldr r1, [pc, #36] @ (80230f0 ) 80230cc: 4809 ldr r0, [pc, #36] @ (80230f4 ) 80230ce: f007 fbcd bl 802a86c 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; 80230d2: 68fb ldr r3, [r7, #12] 80230d4: 2200 movs r2, #0 80230d6: 719a strb r2, [r3, #6] dhcp_discover(netif); 80230d8: 6878 ldr r0, [r7, #4] 80230da: f000 f8af bl 802323c break; 80230de: e002 b.n 80230e6 return; 80230e0: bf00 nop 80230e2: e000 b.n 80230e6 break; 80230e4: bf00 nop } } 80230e6: 3710 adds r7, #16 80230e8: 46bd mov sp, r7 80230ea: bd80 pop {r7, pc} 80230ec: 08030e54 .word 0x08030e54 80230f0: 08030fa0 .word 0x08030fa0 80230f4: 08030eb4 .word 0x08030eb4 080230f8 : * @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) { 80230f8: b580 push {r7, lr} 80230fa: b084 sub sp, #16 80230fc: af00 add r7, sp, #0 80230fe: 6078 str r0, [r7, #4] 8023100: 6039 str r1, [r7, #0] struct dhcp *dhcp; LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8023102: 687b ldr r3, [r7, #4] 8023104: 2b00 cmp r3, #0 8023106: d107 bne.n 8023118 8023108: 4b0e ldr r3, [pc, #56] @ (8023144 ) 802310a: f240 328b movw r2, #907 @ 0x38b 802310e: 490e ldr r1, [pc, #56] @ (8023148 ) 8023110: 480e ldr r0, [pc, #56] @ (802314c ) 8023112: f007 fbab bl 802a86c 8023116: e012 b.n 802313e dhcp = netif_dhcp_data(netif); 8023118: 687b ldr r3, [r7, #4] 802311a: 6a5b ldr r3, [r3, #36] @ 0x24 802311c: 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)) { 802311e: 68fb ldr r3, [r7, #12] 8023120: 2b00 cmp r3, #0 8023122: d00c beq.n 802313e 8023124: 68fb ldr r3, [r7, #12] 8023126: 795b ldrb r3, [r3, #5] 8023128: 2b08 cmp r3, #8 802312a: d108 bne.n 802313e 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)) { 802312c: 683b ldr r3, [r7, #0] 802312e: 681a ldr r2, [r3, #0] 8023130: 68fb ldr r3, [r7, #12] 8023132: 69db ldr r3, [r3, #28] 8023134: 429a cmp r2, r3 8023136: d102 bne.n 802313e /* 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); 8023138: 6878 ldr r0, [r7, #4] 802313a: f000 f809 bl 8023150 } } } 802313e: 3710 adds r7, #16 8023140: 46bd mov sp, r7 8023142: bd80 pop {r7, pc} 8023144: 08030e54 .word 0x08030e54 8023148: 08030f38 .word 0x08030f38 802314c: 08030eb4 .word 0x08030eb4 08023150 : * * @param netif the netif under DHCP control */ static err_t dhcp_decline(struct netif *netif) { 8023150: b5b0 push {r4, r5, r7, lr} 8023152: b08a sub sp, #40 @ 0x28 8023154: af02 add r7, sp, #8 8023156: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023158: 687b ldr r3, [r7, #4] 802315a: 6a5b ldr r3, [r3, #36] @ 0x24 802315c: 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); 802315e: 210c movs r1, #12 8023160: 69b8 ldr r0, [r7, #24] 8023162: f000 fc78 bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len); 8023166: f107 030c add.w r3, r7, #12 802316a: 2204 movs r2, #4 802316c: 69b9 ldr r1, [r7, #24] 802316e: 6878 ldr r0, [r7, #4] 8023170: f001 f90a bl 8024388 8023174: 6178 str r0, [r7, #20] if (p_out != NULL) { 8023176: 697b ldr r3, [r7, #20] 8023178: 2b00 cmp r3, #0 802317a: d035 beq.n 80231e8 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 802317c: 697b ldr r3, [r7, #20] 802317e: 685b ldr r3, [r3, #4] 8023180: 613b str r3, [r7, #16] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 8023182: 89b8 ldrh r0, [r7, #12] 8023184: 693b ldr r3, [r7, #16] 8023186: f103 01f0 add.w r1, r3, #240 @ 0xf0 802318a: 2304 movs r3, #4 802318c: 2232 movs r2, #50 @ 0x32 802318e: f000 fc7d bl 8023a8c 8023192: 4603 mov r3, r0 8023194: 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))); 8023196: 89bc ldrh r4, [r7, #12] 8023198: 693b ldr r3, [r7, #16] 802319a: f103 05f0 add.w r5, r3, #240 @ 0xf0 802319e: 69bb ldr r3, [r7, #24] 80231a0: 69db ldr r3, [r3, #28] 80231a2: 4618 mov r0, r3 80231a4: f7f6 fc1d bl 80199e2 80231a8: 4603 mov r3, r0 80231aa: 461a mov r2, r3 80231ac: 4629 mov r1, r5 80231ae: 4620 mov r0, r4 80231b0: f000 fcf8 bl 8023ba4 80231b4: 4603 mov r3, r0 80231b6: 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); 80231b8: 89b8 ldrh r0, [r7, #12] 80231ba: 693b ldr r3, [r7, #16] 80231bc: 33f0 adds r3, #240 @ 0xf0 80231be: 697a ldr r2, [r7, #20] 80231c0: 4619 mov r1, r3 80231c2: f001 f9b7 bl 8024534 /* 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); 80231c6: 4b19 ldr r3, [pc, #100] @ (802322c ) 80231c8: 6818 ldr r0, [r3, #0] 80231ca: 4b19 ldr r3, [pc, #100] @ (8023230 ) 80231cc: 9301 str r3, [sp, #4] 80231ce: 687b ldr r3, [r7, #4] 80231d0: 9300 str r3, [sp, #0] 80231d2: 2343 movs r3, #67 @ 0x43 80231d4: 4a17 ldr r2, [pc, #92] @ (8023234 ) 80231d6: 6979 ldr r1, [r7, #20] 80231d8: f7ff f88a bl 80222f0 80231dc: 4603 mov r3, r0 80231de: 77fb strb r3, [r7, #31] pbuf_free(p_out); 80231e0: 6978 ldr r0, [r7, #20] 80231e2: f7f8 f8cb bl 801b37c 80231e6: e001 b.n 80231ec 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; 80231e8: 23ff movs r3, #255 @ 0xff 80231ea: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 80231ec: 69bb ldr r3, [r7, #24] 80231ee: 799b ldrb r3, [r3, #6] 80231f0: 2bff cmp r3, #255 @ 0xff 80231f2: d005 beq.n 8023200 dhcp->tries++; 80231f4: 69bb ldr r3, [r7, #24] 80231f6: 799b ldrb r3, [r3, #6] 80231f8: 3301 adds r3, #1 80231fa: b2da uxtb r2, r3 80231fc: 69bb ldr r3, [r7, #24] 80231fe: 719a strb r2, [r3, #6] } msecs = 10 * 1000; 8023200: f242 7310 movw r3, #10000 @ 0x2710 8023204: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8023206: 89fb ldrh r3, [r7, #14] 8023208: f203 13f3 addw r3, r3, #499 @ 0x1f3 802320c: 4a0a ldr r2, [pc, #40] @ (8023238 ) 802320e: fb82 1203 smull r1, r2, r2, r3 8023212: 1152 asrs r2, r2, #5 8023214: 17db asrs r3, r3, #31 8023216: 1ad3 subs r3, r2, r3 8023218: b29a uxth r2, r3 802321a: 69bb ldr r3, [r7, #24] 802321c: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); return result; 802321e: f997 301f ldrsb.w r3, [r7, #31] } 8023222: 4618 mov r0, r3 8023224: 3720 adds r7, #32 8023226: 46bd mov sp, r7 8023228: bdb0 pop {r4, r5, r7, pc} 802322a: bf00 nop 802322c: 2402aff4 .word 0x2402aff4 8023230: 08031c78 .word 0x08031c78 8023234: 08031c7c .word 0x08031c7c 8023238: 10624dd3 .word 0x10624dd3 0802323c : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802323c: b580 push {r7, lr} 802323e: b08a sub sp, #40 @ 0x28 8023240: af02 add r7, sp, #8 8023242: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023244: 687b ldr r3, [r7, #4] 8023246: 6a5b ldr r3, [r3, #36] @ 0x24 8023248: 61bb str r3, [r7, #24] err_t result = ERR_OK; 802324a: 2300 movs r3, #0 802324c: 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); 802324e: 69bb ldr r3, [r7, #24] 8023250: 2200 movs r2, #0 8023252: 61da str r2, [r3, #28] dhcp_set_state(dhcp, DHCP_STATE_SELECTING); 8023254: 2106 movs r1, #6 8023256: 69b8 ldr r0, [r7, #24] 8023258: f000 fbfd bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len); 802325c: f107 0308 add.w r3, r7, #8 8023260: 2201 movs r2, #1 8023262: 69b9 ldr r1, [r7, #24] 8023264: 6878 ldr r0, [r7, #4] 8023266: f001 f88f bl 8024388 802326a: 6138 str r0, [r7, #16] if (p_out != NULL) { 802326c: 693b ldr r3, [r7, #16] 802326e: 2b00 cmp r3, #0 8023270: d04b beq.n 802330a struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8023272: 693b ldr r3, [r7, #16] 8023274: 685b ldr r3, [r3, #4] 8023276: 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); 8023278: 8938 ldrh r0, [r7, #8] 802327a: 68fb ldr r3, [r7, #12] 802327c: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023280: 2302 movs r3, #2 8023282: 2239 movs r2, #57 @ 0x39 8023284: f000 fc02 bl 8023a8c 8023288: 4603 mov r3, r0 802328a: 813b strh r3, [r7, #8] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 802328c: 8938 ldrh r0, [r7, #8] 802328e: 68fb ldr r3, [r7, #12] 8023290: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023294: 687b ldr r3, [r7, #4] 8023296: 8d1b ldrh r3, [r3, #40] @ 0x28 8023298: 461a mov r2, r3 802329a: f000 fc51 bl 8023b40 802329e: 4603 mov r3, r0 80232a0: 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)); 80232a2: 8938 ldrh r0, [r7, #8] 80232a4: 68fb ldr r3, [r7, #12] 80232a6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232aa: 2303 movs r3, #3 80232ac: 2237 movs r2, #55 @ 0x37 80232ae: f000 fbed bl 8023a8c 80232b2: 4603 mov r3, r0 80232b4: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80232b6: 2300 movs r3, #0 80232b8: 77fb strb r3, [r7, #31] 80232ba: e00e b.n 80232da options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80232bc: 8938 ldrh r0, [r7, #8] 80232be: 68fb ldr r3, [r7, #12] 80232c0: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232c4: 7ffb ldrb r3, [r7, #31] 80232c6: 4a29 ldr r2, [pc, #164] @ (802336c ) 80232c8: 5cd3 ldrb r3, [r2, r3] 80232ca: 461a mov r2, r3 80232cc: f000 fc12 bl 8023af4 80232d0: 4603 mov r3, r0 80232d2: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80232d4: 7ffb ldrb r3, [r7, #31] 80232d6: 3301 adds r3, #1 80232d8: 77fb strb r3, [r7, #31] 80232da: 7ffb ldrb r3, [r7, #31] 80232dc: 2b02 cmp r3, #2 80232de: d9ed bls.n 80232bc } 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); 80232e0: 8938 ldrh r0, [r7, #8] 80232e2: 68fb ldr r3, [r7, #12] 80232e4: 33f0 adds r3, #240 @ 0xf0 80232e6: 693a ldr r2, [r7, #16] 80232e8: 4619 mov r1, r3 80232ea: f001 f923 bl 8024534 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); 80232ee: 4b20 ldr r3, [pc, #128] @ (8023370 ) 80232f0: 6818 ldr r0, [r3, #0] 80232f2: 4b20 ldr r3, [pc, #128] @ (8023374 ) 80232f4: 9301 str r3, [sp, #4] 80232f6: 687b ldr r3, [r7, #4] 80232f8: 9300 str r3, [sp, #0] 80232fa: 2343 movs r3, #67 @ 0x43 80232fc: 4a1e ldr r2, [pc, #120] @ (8023378 ) 80232fe: 6939 ldr r1, [r7, #16] 8023300: f7fe fff6 bl 80222f0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); pbuf_free(p_out); 8023304: 6938 ldr r0, [r7, #16] 8023306: f7f8 f839 bl 801b37c 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) { 802330a: 69bb ldr r3, [r7, #24] 802330c: 799b ldrb r3, [r3, #6] 802330e: 2bff cmp r3, #255 @ 0xff 8023310: d005 beq.n 802331e dhcp->tries++; 8023312: 69bb ldr r3, [r7, #24] 8023314: 799b ldrb r3, [r3, #6] 8023316: 3301 adds r3, #1 8023318: b2da uxtb r2, r3 802331a: 69bb ldr r3, [r7, #24] 802331c: 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); 802331e: 69bb ldr r3, [r7, #24] 8023320: 799b ldrb r3, [r3, #6] 8023322: 2b05 cmp r3, #5 8023324: d80d bhi.n 8023342 8023326: 69bb ldr r3, [r7, #24] 8023328: 799b ldrb r3, [r3, #6] 802332a: 461a mov r2, r3 802332c: 2301 movs r3, #1 802332e: 4093 lsls r3, r2 8023330: b29b uxth r3, r3 8023332: 461a mov r2, r3 8023334: 0152 lsls r2, r2, #5 8023336: 1ad2 subs r2, r2, r3 8023338: 0092 lsls r2, r2, #2 802333a: 4413 add r3, r2 802333c: 00db lsls r3, r3, #3 802333e: b29b uxth r3, r3 8023340: e001 b.n 8023346 8023342: f64e 2360 movw r3, #60000 @ 0xea60 8023346: 817b strh r3, [r7, #10] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8023348: 897b ldrh r3, [r7, #10] 802334a: f203 13f3 addw r3, r3, #499 @ 0x1f3 802334e: 4a0b ldr r2, [pc, #44] @ (802337c ) 8023350: fb82 1203 smull r1, r2, r2, r3 8023354: 1152 asrs r2, r2, #5 8023356: 17db asrs r3, r3, #31 8023358: 1ad3 subs r3, r2, r3 802335a: b29a uxth r2, r3 802335c: 69bb ldr r3, [r7, #24] 802335e: 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; 8023360: f997 3017 ldrsb.w r3, [r7, #23] } 8023364: 4618 mov r0, r3 8023366: 3720 adds r7, #32 8023368: 46bd mov sp, r7 802336a: bd80 pop {r7, pc} 802336c: 24000058 .word 0x24000058 8023370: 2402aff4 .word 0x2402aff4 8023374: 08031c78 .word 0x08031c78 8023378: 08031c7c .word 0x08031c7c 802337c: 10624dd3 .word 0x10624dd3 08023380 : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 8023380: b580 push {r7, lr} 8023382: b088 sub sp, #32 8023384: af00 add r7, sp, #0 8023386: 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;); 8023388: 687b ldr r3, [r7, #4] 802338a: 2b00 cmp r3, #0 802338c: d107 bne.n 802339e 802338e: 4b64 ldr r3, [pc, #400] @ (8023520 ) 8023390: f240 4215 movw r2, #1045 @ 0x415 8023394: 4963 ldr r1, [pc, #396] @ (8023524 ) 8023396: 4864 ldr r0, [pc, #400] @ (8023528 ) 8023398: f007 fa68 bl 802a86c 802339c: e0bc b.n 8023518 dhcp = netif_dhcp_data(netif); 802339e: 687b ldr r3, [r7, #4] 80233a0: 6a5b ldr r3, [r3, #36] @ 0x24 80233a2: 61fb str r3, [r7, #28] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 80233a4: 69fb ldr r3, [r7, #28] 80233a6: 2b00 cmp r3, #0 80233a8: d107 bne.n 80233ba 80233aa: 4b5d ldr r3, [pc, #372] @ (8023520 ) 80233ac: f240 4217 movw r2, #1047 @ 0x417 80233b0: 495e ldr r1, [pc, #376] @ (802352c ) 80233b2: 485d ldr r0, [pc, #372] @ (8023528 ) 80233b4: f007 fa5a bl 802a86c 80233b8: e0ae b.n 8023518 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; 80233ba: 69fb ldr r3, [r7, #28] 80233bc: 2200 movs r2, #0 80233be: 825a strh r2, [r3, #18] if (dhcp->offered_t0_lease != 0xffffffffUL) { 80233c0: 69fb ldr r3, [r7, #28] 80233c2: 6a9b ldr r3, [r3, #40] @ 0x28 80233c4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80233c8: d019 beq.n 80233fe /* 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; 80233ca: 69fb ldr r3, [r7, #28] 80233cc: 6a9b ldr r3, [r3, #40] @ 0x28 80233ce: 331e adds r3, #30 80233d0: 4a57 ldr r2, [pc, #348] @ (8023530 ) 80233d2: fba2 2303 umull r2, r3, r2, r3 80233d6: 095b lsrs r3, r3, #5 80233d8: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 80233da: 69bb ldr r3, [r7, #24] 80233dc: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 80233e0: d302 bcc.n 80233e8 timeout = 0xffff; 80233e2: f64f 73ff movw r3, #65535 @ 0xffff 80233e6: 61bb str r3, [r7, #24] } dhcp->t0_timeout = (u16_t)timeout; 80233e8: 69bb ldr r3, [r7, #24] 80233ea: b29a uxth r2, r3 80233ec: 69fb ldr r3, [r7, #28] 80233ee: 829a strh r2, [r3, #20] if (dhcp->t0_timeout == 0) { 80233f0: 69fb ldr r3, [r7, #28] 80233f2: 8a9b ldrh r3, [r3, #20] 80233f4: 2b00 cmp r3, #0 80233f6: d102 bne.n 80233fe dhcp->t0_timeout = 1; 80233f8: 69fb ldr r3, [r7, #28] 80233fa: 2201 movs r2, #1 80233fc: 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) { 80233fe: 69fb ldr r3, [r7, #28] 8023400: 6adb ldr r3, [r3, #44] @ 0x2c 8023402: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8023406: d01d beq.n 8023444 /* 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; 8023408: 69fb ldr r3, [r7, #28] 802340a: 6adb ldr r3, [r3, #44] @ 0x2c 802340c: 331e adds r3, #30 802340e: 4a48 ldr r2, [pc, #288] @ (8023530 ) 8023410: fba2 2303 umull r2, r3, r2, r3 8023414: 095b lsrs r3, r3, #5 8023416: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 8023418: 69bb ldr r3, [r7, #24] 802341a: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802341e: d302 bcc.n 8023426 timeout = 0xffff; 8023420: f64f 73ff movw r3, #65535 @ 0xffff 8023424: 61bb str r3, [r7, #24] } dhcp->t1_timeout = (u16_t)timeout; 8023426: 69bb ldr r3, [r7, #24] 8023428: b29a uxth r2, r3 802342a: 69fb ldr r3, [r7, #28] 802342c: 815a strh r2, [r3, #10] if (dhcp->t1_timeout == 0) { 802342e: 69fb ldr r3, [r7, #28] 8023430: 895b ldrh r3, [r3, #10] 8023432: 2b00 cmp r3, #0 8023434: d102 bne.n 802343c dhcp->t1_timeout = 1; 8023436: 69fb ldr r3, [r7, #28] 8023438: 2201 movs r2, #1 802343a: 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; 802343c: 69fb ldr r3, [r7, #28] 802343e: 895a ldrh r2, [r3, #10] 8023440: 69fb ldr r3, [r7, #28] 8023442: 81da strh r2, [r3, #14] } /* set renewal period timer */ if (dhcp->offered_t2_rebind != 0xffffffffUL) { 8023444: 69fb ldr r3, [r7, #28] 8023446: 6b1b ldr r3, [r3, #48] @ 0x30 8023448: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 802344c: d01d beq.n 802348a 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; 802344e: 69fb ldr r3, [r7, #28] 8023450: 6b1b ldr r3, [r3, #48] @ 0x30 8023452: 331e adds r3, #30 8023454: 4a36 ldr r2, [pc, #216] @ (8023530 ) 8023456: fba2 2303 umull r2, r3, r2, r3 802345a: 095b lsrs r3, r3, #5 802345c: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 802345e: 69bb ldr r3, [r7, #24] 8023460: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8023464: d302 bcc.n 802346c timeout = 0xffff; 8023466: f64f 73ff movw r3, #65535 @ 0xffff 802346a: 61bb str r3, [r7, #24] } dhcp->t2_timeout = (u16_t)timeout; 802346c: 69bb ldr r3, [r7, #24] 802346e: b29a uxth r2, r3 8023470: 69fb ldr r3, [r7, #28] 8023472: 819a strh r2, [r3, #12] if (dhcp->t2_timeout == 0) { 8023474: 69fb ldr r3, [r7, #28] 8023476: 899b ldrh r3, [r3, #12] 8023478: 2b00 cmp r3, #0 802347a: d102 bne.n 8023482 dhcp->t2_timeout = 1; 802347c: 69fb ldr r3, [r7, #28] 802347e: 2201 movs r2, #1 8023480: 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; 8023482: 69fb ldr r3, [r7, #28] 8023484: 899a ldrh r2, [r3, #12] 8023486: 69fb ldr r3, [r7, #28] 8023488: 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)) { 802348a: 69fb ldr r3, [r7, #28] 802348c: 895a ldrh r2, [r3, #10] 802348e: 69fb ldr r3, [r7, #28] 8023490: 899b ldrh r3, [r3, #12] 8023492: 429a cmp r2, r3 8023494: d306 bcc.n 80234a4 8023496: 69fb ldr r3, [r7, #28] 8023498: 899b ldrh r3, [r3, #12] 802349a: 2b00 cmp r3, #0 802349c: d002 beq.n 80234a4 dhcp->t1_timeout = 0; 802349e: 69fb ldr r3, [r7, #28] 80234a0: 2200 movs r2, #0 80234a2: 815a strh r2, [r3, #10] } if (dhcp->subnet_mask_given) { 80234a4: 69fb ldr r3, [r7, #28] 80234a6: 79db ldrb r3, [r3, #7] 80234a8: 2b00 cmp r3, #0 80234aa: d003 beq.n 80234b4 /* copy offered network mask */ ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); 80234ac: 69fb ldr r3, [r7, #28] 80234ae: 6a1b ldr r3, [r3, #32] 80234b0: 613b str r3, [r7, #16] 80234b2: e014 b.n 80234de } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 80234b4: 69fb ldr r3, [r7, #28] 80234b6: 331c adds r3, #28 80234b8: 781b ldrb r3, [r3, #0] 80234ba: 75fb strb r3, [r7, #23] if (first_octet <= 127) { 80234bc: f997 3017 ldrsb.w r3, [r7, #23] 80234c0: 2b00 cmp r3, #0 80234c2: db02 blt.n 80234ca ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 80234c4: 23ff movs r3, #255 @ 0xff 80234c6: 613b str r3, [r7, #16] 80234c8: e009 b.n 80234de } else if (first_octet >= 192) { 80234ca: 7dfb ldrb r3, [r7, #23] 80234cc: 2bbf cmp r3, #191 @ 0xbf 80234ce: d903 bls.n 80234d8 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 80234d0: f06f 437f mvn.w r3, #4278190080 @ 0xff000000 80234d4: 613b str r3, [r7, #16] 80234d6: e002 b.n 80234de } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 80234d8: f64f 73ff movw r3, #65535 @ 0xffff 80234dc: 613b str r3, [r7, #16] } } ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); 80234de: 69fb ldr r3, [r7, #28] 80234e0: 6a5b ldr r3, [r3, #36] @ 0x24 80234e2: 60fb str r3, [r7, #12] /* gateway address not given? */ if (ip4_addr_isany_val(gw_addr)) { 80234e4: 68fb ldr r3, [r7, #12] 80234e6: 2b00 cmp r3, #0 80234e8: d108 bne.n 80234fc /* copy network address */ ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 80234ea: 69fb ldr r3, [r7, #28] 80234ec: 69da ldr r2, [r3, #28] 80234ee: 693b ldr r3, [r7, #16] 80234f0: 4013 ands r3, r2 80234f2: 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)); 80234f4: 68fb ldr r3, [r7, #12] 80234f6: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 80234fa: 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); 80234fc: 210a movs r1, #10 80234fe: 69f8 ldr r0, [r7, #28] 8023500: f000 faa9 bl 8023a56 netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); 8023504: 69fb ldr r3, [r7, #28] 8023506: f103 011c add.w r1, r3, #28 802350a: f107 030c add.w r3, r7, #12 802350e: f107 0210 add.w r2, r7, #16 8023512: 6878 ldr r0, [r7, #4] 8023514: f7f7 f9e8 bl 801a8e8 /* interface is used by routing now that an address is set */ } 8023518: 3720 adds r7, #32 802351a: 46bd mov sp, r7 802351c: bd80 pop {r7, pc} 802351e: bf00 nop 8023520: 08030e54 .word 0x08030e54 8023524: 08030fb4 .word 0x08030fb4 8023528: 08030eb4 .word 0x08030eb4 802352c: 08030fd0 .word 0x08030fd0 8023530: 88888889 .word 0x88888889 08023534 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 8023534: b580 push {r7, lr} 8023536: b08a sub sp, #40 @ 0x28 8023538: af02 add r7, sp, #8 802353a: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 802353c: 687b ldr r3, [r7, #4] 802353e: 6a5b ldr r3, [r3, #36] @ 0x24 8023540: 61bb str r3, [r7, #24] u16_t msecs; u8_t i; struct pbuf *p_out; u16_t options_out_len; LWIP_ASSERT_CORE_LOCKED(); 8023542: f7ed fd6b bl 801101c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_STATE_RENEWING); 8023546: 2105 movs r1, #5 8023548: 69b8 ldr r0, [r7, #24] 802354a: f000 fa84 bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 802354e: f107 030c add.w r3, r7, #12 8023552: 2203 movs r2, #3 8023554: 69b9 ldr r1, [r7, #24] 8023556: 6878 ldr r0, [r7, #4] 8023558: f000 ff16 bl 8024388 802355c: 6178 str r0, [r7, #20] if (p_out != NULL) { 802355e: 697b ldr r3, [r7, #20] 8023560: 2b00 cmp r3, #0 8023562: d04e beq.n 8023602 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8023564: 697b ldr r3, [r7, #20] 8023566: 685b ldr r3, [r3, #4] 8023568: 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); 802356a: 89b8 ldrh r0, [r7, #12] 802356c: 693b ldr r3, [r7, #16] 802356e: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023572: 2302 movs r3, #2 8023574: 2239 movs r2, #57 @ 0x39 8023576: f000 fa89 bl 8023a8c 802357a: 4603 mov r3, r0 802357c: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 802357e: 89b8 ldrh r0, [r7, #12] 8023580: 693b ldr r3, [r7, #16] 8023582: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023586: 687b ldr r3, [r7, #4] 8023588: 8d1b ldrh r3, [r3, #40] @ 0x28 802358a: 461a mov r2, r3 802358c: f000 fad8 bl 8023b40 8023590: 4603 mov r3, r0 8023592: 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)); 8023594: 89b8 ldrh r0, [r7, #12] 8023596: 693b ldr r3, [r7, #16] 8023598: f103 01f0 add.w r1, r3, #240 @ 0xf0 802359c: 2303 movs r3, #3 802359e: 2237 movs r2, #55 @ 0x37 80235a0: f000 fa74 bl 8023a8c 80235a4: 4603 mov r3, r0 80235a6: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80235a8: 2300 movs r3, #0 80235aa: 77bb strb r3, [r7, #30] 80235ac: e00e b.n 80235cc options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80235ae: 89b8 ldrh r0, [r7, #12] 80235b0: 693b ldr r3, [r7, #16] 80235b2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80235b6: 7fbb ldrb r3, [r7, #30] 80235b8: 4a29 ldr r2, [pc, #164] @ (8023660 ) 80235ba: 5cd3 ldrb r3, [r2, r3] 80235bc: 461a mov r2, r3 80235be: f000 fa99 bl 8023af4 80235c2: 4603 mov r3, r0 80235c4: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80235c6: 7fbb ldrb r3, [r7, #30] 80235c8: 3301 adds r3, #1 80235ca: 77bb strb r3, [r7, #30] 80235cc: 7fbb ldrb r3, [r7, #30] 80235ce: 2b02 cmp r3, #2 80235d0: d9ed bls.n 80235ae #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); 80235d2: 89b8 ldrh r0, [r7, #12] 80235d4: 693b ldr r3, [r7, #16] 80235d6: 33f0 adds r3, #240 @ 0xf0 80235d8: 697a ldr r2, [r7, #20] 80235da: 4619 mov r1, r3 80235dc: f000 ffaa bl 8024534 result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 80235e0: 4b20 ldr r3, [pc, #128] @ (8023664 ) 80235e2: 6818 ldr r0, [r3, #0] 80235e4: 69bb ldr r3, [r7, #24] 80235e6: f103 0218 add.w r2, r3, #24 80235ea: 687b ldr r3, [r7, #4] 80235ec: 9300 str r3, [sp, #0] 80235ee: 2343 movs r3, #67 @ 0x43 80235f0: 6979 ldr r1, [r7, #20] 80235f2: f7fe fe09 bl 8022208 80235f6: 4603 mov r3, r0 80235f8: 77fb strb r3, [r7, #31] pbuf_free(p_out); 80235fa: 6978 ldr r0, [r7, #20] 80235fc: f7f7 febe bl 801b37c 8023600: e001 b.n 8023606 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; 8023602: 23ff movs r3, #255 @ 0xff 8023604: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8023606: 69bb ldr r3, [r7, #24] 8023608: 799b ldrb r3, [r3, #6] 802360a: 2bff cmp r3, #255 @ 0xff 802360c: d005 beq.n 802361a dhcp->tries++; 802360e: 69bb ldr r3, [r7, #24] 8023610: 799b ldrb r3, [r3, #6] 8023612: 3301 adds r3, #1 8023614: b2da uxtb r2, r3 8023616: 69bb ldr r3, [r7, #24] 8023618: 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); 802361a: 69bb ldr r3, [r7, #24] 802361c: 799b ldrb r3, [r3, #6] 802361e: 2b09 cmp r3, #9 8023620: d809 bhi.n 8023636 8023622: 69bb ldr r3, [r7, #24] 8023624: 799b ldrb r3, [r3, #6] 8023626: 461a mov r2, r3 8023628: 0152 lsls r2, r2, #5 802362a: 1ad2 subs r2, r2, r3 802362c: 0092 lsls r2, r2, #2 802362e: 4413 add r3, r2 8023630: 011b lsls r3, r3, #4 8023632: b29b uxth r3, r3 8023634: e001 b.n 802363a 8023636: f644 6320 movw r3, #20000 @ 0x4e20 802363a: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 802363c: 89fb ldrh r3, [r7, #14] 802363e: f203 13f3 addw r3, r3, #499 @ 0x1f3 8023642: 4a09 ldr r2, [pc, #36] @ (8023668 ) 8023644: fb82 1203 smull r1, r2, r2, r3 8023648: 1152 asrs r2, r2, #5 802364a: 17db asrs r3, r3, #31 802364c: 1ad3 subs r3, r2, r3 802364e: b29a uxth r2, r3 8023650: 69bb ldr r3, [r7, #24] 8023652: 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; 8023654: f997 301f ldrsb.w r3, [r7, #31] } 8023658: 4618 mov r0, r3 802365a: 3720 adds r7, #32 802365c: 46bd mov sp, r7 802365e: bd80 pop {r7, pc} 8023660: 24000058 .word 0x24000058 8023664: 2402aff4 .word 0x2402aff4 8023668: 10624dd3 .word 0x10624dd3 0802366c : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802366c: b580 push {r7, lr} 802366e: b08a sub sp, #40 @ 0x28 8023670: af02 add r7, sp, #8 8023672: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023674: 687b ldr r3, [r7, #4] 8023676: 6a5b ldr r3, [r3, #36] @ 0x24 8023678: 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); 802367a: 2104 movs r1, #4 802367c: 69b8 ldr r0, [r7, #24] 802367e: f000 f9ea bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8023682: f107 030c add.w r3, r7, #12 8023686: 2203 movs r2, #3 8023688: 69b9 ldr r1, [r7, #24] 802368a: 6878 ldr r0, [r7, #4] 802368c: f000 fe7c bl 8024388 8023690: 6178 str r0, [r7, #20] if (p_out != NULL) { 8023692: 697b ldr r3, [r7, #20] 8023694: 2b00 cmp r3, #0 8023696: d04c beq.n 8023732 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8023698: 697b ldr r3, [r7, #20] 802369a: 685b ldr r3, [r3, #4] 802369c: 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); 802369e: 89b8 ldrh r0, [r7, #12] 80236a0: 693b ldr r3, [r7, #16] 80236a2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236a6: 2302 movs r3, #2 80236a8: 2239 movs r2, #57 @ 0x39 80236aa: f000 f9ef bl 8023a8c 80236ae: 4603 mov r3, r0 80236b0: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80236b2: 89b8 ldrh r0, [r7, #12] 80236b4: 693b ldr r3, [r7, #16] 80236b6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236ba: 687b ldr r3, [r7, #4] 80236bc: 8d1b ldrh r3, [r3, #40] @ 0x28 80236be: 461a mov r2, r3 80236c0: f000 fa3e bl 8023b40 80236c4: 4603 mov r3, r0 80236c6: 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)); 80236c8: 89b8 ldrh r0, [r7, #12] 80236ca: 693b ldr r3, [r7, #16] 80236cc: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236d0: 2303 movs r3, #3 80236d2: 2237 movs r2, #55 @ 0x37 80236d4: f000 f9da bl 8023a8c 80236d8: 4603 mov r3, r0 80236da: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80236dc: 2300 movs r3, #0 80236de: 77bb strb r3, [r7, #30] 80236e0: e00e b.n 8023700 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80236e2: 89b8 ldrh r0, [r7, #12] 80236e4: 693b ldr r3, [r7, #16] 80236e6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236ea: 7fbb ldrb r3, [r7, #30] 80236ec: 4a28 ldr r2, [pc, #160] @ (8023790 ) 80236ee: 5cd3 ldrb r3, [r2, r3] 80236f0: 461a mov r2, r3 80236f2: f000 f9ff bl 8023af4 80236f6: 4603 mov r3, r0 80236f8: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80236fa: 7fbb ldrb r3, [r7, #30] 80236fc: 3301 adds r3, #1 80236fe: 77bb strb r3, [r7, #30] 8023700: 7fbb ldrb r3, [r7, #30] 8023702: 2b02 cmp r3, #2 8023704: d9ed bls.n 80236e2 #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); 8023706: 89b8 ldrh r0, [r7, #12] 8023708: 693b ldr r3, [r7, #16] 802370a: 33f0 adds r3, #240 @ 0xf0 802370c: 697a ldr r2, [r7, #20] 802370e: 4619 mov r1, r3 8023710: f000 ff10 bl 8024534 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 8023714: 4b1f ldr r3, [pc, #124] @ (8023794 ) 8023716: 6818 ldr r0, [r3, #0] 8023718: 687b ldr r3, [r7, #4] 802371a: 9300 str r3, [sp, #0] 802371c: 2343 movs r3, #67 @ 0x43 802371e: 4a1e ldr r2, [pc, #120] @ (8023798 ) 8023720: 6979 ldr r1, [r7, #20] 8023722: f7fe fd71 bl 8022208 8023726: 4603 mov r3, r0 8023728: 77fb strb r3, [r7, #31] pbuf_free(p_out); 802372a: 6978 ldr r0, [r7, #20] 802372c: f7f7 fe26 bl 801b37c 8023730: e001 b.n 8023736 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; 8023732: 23ff movs r3, #255 @ 0xff 8023734: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8023736: 69bb ldr r3, [r7, #24] 8023738: 799b ldrb r3, [r3, #6] 802373a: 2bff cmp r3, #255 @ 0xff 802373c: d005 beq.n 802374a dhcp->tries++; 802373e: 69bb ldr r3, [r7, #24] 8023740: 799b ldrb r3, [r3, #6] 8023742: 3301 adds r3, #1 8023744: b2da uxtb r2, r3 8023746: 69bb ldr r3, [r7, #24] 8023748: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 802374a: 69bb ldr r3, [r7, #24] 802374c: 799b ldrb r3, [r3, #6] 802374e: 2b09 cmp r3, #9 8023750: d809 bhi.n 8023766 8023752: 69bb ldr r3, [r7, #24] 8023754: 799b ldrb r3, [r3, #6] 8023756: 461a mov r2, r3 8023758: 0152 lsls r2, r2, #5 802375a: 1ad2 subs r2, r2, r3 802375c: 0092 lsls r2, r2, #2 802375e: 4413 add r3, r2 8023760: 00db lsls r3, r3, #3 8023762: b29b uxth r3, r3 8023764: e001 b.n 802376a 8023766: f242 7310 movw r3, #10000 @ 0x2710 802376a: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 802376c: 89fb ldrh r3, [r7, #14] 802376e: f203 13f3 addw r3, r3, #499 @ 0x1f3 8023772: 4a0a ldr r2, [pc, #40] @ (802379c ) 8023774: fb82 1203 smull r1, r2, r2, r3 8023778: 1152 asrs r2, r2, #5 802377a: 17db asrs r3, r3, #31 802377c: 1ad3 subs r3, r2, r3 802377e: b29a uxth r2, r3 8023780: 69bb ldr r3, [r7, #24] 8023782: 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; 8023784: f997 301f ldrsb.w r3, [r7, #31] } 8023788: 4618 mov r0, r3 802378a: 3720 adds r7, #32 802378c: 46bd mov sp, r7 802378e: bd80 pop {r7, pc} 8023790: 24000058 .word 0x24000058 8023794: 2402aff4 .word 0x2402aff4 8023798: 08031c7c .word 0x08031c7c 802379c: 10624dd3 .word 0x10624dd3 080237a0 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 80237a0: b5b0 push {r4, r5, r7, lr} 80237a2: b08a sub sp, #40 @ 0x28 80237a4: af02 add r7, sp, #8 80237a6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80237a8: 687b ldr r3, [r7, #4] 80237aa: 6a5b ldr r3, [r3, #36] @ 0x24 80237ac: 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); 80237ae: 2103 movs r1, #3 80237b0: 69b8 ldr r0, [r7, #24] 80237b2: f000 f950 bl 8023a56 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80237b6: f107 030c add.w r3, r7, #12 80237ba: 2203 movs r2, #3 80237bc: 69b9 ldr r1, [r7, #24] 80237be: 6878 ldr r0, [r7, #4] 80237c0: f000 fde2 bl 8024388 80237c4: 6178 str r0, [r7, #20] if (p_out != NULL) { 80237c6: 697b ldr r3, [r7, #20] 80237c8: 2b00 cmp r3, #0 80237ca: d066 beq.n 802389a struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80237cc: 697b ldr r3, [r7, #20] 80237ce: 685b ldr r3, [r3, #4] 80237d0: 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); 80237d2: 89b8 ldrh r0, [r7, #12] 80237d4: 693b ldr r3, [r7, #16] 80237d6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80237da: 2302 movs r3, #2 80237dc: 2239 movs r2, #57 @ 0x39 80237de: f000 f955 bl 8023a8c 80237e2: 4603 mov r3, r0 80237e4: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED); 80237e6: 89b8 ldrh r0, [r7, #12] 80237e8: 693b ldr r3, [r7, #16] 80237ea: 33f0 adds r3, #240 @ 0xf0 80237ec: f44f 7210 mov.w r2, #576 @ 0x240 80237f0: 4619 mov r1, r3 80237f2: f000 f9a5 bl 8023b40 80237f6: 4603 mov r3, r0 80237f8: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 80237fa: 89b8 ldrh r0, [r7, #12] 80237fc: 693b ldr r3, [r7, #16] 80237fe: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023802: 2304 movs r3, #4 8023804: 2232 movs r2, #50 @ 0x32 8023806: f000 f941 bl 8023a8c 802380a: 4603 mov r3, r0 802380c: 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))); 802380e: 89bc ldrh r4, [r7, #12] 8023810: 693b ldr r3, [r7, #16] 8023812: f103 05f0 add.w r5, r3, #240 @ 0xf0 8023816: 69bb ldr r3, [r7, #24] 8023818: 69db ldr r3, [r3, #28] 802381a: 4618 mov r0, r3 802381c: f7f6 f8e1 bl 80199e2 8023820: 4603 mov r3, r0 8023822: 461a mov r2, r3 8023824: 4629 mov r1, r5 8023826: 4620 mov r0, r4 8023828: f000 f9bc bl 8023ba4 802382c: 4603 mov r3, r0 802382e: 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)); 8023830: 89b8 ldrh r0, [r7, #12] 8023832: 693b ldr r3, [r7, #16] 8023834: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023838: 2303 movs r3, #3 802383a: 2237 movs r2, #55 @ 0x37 802383c: f000 f926 bl 8023a8c 8023840: 4603 mov r3, r0 8023842: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8023844: 2300 movs r3, #0 8023846: 77bb strb r3, [r7, #30] 8023848: e00e b.n 8023868 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 802384a: 89b8 ldrh r0, [r7, #12] 802384c: 693b ldr r3, [r7, #16] 802384e: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023852: 7fbb ldrb r3, [r7, #30] 8023854: 4a28 ldr r2, [pc, #160] @ (80238f8 ) 8023856: 5cd3 ldrb r3, [r2, r3] 8023858: 461a mov r2, r3 802385a: f000 f94b bl 8023af4 802385e: 4603 mov r3, r0 8023860: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8023862: 7fbb ldrb r3, [r7, #30] 8023864: 3301 adds r3, #1 8023866: 77bb strb r3, [r7, #30] 8023868: 7fbb ldrb r3, [r7, #30] 802386a: 2b02 cmp r3, #2 802386c: d9ed bls.n 802384a #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); 802386e: 89b8 ldrh r0, [r7, #12] 8023870: 693b ldr r3, [r7, #16] 8023872: 33f0 adds r3, #240 @ 0xf0 8023874: 697a ldr r2, [r7, #20] 8023876: 4619 mov r1, r3 8023878: f000 fe5c bl 8024534 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 802387c: 4b1f ldr r3, [pc, #124] @ (80238fc ) 802387e: 6818 ldr r0, [r3, #0] 8023880: 687b ldr r3, [r7, #4] 8023882: 9300 str r3, [sp, #0] 8023884: 2343 movs r3, #67 @ 0x43 8023886: 4a1e ldr r2, [pc, #120] @ (8023900 ) 8023888: 6979 ldr r1, [r7, #20] 802388a: f7fe fcbd bl 8022208 802388e: 4603 mov r3, r0 8023890: 77fb strb r3, [r7, #31] pbuf_free(p_out); 8023892: 6978 ldr r0, [r7, #20] 8023894: f7f7 fd72 bl 801b37c 8023898: e001 b.n 802389e 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; 802389a: 23ff movs r3, #255 @ 0xff 802389c: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 802389e: 69bb ldr r3, [r7, #24] 80238a0: 799b ldrb r3, [r3, #6] 80238a2: 2bff cmp r3, #255 @ 0xff 80238a4: d005 beq.n 80238b2 dhcp->tries++; 80238a6: 69bb ldr r3, [r7, #24] 80238a8: 799b ldrb r3, [r3, #6] 80238aa: 3301 adds r3, #1 80238ac: b2da uxtb r2, r3 80238ae: 69bb ldr r3, [r7, #24] 80238b0: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 80238b2: 69bb ldr r3, [r7, #24] 80238b4: 799b ldrb r3, [r3, #6] 80238b6: 2b09 cmp r3, #9 80238b8: d809 bhi.n 80238ce 80238ba: 69bb ldr r3, [r7, #24] 80238bc: 799b ldrb r3, [r3, #6] 80238be: 461a mov r2, r3 80238c0: 0152 lsls r2, r2, #5 80238c2: 1ad2 subs r2, r2, r3 80238c4: 0092 lsls r2, r2, #2 80238c6: 4413 add r3, r2 80238c8: 00db lsls r3, r3, #3 80238ca: b29b uxth r3, r3 80238cc: e001 b.n 80238d2 80238ce: f242 7310 movw r3, #10000 @ 0x2710 80238d2: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80238d4: 89fb ldrh r3, [r7, #14] 80238d6: f203 13f3 addw r3, r3, #499 @ 0x1f3 80238da: 4a0a ldr r2, [pc, #40] @ (8023904 ) 80238dc: fb82 1203 smull r1, r2, r2, r3 80238e0: 1152 asrs r2, r2, #5 80238e2: 17db asrs r3, r3, #31 80238e4: 1ad3 subs r3, r2, r3 80238e6: b29a uxth r2, r3 80238e8: 69bb ldr r3, [r7, #24] 80238ea: 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; 80238ec: f997 301f ldrsb.w r3, [r7, #31] } 80238f0: 4618 mov r0, r3 80238f2: 3720 adds r7, #32 80238f4: 46bd mov sp, r7 80238f6: bdb0 pop {r4, r5, r7, pc} 80238f8: 24000058 .word 0x24000058 80238fc: 2402aff4 .word 0x2402aff4 8023900: 08031c7c .word 0x08031c7c 8023904: 10624dd3 .word 0x10624dd3 08023908 : * * @param netif network interface */ void dhcp_release_and_stop(struct netif *netif) { 8023908: b5b0 push {r4, r5, r7, lr} 802390a: b08a sub sp, #40 @ 0x28 802390c: af02 add r7, sp, #8 802390e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023910: 687b ldr r3, [r7, #4] 8023912: 6a5b ldr r3, [r3, #36] @ 0x24 8023914: 61fb str r3, [r7, #28] ip_addr_t server_ip_addr; LWIP_ASSERT_CORE_LOCKED(); 8023916: f7ed fb81 bl 801101c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n")); if (dhcp == NULL) { 802391a: 69fb ldr r3, [r7, #28] 802391c: 2b00 cmp r3, #0 802391e: f000 8084 beq.w 8023a2a return; } /* already off? -> nothing to do */ if (dhcp->state == DHCP_STATE_OFF) { 8023922: 69fb ldr r3, [r7, #28] 8023924: 795b ldrb r3, [r3, #5] 8023926: 2b00 cmp r3, #0 8023928: f000 8081 beq.w 8023a2e return; } ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); 802392c: 69fb ldr r3, [r7, #28] 802392e: 699b ldr r3, [r3, #24] 8023930: 613b str r3, [r7, #16] /* clean old DHCP offer */ ip_addr_set_zero_ip4(&dhcp->server_ip_addr); 8023932: 69fb ldr r3, [r7, #28] 8023934: 2200 movs r2, #0 8023936: 619a str r2, [r3, #24] ip4_addr_set_zero(&dhcp->offered_ip_addr); 8023938: 69fb ldr r3, [r7, #28] 802393a: 2200 movs r2, #0 802393c: 61da str r2, [r3, #28] ip4_addr_set_zero(&dhcp->offered_sn_mask); 802393e: 69fb ldr r3, [r7, #28] 8023940: 2200 movs r2, #0 8023942: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8023944: 69fb ldr r3, [r7, #28] 8023946: 2200 movs r2, #0 8023948: 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; 802394a: 69fb ldr r3, [r7, #28] 802394c: 2200 movs r2, #0 802394e: 631a str r2, [r3, #48] @ 0x30 8023950: 69fb ldr r3, [r7, #28] 8023952: 6b1a ldr r2, [r3, #48] @ 0x30 8023954: 69fb ldr r3, [r7, #28] 8023956: 62da str r2, [r3, #44] @ 0x2c 8023958: 69fb ldr r3, [r7, #28] 802395a: 6ada ldr r2, [r3, #44] @ 0x2c 802395c: 69fb ldr r3, [r7, #28] 802395e: 629a str r2, [r3, #40] @ 0x28 dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; 8023960: 69fb ldr r3, [r7, #28] 8023962: 2200 movs r2, #0 8023964: 829a strh r2, [r3, #20] 8023966: 69fb ldr r3, [r7, #28] 8023968: 8a9a ldrh r2, [r3, #20] 802396a: 69fb ldr r3, [r7, #28] 802396c: 825a strh r2, [r3, #18] 802396e: 69fb ldr r3, [r7, #28] 8023970: 8a5a ldrh r2, [r3, #18] 8023972: 69fb ldr r3, [r7, #28] 8023974: 821a strh r2, [r3, #16] 8023976: 69fb ldr r3, [r7, #28] 8023978: 8a1a ldrh r2, [r3, #16] 802397a: 69fb ldr r3, [r7, #28] 802397c: 81da strh r2, [r3, #14] /* send release message when current IP was assigned via DHCP */ if (dhcp_supplied_address(netif)) { 802397e: 6878 ldr r0, [r7, #4] 8023980: f000 fe06 bl 8024590 8023984: 4603 mov r3, r0 8023986: 2b00 cmp r3, #0 8023988: d03b beq.n 8023a02 /* 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); 802398a: f107 030e add.w r3, r7, #14 802398e: 2207 movs r2, #7 8023990: 69f9 ldr r1, [r7, #28] 8023992: 6878 ldr r0, [r7, #4] 8023994: f000 fcf8 bl 8024388 8023998: 61b8 str r0, [r7, #24] if (p_out != NULL) { 802399a: 69bb ldr r3, [r7, #24] 802399c: 2b00 cmp r3, #0 802399e: d030 beq.n 8023a02 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80239a0: 69bb ldr r3, [r7, #24] 80239a2: 685b ldr r3, [r3, #4] 80239a4: 617b str r3, [r7, #20] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 80239a6: 89f8 ldrh r0, [r7, #14] 80239a8: 697b ldr r3, [r7, #20] 80239aa: f103 01f0 add.w r1, r3, #240 @ 0xf0 80239ae: 2304 movs r3, #4 80239b0: 2236 movs r2, #54 @ 0x36 80239b2: f000 f86b bl 8023a8c 80239b6: 4603 mov r3, r0 80239b8: 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)))); 80239ba: 89fc ldrh r4, [r7, #14] 80239bc: 697b ldr r3, [r7, #20] 80239be: f103 05f0 add.w r5, r3, #240 @ 0xf0 80239c2: 693b ldr r3, [r7, #16] 80239c4: 4618 mov r0, r3 80239c6: f7f6 f80c bl 80199e2 80239ca: 4603 mov r3, r0 80239cc: 461a mov r2, r3 80239ce: 4629 mov r1, r5 80239d0: 4620 mov r0, r4 80239d2: f000 f8e7 bl 8023ba4 80239d6: 4603 mov r3, r0 80239d8: 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); 80239da: 89f8 ldrh r0, [r7, #14] 80239dc: 697b ldr r3, [r7, #20] 80239de: 33f0 adds r3, #240 @ 0xf0 80239e0: 69ba ldr r2, [r7, #24] 80239e2: 4619 mov r1, r3 80239e4: f000 fda6 bl 8024534 udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 80239e8: 4b13 ldr r3, [pc, #76] @ (8023a38 ) 80239ea: 6818 ldr r0, [r3, #0] 80239ec: f107 0210 add.w r2, r7, #16 80239f0: 687b ldr r3, [r7, #4] 80239f2: 9300 str r3, [sp, #0] 80239f4: 2343 movs r3, #67 @ 0x43 80239f6: 69b9 ldr r1, [r7, #24] 80239f8: f7fe fc06 bl 8022208 pbuf_free(p_out); 80239fc: 69b8 ldr r0, [r7, #24] 80239fe: f7f7 fcbd bl 801b37c 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); 8023a02: 4b0e ldr r3, [pc, #56] @ (8023a3c ) 8023a04: 4a0d ldr r2, [pc, #52] @ (8023a3c ) 8023a06: 490d ldr r1, [pc, #52] @ (8023a3c ) 8023a08: 6878 ldr r0, [r7, #4] 8023a0a: f7f6 ff6d bl 801a8e8 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ dhcp_set_state(dhcp, DHCP_STATE_OFF); 8023a0e: 2100 movs r1, #0 8023a10: 69f8 ldr r0, [r7, #28] 8023a12: f000 f820 bl 8023a56 if (dhcp->pcb_allocated != 0) { 8023a16: 69fb ldr r3, [r7, #28] 8023a18: 791b ldrb r3, [r3, #4] 8023a1a: 2b00 cmp r3, #0 8023a1c: d008 beq.n 8023a30 dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8023a1e: f7fe ff83 bl 8022928 dhcp->pcb_allocated = 0; 8023a22: 69fb ldr r3, [r7, #28] 8023a24: 2200 movs r2, #0 8023a26: 711a strb r2, [r3, #4] 8023a28: e002 b.n 8023a30 return; 8023a2a: bf00 nop 8023a2c: e000 b.n 8023a30 return; 8023a2e: bf00 nop } } 8023a30: 3720 adds r7, #32 8023a32: 46bd mov sp, r7 8023a34: bdb0 pop {r4, r5, r7, pc} 8023a36: bf00 nop 8023a38: 2402aff4 .word 0x2402aff4 8023a3c: 08031c78 .word 0x08031c78 08023a40 : * This function calls dhcp_release_and_stop() internally. * @deprecated Use dhcp_release_and_stop() instead. */ void dhcp_stop(struct netif *netif) { 8023a40: b580 push {r7, lr} 8023a42: b082 sub sp, #8 8023a44: af00 add r7, sp, #0 8023a46: 6078 str r0, [r7, #4] dhcp_release_and_stop(netif); 8023a48: 6878 ldr r0, [r7, #4] 8023a4a: f7ff ff5d bl 8023908 } 8023a4e: bf00 nop 8023a50: 3708 adds r7, #8 8023a52: 46bd mov sp, r7 8023a54: bd80 pop {r7, pc} 08023a56 : * * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { 8023a56: b480 push {r7} 8023a58: b083 sub sp, #12 8023a5a: af00 add r7, sp, #0 8023a5c: 6078 str r0, [r7, #4] 8023a5e: 460b mov r3, r1 8023a60: 70fb strb r3, [r7, #3] if (new_state != dhcp->state) { 8023a62: 687b ldr r3, [r7, #4] 8023a64: 795b ldrb r3, [r3, #5] 8023a66: 78fa ldrb r2, [r7, #3] 8023a68: 429a cmp r2, r3 8023a6a: d008 beq.n 8023a7e dhcp->state = new_state; 8023a6c: 687b ldr r3, [r7, #4] 8023a6e: 78fa ldrb r2, [r7, #3] 8023a70: 715a strb r2, [r3, #5] dhcp->tries = 0; 8023a72: 687b ldr r3, [r7, #4] 8023a74: 2200 movs r2, #0 8023a76: 719a strb r2, [r3, #6] dhcp->request_timeout = 0; 8023a78: 687b ldr r3, [r7, #4] 8023a7a: 2200 movs r2, #0 8023a7c: 811a strh r2, [r3, #8] } } 8023a7e: bf00 nop 8023a80: 370c adds r7, #12 8023a82: 46bd mov sp, r7 8023a84: f85d 7b04 ldr.w r7, [sp], #4 8023a88: 4770 bx lr ... 08023a8c : * DHCP message. * */ static u16_t dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len) { 8023a8c: b580 push {r7, lr} 8023a8e: b082 sub sp, #8 8023a90: af00 add r7, sp, #0 8023a92: 6039 str r1, [r7, #0] 8023a94: 4611 mov r1, r2 8023a96: 461a mov r2, r3 8023a98: 4603 mov r3, r0 8023a9a: 80fb strh r3, [r7, #6] 8023a9c: 460b mov r3, r1 8023a9e: 717b strb r3, [r7, #5] 8023aa0: 4613 mov r3, r2 8023aa2: 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); 8023aa4: 88fa ldrh r2, [r7, #6] 8023aa6: 793b ldrb r3, [r7, #4] 8023aa8: 4413 add r3, r2 8023aaa: 3302 adds r3, #2 8023aac: 2b44 cmp r3, #68 @ 0x44 8023aae: d906 bls.n 8023abe 8023ab0: 4b0d ldr r3, [pc, #52] @ (8023ae8 ) 8023ab2: f240 529a movw r2, #1434 @ 0x59a 8023ab6: 490d ldr r1, [pc, #52] @ (8023aec ) 8023ab8: 480d ldr r0, [pc, #52] @ (8023af0 ) 8023aba: f006 fed7 bl 802a86c options[options_out_len++] = option_type; 8023abe: 88fb ldrh r3, [r7, #6] 8023ac0: 1c5a adds r2, r3, #1 8023ac2: 80fa strh r2, [r7, #6] 8023ac4: 461a mov r2, r3 8023ac6: 683b ldr r3, [r7, #0] 8023ac8: 4413 add r3, r2 8023aca: 797a ldrb r2, [r7, #5] 8023acc: 701a strb r2, [r3, #0] options[options_out_len++] = option_len; 8023ace: 88fb ldrh r3, [r7, #6] 8023ad0: 1c5a adds r2, r3, #1 8023ad2: 80fa strh r2, [r7, #6] 8023ad4: 461a mov r2, r3 8023ad6: 683b ldr r3, [r7, #0] 8023ad8: 4413 add r3, r2 8023ada: 793a ldrb r2, [r7, #4] 8023adc: 701a strb r2, [r3, #0] return options_out_len; 8023ade: 88fb ldrh r3, [r7, #6] } 8023ae0: 4618 mov r0, r3 8023ae2: 3708 adds r7, #8 8023ae4: 46bd mov sp, r7 8023ae6: bd80 pop {r7, pc} 8023ae8: 08030e54 .word 0x08030e54 8023aec: 08030fe8 .word 0x08030fe8 8023af0: 08030eb4 .word 0x08030eb4 08023af4 : * 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) { 8023af4: b580 push {r7, lr} 8023af6: b082 sub sp, #8 8023af8: af00 add r7, sp, #0 8023afa: 4603 mov r3, r0 8023afc: 6039 str r1, [r7, #0] 8023afe: 80fb strh r3, [r7, #6] 8023b00: 4613 mov r3, r2 8023b02: 717b strb r3, [r7, #5] LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); 8023b04: 88fb ldrh r3, [r7, #6] 8023b06: 2b43 cmp r3, #67 @ 0x43 8023b08: d906 bls.n 8023b18 8023b0a: 4b0a ldr r3, [pc, #40] @ (8023b34 ) 8023b0c: f240 52a6 movw r2, #1446 @ 0x5a6 8023b10: 4909 ldr r1, [pc, #36] @ (8023b38 ) 8023b12: 480a ldr r0, [pc, #40] @ (8023b3c ) 8023b14: f006 feaa bl 802a86c options[options_out_len++] = value; 8023b18: 88fb ldrh r3, [r7, #6] 8023b1a: 1c5a adds r2, r3, #1 8023b1c: 80fa strh r2, [r7, #6] 8023b1e: 461a mov r2, r3 8023b20: 683b ldr r3, [r7, #0] 8023b22: 4413 add r3, r2 8023b24: 797a ldrb r2, [r7, #5] 8023b26: 701a strb r2, [r3, #0] return options_out_len; 8023b28: 88fb ldrh r3, [r7, #6] } 8023b2a: 4618 mov r0, r3 8023b2c: 3708 adds r7, #8 8023b2e: 46bd mov sp, r7 8023b30: bd80 pop {r7, pc} 8023b32: bf00 nop 8023b34: 08030e54 .word 0x08030e54 8023b38: 0803102c .word 0x0803102c 8023b3c: 08030eb4 .word 0x08030eb4 08023b40 : static u16_t dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value) { 8023b40: b580 push {r7, lr} 8023b42: b082 sub sp, #8 8023b44: af00 add r7, sp, #0 8023b46: 4603 mov r3, r0 8023b48: 6039 str r1, [r7, #0] 8023b4a: 80fb strh r3, [r7, #6] 8023b4c: 4613 mov r3, r2 8023b4e: 80bb strh r3, [r7, #4] LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); 8023b50: 88fb ldrh r3, [r7, #6] 8023b52: 3302 adds r3, #2 8023b54: 2b44 cmp r3, #68 @ 0x44 8023b56: d906 bls.n 8023b66 8023b58: 4b0f ldr r3, [pc, #60] @ (8023b98 ) 8023b5a: f240 52ae movw r2, #1454 @ 0x5ae 8023b5e: 490f ldr r1, [pc, #60] @ (8023b9c ) 8023b60: 480f ldr r0, [pc, #60] @ (8023ba0 ) 8023b62: f006 fe83 bl 802a86c options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 8023b66: 88bb ldrh r3, [r7, #4] 8023b68: 0a1b lsrs r3, r3, #8 8023b6a: b29a uxth r2, r3 8023b6c: 88fb ldrh r3, [r7, #6] 8023b6e: 1c59 adds r1, r3, #1 8023b70: 80f9 strh r1, [r7, #6] 8023b72: 4619 mov r1, r3 8023b74: 683b ldr r3, [r7, #0] 8023b76: 440b add r3, r1 8023b78: b2d2 uxtb r2, r2 8023b7a: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t) (value & 0x00ffU); 8023b7c: 88fb ldrh r3, [r7, #6] 8023b7e: 1c5a adds r2, r3, #1 8023b80: 80fa strh r2, [r7, #6] 8023b82: 461a mov r2, r3 8023b84: 683b ldr r3, [r7, #0] 8023b86: 4413 add r3, r2 8023b88: 88ba ldrh r2, [r7, #4] 8023b8a: b2d2 uxtb r2, r2 8023b8c: 701a strb r2, [r3, #0] return options_out_len; 8023b8e: 88fb ldrh r3, [r7, #6] } 8023b90: 4618 mov r0, r3 8023b92: 3708 adds r7, #8 8023b94: 46bd mov sp, r7 8023b96: bd80 pop {r7, pc} 8023b98: 08030e54 .word 0x08030e54 8023b9c: 08031064 .word 0x08031064 8023ba0: 08030eb4 .word 0x08030eb4 08023ba4 : static u16_t dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value) { 8023ba4: b580 push {r7, lr} 8023ba6: b084 sub sp, #16 8023ba8: af00 add r7, sp, #0 8023baa: 4603 mov r3, r0 8023bac: 60b9 str r1, [r7, #8] 8023bae: 607a str r2, [r7, #4] 8023bb0: 81fb strh r3, [r7, #14] LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); 8023bb2: 89fb ldrh r3, [r7, #14] 8023bb4: 3304 adds r3, #4 8023bb6: 2b44 cmp r3, #68 @ 0x44 8023bb8: d906 bls.n 8023bc8 8023bba: 4b19 ldr r3, [pc, #100] @ (8023c20 ) 8023bbc: f240 52b7 movw r2, #1463 @ 0x5b7 8023bc0: 4918 ldr r1, [pc, #96] @ (8023c24 ) 8023bc2: 4819 ldr r0, [pc, #100] @ (8023c28 ) 8023bc4: f006 fe52 bl 802a86c options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 8023bc8: 687b ldr r3, [r7, #4] 8023bca: 0e1a lsrs r2, r3, #24 8023bcc: 89fb ldrh r3, [r7, #14] 8023bce: 1c59 adds r1, r3, #1 8023bd0: 81f9 strh r1, [r7, #14] 8023bd2: 4619 mov r1, r3 8023bd4: 68bb ldr r3, [r7, #8] 8023bd6: 440b add r3, r1 8023bd8: b2d2 uxtb r2, r2 8023bda: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 8023bdc: 687b ldr r3, [r7, #4] 8023bde: 0c1a lsrs r2, r3, #16 8023be0: 89fb ldrh r3, [r7, #14] 8023be2: 1c59 adds r1, r3, #1 8023be4: 81f9 strh r1, [r7, #14] 8023be6: 4619 mov r1, r3 8023be8: 68bb ldr r3, [r7, #8] 8023bea: 440b add r3, r1 8023bec: b2d2 uxtb r2, r2 8023bee: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 8023bf0: 687b ldr r3, [r7, #4] 8023bf2: 0a1a lsrs r2, r3, #8 8023bf4: 89fb ldrh r3, [r7, #14] 8023bf6: 1c59 adds r1, r3, #1 8023bf8: 81f9 strh r1, [r7, #14] 8023bfa: 4619 mov r1, r3 8023bfc: 68bb ldr r3, [r7, #8] 8023bfe: 440b add r3, r1 8023c00: b2d2 uxtb r2, r2 8023c02: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8023c04: 89fb ldrh r3, [r7, #14] 8023c06: 1c5a adds r2, r3, #1 8023c08: 81fa strh r2, [r7, #14] 8023c0a: 461a mov r2, r3 8023c0c: 68bb ldr r3, [r7, #8] 8023c0e: 4413 add r3, r2 8023c10: 687a ldr r2, [r7, #4] 8023c12: b2d2 uxtb r2, r2 8023c14: 701a strb r2, [r3, #0] return options_out_len; 8023c16: 89fb ldrh r3, [r7, #14] } 8023c18: 4618 mov r0, r3 8023c1a: 3710 adds r7, #16 8023c1c: 46bd mov sp, r7 8023c1e: bd80 pop {r7, pc} 8023c20: 08030e54 .word 0x08030e54 8023c24: 080310a0 .word 0x080310a0 8023c28: 08030eb4 .word 0x08030eb4 08023c2c : * use that further on. * */ static err_t dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp) { 8023c2c: b580 push {r7, lr} 8023c2e: b092 sub sp, #72 @ 0x48 8023c30: af00 add r7, sp, #0 8023c32: 6078 str r0, [r7, #4] 8023c34: 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; 8023c36: 2300 movs r3, #0 8023c38: 633b str r3, [r7, #48] @ 0x30 int parse_sname_as_options = 0; 8023c3a: 2300 movs r3, #0 8023c3c: 62fb str r3, [r7, #44] @ 0x2c #endif LWIP_UNUSED_ARG(dhcp); /* clear received options */ dhcp_clear_all_options(dhcp); 8023c3e: 2208 movs r2, #8 8023c40: 2100 movs r1, #0 8023c42: 48b8 ldr r0, [pc, #736] @ (8023f24 ) 8023c44: f006 ffa4 bl 802ab90 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 8023c48: 687b ldr r3, [r7, #4] 8023c4a: 895b ldrh r3, [r3, #10] 8023c4c: 2b2b cmp r3, #43 @ 0x2b 8023c4e: d802 bhi.n 8023c56 return ERR_BUF; 8023c50: f06f 0301 mvn.w r3, #1 8023c54: e2b8 b.n 80241c8 } msg_in = (struct dhcp_msg *)p->payload; 8023c56: 687b ldr r3, [r7, #4] 8023c58: 685b ldr r3, [r3, #4] 8023c5a: 61fb str r3, [r7, #28] #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 8023c5c: 23f0 movs r3, #240 @ 0xf0 8023c5e: 87bb strh r3, [r7, #60] @ 0x3c /* parse options to the end of the received packet */ options_idx_max = p->tot_len; 8023c60: 687b ldr r3, [r7, #4] 8023c62: 891b ldrh r3, [r3, #8] 8023c64: 877b strh r3, [r7, #58] @ 0x3a again: q = p; 8023c66: 687b ldr r3, [r7, #4] 8023c68: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8023c6a: e00c b.n 8023c86 options_idx = (u16_t)(options_idx - q->len); 8023c6c: 6b7b ldr r3, [r7, #52] @ 0x34 8023c6e: 895b ldrh r3, [r3, #10] 8023c70: 8fba ldrh r2, [r7, #60] @ 0x3c 8023c72: 1ad3 subs r3, r2, r3 8023c74: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = (u16_t)(options_idx_max - q->len); 8023c76: 6b7b ldr r3, [r7, #52] @ 0x34 8023c78: 895b ldrh r3, [r3, #10] 8023c7a: 8f7a ldrh r2, [r7, #58] @ 0x3a 8023c7c: 1ad3 subs r3, r2, r3 8023c7e: 877b strh r3, [r7, #58] @ 0x3a q = q->next; 8023c80: 6b7b ldr r3, [r7, #52] @ 0x34 8023c82: 681b ldr r3, [r3, #0] 8023c84: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8023c86: 6b7b ldr r3, [r7, #52] @ 0x34 8023c88: 2b00 cmp r3, #0 8023c8a: d004 beq.n 8023c96 8023c8c: 6b7b ldr r3, [r7, #52] @ 0x34 8023c8e: 895b ldrh r3, [r3, #10] 8023c90: 8fba ldrh r2, [r7, #60] @ 0x3c 8023c92: 429a cmp r2, r3 8023c94: d2ea bcs.n 8023c6c } if (q == NULL) { 8023c96: 6b7b ldr r3, [r7, #52] @ 0x34 8023c98: 2b00 cmp r3, #0 8023c9a: d102 bne.n 8023ca2 return ERR_BUF; 8023c9c: f06f 0301 mvn.w r3, #1 8023ca0: e292 b.n 80241c8 } offset = options_idx; 8023ca2: 8fbb ldrh r3, [r7, #60] @ 0x3c 8023ca4: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = options_idx_max; 8023ca8: 8f7b ldrh r3, [r7, #58] @ 0x3a 8023caa: 87fb strh r3, [r7, #62] @ 0x3e options = (u8_t *)q->payload; 8023cac: 6b7b ldr r3, [r7, #52] @ 0x34 8023cae: 685b ldr r3, [r3, #4] 8023cb0: 643b str r3, [r7, #64] @ 0x40 /* 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)) { 8023cb2: e247 b.n 8024144 u8_t op = options[offset]; 8023cb4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023cb8: 6c3a ldr r2, [r7, #64] @ 0x40 8023cba: 4413 add r3, r2 8023cbc: 781b ldrb r3, [r3, #0] 8023cbe: 76fb strb r3, [r7, #27] u8_t len; u8_t decode_len = 0; 8023cc0: 2300 movs r3, #0 8023cc2: f887 302a strb.w r3, [r7, #42] @ 0x2a int decode_idx = -1; 8023cc6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023cca: 627b str r3, [r7, #36] @ 0x24 u16_t val_offset = (u16_t)(offset + 2); 8023ccc: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023cd0: 3302 adds r3, #2 8023cd2: 847b strh r3, [r7, #34] @ 0x22 if (val_offset < offset) { 8023cd4: 8c7a ldrh r2, [r7, #34] @ 0x22 8023cd6: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023cda: 429a cmp r2, r3 8023cdc: d202 bcs.n 8023ce4 /* overflow */ return ERR_BUF; 8023cde: f06f 0301 mvn.w r3, #1 8023ce2: e271 b.n 80241c8 } /* len byte might be in the next pbuf */ if ((offset + 1) < q->len) { 8023ce4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023ce8: 3301 adds r3, #1 8023cea: 6b7a ldr r2, [r7, #52] @ 0x34 8023cec: 8952 ldrh r2, [r2, #10] 8023cee: 4293 cmp r3, r2 8023cf0: da08 bge.n 8023d04 len = options[offset + 1]; 8023cf2: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023cf6: 3301 adds r3, #1 8023cf8: 6c3a ldr r2, [r7, #64] @ 0x40 8023cfa: 4413 add r3, r2 8023cfc: 781b ldrb r3, [r3, #0] 8023cfe: f887 302b strb.w r3, [r7, #43] @ 0x2b 8023d02: e00b b.n 8023d1c } else { len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0); 8023d04: 6b7b ldr r3, [r7, #52] @ 0x34 8023d06: 681b ldr r3, [r3, #0] 8023d08: 2b00 cmp r3, #0 8023d0a: d004 beq.n 8023d16 8023d0c: 6b7b ldr r3, [r7, #52] @ 0x34 8023d0e: 681b ldr r3, [r3, #0] 8023d10: 685b ldr r3, [r3, #4] 8023d12: 781b ldrb r3, [r3, #0] 8023d14: e000 b.n 8023d18 8023d16: 2300 movs r3, #0 8023d18: f887 302b strb.w r3, [r7, #43] @ 0x2b } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; 8023d1c: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023d20: f887 302a strb.w r3, [r7, #42] @ 0x2a switch (op) { 8023d24: 7efb ldrb r3, [r7, #27] 8023d26: 2b3b cmp r3, #59 @ 0x3b 8023d28: f200 812c bhi.w 8023f84 8023d2c: a201 add r2, pc, #4 @ (adr r2, 8023d34 ) 8023d2e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8023d32: bf00 nop 8023d34: 08023e25 .word 0x08023e25 8023d38: 08023e35 .word 0x08023e35 8023d3c: 08023f85 .word 0x08023f85 8023d40: 08023e57 .word 0x08023e57 8023d44: 08023f85 .word 0x08023f85 8023d48: 08023f85 .word 0x08023f85 8023d4c: 08023f85 .word 0x08023f85 8023d50: 08023f85 .word 0x08023f85 8023d54: 08023f85 .word 0x08023f85 8023d58: 08023f85 .word 0x08023f85 8023d5c: 08023f85 .word 0x08023f85 8023d60: 08023f85 .word 0x08023f85 8023d64: 08023f85 .word 0x08023f85 8023d68: 08023f85 .word 0x08023f85 8023d6c: 08023f85 .word 0x08023f85 8023d70: 08023f85 .word 0x08023f85 8023d74: 08023f85 .word 0x08023f85 8023d78: 08023f85 .word 0x08023f85 8023d7c: 08023f85 .word 0x08023f85 8023d80: 08023f85 .word 0x08023f85 8023d84: 08023f85 .word 0x08023f85 8023d88: 08023f85 .word 0x08023f85 8023d8c: 08023f85 .word 0x08023f85 8023d90: 08023f85 .word 0x08023f85 8023d94: 08023f85 .word 0x08023f85 8023d98: 08023f85 .word 0x08023f85 8023d9c: 08023f85 .word 0x08023f85 8023da0: 08023f85 .word 0x08023f85 8023da4: 08023f85 .word 0x08023f85 8023da8: 08023f85 .word 0x08023f85 8023dac: 08023f85 .word 0x08023f85 8023db0: 08023f85 .word 0x08023f85 8023db4: 08023f85 .word 0x08023f85 8023db8: 08023f85 .word 0x08023f85 8023dbc: 08023f85 .word 0x08023f85 8023dc0: 08023f85 .word 0x08023f85 8023dc4: 08023f85 .word 0x08023f85 8023dc8: 08023f85 .word 0x08023f85 8023dcc: 08023f85 .word 0x08023f85 8023dd0: 08023f85 .word 0x08023f85 8023dd4: 08023f85 .word 0x08023f85 8023dd8: 08023f85 .word 0x08023f85 8023ddc: 08023f85 .word 0x08023f85 8023de0: 08023f85 .word 0x08023f85 8023de4: 08023f85 .word 0x08023f85 8023de8: 08023f85 .word 0x08023f85 8023dec: 08023f85 .word 0x08023f85 8023df0: 08023f85 .word 0x08023f85 8023df4: 08023f85 .word 0x08023f85 8023df8: 08023f85 .word 0x08023f85 8023dfc: 08023f85 .word 0x08023f85 8023e00: 08023e83 .word 0x08023e83 8023e04: 08023ea5 .word 0x08023ea5 8023e08: 08023ee1 .word 0x08023ee1 8023e0c: 08023f03 .word 0x08023f03 8023e10: 08023f85 .word 0x08023f85 8023e14: 08023f85 .word 0x08023f85 8023e18: 08023f85 .word 0x08023f85 8023e1c: 08023f41 .word 0x08023f41 8023e20: 08023f63 .word 0x08023f63 /* case(DHCP_OPTION_END): handled above */ case (DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 8023e24: 2300 movs r3, #0 8023e26: f887 302b strb.w r3, [r7, #43] @ 0x2b 8023e2a: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023e2e: f887 302a strb.w r3, [r7, #42] @ 0x2a /* will be increased below */ break; 8023e32: e0ab b.n 8023f8c case (DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023e34: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023e38: 2b04 cmp r3, #4 8023e3a: d009 beq.n 8023e50 8023e3c: 4b3a ldr r3, [pc, #232] @ (8023f28 ) 8023e3e: f240 622e movw r2, #1582 @ 0x62e 8023e42: 493a ldr r1, [pc, #232] @ (8023f2c ) 8023e44: 483a ldr r0, [pc, #232] @ (8023f30 ) 8023e46: f006 fd11 bl 802a86c 8023e4a: f06f 0305 mvn.w r3, #5 8023e4e: e1bb b.n 80241c8 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 8023e50: 2306 movs r3, #6 8023e52: 627b str r3, [r7, #36] @ 0x24 break; 8023e54: e09a b.n 8023f8c case (DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ 8023e56: 2304 movs r3, #4 8023e58: f887 302a strb.w r3, [r7, #42] @ 0x2a LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 8023e5c: f897 202b ldrb.w r2, [r7, #43] @ 0x2b 8023e60: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023e64: 429a cmp r2, r3 8023e66: d209 bcs.n 8023e7c 8023e68: 4b2f ldr r3, [pc, #188] @ (8023f28 ) 8023e6a: f240 6233 movw r2, #1587 @ 0x633 8023e6e: 4931 ldr r1, [pc, #196] @ (8023f34 ) 8023e70: 482f ldr r0, [pc, #188] @ (8023f30 ) 8023e72: f006 fcfb bl 802a86c 8023e76: f06f 0305 mvn.w r3, #5 8023e7a: e1a5 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_ROUTER; 8023e7c: 2307 movs r3, #7 8023e7e: 627b str r3, [r7, #36] @ 0x24 break; 8023e80: e084 b.n 8023f8c 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;); 8023e82: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023e86: 2b04 cmp r3, #4 8023e88: d009 beq.n 8023e9e 8023e8a: 4b27 ldr r3, [pc, #156] @ (8023f28 ) 8023e8c: f240 6241 movw r2, #1601 @ 0x641 8023e90: 4926 ldr r1, [pc, #152] @ (8023f2c ) 8023e92: 4827 ldr r0, [pc, #156] @ (8023f30 ) 8023e94: f006 fcea bl 802a86c 8023e98: f06f 0305 mvn.w r3, #5 8023e9c: e194 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 8023e9e: 2303 movs r3, #3 8023ea0: 627b str r3, [r7, #36] @ 0x24 break; 8023ea2: e073 b.n 8023f8c 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;); 8023ea4: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023ea8: 2b01 cmp r3, #1 8023eaa: d009 beq.n 8023ec0 8023eac: 4b1e ldr r3, [pc, #120] @ (8023f28 ) 8023eae: f240 624f movw r2, #1615 @ 0x64f 8023eb2: 4921 ldr r1, [pc, #132] @ (8023f38 ) 8023eb4: 481e ldr r0, [pc, #120] @ (8023f30 ) 8023eb6: f006 fcd9 bl 802a86c 8023eba: f06f 0305 mvn.w r3, #5 8023ebe: e183 b.n 80241c8 /* 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;); 8023ec0: 8fbb ldrh r3, [r7, #60] @ 0x3c 8023ec2: 2bf0 cmp r3, #240 @ 0xf0 8023ec4: d009 beq.n 8023eda 8023ec6: 4b18 ldr r3, [pc, #96] @ (8023f28 ) 8023ec8: f240 6251 movw r2, #1617 @ 0x651 8023ecc: 491b ldr r1, [pc, #108] @ (8023f3c ) 8023ece: 4818 ldr r0, [pc, #96] @ (8023f30 ) 8023ed0: f006 fccc bl 802a86c 8023ed4: f06f 0305 mvn.w r3, #5 8023ed8: e176 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 8023eda: 2300 movs r3, #0 8023edc: 627b str r3, [r7, #36] @ 0x24 break; 8023ede: e055 b.n 8023f8c case (DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8023ee0: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023ee4: 2b01 cmp r3, #1 8023ee6: d009 beq.n 8023efc 8023ee8: 4b0f ldr r3, [pc, #60] @ (8023f28 ) 8023eea: f240 6255 movw r2, #1621 @ 0x655 8023eee: 4912 ldr r1, [pc, #72] @ (8023f38 ) 8023ef0: 480f ldr r0, [pc, #60] @ (8023f30 ) 8023ef2: f006 fcbb bl 802a86c 8023ef6: f06f 0305 mvn.w r3, #5 8023efa: e165 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; 8023efc: 2301 movs r3, #1 8023efe: 627b str r3, [r7, #36] @ 0x24 break; 8023f00: e044 b.n 8023f8c case (DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f02: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f06: 2b04 cmp r3, #4 8023f08: d009 beq.n 8023f1e 8023f0a: 4b07 ldr r3, [pc, #28] @ (8023f28 ) 8023f0c: f240 6259 movw r2, #1625 @ 0x659 8023f10: 4906 ldr r1, [pc, #24] @ (8023f2c ) 8023f12: 4807 ldr r0, [pc, #28] @ (8023f30 ) 8023f14: f006 fcaa bl 802a86c 8023f18: f06f 0305 mvn.w r3, #5 8023f1c: e154 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 8023f1e: 2302 movs r3, #2 8023f20: 627b str r3, [r7, #36] @ 0x24 break; 8023f22: e033 b.n 8023f8c 8023f24: 2402afec .word 0x2402afec 8023f28: 08030e54 .word 0x08030e54 8023f2c: 080310dc .word 0x080310dc 8023f30: 08030eb4 .word 0x08030eb4 8023f34: 080310e8 .word 0x080310e8 8023f38: 080310fc .word 0x080310fc 8023f3c: 08031108 .word 0x08031108 case (DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f40: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f44: 2b04 cmp r3, #4 8023f46: d009 beq.n 8023f5c 8023f48: 4ba1 ldr r3, [pc, #644] @ (80241d0 ) 8023f4a: f240 625d movw r2, #1629 @ 0x65d 8023f4e: 49a1 ldr r1, [pc, #644] @ (80241d4 ) 8023f50: 48a1 ldr r0, [pc, #644] @ (80241d8 ) 8023f52: f006 fc8b bl 802a86c 8023f56: f06f 0305 mvn.w r3, #5 8023f5a: e135 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_T1; 8023f5c: 2304 movs r3, #4 8023f5e: 627b str r3, [r7, #36] @ 0x24 break; 8023f60: e014 b.n 8023f8c case (DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f62: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f66: 2b04 cmp r3, #4 8023f68: d009 beq.n 8023f7e 8023f6a: 4b99 ldr r3, [pc, #612] @ (80241d0 ) 8023f6c: f240 6261 movw r2, #1633 @ 0x661 8023f70: 4998 ldr r1, [pc, #608] @ (80241d4 ) 8023f72: 4899 ldr r0, [pc, #612] @ (80241d8 ) 8023f74: f006 fc7a bl 802a86c 8023f78: f06f 0305 mvn.w r3, #5 8023f7c: e124 b.n 80241c8 decode_idx = DHCP_OPTION_IDX_T2; 8023f7e: 2305 movs r3, #5 8023f80: 627b str r3, [r7, #36] @ 0x24 break; 8023f82: e003 b.n 8023f8c default: decode_len = 0; 8023f84: 2300 movs r3, #0 8023f86: f887 302a strb.w r3, [r7, #42] @ 0x2a 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; 8023f8a: bf00 nop } if (op == DHCP_OPTION_PAD) { 8023f8c: 7efb ldrb r3, [r7, #27] 8023f8e: 2b00 cmp r3, #0 8023f90: d105 bne.n 8023f9e offset++; 8023f92: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023f96: 3301 adds r3, #1 8023f98: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 8023f9c: e0a4 b.n 80240e8 } else { if (offset + len + 2 > 0xFFFF) { 8023f9e: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8023fa2: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023fa6: 4413 add r3, r2 8023fa8: f64f 72fd movw r2, #65533 @ 0xfffd 8023fac: 4293 cmp r3, r2 8023fae: dd02 ble.n 8023fb6 /* overflow */ return ERR_BUF; 8023fb0: f06f 0301 mvn.w r3, #1 8023fb4: e108 b.n 80241c8 } offset = (u16_t)(offset + len + 2); 8023fb6: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023fba: b29a uxth r2, r3 8023fbc: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023fc0: 4413 add r3, r2 8023fc2: b29b uxth r3, r3 8023fc4: 3302 adds r3, #2 8023fc6: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 if (decode_len > 0) { 8023fca: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023fce: 2b00 cmp r3, #0 8023fd0: f000 808a beq.w 80240e8 u32_t value = 0; 8023fd4: 2300 movs r3, #0 8023fd6: 60fb str r3, [r7, #12] u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); 8023fd8: 6a7b ldr r3, [r7, #36] @ 0x24 8023fda: 2b00 cmp r3, #0 8023fdc: db02 blt.n 8023fe4 8023fde: 6a7b ldr r3, [r7, #36] @ 0x24 8023fe0: 2b07 cmp r3, #7 8023fe2: dd06 ble.n 8023ff2 8023fe4: 4b7a ldr r3, [pc, #488] @ (80241d0 ) 8023fe6: f44f 62cf mov.w r2, #1656 @ 0x678 8023fea: 497c ldr r1, [pc, #496] @ (80241dc ) 8023fec: 487a ldr r0, [pc, #488] @ (80241d8 ) 8023fee: f006 fc3d bl 802a86c if (!dhcp_option_given(dhcp, decode_idx)) { 8023ff2: 4a7b ldr r2, [pc, #492] @ (80241e0 ) 8023ff4: 6a7b ldr r3, [r7, #36] @ 0x24 8023ff6: 4413 add r3, r2 8023ff8: 781b ldrb r3, [r3, #0] 8023ffa: 2b00 cmp r3, #0 8023ffc: d174 bne.n 80240e8 copy_len = LWIP_MIN(decode_len, 4); 8023ffe: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8024002: 2b04 cmp r3, #4 8024004: bf28 it cs 8024006: 2304 movcs r3, #4 8024008: b2db uxtb r3, r3 802400a: 833b strh r3, [r7, #24] if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { 802400c: 8c7b ldrh r3, [r7, #34] @ 0x22 802400e: 8b3a ldrh r2, [r7, #24] 8024010: f107 010c add.w r1, r7, #12 8024014: 6b78 ldr r0, [r7, #52] @ 0x34 8024016: f7f7 fbb7 bl 801b788 802401a: 4603 mov r3, r0 802401c: 461a mov r2, r3 802401e: 8b3b ldrh r3, [r7, #24] 8024020: 4293 cmp r3, r2 8024022: d002 beq.n 802402a return ERR_BUF; 8024024: f06f 0301 mvn.w r3, #1 8024028: e0ce b.n 80241c8 } if (decode_len > 4) { 802402a: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 802402e: 2b04 cmp r3, #4 8024030: d933 bls.n 802409a /* decode more than one u32_t */ u16_t next_val_offset; LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 8024032: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8024036: f003 0303 and.w r3, r3, #3 802403a: b2db uxtb r3, r3 802403c: 2b00 cmp r3, #0 802403e: d009 beq.n 8024054 8024040: 4b63 ldr r3, [pc, #396] @ (80241d0 ) 8024042: f240 6281 movw r2, #1665 @ 0x681 8024046: 4967 ldr r1, [pc, #412] @ (80241e4 ) 8024048: 4863 ldr r0, [pc, #396] @ (80241d8 ) 802404a: f006 fc0f bl 802a86c 802404e: f06f 0305 mvn.w r3, #5 8024052: e0b9 b.n 80241c8 dhcp_got_option(dhcp, decode_idx); 8024054: 4a62 ldr r2, [pc, #392] @ (80241e0 ) 8024056: 6a7b ldr r3, [r7, #36] @ 0x24 8024058: 4413 add r3, r2 802405a: 2201 movs r2, #1 802405c: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); 802405e: 68fb ldr r3, [r7, #12] 8024060: 4618 mov r0, r3 8024062: f7f5 fcbe bl 80199e2 8024066: 4602 mov r2, r0 8024068: 495f ldr r1, [pc, #380] @ (80241e8 ) 802406a: 6a7b ldr r3, [r7, #36] @ 0x24 802406c: f841 2023 str.w r2, [r1, r3, lsl #2] decode_len = (u8_t)(decode_len - 4); 8024070: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8024074: 3b04 subs r3, #4 8024076: f887 302a strb.w r3, [r7, #42] @ 0x2a next_val_offset = (u16_t)(val_offset + 4); 802407a: 8c7b ldrh r3, [r7, #34] @ 0x22 802407c: 3304 adds r3, #4 802407e: 82fb strh r3, [r7, #22] if (next_val_offset < val_offset) { 8024080: 8afa ldrh r2, [r7, #22] 8024082: 8c7b ldrh r3, [r7, #34] @ 0x22 8024084: 429a cmp r2, r3 8024086: d202 bcs.n 802408e /* overflow */ return ERR_BUF; 8024088: f06f 0301 mvn.w r3, #1 802408c: e09c b.n 80241c8 } val_offset = next_val_offset; 802408e: 8afb ldrh r3, [r7, #22] 8024090: 847b strh r3, [r7, #34] @ 0x22 decode_idx++; 8024092: 6a7b ldr r3, [r7, #36] @ 0x24 8024094: 3301 adds r3, #1 8024096: 627b str r3, [r7, #36] @ 0x24 goto decode_next; 8024098: e79e b.n 8023fd8 } else if (decode_len == 4) { 802409a: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 802409e: 2b04 cmp r3, #4 80240a0: d106 bne.n 80240b0 value = lwip_ntohl(value); 80240a2: 68fb ldr r3, [r7, #12] 80240a4: 4618 mov r0, r3 80240a6: f7f5 fc9c bl 80199e2 80240aa: 4603 mov r3, r0 80240ac: 60fb str r3, [r7, #12] 80240ae: e011 b.n 80240d4 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 80240b0: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80240b4: 2b01 cmp r3, #1 80240b6: d009 beq.n 80240cc 80240b8: 4b45 ldr r3, [pc, #276] @ (80241d0 ) 80240ba: f44f 62d2 mov.w r2, #1680 @ 0x690 80240be: 494b ldr r1, [pc, #300] @ (80241ec ) 80240c0: 4845 ldr r0, [pc, #276] @ (80241d8 ) 80240c2: f006 fbd3 bl 802a86c 80240c6: f06f 0305 mvn.w r3, #5 80240ca: e07d b.n 80241c8 value = ((u8_t *)&value)[0]; 80240cc: f107 030c add.w r3, r7, #12 80240d0: 781b ldrb r3, [r3, #0] 80240d2: 60fb str r3, [r7, #12] } dhcp_got_option(dhcp, decode_idx); 80240d4: 4a42 ldr r2, [pc, #264] @ (80241e0 ) 80240d6: 6a7b ldr r3, [r7, #36] @ 0x24 80240d8: 4413 add r3, r2 80240da: 2201 movs r2, #1 80240dc: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, value); 80240de: 68fa ldr r2, [r7, #12] 80240e0: 4941 ldr r1, [pc, #260] @ (80241e8 ) 80240e2: 6a7b ldr r3, [r7, #36] @ 0x24 80240e4: f841 2023 str.w r2, [r1, r3, lsl #2] } } } if (offset >= q->len) { 80240e8: 6b7b ldr r3, [r7, #52] @ 0x34 80240ea: 895b ldrh r3, [r3, #10] 80240ec: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 80240f0: 429a cmp r2, r3 80240f2: d327 bcc.n 8024144 offset = (u16_t)(offset - q->len); 80240f4: 6b7b ldr r3, [r7, #52] @ 0x34 80240f6: 895b ldrh r3, [r3, #10] 80240f8: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 80240fc: 1ad3 subs r3, r2, r3 80240fe: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = (u16_t)(offset_max - q->len); 8024102: 6b7b ldr r3, [r7, #52] @ 0x34 8024104: 895b ldrh r3, [r3, #10] 8024106: 8ffa ldrh r2, [r7, #62] @ 0x3e 8024108: 1ad3 subs r3, r2, r3 802410a: 87fb strh r3, [r7, #62] @ 0x3e if (offset < offset_max) { 802410c: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8024110: 8ffb ldrh r3, [r7, #62] @ 0x3e 8024112: 429a cmp r2, r3 8024114: d213 bcs.n 802413e q = q->next; 8024116: 6b7b ldr r3, [r7, #52] @ 0x34 8024118: 681b ldr r3, [r3, #0] 802411a: 637b str r3, [r7, #52] @ 0x34 LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); 802411c: 6b7b ldr r3, [r7, #52] @ 0x34 802411e: 2b00 cmp r3, #0 8024120: d109 bne.n 8024136 8024122: 4b2b ldr r3, [pc, #172] @ (80241d0 ) 8024124: f240 629d movw r2, #1693 @ 0x69d 8024128: 4931 ldr r1, [pc, #196] @ (80241f0 ) 802412a: 482b ldr r0, [pc, #172] @ (80241d8 ) 802412c: f006 fb9e bl 802a86c 8024130: f06f 0305 mvn.w r3, #5 8024134: e048 b.n 80241c8 options = (u8_t *)q->payload; 8024136: 6b7b ldr r3, [r7, #52] @ 0x34 8024138: 685b ldr r3, [r3, #4] 802413a: 643b str r3, [r7, #64] @ 0x40 802413c: e002 b.n 8024144 } else { /* We've run out of bytes, probably no end marker. Don't proceed. */ return ERR_BUF; 802413e: f06f 0301 mvn.w r3, #1 8024142: e041 b.n 80241c8 while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { 8024144: 6b7b ldr r3, [r7, #52] @ 0x34 8024146: 2b00 cmp r3, #0 8024148: d00c beq.n 8024164 802414a: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 802414e: 8ffb ldrh r3, [r7, #62] @ 0x3e 8024150: 429a cmp r2, r3 8024152: d207 bcs.n 8024164 8024154: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8024158: 6c3a ldr r2, [r7, #64] @ 0x40 802415a: 4413 add r3, r2 802415c: 781b ldrb r3, [r3, #0] 802415e: 2bff cmp r3, #255 @ 0xff 8024160: f47f ada8 bne.w 8023cb4 } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 8024164: 4b1e ldr r3, [pc, #120] @ (80241e0 ) 8024166: 781b ldrb r3, [r3, #0] 8024168: 2b00 cmp r3, #0 802416a: d018 beq.n 802419e u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802416c: 4b1e ldr r3, [pc, #120] @ (80241e8 ) 802416e: 681b ldr r3, [r3, #0] 8024170: 613b str r3, [r7, #16] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 8024172: 4b1b ldr r3, [pc, #108] @ (80241e0 ) 8024174: 2200 movs r2, #0 8024176: 701a strb r2, [r3, #0] if (overload == DHCP_OVERLOAD_FILE) { 8024178: 693b ldr r3, [r7, #16] 802417a: 2b01 cmp r3, #1 802417c: d102 bne.n 8024184 parse_file_as_options = 1; 802417e: 2301 movs r3, #1 8024180: 633b str r3, [r7, #48] @ 0x30 8024182: e00c b.n 802419e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 8024184: 693b ldr r3, [r7, #16] 8024186: 2b02 cmp r3, #2 8024188: d102 bne.n 8024190 parse_sname_as_options = 1; 802418a: 2301 movs r3, #1 802418c: 62fb str r3, [r7, #44] @ 0x2c 802418e: e006 b.n 802419e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 8024190: 693b ldr r3, [r7, #16] 8024192: 2b03 cmp r3, #3 8024194: d103 bne.n 802419e parse_sname_as_options = 1; 8024196: 2301 movs r3, #1 8024198: 62fb str r3, [r7, #44] @ 0x2c parse_file_as_options = 1; 802419a: 2301 movs r3, #1 802419c: 633b str r3, [r7, #48] @ 0x30 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) { 802419e: 6b3b ldr r3, [r7, #48] @ 0x30 80241a0: 2b00 cmp r3, #0 80241a2: d006 beq.n 80241b2 /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; 80241a4: 2300 movs r3, #0 80241a6: 633b str r3, [r7, #48] @ 0x30 options_idx = DHCP_FILE_OFS; 80241a8: 236c movs r3, #108 @ 0x6c 80241aa: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 80241ac: 23ec movs r3, #236 @ 0xec 80241ae: 877b strh r3, [r7, #58] @ 0x3a #if LWIP_DHCP_BOOTP_FILE file_overloaded = 1; #endif goto again; 80241b0: e559 b.n 8023c66 } else if (parse_sname_as_options) { 80241b2: 6afb ldr r3, [r7, #44] @ 0x2c 80241b4: 2b00 cmp r3, #0 80241b6: d006 beq.n 80241c6 parse_sname_as_options = 0; 80241b8: 2300 movs r3, #0 80241ba: 62fb str r3, [r7, #44] @ 0x2c options_idx = DHCP_SNAME_OFS; 80241bc: 232c movs r3, #44 @ 0x2c 80241be: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 80241c0: 236c movs r3, #108 @ 0x6c 80241c2: 877b strh r3, [r7, #58] @ 0x3a goto again; 80241c4: e54f b.n 8023c66 } /* 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; 80241c6: 2300 movs r3, #0 } 80241c8: 4618 mov r0, r3 80241ca: 3748 adds r7, #72 @ 0x48 80241cc: 46bd mov sp, r7 80241ce: bd80 pop {r7, pc} 80241d0: 08030e54 .word 0x08030e54 80241d4: 080310dc .word 0x080310dc 80241d8: 08030eb4 .word 0x08030eb4 80241dc: 08031120 .word 0x08031120 80241e0: 2402afec .word 0x2402afec 80241e4: 08031134 .word 0x08031134 80241e8: 2402afcc .word 0x2402afcc 80241ec: 0803114c .word 0x0803114c 80241f0: 08031160 .word 0x08031160 080241f4 : /** * 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) { 80241f4: b580 push {r7, lr} 80241f6: b08a sub sp, #40 @ 0x28 80241f8: af00 add r7, sp, #0 80241fa: 60f8 str r0, [r7, #12] 80241fc: 60b9 str r1, [r7, #8] 80241fe: 607a str r2, [r7, #4] 8024200: 603b str r3, [r7, #0] struct netif *netif = ip_current_input_netif(); 8024202: 4b5e ldr r3, [pc, #376] @ (802437c ) 8024204: 685b ldr r3, [r3, #4] 8024206: 61fb str r3, [r7, #28] struct dhcp *dhcp = netif_dhcp_data(netif); 8024208: 69fb ldr r3, [r7, #28] 802420a: 6a5b ldr r3, [r3, #36] @ 0x24 802420c: 61bb str r3, [r7, #24] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802420e: 687b ldr r3, [r7, #4] 8024210: 685b ldr r3, [r3, #4] 8024212: 617b str r3, [r7, #20] 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)) { 8024214: 69bb ldr r3, [r7, #24] 8024216: 2b00 cmp r3, #0 8024218: f000 809a beq.w 8024350 802421c: 69bb ldr r3, [r7, #24] 802421e: 791b ldrb r3, [r3, #4] 8024220: 2b00 cmp r3, #0 8024222: f000 8095 beq.w 8024350 /* prevent warnings about unused arguments */ LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); if (p->len < DHCP_MIN_REPLY_LEN) { 8024226: 687b ldr r3, [r7, #4] 8024228: 895b ldrh r3, [r3, #10] 802422a: 2b2b cmp r3, #43 @ 0x2b 802422c: f240 8092 bls.w 8024354 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) { 8024230: 697b ldr r3, [r7, #20] 8024232: 781b ldrb r3, [r3, #0] 8024234: 2b02 cmp r3, #2 8024236: f040 808f bne.w 8024358 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++) { 802423a: 2300 movs r3, #0 802423c: 74fb strb r3, [r7, #19] 802423e: e00e b.n 802425e if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 8024240: 7cfb ldrb r3, [r7, #19] 8024242: 69fa ldr r2, [r7, #28] 8024244: 4413 add r3, r2 8024246: f893 202a ldrb.w r2, [r3, #42] @ 0x2a 802424a: 7cfb ldrb r3, [r7, #19] 802424c: 6979 ldr r1, [r7, #20] 802424e: 440b add r3, r1 8024250: 7f1b ldrb r3, [r3, #28] 8024252: 429a cmp r2, r3 8024254: f040 8082 bne.w 802435c for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 8024258: 7cfb ldrb r3, [r7, #19] 802425a: 3301 adds r3, #1 802425c: 74fb strb r3, [r7, #19] 802425e: 69fb ldr r3, [r7, #28] 8024260: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8024264: 7cfa ldrb r2, [r7, #19] 8024266: 429a cmp r2, r3 8024268: d202 bcs.n 8024270 802426a: 7cfb ldrb r3, [r7, #19] 802426c: 2b05 cmp r3, #5 802426e: d9e7 bls.n 8024240 (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) { 8024270: 697b ldr r3, [r7, #20] 8024272: 685b ldr r3, [r3, #4] 8024274: 4618 mov r0, r3 8024276: f7f5 fbb4 bl 80199e2 802427a: 4602 mov r2, r0 802427c: 69bb ldr r3, [r7, #24] 802427e: 681b ldr r3, [r3, #0] 8024280: 429a cmp r2, r3 8024282: d16d bne.n 8024360 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) { 8024284: 69b9 ldr r1, [r7, #24] 8024286: 6878 ldr r0, [r7, #4] 8024288: f7ff fcd0 bl 8023c2c 802428c: 4603 mov r3, r0 802428e: 2b00 cmp r3, #0 8024290: d168 bne.n 8024364 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)) { 8024292: 4b3b ldr r3, [pc, #236] @ (8024380 ) 8024294: 785b ldrb r3, [r3, #1] 8024296: 2b00 cmp r3, #0 8024298: d066 beq.n 8024368 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; 802429a: 687b ldr r3, [r7, #4] 802429c: 685b ldr r3, [r3, #4] 802429e: 627b str r3, [r7, #36] @ 0x24 /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 80242a0: 4b38 ldr r3, [pc, #224] @ (8024384 ) 80242a2: 685b ldr r3, [r3, #4] 80242a4: f887 3023 strb.w r3, [r7, #35] @ 0x23 /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 80242a8: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80242ac: 2b05 cmp r3, #5 80242ae: d12a bne.n 8024306 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_STATE_REQUESTING) { 80242b0: 69bb ldr r3, [r7, #24] 80242b2: 795b ldrb r3, [r3, #5] 80242b4: 2b01 cmp r3, #1 80242b6: d112 bne.n 80242de dhcp_handle_ack(netif, msg_in); 80242b8: 6a79 ldr r1, [r7, #36] @ 0x24 80242ba: 69f8 ldr r0, [r7, #28] 80242bc: f7fe fe00 bl 8022ec0 #if DHCP_DOES_ARP_CHECK if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { 80242c0: 69fb ldr r3, [r7, #28] 80242c2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80242c6: f003 0308 and.w r3, r3, #8 80242ca: 2b00 cmp r3, #0 80242cc: d003 beq.n 80242d6 /* check if the acknowledged lease address is already in use */ dhcp_check(netif); 80242ce: 69f8 ldr r0, [r7, #28] 80242d0: f7fe fb6e bl 80229b0 80242d4: e04b b.n 802436e } else { /* bind interface to the acknowledged lease address */ dhcp_bind(netif); 80242d6: 69f8 ldr r0, [r7, #28] 80242d8: f7ff f852 bl 8023380 80242dc: e047 b.n 802436e /* 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) || 80242de: 69bb ldr r3, [r7, #24] 80242e0: 795b ldrb r3, [r3, #5] 80242e2: 2b03 cmp r3, #3 80242e4: d007 beq.n 80242f6 80242e6: 69bb ldr r3, [r7, #24] 80242e8: 795b ldrb r3, [r3, #5] 80242ea: 2b04 cmp r3, #4 80242ec: d003 beq.n 80242f6 (dhcp->state == DHCP_STATE_RENEWING)) { 80242ee: 69bb ldr r3, [r7, #24] 80242f0: 795b ldrb r3, [r3, #5] else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || 80242f2: 2b05 cmp r3, #5 80242f4: d13b bne.n 802436e dhcp_handle_ack(netif, msg_in); 80242f6: 6a79 ldr r1, [r7, #36] @ 0x24 80242f8: 69f8 ldr r0, [r7, #28] 80242fa: f7fe fde1 bl 8022ec0 dhcp_bind(netif); 80242fe: 69f8 ldr r0, [r7, #28] 8024300: f7ff f83e bl 8023380 8024304: e033 b.n 802436e } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 8024306: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802430a: 2b06 cmp r3, #6 802430c: d113 bne.n 8024336 ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 802430e: 69bb ldr r3, [r7, #24] 8024310: 795b ldrb r3, [r3, #5] else if ((msg_type == DHCP_NAK) && 8024312: 2b03 cmp r3, #3 8024314: d00b beq.n 802432e ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8024316: 69bb ldr r3, [r7, #24] 8024318: 795b ldrb r3, [r3, #5] 802431a: 2b01 cmp r3, #1 802431c: d007 beq.n 802432e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 802431e: 69bb ldr r3, [r7, #24] 8024320: 795b ldrb r3, [r3, #5] ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8024322: 2b04 cmp r3, #4 8024324: d003 beq.n 802432e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 8024326: 69bb ldr r3, [r7, #24] 8024328: 795b ldrb r3, [r3, #5] 802432a: 2b05 cmp r3, #5 802432c: d103 bne.n 8024336 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); 802432e: 69f8 ldr r0, [r7, #28] 8024330: f7fe fb24 bl 802297c 8024334: e01b b.n 802436e } /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { 8024336: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802433a: 2b02 cmp r3, #2 802433c: d116 bne.n 802436c 802433e: 69bb ldr r3, [r7, #24] 8024340: 795b ldrb r3, [r3, #5] 8024342: 2b06 cmp r3, #6 8024344: d112 bne.n 802436c 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); 8024346: 6a79 ldr r1, [r7, #36] @ 0x24 8024348: 69f8 ldr r0, [r7, #28] 802434a: f7fe fb65 bl 8022a18 802434e: e00e b.n 802436e goto free_pbuf_and_return; 8024350: bf00 nop 8024352: e00c b.n 802436e goto free_pbuf_and_return; 8024354: bf00 nop 8024356: e00a b.n 802436e goto free_pbuf_and_return; 8024358: bf00 nop 802435a: e008 b.n 802436e goto free_pbuf_and_return; 802435c: bf00 nop 802435e: e006 b.n 802436e goto free_pbuf_and_return; 8024360: bf00 nop 8024362: e004 b.n 802436e goto free_pbuf_and_return; 8024364: bf00 nop 8024366: e002 b.n 802436e goto free_pbuf_and_return; 8024368: bf00 nop 802436a: e000 b.n 802436e } free_pbuf_and_return: 802436c: bf00 nop pbuf_free(p); 802436e: 6878 ldr r0, [r7, #4] 8024370: f7f7 f804 bl 801b37c } 8024374: bf00 nop 8024376: 3728 adds r7, #40 @ 0x28 8024378: 46bd mov sp, r7 802437a: bd80 pop {r7, pc} 802437c: 24024418 .word 0x24024418 8024380: 2402afec .word 0x2402afec 8024384: 2402afcc .word 0x2402afcc 08024388 : * @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) { 8024388: b580 push {r7, lr} 802438a: b088 sub sp, #32 802438c: af00 add r7, sp, #0 802438e: 60f8 str r0, [r7, #12] 8024390: 60b9 str r1, [r7, #8] 8024392: 603b str r3, [r7, #0] 8024394: 4613 mov r3, r2 8024396: 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;); 8024398: 68fb ldr r3, [r7, #12] 802439a: 2b00 cmp r3, #0 802439c: d108 bne.n 80243b0 802439e: 4b5f ldr r3, [pc, #380] @ (802451c ) 80243a0: f240 7269 movw r2, #1897 @ 0x769 80243a4: 495e ldr r1, [pc, #376] @ (8024520 ) 80243a6: 485f ldr r0, [pc, #380] @ (8024524 ) 80243a8: f006 fa60 bl 802a86c 80243ac: 2300 movs r3, #0 80243ae: e0b1 b.n 8024514 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); 80243b0: 68bb ldr r3, [r7, #8] 80243b2: 2b00 cmp r3, #0 80243b4: d108 bne.n 80243c8 80243b6: 4b59 ldr r3, [pc, #356] @ (802451c ) 80243b8: f240 726a movw r2, #1898 @ 0x76a 80243bc: 495a ldr r1, [pc, #360] @ (8024528 ) 80243be: 4859 ldr r0, [pc, #356] @ (8024524 ) 80243c0: f006 fa54 bl 802a86c 80243c4: 2300 movs r3, #0 80243c6: e0a5 b.n 8024514 p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 80243c8: f44f 7220 mov.w r2, #640 @ 0x280 80243cc: f44f 719a mov.w r1, #308 @ 0x134 80243d0: 2036 movs r0, #54 @ 0x36 80243d2: f7f6 fcbd bl 801ad50 80243d6: 61b8 str r0, [r7, #24] if (p_out == NULL) { 80243d8: 69bb ldr r3, [r7, #24] 80243da: 2b00 cmp r3, #0 80243dc: d101 bne.n 80243e2 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return NULL; 80243de: 2300 movs r3, #0 80243e0: e098 b.n 8024514 } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", 80243e2: 69bb ldr r3, [r7, #24] 80243e4: 895b ldrh r3, [r3, #10] 80243e6: f5b3 7f9a cmp.w r3, #308 @ 0x134 80243ea: d206 bcs.n 80243fa 80243ec: 4b4b ldr r3, [pc, #300] @ (802451c ) 80243ee: f240 7271 movw r2, #1905 @ 0x771 80243f2: 494e ldr r1, [pc, #312] @ (802452c ) 80243f4: 484b ldr r0, [pc, #300] @ (8024524 ) 80243f6: f006 fa39 bl 802a86c (p_out->len >= sizeof(struct dhcp_msg))); /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { 80243fa: 79fb ldrb r3, [r7, #7] 80243fc: 2b03 cmp r3, #3 80243fe: d103 bne.n 8024408 8024400: 68bb ldr r3, [r7, #8] 8024402: 795b ldrb r3, [r3, #5] 8024404: 2b03 cmp r3, #3 8024406: d10d bne.n 8024424 /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 8024408: 68bb ldr r3, [r7, #8] 802440a: 799b ldrb r3, [r3, #6] 802440c: 2b00 cmp r3, #0 802440e: d105 bne.n 802441c #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); 8024410: f004 ff02 bl 8029218 8024414: 4603 mov r3, r0 8024416: 461a mov r2, r3 8024418: 4b45 ldr r3, [pc, #276] @ (8024530 ) 802441a: 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; 802441c: 4b44 ldr r3, [pc, #272] @ (8024530 ) 802441e: 681a ldr r2, [r3, #0] 8024420: 68bb ldr r3, [r7, #8] 8024422: 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; 8024424: 69bb ldr r3, [r7, #24] 8024426: 685b ldr r3, [r3, #4] 8024428: 617b str r3, [r7, #20] memset(msg_out, 0, sizeof(struct dhcp_msg)); 802442a: f44f 729a mov.w r2, #308 @ 0x134 802442e: 2100 movs r1, #0 8024430: 6978 ldr r0, [r7, #20] 8024432: f006 fbad bl 802ab90 msg_out->op = DHCP_BOOTREQUEST; 8024436: 697b ldr r3, [r7, #20] 8024438: 2201 movs r2, #1 802443a: 701a strb r2, [r3, #0] /* @todo: make link layer independent */ msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; 802443c: 697b ldr r3, [r7, #20] 802443e: 2201 movs r2, #1 8024440: 705a strb r2, [r3, #1] msg_out->hlen = netif->hwaddr_len; 8024442: 68fb ldr r3, [r7, #12] 8024444: f893 2030 ldrb.w r2, [r3, #48] @ 0x30 8024448: 697b ldr r3, [r7, #20] 802444a: 709a strb r2, [r3, #2] msg_out->xid = lwip_htonl(dhcp->xid); 802444c: 68bb ldr r3, [r7, #8] 802444e: 681b ldr r3, [r3, #0] 8024450: 4618 mov r0, r3 8024452: f7f5 fac6 bl 80199e2 8024456: 4602 mov r2, r0 8024458: 697b ldr r3, [r7, #20] 802445a: 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) || 802445c: 79fb ldrb r3, [r7, #7] 802445e: 2b08 cmp r3, #8 8024460: d010 beq.n 8024484 8024462: 79fb ldrb r3, [r7, #7] 8024464: 2b04 cmp r3, #4 8024466: d00d beq.n 8024484 8024468: 79fb ldrb r3, [r7, #7] 802446a: 2b07 cmp r3, #7 802446c: d00a beq.n 8024484 802446e: 79fb ldrb r3, [r7, #7] 8024470: 2b03 cmp r3, #3 8024472: d10c bne.n 802448e ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 8024474: 68bb ldr r3, [r7, #8] 8024476: 795b ldrb r3, [r3, #5] ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ 8024478: 2b05 cmp r3, #5 802447a: d003 beq.n 8024484 ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 802447c: 68bb ldr r3, [r7, #8] 802447e: 795b ldrb r3, [r3, #5] 8024480: 2b04 cmp r3, #4 8024482: d104 bne.n 802448e ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif)); 8024484: 68fb ldr r3, [r7, #12] 8024486: 3304 adds r3, #4 8024488: 681a ldr r2, [r3, #0] 802448a: 697b ldr r3, [r7, #20] 802448c: 60da str r2, [r3, #12] } for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 802448e: 2300 movs r3, #0 8024490: 83fb strh r3, [r7, #30] 8024492: e00c b.n 80244ae /* copy netif hardware address (padded with zeroes through memset already) */ msg_out->chaddr[i] = netif->hwaddr[i]; 8024494: 8bfa ldrh r2, [r7, #30] 8024496: 8bfb ldrh r3, [r7, #30] 8024498: 68f9 ldr r1, [r7, #12] 802449a: 440a add r2, r1 802449c: f892 102a ldrb.w r1, [r2, #42] @ 0x2a 80244a0: 697a ldr r2, [r7, #20] 80244a2: 4413 add r3, r2 80244a4: 460a mov r2, r1 80244a6: 771a strb r2, [r3, #28] for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 80244a8: 8bfb ldrh r3, [r7, #30] 80244aa: 3301 adds r3, #1 80244ac: 83fb strh r3, [r7, #30] 80244ae: 8bfb ldrh r3, [r7, #30] 80244b0: 2b05 cmp r3, #5 80244b2: d9ef bls.n 8024494 } msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 80244b4: 697b ldr r3, [r7, #20] 80244b6: 2200 movs r2, #0 80244b8: f042 0263 orr.w r2, r2, #99 @ 0x63 80244bc: f883 20ec strb.w r2, [r3, #236] @ 0xec 80244c0: 2200 movs r2, #0 80244c2: f062 027d orn r2, r2, #125 @ 0x7d 80244c6: f883 20ed strb.w r2, [r3, #237] @ 0xed 80244ca: 2200 movs r2, #0 80244cc: f042 0253 orr.w r2, r2, #83 @ 0x53 80244d0: f883 20ee strb.w r2, [r3, #238] @ 0xee 80244d4: 2200 movs r2, #0 80244d6: f042 0263 orr.w r2, r2, #99 @ 0x63 80244da: 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); 80244de: 697b ldr r3, [r7, #20] 80244e0: f103 01f0 add.w r1, r3, #240 @ 0xf0 80244e4: 2301 movs r3, #1 80244e6: 2235 movs r2, #53 @ 0x35 80244e8: 2000 movs r0, #0 80244ea: f7ff facf bl 8023a8c 80244ee: 4603 mov r3, r0 80244f0: 827b strh r3, [r7, #18] options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type); 80244f2: 697b ldr r3, [r7, #20] 80244f4: f103 01f0 add.w r1, r3, #240 @ 0xf0 80244f8: 79fa ldrb r2, [r7, #7] 80244fa: 8a7b ldrh r3, [r7, #18] 80244fc: 4618 mov r0, r3 80244fe: f7ff faf9 bl 8023af4 8024502: 4603 mov r3, r0 8024504: 827b strh r3, [r7, #18] if (options_out_len) { 8024506: 683b ldr r3, [r7, #0] 8024508: 2b00 cmp r3, #0 802450a: d002 beq.n 8024512 *options_out_len = options_out_len_loc; 802450c: 683b ldr r3, [r7, #0] 802450e: 8a7a ldrh r2, [r7, #18] 8024510: 801a strh r2, [r3, #0] } return p_out; 8024512: 69bb ldr r3, [r7, #24] } 8024514: 4618 mov r0, r3 8024516: 3720 adds r7, #32 8024518: 46bd mov sp, r7 802451a: bd80 pop {r7, pc} 802451c: 08030e54 .word 0x08030e54 8024520: 08031174 .word 0x08031174 8024524: 08030eb4 .word 0x08030eb4 8024528: 08031194 .word 0x08031194 802452c: 080311b4 .word 0x080311b4 8024530: 2402affc .word 0x2402affc 08024534 : * 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) { 8024534: b580 push {r7, lr} 8024536: b084 sub sp, #16 8024538: af00 add r7, sp, #0 802453a: 4603 mov r3, r0 802453c: 60b9 str r1, [r7, #8] 802453e: 607a str r2, [r7, #4] 8024540: 81fb strh r3, [r7, #14] options[options_out_len++] = DHCP_OPTION_END; 8024542: 89fb ldrh r3, [r7, #14] 8024544: 1c5a adds r2, r3, #1 8024546: 81fa strh r2, [r7, #14] 8024548: 461a mov r2, r3 802454a: 68bb ldr r3, [r7, #8] 802454c: 4413 add r3, r2 802454e: 22ff movs r2, #255 @ 0xff 8024550: 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)) && 8024552: e007 b.n 8024564 (options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ options[options_out_len++] = 0; 8024554: 89fb ldrh r3, [r7, #14] 8024556: 1c5a adds r2, r3, #1 8024558: 81fa strh r2, [r7, #14] 802455a: 461a mov r2, r3 802455c: 68bb ldr r3, [r7, #8] 802455e: 4413 add r3, r2 8024560: 2200 movs r2, #0 8024562: 701a strb r2, [r3, #0] while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && 8024564: 89fb ldrh r3, [r7, #14] 8024566: 2b43 cmp r3, #67 @ 0x43 8024568: d904 bls.n 8024574 802456a: 89fb ldrh r3, [r7, #14] 802456c: f003 0303 and.w r3, r3, #3 8024570: 2b00 cmp r3, #0 8024572: d002 beq.n 802457a 8024574: 89fb ldrh r3, [r7, #14] 8024576: 2b43 cmp r3, #67 @ 0x43 8024578: d9ec bls.n 8024554 } /* shrink the pbuf to the actual content length */ pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len)); 802457a: 89fb ldrh r3, [r7, #14] 802457c: 33f0 adds r3, #240 @ 0xf0 802457e: b29b uxth r3, r3 8024580: 4619 mov r1, r3 8024582: 6878 ldr r0, [r7, #4] 8024584: f7f6 fd44 bl 801b010 } 8024588: bf00 nop 802458a: 3710 adds r7, #16 802458c: 46bd mov sp, r7 802458e: bd80 pop {r7, pc} 08024590 : * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), * 0 otherwise */ u8_t dhcp_supplied_address(const struct netif *netif) { 8024590: b480 push {r7} 8024592: b085 sub sp, #20 8024594: af00 add r7, sp, #0 8024596: 6078 str r0, [r7, #4] if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { 8024598: 687b ldr r3, [r7, #4] 802459a: 2b00 cmp r3, #0 802459c: d017 beq.n 80245ce 802459e: 687b ldr r3, [r7, #4] 80245a0: 6a5b ldr r3, [r3, #36] @ 0x24 80245a2: 2b00 cmp r3, #0 80245a4: d013 beq.n 80245ce struct dhcp *dhcp = netif_dhcp_data(netif); 80245a6: 687b ldr r3, [r7, #4] 80245a8: 6a5b ldr r3, [r3, #36] @ 0x24 80245aa: 60fb str r3, [r7, #12] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 80245ac: 68fb ldr r3, [r7, #12] 80245ae: 795b ldrb r3, [r3, #5] 80245b0: 2b0a cmp r3, #10 80245b2: d007 beq.n 80245c4 80245b4: 68fb ldr r3, [r7, #12] 80245b6: 795b ldrb r3, [r3, #5] 80245b8: 2b05 cmp r3, #5 80245ba: d003 beq.n 80245c4 (dhcp->state == DHCP_STATE_REBINDING); 80245bc: 68fb ldr r3, [r7, #12] 80245be: 795b ldrb r3, [r3, #5] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 80245c0: 2b04 cmp r3, #4 80245c2: d101 bne.n 80245c8 80245c4: 2301 movs r3, #1 80245c6: e000 b.n 80245ca 80245c8: 2300 movs r3, #0 80245ca: b2db uxtb r3, r3 80245cc: e000 b.n 80245d0 } return 0; 80245ce: 2300 movs r3, #0 } 80245d0: 4618 mov r0, r3 80245d2: 3714 adds r7, #20 80245d4: 46bd mov sp, r7 80245d6: f85d 7b04 ldr.w r7, [sp], #4 80245da: 4770 bx lr 080245dc : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 80245dc: b580 push {r7, lr} 80245de: b082 sub sp, #8 80245e0: af00 add r7, sp, #0 80245e2: 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) { 80245e4: 492b ldr r1, [pc, #172] @ (8024694 ) 80245e6: 687a ldr r2, [r7, #4] 80245e8: 4613 mov r3, r2 80245ea: 005b lsls r3, r3, #1 80245ec: 4413 add r3, r2 80245ee: 00db lsls r3, r3, #3 80245f0: 440b add r3, r1 80245f2: 681b ldr r3, [r3, #0] 80245f4: 2b00 cmp r3, #0 80245f6: d013 beq.n 8024620 /* 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); 80245f8: 4926 ldr r1, [pc, #152] @ (8024694 ) 80245fa: 687a ldr r2, [r7, #4] 80245fc: 4613 mov r3, r2 80245fe: 005b lsls r3, r3, #1 8024600: 4413 add r3, r2 8024602: 00db lsls r3, r3, #3 8024604: 440b add r3, r1 8024606: 681b ldr r3, [r3, #0] 8024608: 4618 mov r0, r3 802460a: f7f6 feb7 bl 801b37c arp_table[i].q = NULL; 802460e: 4921 ldr r1, [pc, #132] @ (8024694 ) 8024610: 687a ldr r2, [r7, #4] 8024612: 4613 mov r3, r2 8024614: 005b lsls r3, r3, #1 8024616: 4413 add r3, r2 8024618: 00db lsls r3, r3, #3 802461a: 440b add r3, r1 802461c: 2200 movs r2, #0 802461e: 601a str r2, [r3, #0] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8024620: 491c ldr r1, [pc, #112] @ (8024694 ) 8024622: 687a ldr r2, [r7, #4] 8024624: 4613 mov r3, r2 8024626: 005b lsls r3, r3, #1 8024628: 4413 add r3, r2 802462a: 00db lsls r3, r3, #3 802462c: 440b add r3, r1 802462e: 3314 adds r3, #20 8024630: 2200 movs r2, #0 8024632: 701a strb r2, [r3, #0] #ifdef LWIP_DEBUG /* for debugging, clean out the complete entry */ arp_table[i].ctime = 0; 8024634: 4917 ldr r1, [pc, #92] @ (8024694 ) 8024636: 687a ldr r2, [r7, #4] 8024638: 4613 mov r3, r2 802463a: 005b lsls r3, r3, #1 802463c: 4413 add r3, r2 802463e: 00db lsls r3, r3, #3 8024640: 440b add r3, r1 8024642: 3312 adds r3, #18 8024644: 2200 movs r2, #0 8024646: 801a strh r2, [r3, #0] arp_table[i].netif = NULL; 8024648: 4912 ldr r1, [pc, #72] @ (8024694 ) 802464a: 687a ldr r2, [r7, #4] 802464c: 4613 mov r3, r2 802464e: 005b lsls r3, r3, #1 8024650: 4413 add r3, r2 8024652: 00db lsls r3, r3, #3 8024654: 440b add r3, r1 8024656: 3308 adds r3, #8 8024658: 2200 movs r2, #0 802465a: 601a str r2, [r3, #0] ip4_addr_set_zero(&arp_table[i].ipaddr); 802465c: 490d ldr r1, [pc, #52] @ (8024694 ) 802465e: 687a ldr r2, [r7, #4] 8024660: 4613 mov r3, r2 8024662: 005b lsls r3, r3, #1 8024664: 4413 add r3, r2 8024666: 00db lsls r3, r3, #3 8024668: 440b add r3, r1 802466a: 3304 adds r3, #4 802466c: 2200 movs r2, #0 802466e: 601a str r2, [r3, #0] arp_table[i].ethaddr = ethzero; 8024670: 4908 ldr r1, [pc, #32] @ (8024694 ) 8024672: 687a ldr r2, [r7, #4] 8024674: 4613 mov r3, r2 8024676: 005b lsls r3, r3, #1 8024678: 4413 add r3, r2 802467a: 00db lsls r3, r3, #3 802467c: 440b add r3, r1 802467e: 3308 adds r3, #8 8024680: 4a05 ldr r2, [pc, #20] @ (8024698 ) 8024682: 3304 adds r3, #4 8024684: 6810 ldr r0, [r2, #0] 8024686: 6018 str r0, [r3, #0] 8024688: 8892 ldrh r2, [r2, #4] 802468a: 809a strh r2, [r3, #4] #endif /* LWIP_DEBUG */ } 802468c: bf00 nop 802468e: 3708 adds r7, #8 8024690: 46bd mov sp, r7 8024692: bd80 pop {r7, pc} 8024694: 2402b000 .word 0x2402b000 8024698: 08031c88 .word 0x08031c88 0802469c : * 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) { 802469c: b580 push {r7, lr} 802469e: b082 sub sp, #8 80246a0: 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) { 80246a2: 2300 movs r3, #0 80246a4: 607b str r3, [r7, #4] 80246a6: e096 b.n 80247d6 u8_t state = arp_table[i].state; 80246a8: 494f ldr r1, [pc, #316] @ (80247e8 ) 80246aa: 687a ldr r2, [r7, #4] 80246ac: 4613 mov r3, r2 80246ae: 005b lsls r3, r3, #1 80246b0: 4413 add r3, r2 80246b2: 00db lsls r3, r3, #3 80246b4: 440b add r3, r1 80246b6: 3314 adds r3, #20 80246b8: 781b ldrb r3, [r3, #0] 80246ba: 70fb strb r3, [r7, #3] if (state != ETHARP_STATE_EMPTY 80246bc: 78fb ldrb r3, [r7, #3] 80246be: 2b00 cmp r3, #0 80246c0: f000 8086 beq.w 80247d0 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 80246c4: 4948 ldr r1, [pc, #288] @ (80247e8 ) 80246c6: 687a ldr r2, [r7, #4] 80246c8: 4613 mov r3, r2 80246ca: 005b lsls r3, r3, #1 80246cc: 4413 add r3, r2 80246ce: 00db lsls r3, r3, #3 80246d0: 440b add r3, r1 80246d2: 3312 adds r3, #18 80246d4: 881b ldrh r3, [r3, #0] 80246d6: 3301 adds r3, #1 80246d8: b298 uxth r0, r3 80246da: 4943 ldr r1, [pc, #268] @ (80247e8 ) 80246dc: 687a ldr r2, [r7, #4] 80246de: 4613 mov r3, r2 80246e0: 005b lsls r3, r3, #1 80246e2: 4413 add r3, r2 80246e4: 00db lsls r3, r3, #3 80246e6: 440b add r3, r1 80246e8: 3312 adds r3, #18 80246ea: 4602 mov r2, r0 80246ec: 801a strh r2, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 80246ee: 493e ldr r1, [pc, #248] @ (80247e8 ) 80246f0: 687a ldr r2, [r7, #4] 80246f2: 4613 mov r3, r2 80246f4: 005b lsls r3, r3, #1 80246f6: 4413 add r3, r2 80246f8: 00db lsls r3, r3, #3 80246fa: 440b add r3, r1 80246fc: 3312 adds r3, #18 80246fe: 881b ldrh r3, [r3, #0] 8024700: f5b3 7f96 cmp.w r3, #300 @ 0x12c 8024704: d215 bcs.n 8024732 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8024706: 4938 ldr r1, [pc, #224] @ (80247e8 ) 8024708: 687a ldr r2, [r7, #4] 802470a: 4613 mov r3, r2 802470c: 005b lsls r3, r3, #1 802470e: 4413 add r3, r2 8024710: 00db lsls r3, r3, #3 8024712: 440b add r3, r1 8024714: 3314 adds r3, #20 8024716: 781b ldrb r3, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8024718: 2b01 cmp r3, #1 802471a: d10e bne.n 802473a (arp_table[i].ctime >= ARP_MAXPENDING))) { 802471c: 4932 ldr r1, [pc, #200] @ (80247e8 ) 802471e: 687a ldr r2, [r7, #4] 8024720: 4613 mov r3, r2 8024722: 005b lsls r3, r3, #1 8024724: 4413 add r3, r2 8024726: 00db lsls r3, r3, #3 8024728: 440b add r3, r1 802472a: 3312 adds r3, #18 802472c: 881b ldrh r3, [r3, #0] ((arp_table[i].state == ETHARP_STATE_PENDING) && 802472e: 2b04 cmp r3, #4 8024730: d903 bls.n 802473a /* 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); 8024732: 6878 ldr r0, [r7, #4] 8024734: f7ff ff52 bl 80245dc 8024738: e04a b.n 80247d0 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { 802473a: 492b ldr r1, [pc, #172] @ (80247e8 ) 802473c: 687a ldr r2, [r7, #4] 802473e: 4613 mov r3, r2 8024740: 005b lsls r3, r3, #1 8024742: 4413 add r3, r2 8024744: 00db lsls r3, r3, #3 8024746: 440b add r3, r1 8024748: 3314 adds r3, #20 802474a: 781b ldrb r3, [r3, #0] 802474c: 2b03 cmp r3, #3 802474e: d10a bne.n 8024766 /* Don't send more than one request every 2 seconds. */ arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; 8024750: 4925 ldr r1, [pc, #148] @ (80247e8 ) 8024752: 687a ldr r2, [r7, #4] 8024754: 4613 mov r3, r2 8024756: 005b lsls r3, r3, #1 8024758: 4413 add r3, r2 802475a: 00db lsls r3, r3, #3 802475c: 440b add r3, r1 802475e: 3314 adds r3, #20 8024760: 2204 movs r2, #4 8024762: 701a strb r2, [r3, #0] 8024764: e034 b.n 80247d0 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { 8024766: 4920 ldr r1, [pc, #128] @ (80247e8 ) 8024768: 687a ldr r2, [r7, #4] 802476a: 4613 mov r3, r2 802476c: 005b lsls r3, r3, #1 802476e: 4413 add r3, r2 8024770: 00db lsls r3, r3, #3 8024772: 440b add r3, r1 8024774: 3314 adds r3, #20 8024776: 781b ldrb r3, [r3, #0] 8024778: 2b04 cmp r3, #4 802477a: d10a bne.n 8024792 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 802477c: 491a ldr r1, [pc, #104] @ (80247e8 ) 802477e: 687a ldr r2, [r7, #4] 8024780: 4613 mov r3, r2 8024782: 005b lsls r3, r3, #1 8024784: 4413 add r3, r2 8024786: 00db lsls r3, r3, #3 8024788: 440b add r3, r1 802478a: 3314 adds r3, #20 802478c: 2202 movs r2, #2 802478e: 701a strb r2, [r3, #0] 8024790: e01e b.n 80247d0 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8024792: 4915 ldr r1, [pc, #84] @ (80247e8 ) 8024794: 687a ldr r2, [r7, #4] 8024796: 4613 mov r3, r2 8024798: 005b lsls r3, r3, #1 802479a: 4413 add r3, r2 802479c: 00db lsls r3, r3, #3 802479e: 440b add r3, r1 80247a0: 3314 adds r3, #20 80247a2: 781b ldrb r3, [r3, #0] 80247a4: 2b01 cmp r3, #1 80247a6: d113 bne.n 80247d0 /* still pending, resend an ARP query */ etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); 80247a8: 490f ldr r1, [pc, #60] @ (80247e8 ) 80247aa: 687a ldr r2, [r7, #4] 80247ac: 4613 mov r3, r2 80247ae: 005b lsls r3, r3, #1 80247b0: 4413 add r3, r2 80247b2: 00db lsls r3, r3, #3 80247b4: 440b add r3, r1 80247b6: 3308 adds r3, #8 80247b8: 6818 ldr r0, [r3, #0] 80247ba: 687a ldr r2, [r7, #4] 80247bc: 4613 mov r3, r2 80247be: 005b lsls r3, r3, #1 80247c0: 4413 add r3, r2 80247c2: 00db lsls r3, r3, #3 80247c4: 4a08 ldr r2, [pc, #32] @ (80247e8 ) 80247c6: 4413 add r3, r2 80247c8: 3304 adds r3, #4 80247ca: 4619 mov r1, r3 80247cc: f000 fe76 bl 80254bc for (i = 0; i < ARP_TABLE_SIZE; ++i) { 80247d0: 687b ldr r3, [r7, #4] 80247d2: 3301 adds r3, #1 80247d4: 607b str r3, [r7, #4] 80247d6: 687b ldr r3, [r7, #4] 80247d8: 2b09 cmp r3, #9 80247da: f77f af65 ble.w 80246a8 } } } } 80247de: bf00 nop 80247e0: bf00 nop 80247e2: 3708 adds r7, #8 80247e4: 46bd mov sp, r7 80247e6: bd80 pop {r7, pc} 80247e8: 2402b000 .word 0x2402b000 080247ec : * @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) { 80247ec: b580 push {r7, lr} 80247ee: b08a sub sp, #40 @ 0x28 80247f0: af00 add r7, sp, #0 80247f2: 60f8 str r0, [r7, #12] 80247f4: 460b mov r3, r1 80247f6: 607a str r2, [r7, #4] 80247f8: 72fb strb r3, [r7, #11] s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 80247fa: 230a movs r3, #10 80247fc: 843b strh r3, [r7, #32] 80247fe: 230a movs r3, #10 8024800: 847b strh r3, [r7, #34] @ 0x22 s16_t empty = ARP_TABLE_SIZE; 8024802: 230a movs r3, #10 8024804: 84bb strh r3, [r7, #36] @ 0x24 s16_t i = 0; 8024806: 2300 movs r3, #0 8024808: 84fb strh r3, [r7, #38] @ 0x26 /* oldest entry with packets on queue */ s16_t old_queue = ARP_TABLE_SIZE; 802480a: 230a movs r3, #10 802480c: 83fb strh r3, [r7, #30] /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; 802480e: 2300 movs r3, #0 8024810: 83bb strh r3, [r7, #28] 8024812: 2300 movs r3, #0 8024814: 837b strh r3, [r7, #26] 8024816: 2300 movs r3, #0 8024818: 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) { 802481a: 2300 movs r3, #0 802481c: 84fb strh r3, [r7, #38] @ 0x26 802481e: e0ae b.n 802497e u8_t state = arp_table[i].state; 8024820: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024824: 49a6 ldr r1, [pc, #664] @ (8024ac0 ) 8024826: 4613 mov r3, r2 8024828: 005b lsls r3, r3, #1 802482a: 4413 add r3, r2 802482c: 00db lsls r3, r3, #3 802482e: 440b add r3, r1 8024830: 3314 adds r3, #20 8024832: 781b ldrb r3, [r3, #0] 8024834: 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)) { 8024836: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 802483a: 2b0a cmp r3, #10 802483c: d105 bne.n 802484a 802483e: 7dfb ldrb r3, [r7, #23] 8024840: 2b00 cmp r3, #0 8024842: d102 bne.n 802484a LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i)); /* remember first empty entry */ empty = i; 8024844: 8cfb ldrh r3, [r7, #38] @ 0x26 8024846: 84bb strh r3, [r7, #36] @ 0x24 8024848: e095 b.n 8024976 } else if (state != ETHARP_STATE_EMPTY) { 802484a: 7dfb ldrb r3, [r7, #23] 802484c: 2b00 cmp r3, #0 802484e: f000 8092 beq.w 8024976 LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", 8024852: 7dfb ldrb r3, [r7, #23] 8024854: 2b01 cmp r3, #1 8024856: d009 beq.n 802486c 8024858: 7dfb ldrb r3, [r7, #23] 802485a: 2b01 cmp r3, #1 802485c: d806 bhi.n 802486c 802485e: 4b99 ldr r3, [pc, #612] @ (8024ac4 ) 8024860: f240 1223 movw r2, #291 @ 0x123 8024864: 4998 ldr r1, [pc, #608] @ (8024ac8 ) 8024866: 4899 ldr r0, [pc, #612] @ (8024acc ) 8024868: f006 f800 bl 802a86c 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) 802486c: 68fb ldr r3, [r7, #12] 802486e: 2b00 cmp r3, #0 8024870: d020 beq.n 80248b4 8024872: 68fb ldr r3, [r7, #12] 8024874: 6819 ldr r1, [r3, #0] 8024876: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 802487a: 4891 ldr r0, [pc, #580] @ (8024ac0 ) 802487c: 4613 mov r3, r2 802487e: 005b lsls r3, r3, #1 8024880: 4413 add r3, r2 8024882: 00db lsls r3, r3, #3 8024884: 4403 add r3, r0 8024886: 3304 adds r3, #4 8024888: 681b ldr r3, [r3, #0] 802488a: 4299 cmp r1, r3 802488c: d112 bne.n 80248b4 #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) 802488e: 687b ldr r3, [r7, #4] 8024890: 2b00 cmp r3, #0 8024892: d00c beq.n 80248ae 8024894: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024898: 4989 ldr r1, [pc, #548] @ (8024ac0 ) 802489a: 4613 mov r3, r2 802489c: 005b lsls r3, r3, #1 802489e: 4413 add r3, r2 80248a0: 00db lsls r3, r3, #3 80248a2: 440b add r3, r1 80248a4: 3308 adds r3, #8 80248a6: 681b ldr r3, [r3, #0] 80248a8: 687a ldr r2, [r7, #4] 80248aa: 429a cmp r2, r3 80248ac: d102 bne.n 80248b4 #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; 80248ae: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 80248b2: e100 b.n 8024ab6 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 80248b4: 7dfb ldrb r3, [r7, #23] 80248b6: 2b01 cmp r3, #1 80248b8: d140 bne.n 802493c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 80248ba: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248be: 4980 ldr r1, [pc, #512] @ (8024ac0 ) 80248c0: 4613 mov r3, r2 80248c2: 005b lsls r3, r3, #1 80248c4: 4413 add r3, r2 80248c6: 00db lsls r3, r3, #3 80248c8: 440b add r3, r1 80248ca: 681b ldr r3, [r3, #0] 80248cc: 2b00 cmp r3, #0 80248ce: d01a beq.n 8024906 if (arp_table[i].ctime >= age_queue) { 80248d0: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248d4: 497a ldr r1, [pc, #488] @ (8024ac0 ) 80248d6: 4613 mov r3, r2 80248d8: 005b lsls r3, r3, #1 80248da: 4413 add r3, r2 80248dc: 00db lsls r3, r3, #3 80248de: 440b add r3, r1 80248e0: 3312 adds r3, #18 80248e2: 881b ldrh r3, [r3, #0] 80248e4: 8bba ldrh r2, [r7, #28] 80248e6: 429a cmp r2, r3 80248e8: d845 bhi.n 8024976 old_queue = i; 80248ea: 8cfb ldrh r3, [r7, #38] @ 0x26 80248ec: 83fb strh r3, [r7, #30] age_queue = arp_table[i].ctime; 80248ee: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248f2: 4973 ldr r1, [pc, #460] @ (8024ac0 ) 80248f4: 4613 mov r3, r2 80248f6: 005b lsls r3, r3, #1 80248f8: 4413 add r3, r2 80248fa: 00db lsls r3, r3, #3 80248fc: 440b add r3, r1 80248fe: 3312 adds r3, #18 8024900: 881b ldrh r3, [r3, #0] 8024902: 83bb strh r3, [r7, #28] 8024904: e037 b.n 8024976 } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8024906: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 802490a: 496d ldr r1, [pc, #436] @ (8024ac0 ) 802490c: 4613 mov r3, r2 802490e: 005b lsls r3, r3, #1 8024910: 4413 add r3, r2 8024912: 00db lsls r3, r3, #3 8024914: 440b add r3, r1 8024916: 3312 adds r3, #18 8024918: 881b ldrh r3, [r3, #0] 802491a: 8b7a ldrh r2, [r7, #26] 802491c: 429a cmp r2, r3 802491e: d82a bhi.n 8024976 old_pending = i; 8024920: 8cfb ldrh r3, [r7, #38] @ 0x26 8024922: 843b strh r3, [r7, #32] age_pending = arp_table[i].ctime; 8024924: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024928: 4965 ldr r1, [pc, #404] @ (8024ac0 ) 802492a: 4613 mov r3, r2 802492c: 005b lsls r3, r3, #1 802492e: 4413 add r3, r2 8024930: 00db lsls r3, r3, #3 8024932: 440b add r3, r1 8024934: 3312 adds r3, #18 8024936: 881b ldrh r3, [r3, #0] 8024938: 837b strh r3, [r7, #26] 802493a: e01c b.n 8024976 } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 802493c: 7dfb ldrb r3, [r7, #23] 802493e: 2b01 cmp r3, #1 8024940: d919 bls.n 8024976 /* 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) { 8024942: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024946: 495e ldr r1, [pc, #376] @ (8024ac0 ) 8024948: 4613 mov r3, r2 802494a: 005b lsls r3, r3, #1 802494c: 4413 add r3, r2 802494e: 00db lsls r3, r3, #3 8024950: 440b add r3, r1 8024952: 3312 adds r3, #18 8024954: 881b ldrh r3, [r3, #0] 8024956: 8b3a ldrh r2, [r7, #24] 8024958: 429a cmp r2, r3 802495a: d80c bhi.n 8024976 old_stable = i; 802495c: 8cfb ldrh r3, [r7, #38] @ 0x26 802495e: 847b strh r3, [r7, #34] @ 0x22 age_stable = arp_table[i].ctime; 8024960: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024964: 4956 ldr r1, [pc, #344] @ (8024ac0 ) 8024966: 4613 mov r3, r2 8024968: 005b lsls r3, r3, #1 802496a: 4413 add r3, r2 802496c: 00db lsls r3, r3, #3 802496e: 440b add r3, r1 8024970: 3312 adds r3, #18 8024972: 881b ldrh r3, [r3, #0] 8024974: 833b strh r3, [r7, #24] for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024976: 8cfb ldrh r3, [r7, #38] @ 0x26 8024978: 3301 adds r3, #1 802497a: b29b uxth r3, r3 802497c: 84fb strh r3, [r7, #38] @ 0x26 802497e: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024982: 2b09 cmp r3, #9 8024984: f77f af4c ble.w 8024820 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8024988: 7afb ldrb r3, [r7, #11] 802498a: f003 0302 and.w r3, r3, #2 802498e: 2b00 cmp r3, #0 8024990: d108 bne.n 80249a4 8024992: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 8024996: 2b0a cmp r3, #10 8024998: d107 bne.n 80249aa /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 802499a: 7afb ldrb r3, [r7, #11] 802499c: f003 0301 and.w r3, r3, #1 80249a0: 2b00 cmp r3, #0 80249a2: d102 bne.n 80249aa 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; 80249a4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80249a8: e085 b.n 8024ab6 * * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { 80249aa: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 80249ae: 2b09 cmp r3, #9 80249b0: dc02 bgt.n 80249b8 i = empty; 80249b2: 8cbb ldrh r3, [r7, #36] @ 0x24 80249b4: 84fb strh r3, [r7, #38] @ 0x26 80249b6: e039 b.n 8024a2c 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) { 80249b8: f9b7 3022 ldrsh.w r3, [r7, #34] @ 0x22 80249bc: 2b09 cmp r3, #9 80249be: dc14 bgt.n 80249ea /* recycle oldest stable*/ i = old_stable; 80249c0: 8c7b ldrh r3, [r7, #34] @ 0x22 80249c2: 84fb strh r3, [r7, #38] @ 0x26 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); 80249c4: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80249c8: 493d ldr r1, [pc, #244] @ (8024ac0 ) 80249ca: 4613 mov r3, r2 80249cc: 005b lsls r3, r3, #1 80249ce: 4413 add r3, r2 80249d0: 00db lsls r3, r3, #3 80249d2: 440b add r3, r1 80249d4: 681b ldr r3, [r3, #0] 80249d6: 2b00 cmp r3, #0 80249d8: d018 beq.n 8024a0c 80249da: 4b3a ldr r3, [pc, #232] @ (8024ac4 ) 80249dc: f240 126d movw r2, #365 @ 0x16d 80249e0: 493b ldr r1, [pc, #236] @ (8024ad0 ) 80249e2: 483a ldr r0, [pc, #232] @ (8024acc ) 80249e4: f005 ff42 bl 802a86c 80249e8: e010 b.n 8024a0c /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 80249ea: f9b7 3020 ldrsh.w r3, [r7, #32] 80249ee: 2b09 cmp r3, #9 80249f0: dc02 bgt.n 80249f8 /* recycle oldest pending */ i = old_pending; 80249f2: 8c3b ldrh r3, [r7, #32] 80249f4: 84fb strh r3, [r7, #38] @ 0x26 80249f6: e009 b.n 8024a0c 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) { 80249f8: f9b7 301e ldrsh.w r3, [r7, #30] 80249fc: 2b09 cmp r3, #9 80249fe: dc02 bgt.n 8024a06 /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8024a00: 8bfb ldrh r3, [r7, #30] 8024a02: 84fb strh r3, [r7, #38] @ 0x26 8024a04: e002 b.n 8024a0c 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; 8024a06: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8024a0a: e054 b.n 8024ab6 } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8024a0c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a10: 2b09 cmp r3, #9 8024a12: dd06 ble.n 8024a22 8024a14: 4b2b ldr r3, [pc, #172] @ (8024ac4 ) 8024a16: f240 127f movw r2, #383 @ 0x17f 8024a1a: 492e ldr r1, [pc, #184] @ (8024ad4 ) 8024a1c: 482b ldr r0, [pc, #172] @ (8024acc ) 8024a1e: f005 ff25 bl 802a86c etharp_free_entry(i); 8024a22: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a26: 4618 mov r0, r3 8024a28: f7ff fdd8 bl 80245dc } LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8024a2c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a30: 2b09 cmp r3, #9 8024a32: dd06 ble.n 8024a42 8024a34: 4b23 ldr r3, [pc, #140] @ (8024ac4 ) 8024a36: f240 1283 movw r2, #387 @ 0x183 8024a3a: 4926 ldr r1, [pc, #152] @ (8024ad4 ) 8024a3c: 4823 ldr r0, [pc, #140] @ (8024acc ) 8024a3e: f005 ff15 bl 802a86c LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 8024a42: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024a46: 491e ldr r1, [pc, #120] @ (8024ac0 ) 8024a48: 4613 mov r3, r2 8024a4a: 005b lsls r3, r3, #1 8024a4c: 4413 add r3, r2 8024a4e: 00db lsls r3, r3, #3 8024a50: 440b add r3, r1 8024a52: 3314 adds r3, #20 8024a54: 781b ldrb r3, [r3, #0] 8024a56: 2b00 cmp r3, #0 8024a58: d006 beq.n 8024a68 8024a5a: 4b1a ldr r3, [pc, #104] @ (8024ac4 ) 8024a5c: f44f 72c2 mov.w r2, #388 @ 0x184 8024a60: 491d ldr r1, [pc, #116] @ (8024ad8 ) 8024a62: 481a ldr r0, [pc, #104] @ (8024acc ) 8024a64: f005 ff02 bl 802a86c arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 8024a68: 68fb ldr r3, [r7, #12] 8024a6a: 2b00 cmp r3, #0 8024a6c: d00b beq.n 8024a86 /* set IP address */ ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); 8024a6e: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024a72: 68fb ldr r3, [r7, #12] 8024a74: 6819 ldr r1, [r3, #0] 8024a76: 4812 ldr r0, [pc, #72] @ (8024ac0 ) 8024a78: 4613 mov r3, r2 8024a7a: 005b lsls r3, r3, #1 8024a7c: 4413 add r3, r2 8024a7e: 00db lsls r3, r3, #3 8024a80: 4403 add r3, r0 8024a82: 3304 adds r3, #4 8024a84: 6019 str r1, [r3, #0] } arp_table[i].ctime = 0; 8024a86: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024a8a: 490d ldr r1, [pc, #52] @ (8024ac0 ) 8024a8c: 4613 mov r3, r2 8024a8e: 005b lsls r3, r3, #1 8024a90: 4413 add r3, r2 8024a92: 00db lsls r3, r3, #3 8024a94: 440b add r3, r1 8024a96: 3312 adds r3, #18 8024a98: 2200 movs r2, #0 8024a9a: 801a strh r2, [r3, #0] #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; 8024a9c: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024aa0: 4907 ldr r1, [pc, #28] @ (8024ac0 ) 8024aa2: 4613 mov r3, r2 8024aa4: 005b lsls r3, r3, #1 8024aa6: 4413 add r3, r2 8024aa8: 00db lsls r3, r3, #3 8024aaa: 440b add r3, r1 8024aac: 3308 adds r3, #8 8024aae: 687a ldr r2, [r7, #4] 8024ab0: 601a str r2, [r3, #0] #endif /* ETHARP_TABLE_MATCH_NETIF */ return (s16_t)i; 8024ab2: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 } 8024ab6: 4618 mov r0, r3 8024ab8: 3728 adds r7, #40 @ 0x28 8024aba: 46bd mov sp, r7 8024abc: bd80 pop {r7, pc} 8024abe: bf00 nop 8024ac0: 2402b000 .word 0x2402b000 8024ac4: 080311f4 .word 0x080311f4 8024ac8: 0803122c .word 0x0803122c 8024acc: 0803126c .word 0x0803126c 8024ad0: 08031294 .word 0x08031294 8024ad4: 080312ac .word 0x080312ac 8024ad8: 080312c0 .word 0x080312c0 08024adc : * * @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) { 8024adc: b580 push {r7, lr} 8024ade: b088 sub sp, #32 8024ae0: af02 add r7, sp, #8 8024ae2: 60f8 str r0, [r7, #12] 8024ae4: 60b9 str r1, [r7, #8] 8024ae6: 607a str r2, [r7, #4] 8024ae8: 70fb strb r3, [r7, #3] s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 8024aea: 68fb ldr r3, [r7, #12] 8024aec: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8024af0: 2b06 cmp r3, #6 8024af2: d006 beq.n 8024b02 8024af4: 4b48 ldr r3, [pc, #288] @ (8024c18 ) 8024af6: f240 12a9 movw r2, #425 @ 0x1a9 8024afa: 4948 ldr r1, [pc, #288] @ (8024c1c ) 8024afc: 4848 ldr r0, [pc, #288] @ (8024c20 ) 8024afe: f005 feb5 bl 802a86c 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) || 8024b02: 68bb ldr r3, [r7, #8] 8024b04: 2b00 cmp r3, #0 8024b06: d012 beq.n 8024b2e 8024b08: 68bb ldr r3, [r7, #8] 8024b0a: 681b ldr r3, [r3, #0] 8024b0c: 2b00 cmp r3, #0 8024b0e: d00e beq.n 8024b2e ip4_addr_isbroadcast(ipaddr, netif) || 8024b10: 68bb ldr r3, [r7, #8] 8024b12: 681b ldr r3, [r3, #0] 8024b14: 68f9 ldr r1, [r7, #12] 8024b16: 4618 mov r0, r3 8024b18: f001 f952 bl 8025dc0 8024b1c: 4603 mov r3, r0 if (ip4_addr_isany(ipaddr) || 8024b1e: 2b00 cmp r3, #0 8024b20: d105 bne.n 8024b2e ip4_addr_ismulticast(ipaddr)) { 8024b22: 68bb ldr r3, [r7, #8] 8024b24: 681b ldr r3, [r3, #0] 8024b26: f003 03f0 and.w r3, r3, #240 @ 0xf0 ip4_addr_isbroadcast(ipaddr, netif) || 8024b2a: 2be0 cmp r3, #224 @ 0xe0 8024b2c: d102 bne.n 8024b34 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; 8024b2e: f06f 030f mvn.w r3, #15 8024b32: e06c b.n 8024c0e } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags, netif); 8024b34: 78fb ldrb r3, [r7, #3] 8024b36: 68fa ldr r2, [r7, #12] 8024b38: 4619 mov r1, r3 8024b3a: 68b8 ldr r0, [r7, #8] 8024b3c: f7ff fe56 bl 80247ec 8024b40: 4603 mov r3, r0 8024b42: 82fb strh r3, [r7, #22] /* bail out if no entry could be found */ if (i < 0) { 8024b44: f9b7 3016 ldrsh.w r3, [r7, #22] 8024b48: 2b00 cmp r3, #0 8024b4a: da02 bge.n 8024b52 return (err_t)i; 8024b4c: 8afb ldrh r3, [r7, #22] 8024b4e: b25b sxtb r3, r3 8024b50: e05d b.n 8024c0e return ERR_VAL; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8024b52: f9b7 2016 ldrsh.w r2, [r7, #22] 8024b56: 4933 ldr r1, [pc, #204] @ (8024c24 ) 8024b58: 4613 mov r3, r2 8024b5a: 005b lsls r3, r3, #1 8024b5c: 4413 add r3, r2 8024b5e: 00db lsls r3, r3, #3 8024b60: 440b add r3, r1 8024b62: 3314 adds r3, #20 8024b64: 2202 movs r2, #2 8024b66: 701a strb r2, [r3, #0] } /* record network interface */ arp_table[i].netif = netif; 8024b68: f9b7 2016 ldrsh.w r2, [r7, #22] 8024b6c: 492d ldr r1, [pc, #180] @ (8024c24 ) 8024b6e: 4613 mov r3, r2 8024b70: 005b lsls r3, r3, #1 8024b72: 4413 add r3, r2 8024b74: 00db lsls r3, r3, #3 8024b76: 440b add r3, r1 8024b78: 3308 adds r3, #8 8024b7a: 68fa ldr r2, [r7, #12] 8024b7c: 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); 8024b7e: f9b7 2016 ldrsh.w r2, [r7, #22] 8024b82: 4613 mov r3, r2 8024b84: 005b lsls r3, r3, #1 8024b86: 4413 add r3, r2 8024b88: 00db lsls r3, r3, #3 8024b8a: 3308 adds r3, #8 8024b8c: 4a25 ldr r2, [pc, #148] @ (8024c24 ) 8024b8e: 4413 add r3, r2 8024b90: 3304 adds r3, #4 8024b92: 2206 movs r2, #6 8024b94: 6879 ldr r1, [r7, #4] 8024b96: 4618 mov r0, r3 8024b98: f006 f8f1 bl 802ad7e /* reset time stamp */ arp_table[i].ctime = 0; 8024b9c: f9b7 2016 ldrsh.w r2, [r7, #22] 8024ba0: 4920 ldr r1, [pc, #128] @ (8024c24 ) 8024ba2: 4613 mov r3, r2 8024ba4: 005b lsls r3, r3, #1 8024ba6: 4413 add r3, r2 8024ba8: 00db lsls r3, r3, #3 8024baa: 440b add r3, r1 8024bac: 3312 adds r3, #18 8024bae: 2200 movs r2, #0 8024bb0: 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) { 8024bb2: f9b7 2016 ldrsh.w r2, [r7, #22] 8024bb6: 491b ldr r1, [pc, #108] @ (8024c24 ) 8024bb8: 4613 mov r3, r2 8024bba: 005b lsls r3, r3, #1 8024bbc: 4413 add r3, r2 8024bbe: 00db lsls r3, r3, #3 8024bc0: 440b add r3, r1 8024bc2: 681b ldr r3, [r3, #0] 8024bc4: 2b00 cmp r3, #0 8024bc6: d021 beq.n 8024c0c struct pbuf *p = arp_table[i].q; 8024bc8: f9b7 2016 ldrsh.w r2, [r7, #22] 8024bcc: 4915 ldr r1, [pc, #84] @ (8024c24 ) 8024bce: 4613 mov r3, r2 8024bd0: 005b lsls r3, r3, #1 8024bd2: 4413 add r3, r2 8024bd4: 00db lsls r3, r3, #3 8024bd6: 440b add r3, r1 8024bd8: 681b ldr r3, [r3, #0] 8024bda: 613b str r3, [r7, #16] arp_table[i].q = NULL; 8024bdc: f9b7 2016 ldrsh.w r2, [r7, #22] 8024be0: 4910 ldr r1, [pc, #64] @ (8024c24 ) 8024be2: 4613 mov r3, r2 8024be4: 005b lsls r3, r3, #1 8024be6: 4413 add r3, r2 8024be8: 00db lsls r3, r3, #3 8024bea: 440b add r3, r1 8024bec: 2200 movs r2, #0 8024bee: 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); 8024bf0: 68fb ldr r3, [r7, #12] 8024bf2: f103 022a add.w r2, r3, #42 @ 0x2a 8024bf6: f44f 6300 mov.w r3, #2048 @ 0x800 8024bfa: 9300 str r3, [sp, #0] 8024bfc: 687b ldr r3, [r7, #4] 8024bfe: 6939 ldr r1, [r7, #16] 8024c00: 68f8 ldr r0, [r7, #12] 8024c02: f002 f9bb bl 8026f7c /* free the queued IP packet */ pbuf_free(p); 8024c06: 6938 ldr r0, [r7, #16] 8024c08: f7f6 fbb8 bl 801b37c } return ERR_OK; 8024c0c: 2300 movs r3, #0 } 8024c0e: 4618 mov r0, r3 8024c10: 3718 adds r7, #24 8024c12: 46bd mov sp, r7 8024c14: bd80 pop {r7, pc} 8024c16: bf00 nop 8024c18: 080311f4 .word 0x080311f4 8024c1c: 080312ec .word 0x080312ec 8024c20: 0803126c .word 0x0803126c 8024c24: 2402b000 .word 0x2402b000 08024c28 : * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8024c28: b580 push {r7, lr} 8024c2a: b084 sub sp, #16 8024c2c: af00 add r7, sp, #0 8024c2e: 6078 str r0, [r7, #4] int i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024c30: 2300 movs r3, #0 8024c32: 60fb str r3, [r7, #12] 8024c34: e01e b.n 8024c74 u8_t state = arp_table[i].state; 8024c36: 4913 ldr r1, [pc, #76] @ (8024c84 ) 8024c38: 68fa ldr r2, [r7, #12] 8024c3a: 4613 mov r3, r2 8024c3c: 005b lsls r3, r3, #1 8024c3e: 4413 add r3, r2 8024c40: 00db lsls r3, r3, #3 8024c42: 440b add r3, r1 8024c44: 3314 adds r3, #20 8024c46: 781b ldrb r3, [r3, #0] 8024c48: 72fb strb r3, [r7, #11] if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 8024c4a: 7afb ldrb r3, [r7, #11] 8024c4c: 2b00 cmp r3, #0 8024c4e: d00e beq.n 8024c6e 8024c50: 490c ldr r1, [pc, #48] @ (8024c84 ) 8024c52: 68fa ldr r2, [r7, #12] 8024c54: 4613 mov r3, r2 8024c56: 005b lsls r3, r3, #1 8024c58: 4413 add r3, r2 8024c5a: 00db lsls r3, r3, #3 8024c5c: 440b add r3, r1 8024c5e: 3308 adds r3, #8 8024c60: 681b ldr r3, [r3, #0] 8024c62: 687a ldr r2, [r7, #4] 8024c64: 429a cmp r2, r3 8024c66: d102 bne.n 8024c6e etharp_free_entry(i); 8024c68: 68f8 ldr r0, [r7, #12] 8024c6a: f7ff fcb7 bl 80245dc for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024c6e: 68fb ldr r3, [r7, #12] 8024c70: 3301 adds r3, #1 8024c72: 60fb str r3, [r7, #12] 8024c74: 68fb ldr r3, [r7, #12] 8024c76: 2b09 cmp r3, #9 8024c78: dddd ble.n 8024c36 } } } 8024c7a: bf00 nop 8024c7c: bf00 nop 8024c7e: 3710 adds r7, #16 8024c80: 46bd mov sp, r7 8024c82: bd80 pop {r7, pc} 8024c84: 2402b000 .word 0x2402b000 08024c88 : * * @see pbuf_free() */ void etharp_input(struct pbuf *p, struct netif *netif) { 8024c88: b5b0 push {r4, r5, r7, lr} 8024c8a: b08a sub sp, #40 @ 0x28 8024c8c: af04 add r7, sp, #16 8024c8e: 6078 str r0, [r7, #4] 8024c90: 6039 str r1, [r7, #0] struct etharp_hdr *hdr; /* these are aligned properly, whereas the ARP header fields might not be */ ip4_addr_t sipaddr, dipaddr; u8_t for_us; LWIP_ASSERT_CORE_LOCKED(); 8024c92: f7ec f9c3 bl 801101c LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8024c96: 683b ldr r3, [r7, #0] 8024c98: 2b00 cmp r3, #0 8024c9a: d107 bne.n 8024cac 8024c9c: 4b3f ldr r3, [pc, #252] @ (8024d9c ) 8024c9e: f240 228a movw r2, #650 @ 0x28a 8024ca2: 493f ldr r1, [pc, #252] @ (8024da0 ) 8024ca4: 483f ldr r0, [pc, #252] @ (8024da4 ) 8024ca6: f005 fde1 bl 802a86c 8024caa: e074 b.n 8024d96 hdr = (struct etharp_hdr *)p->payload; 8024cac: 687b ldr r3, [r7, #4] 8024cae: 685b ldr r3, [r3, #4] 8024cb0: 617b str r3, [r7, #20] /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8024cb2: 697b ldr r3, [r7, #20] 8024cb4: 881b ldrh r3, [r3, #0] 8024cb6: b29b uxth r3, r3 8024cb8: f5b3 7f80 cmp.w r3, #256 @ 0x100 8024cbc: d10c bne.n 8024cd8 (hdr->hwlen != ETH_HWADDR_LEN) || 8024cbe: 697b ldr r3, [r7, #20] 8024cc0: 791b ldrb r3, [r3, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8024cc2: 2b06 cmp r3, #6 8024cc4: d108 bne.n 8024cd8 (hdr->protolen != sizeof(ip4_addr_t)) || 8024cc6: 697b ldr r3, [r7, #20] 8024cc8: 795b ldrb r3, [r3, #5] (hdr->hwlen != ETH_HWADDR_LEN) || 8024cca: 2b04 cmp r3, #4 8024ccc: d104 bne.n 8024cd8 (hdr->proto != PP_HTONS(ETHTYPE_IP))) { 8024cce: 697b ldr r3, [r7, #20] 8024cd0: 885b ldrh r3, [r3, #2] 8024cd2: b29b uxth r3, r3 (hdr->protolen != sizeof(ip4_addr_t)) || 8024cd4: 2b08 cmp r3, #8 8024cd6: d003 beq.n 8024ce0 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); 8024cd8: 6878 ldr r0, [r7, #4] 8024cda: f7f6 fb4f bl 801b37c return; 8024cde: e05a b.n 8024d96 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); 8024ce0: 697b ldr r3, [r7, #20] 8024ce2: 330e adds r3, #14 8024ce4: 681b ldr r3, [r3, #0] 8024ce6: 60fb str r3, [r7, #12] IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); 8024ce8: 697b ldr r3, [r7, #20] 8024cea: 3318 adds r3, #24 8024cec: 681b ldr r3, [r3, #0] 8024cee: 60bb str r3, [r7, #8] /* this interface is not configured? */ if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { 8024cf0: 683b ldr r3, [r7, #0] 8024cf2: 3304 adds r3, #4 8024cf4: 681b ldr r3, [r3, #0] 8024cf6: 2b00 cmp r3, #0 8024cf8: d102 bne.n 8024d00 for_us = 0; 8024cfa: 2300 movs r3, #0 8024cfc: 74fb strb r3, [r7, #19] 8024cfe: e009 b.n 8024d14 } else { /* ARP packet directed to us? */ for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); 8024d00: 68ba ldr r2, [r7, #8] 8024d02: 683b ldr r3, [r7, #0] 8024d04: 3304 adds r3, #4 8024d06: 681b ldr r3, [r3, #0] 8024d08: 429a cmp r2, r3 8024d0a: bf0c ite eq 8024d0c: 2301 moveq r3, #1 8024d0e: 2300 movne r3, #0 8024d10: b2db uxtb r3, r3 8024d12: 74fb strb r3, [r7, #19] /* 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), 8024d14: 697b ldr r3, [r7, #20] 8024d16: f103 0208 add.w r2, r3, #8 8024d1a: 7cfb ldrb r3, [r7, #19] 8024d1c: 2b00 cmp r3, #0 8024d1e: d001 beq.n 8024d24 8024d20: 2301 movs r3, #1 8024d22: e000 b.n 8024d26 8024d24: 2302 movs r3, #2 8024d26: f107 010c add.w r1, r7, #12 8024d2a: 6838 ldr r0, [r7, #0] 8024d2c: f7ff fed6 bl 8024adc for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 8024d30: 697b ldr r3, [r7, #20] 8024d32: 88db ldrh r3, [r3, #6] 8024d34: b29b uxth r3, r3 8024d36: f5b3 7f80 cmp.w r3, #256 @ 0x100 8024d3a: d003 beq.n 8024d44 8024d3c: f5b3 7f00 cmp.w r3, #512 @ 0x200 8024d40: d01e beq.n 8024d80 #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; 8024d42: e025 b.n 8024d90 if (for_us) { 8024d44: 7cfb ldrb r3, [r7, #19] 8024d46: 2b00 cmp r3, #0 8024d48: d021 beq.n 8024d8e (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, 8024d4a: 683b ldr r3, [r7, #0] 8024d4c: f103 002a add.w r0, r3, #42 @ 0x2a 8024d50: 697b ldr r3, [r7, #20] 8024d52: f103 0408 add.w r4, r3, #8 (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), 8024d56: 683b ldr r3, [r7, #0] 8024d58: f103 052a add.w r5, r3, #42 @ 0x2a 8024d5c: 683b ldr r3, [r7, #0] 8024d5e: 3304 adds r3, #4 &hdr->shwaddr, &sipaddr, 8024d60: 697a ldr r2, [r7, #20] 8024d62: 3208 adds r2, #8 etharp_raw(netif, 8024d64: 2102 movs r1, #2 8024d66: 9103 str r1, [sp, #12] 8024d68: f107 010c add.w r1, r7, #12 8024d6c: 9102 str r1, [sp, #8] 8024d6e: 9201 str r2, [sp, #4] 8024d70: 9300 str r3, [sp, #0] 8024d72: 462b mov r3, r5 8024d74: 4622 mov r2, r4 8024d76: 4601 mov r1, r0 8024d78: 6838 ldr r0, [r7, #0] 8024d7a: f000 faf1 bl 8025360 break; 8024d7e: e006 b.n 8024d8e dhcp_arp_reply(netif, &sipaddr); 8024d80: f107 030c add.w r3, r7, #12 8024d84: 4619 mov r1, r3 8024d86: 6838 ldr r0, [r7, #0] 8024d88: f7fe f9b6 bl 80230f8 break; 8024d8c: e000 b.n 8024d90 break; 8024d8e: bf00 nop } /* free ARP packet */ pbuf_free(p); 8024d90: 6878 ldr r0, [r7, #4] 8024d92: f7f6 faf3 bl 801b37c } 8024d96: 3718 adds r7, #24 8024d98: 46bd mov sp, r7 8024d9a: bdb0 pop {r4, r5, r7, pc} 8024d9c: 080311f4 .word 0x080311f4 8024da0: 08031344 .word 0x08031344 8024da4: 0803126c .word 0x0803126c 08024da8 : /** 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) { 8024da8: b580 push {r7, lr} 8024daa: b086 sub sp, #24 8024dac: af02 add r7, sp, #8 8024dae: 60f8 str r0, [r7, #12] 8024db0: 60b9 str r1, [r7, #8] 8024db2: 4613 mov r3, r2 8024db4: 71fb strb r3, [r7, #7] LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 8024db6: 79fa ldrb r2, [r7, #7] 8024db8: 4944 ldr r1, [pc, #272] @ (8024ecc ) 8024dba: 4613 mov r3, r2 8024dbc: 005b lsls r3, r3, #1 8024dbe: 4413 add r3, r2 8024dc0: 00db lsls r3, r3, #3 8024dc2: 440b add r3, r1 8024dc4: 3314 adds r3, #20 8024dc6: 781b ldrb r3, [r3, #0] 8024dc8: 2b01 cmp r3, #1 8024dca: d806 bhi.n 8024dda 8024dcc: 4b40 ldr r3, [pc, #256] @ (8024ed0 ) 8024dce: f240 22ee movw r2, #750 @ 0x2ee 8024dd2: 4940 ldr r1, [pc, #256] @ (8024ed4 ) 8024dd4: 4840 ldr r0, [pc, #256] @ (8024ed8 ) 8024dd6: f005 fd49 bl 802a86c 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) { 8024dda: 79fa ldrb r2, [r7, #7] 8024ddc: 493b ldr r1, [pc, #236] @ (8024ecc ) 8024dde: 4613 mov r3, r2 8024de0: 005b lsls r3, r3, #1 8024de2: 4413 add r3, r2 8024de4: 00db lsls r3, r3, #3 8024de6: 440b add r3, r1 8024de8: 3314 adds r3, #20 8024dea: 781b ldrb r3, [r3, #0] 8024dec: 2b02 cmp r3, #2 8024dee: d153 bne.n 8024e98 if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { 8024df0: 79fa ldrb r2, [r7, #7] 8024df2: 4936 ldr r1, [pc, #216] @ (8024ecc ) 8024df4: 4613 mov r3, r2 8024df6: 005b lsls r3, r3, #1 8024df8: 4413 add r3, r2 8024dfa: 00db lsls r3, r3, #3 8024dfc: 440b add r3, r1 8024dfe: 3312 adds r3, #18 8024e00: 881b ldrh r3, [r3, #0] 8024e02: f5b3 7f8e cmp.w r3, #284 @ 0x11c 8024e06: d919 bls.n 8024e3c /* issue a standard request using broadcast */ if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8024e08: 79fa ldrb r2, [r7, #7] 8024e0a: 4613 mov r3, r2 8024e0c: 005b lsls r3, r3, #1 8024e0e: 4413 add r3, r2 8024e10: 00db lsls r3, r3, #3 8024e12: 4a2e ldr r2, [pc, #184] @ (8024ecc ) 8024e14: 4413 add r3, r2 8024e16: 3304 adds r3, #4 8024e18: 4619 mov r1, r3 8024e1a: 68f8 ldr r0, [r7, #12] 8024e1c: f000 fb4e bl 80254bc 8024e20: 4603 mov r3, r0 8024e22: 2b00 cmp r3, #0 8024e24: d138 bne.n 8024e98 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8024e26: 79fa ldrb r2, [r7, #7] 8024e28: 4928 ldr r1, [pc, #160] @ (8024ecc ) 8024e2a: 4613 mov r3, r2 8024e2c: 005b lsls r3, r3, #1 8024e2e: 4413 add r3, r2 8024e30: 00db lsls r3, r3, #3 8024e32: 440b add r3, r1 8024e34: 3314 adds r3, #20 8024e36: 2203 movs r2, #3 8024e38: 701a strb r2, [r3, #0] 8024e3a: e02d b.n 8024e98 } } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { 8024e3c: 79fa ldrb r2, [r7, #7] 8024e3e: 4923 ldr r1, [pc, #140] @ (8024ecc ) 8024e40: 4613 mov r3, r2 8024e42: 005b lsls r3, r3, #1 8024e44: 4413 add r3, r2 8024e46: 00db lsls r3, r3, #3 8024e48: 440b add r3, r1 8024e4a: 3312 adds r3, #18 8024e4c: 881b ldrh r3, [r3, #0] 8024e4e: f5b3 7f87 cmp.w r3, #270 @ 0x10e 8024e52: d321 bcc.n 8024e98 /* 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) { 8024e54: 79fa ldrb r2, [r7, #7] 8024e56: 4613 mov r3, r2 8024e58: 005b lsls r3, r3, #1 8024e5a: 4413 add r3, r2 8024e5c: 00db lsls r3, r3, #3 8024e5e: 4a1b ldr r2, [pc, #108] @ (8024ecc ) 8024e60: 4413 add r3, r2 8024e62: 1d19 adds r1, r3, #4 8024e64: 79fa ldrb r2, [r7, #7] 8024e66: 4613 mov r3, r2 8024e68: 005b lsls r3, r3, #1 8024e6a: 4413 add r3, r2 8024e6c: 00db lsls r3, r3, #3 8024e6e: 3308 adds r3, #8 8024e70: 4a16 ldr r2, [pc, #88] @ (8024ecc ) 8024e72: 4413 add r3, r2 8024e74: 3304 adds r3, #4 8024e76: 461a mov r2, r3 8024e78: 68f8 ldr r0, [r7, #12] 8024e7a: f000 fafd bl 8025478 8024e7e: 4603 mov r3, r0 8024e80: 2b00 cmp r3, #0 8024e82: d109 bne.n 8024e98 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8024e84: 79fa ldrb r2, [r7, #7] 8024e86: 4911 ldr r1, [pc, #68] @ (8024ecc ) 8024e88: 4613 mov r3, r2 8024e8a: 005b lsls r3, r3, #1 8024e8c: 4413 add r3, r2 8024e8e: 00db lsls r3, r3, #3 8024e90: 440b add r3, r1 8024e92: 3314 adds r3, #20 8024e94: 2203 movs r2, #3 8024e96: 701a strb r2, [r3, #0] } } } return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); 8024e98: 68fb ldr r3, [r7, #12] 8024e9a: f103 012a add.w r1, r3, #42 @ 0x2a 8024e9e: 79fa ldrb r2, [r7, #7] 8024ea0: 4613 mov r3, r2 8024ea2: 005b lsls r3, r3, #1 8024ea4: 4413 add r3, r2 8024ea6: 00db lsls r3, r3, #3 8024ea8: 3308 adds r3, #8 8024eaa: 4a08 ldr r2, [pc, #32] @ (8024ecc ) 8024eac: 4413 add r3, r2 8024eae: 3304 adds r3, #4 8024eb0: f44f 6200 mov.w r2, #2048 @ 0x800 8024eb4: 9200 str r2, [sp, #0] 8024eb6: 460a mov r2, r1 8024eb8: 68b9 ldr r1, [r7, #8] 8024eba: 68f8 ldr r0, [r7, #12] 8024ebc: f002 f85e bl 8026f7c 8024ec0: 4603 mov r3, r0 } 8024ec2: 4618 mov r0, r3 8024ec4: 3710 adds r7, #16 8024ec6: 46bd mov sp, r7 8024ec8: bd80 pop {r7, pc} 8024eca: bf00 nop 8024ecc: 2402b000 .word 0x2402b000 8024ed0: 080311f4 .word 0x080311f4 8024ed4: 08031364 .word 0x08031364 8024ed8: 0803126c .word 0x0803126c 08024edc : * - 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) { 8024edc: b580 push {r7, lr} 8024ede: b08a sub sp, #40 @ 0x28 8024ee0: af02 add r7, sp, #8 8024ee2: 60f8 str r0, [r7, #12] 8024ee4: 60b9 str r1, [r7, #8] 8024ee6: 607a str r2, [r7, #4] const struct eth_addr *dest; struct eth_addr mcastaddr; const ip4_addr_t *dst_addr = ipaddr; 8024ee8: 687b ldr r3, [r7, #4] 8024eea: 61bb str r3, [r7, #24] LWIP_ASSERT_CORE_LOCKED(); 8024eec: f7ec f896 bl 801101c LWIP_ASSERT("netif != NULL", netif != NULL); 8024ef0: 68fb ldr r3, [r7, #12] 8024ef2: 2b00 cmp r3, #0 8024ef4: d106 bne.n 8024f04 8024ef6: 4b73 ldr r3, [pc, #460] @ (80250c4 ) 8024ef8: f240 321e movw r2, #798 @ 0x31e 8024efc: 4972 ldr r1, [pc, #456] @ (80250c8 ) 8024efe: 4873 ldr r0, [pc, #460] @ (80250cc ) 8024f00: f005 fcb4 bl 802a86c LWIP_ASSERT("q != NULL", q != NULL); 8024f04: 68bb ldr r3, [r7, #8] 8024f06: 2b00 cmp r3, #0 8024f08: d106 bne.n 8024f18 8024f0a: 4b6e ldr r3, [pc, #440] @ (80250c4 ) 8024f0c: f240 321f movw r2, #799 @ 0x31f 8024f10: 496f ldr r1, [pc, #444] @ (80250d0 ) 8024f12: 486e ldr r0, [pc, #440] @ (80250cc ) 8024f14: f005 fcaa bl 802a86c LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 8024f18: 687b ldr r3, [r7, #4] 8024f1a: 2b00 cmp r3, #0 8024f1c: d106 bne.n 8024f2c 8024f1e: 4b69 ldr r3, [pc, #420] @ (80250c4 ) 8024f20: f44f 7248 mov.w r2, #800 @ 0x320 8024f24: 496b ldr r1, [pc, #428] @ (80250d4 ) 8024f26: 4869 ldr r0, [pc, #420] @ (80250cc ) 8024f28: f005 fca0 bl 802a86c /* 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)) { 8024f2c: 687b ldr r3, [r7, #4] 8024f2e: 681b ldr r3, [r3, #0] 8024f30: 68f9 ldr r1, [r7, #12] 8024f32: 4618 mov r0, r3 8024f34: f000 ff44 bl 8025dc0 8024f38: 4603 mov r3, r0 8024f3a: 2b00 cmp r3, #0 8024f3c: d002 beq.n 8024f44 /* broadcast on Ethernet also */ dest = (const struct eth_addr *)ðbroadcast; 8024f3e: 4b66 ldr r3, [pc, #408] @ (80250d8 ) 8024f40: 61fb str r3, [r7, #28] 8024f42: e0af b.n 80250a4 /* multicast destination IP address? */ } else if (ip4_addr_ismulticast(ipaddr)) { 8024f44: 687b ldr r3, [r7, #4] 8024f46: 681b ldr r3, [r3, #0] 8024f48: f003 03f0 and.w r3, r3, #240 @ 0xf0 8024f4c: 2be0 cmp r3, #224 @ 0xe0 8024f4e: d118 bne.n 8024f82 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; 8024f50: 2301 movs r3, #1 8024f52: 743b strb r3, [r7, #16] mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; 8024f54: 2300 movs r3, #0 8024f56: 747b strb r3, [r7, #17] mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; 8024f58: 235e movs r3, #94 @ 0x5e 8024f5a: 74bb strb r3, [r7, #18] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8024f5c: 687b ldr r3, [r7, #4] 8024f5e: 3301 adds r3, #1 8024f60: 781b ldrb r3, [r3, #0] 8024f62: f003 037f and.w r3, r3, #127 @ 0x7f 8024f66: b2db uxtb r3, r3 8024f68: 74fb strb r3, [r7, #19] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8024f6a: 687b ldr r3, [r7, #4] 8024f6c: 3302 adds r3, #2 8024f6e: 781b ldrb r3, [r3, #0] 8024f70: 753b strb r3, [r7, #20] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8024f72: 687b ldr r3, [r7, #4] 8024f74: 3303 adds r3, #3 8024f76: 781b ldrb r3, [r3, #0] 8024f78: 757b strb r3, [r7, #21] /* destination Ethernet address is multicast */ dest = &mcastaddr; 8024f7a: f107 0310 add.w r3, r7, #16 8024f7e: 61fb str r3, [r7, #28] 8024f80: e090 b.n 80250a4 /* 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)) && 8024f82: 687b ldr r3, [r7, #4] 8024f84: 681a ldr r2, [r3, #0] 8024f86: 68fb ldr r3, [r7, #12] 8024f88: 3304 adds r3, #4 8024f8a: 681b ldr r3, [r3, #0] 8024f8c: 405a eors r2, r3 8024f8e: 68fb ldr r3, [r7, #12] 8024f90: 3308 adds r3, #8 8024f92: 681b ldr r3, [r3, #0] 8024f94: 4013 ands r3, r2 8024f96: 2b00 cmp r3, #0 8024f98: d012 beq.n 8024fc0 !ip4_addr_islinklocal(ipaddr)) { 8024f9a: 687b ldr r3, [r7, #4] 8024f9c: 681b ldr r3, [r3, #0] 8024f9e: b29b uxth r3, r3 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 8024fa0: f64f 62a9 movw r2, #65193 @ 0xfea9 8024fa4: 4293 cmp r3, r2 8024fa6: d00b beq.n 8024fc0 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))) { 8024fa8: 68fb ldr r3, [r7, #12] 8024faa: 330c adds r3, #12 8024fac: 681b ldr r3, [r3, #0] 8024fae: 2b00 cmp r3, #0 8024fb0: d003 beq.n 8024fba /* send to hardware address of default gateway IP address */ dst_addr = netif_ip4_gw(netif); 8024fb2: 68fb ldr r3, [r7, #12] 8024fb4: 330c adds r3, #12 8024fb6: 61bb str r3, [r7, #24] 8024fb8: e002 b.n 8024fc0 /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 8024fba: f06f 0303 mvn.w r3, #3 8024fbe: e07d b.n 80250bc 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) && 8024fc0: 4b46 ldr r3, [pc, #280] @ (80250dc ) 8024fc2: 781b ldrb r3, [r3, #0] 8024fc4: 4619 mov r1, r3 8024fc6: 4a46 ldr r2, [pc, #280] @ (80250e0 ) 8024fc8: 460b mov r3, r1 8024fca: 005b lsls r3, r3, #1 8024fcc: 440b add r3, r1 8024fce: 00db lsls r3, r3, #3 8024fd0: 4413 add r3, r2 8024fd2: 3314 adds r3, #20 8024fd4: 781b ldrb r3, [r3, #0] 8024fd6: 2b01 cmp r3, #1 8024fd8: d925 bls.n 8025026 #if ETHARP_TABLE_MATCH_NETIF (arp_table[etharp_cached_entry].netif == netif) && 8024fda: 4b40 ldr r3, [pc, #256] @ (80250dc ) 8024fdc: 781b ldrb r3, [r3, #0] 8024fde: 4619 mov r1, r3 8024fe0: 4a3f ldr r2, [pc, #252] @ (80250e0 ) 8024fe2: 460b mov r3, r1 8024fe4: 005b lsls r3, r3, #1 8024fe6: 440b add r3, r1 8024fe8: 00db lsls r3, r3, #3 8024fea: 4413 add r3, r2 8024fec: 3308 adds r3, #8 8024fee: 681b ldr r3, [r3, #0] if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8024ff0: 68fa ldr r2, [r7, #12] 8024ff2: 429a cmp r2, r3 8024ff4: d117 bne.n 8025026 #endif (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { 8024ff6: 69bb ldr r3, [r7, #24] 8024ff8: 681a ldr r2, [r3, #0] 8024ffa: 4b38 ldr r3, [pc, #224] @ (80250dc ) 8024ffc: 781b ldrb r3, [r3, #0] 8024ffe: 4618 mov r0, r3 8025000: 4937 ldr r1, [pc, #220] @ (80250e0 ) 8025002: 4603 mov r3, r0 8025004: 005b lsls r3, r3, #1 8025006: 4403 add r3, r0 8025008: 00db lsls r3, r3, #3 802500a: 440b add r3, r1 802500c: 3304 adds r3, #4 802500e: 681b ldr r3, [r3, #0] (arp_table[etharp_cached_entry].netif == netif) && 8025010: 429a cmp r2, r3 8025012: d108 bne.n 8025026 /* 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); 8025014: 4b31 ldr r3, [pc, #196] @ (80250dc ) 8025016: 781b ldrb r3, [r3, #0] 8025018: 461a mov r2, r3 802501a: 68b9 ldr r1, [r7, #8] 802501c: 68f8 ldr r0, [r7, #12] 802501e: f7ff fec3 bl 8024da8 8025022: 4603 mov r3, r0 8025024: e04a b.n 80250bc } #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++) { 8025026: 2300 movs r3, #0 8025028: 75fb strb r3, [r7, #23] 802502a: e031 b.n 8025090 if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 802502c: 7dfa ldrb r2, [r7, #23] 802502e: 492c ldr r1, [pc, #176] @ (80250e0 ) 8025030: 4613 mov r3, r2 8025032: 005b lsls r3, r3, #1 8025034: 4413 add r3, r2 8025036: 00db lsls r3, r3, #3 8025038: 440b add r3, r1 802503a: 3314 adds r3, #20 802503c: 781b ldrb r3, [r3, #0] 802503e: 2b01 cmp r3, #1 8025040: d923 bls.n 802508a #if ETHARP_TABLE_MATCH_NETIF (arp_table[i].netif == netif) && 8025042: 7dfa ldrb r2, [r7, #23] 8025044: 4926 ldr r1, [pc, #152] @ (80250e0 ) 8025046: 4613 mov r3, r2 8025048: 005b lsls r3, r3, #1 802504a: 4413 add r3, r2 802504c: 00db lsls r3, r3, #3 802504e: 440b add r3, r1 8025050: 3308 adds r3, #8 8025052: 681b ldr r3, [r3, #0] if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 8025054: 68fa ldr r2, [r7, #12] 8025056: 429a cmp r2, r3 8025058: d117 bne.n 802508a #endif (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { 802505a: 69bb ldr r3, [r7, #24] 802505c: 6819 ldr r1, [r3, #0] 802505e: 7dfa ldrb r2, [r7, #23] 8025060: 481f ldr r0, [pc, #124] @ (80250e0 ) 8025062: 4613 mov r3, r2 8025064: 005b lsls r3, r3, #1 8025066: 4413 add r3, r2 8025068: 00db lsls r3, r3, #3 802506a: 4403 add r3, r0 802506c: 3304 adds r3, #4 802506e: 681b ldr r3, [r3, #0] (arp_table[i].netif == netif) && 8025070: 4299 cmp r1, r3 8025072: d10a bne.n 802508a /* found an existing, stable entry */ ETHARP_SET_ADDRHINT(netif, i); 8025074: 4a19 ldr r2, [pc, #100] @ (80250dc ) 8025076: 7dfb ldrb r3, [r7, #23] 8025078: 7013 strb r3, [r2, #0] return etharp_output_to_arp_index(netif, q, i); 802507a: 7dfb ldrb r3, [r7, #23] 802507c: 461a mov r2, r3 802507e: 68b9 ldr r1, [r7, #8] 8025080: 68f8 ldr r0, [r7, #12] 8025082: f7ff fe91 bl 8024da8 8025086: 4603 mov r3, r0 8025088: e018 b.n 80250bc for (i = 0; i < ARP_TABLE_SIZE; i++) { 802508a: 7dfb ldrb r3, [r7, #23] 802508c: 3301 adds r3, #1 802508e: 75fb strb r3, [r7, #23] 8025090: 7dfb ldrb r3, [r7, #23] 8025092: 2b09 cmp r3, #9 8025094: d9ca bls.n 802502c } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 8025096: 68ba ldr r2, [r7, #8] 8025098: 69b9 ldr r1, [r7, #24] 802509a: 68f8 ldr r0, [r7, #12] 802509c: f000 f822 bl 80250e4 80250a0: 4603 mov r3, r0 80250a2: e00b b.n 80250bc } /* 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); 80250a4: 68fb ldr r3, [r7, #12] 80250a6: f103 022a add.w r2, r3, #42 @ 0x2a 80250aa: f44f 6300 mov.w r3, #2048 @ 0x800 80250ae: 9300 str r3, [sp, #0] 80250b0: 69fb ldr r3, [r7, #28] 80250b2: 68b9 ldr r1, [r7, #8] 80250b4: 68f8 ldr r0, [r7, #12] 80250b6: f001 ff61 bl 8026f7c 80250ba: 4603 mov r3, r0 } 80250bc: 4618 mov r0, r3 80250be: 3720 adds r7, #32 80250c0: 46bd mov sp, r7 80250c2: bd80 pop {r7, pc} 80250c4: 080311f4 .word 0x080311f4 80250c8: 08031344 .word 0x08031344 80250cc: 0803126c .word 0x0803126c 80250d0: 08031394 .word 0x08031394 80250d4: 08031334 .word 0x08031334 80250d8: 08031c80 .word 0x08031c80 80250dc: 2402b0f0 .word 0x2402b0f0 80250e0: 2402b000 .word 0x2402b000 080250e4 : * - 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) { 80250e4: b580 push {r7, lr} 80250e6: b08c sub sp, #48 @ 0x30 80250e8: af02 add r7, sp, #8 80250ea: 60f8 str r0, [r7, #12] 80250ec: 60b9 str r1, [r7, #8] 80250ee: 607a str r2, [r7, #4] struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; 80250f0: 68fb ldr r3, [r7, #12] 80250f2: 332a adds r3, #42 @ 0x2a 80250f4: 617b str r3, [r7, #20] err_t result = ERR_MEM; 80250f6: 23ff movs r3, #255 @ 0xff 80250f8: f887 3027 strb.w r3, [r7, #39] @ 0x27 int is_new_entry = 0; 80250fc: 2300 movs r3, #0 80250fe: 623b str r3, [r7, #32] s16_t i_err; netif_addr_idx_t i; /* non-unicast address? */ if (ip4_addr_isbroadcast(ipaddr, netif) || 8025100: 68bb ldr r3, [r7, #8] 8025102: 681b ldr r3, [r3, #0] 8025104: 68f9 ldr r1, [r7, #12] 8025106: 4618 mov r0, r3 8025108: f000 fe5a bl 8025dc0 802510c: 4603 mov r3, r0 802510e: 2b00 cmp r3, #0 8025110: d10c bne.n 802512c ip4_addr_ismulticast(ipaddr) || 8025112: 68bb ldr r3, [r7, #8] 8025114: 681b ldr r3, [r3, #0] 8025116: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isbroadcast(ipaddr, netif) || 802511a: 2be0 cmp r3, #224 @ 0xe0 802511c: d006 beq.n 802512c ip4_addr_ismulticast(ipaddr) || 802511e: 68bb ldr r3, [r7, #8] 8025120: 2b00 cmp r3, #0 8025122: d003 beq.n 802512c ip4_addr_isany(ipaddr)) { 8025124: 68bb ldr r3, [r7, #8] 8025126: 681b ldr r3, [r3, #0] 8025128: 2b00 cmp r3, #0 802512a: d102 bne.n 8025132 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 802512c: f06f 030f mvn.w r3, #15 8025130: e101 b.n 8025336 } /* find entry in ARP cache, ask to create entry if queueing packet */ i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); 8025132: 68fa ldr r2, [r7, #12] 8025134: 2101 movs r1, #1 8025136: 68b8 ldr r0, [r7, #8] 8025138: f7ff fb58 bl 80247ec 802513c: 4603 mov r3, r0 802513e: 827b strh r3, [r7, #18] /* could not find or create entry? */ if (i_err < 0) { 8025140: f9b7 3012 ldrsh.w r3, [r7, #18] 8025144: 2b00 cmp r3, #0 8025146: da02 bge.n 802514e 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; 8025148: 8a7b ldrh r3, [r7, #18] 802514a: b25b sxtb r3, r3 802514c: e0f3 b.n 8025336 } LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 802514e: 8a7b ldrh r3, [r7, #18] 8025150: 2b7e cmp r3, #126 @ 0x7e 8025152: d906 bls.n 8025162 8025154: 4b7a ldr r3, [pc, #488] @ (8025340 ) 8025156: f240 32c1 movw r2, #961 @ 0x3c1 802515a: 497a ldr r1, [pc, #488] @ (8025344 ) 802515c: 487a ldr r0, [pc, #488] @ (8025348 ) 802515e: f005 fb85 bl 802a86c i = (netif_addr_idx_t)i_err; 8025162: 8a7b ldrh r3, [r7, #18] 8025164: 747b strb r3, [r7, #17] /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 8025166: 7c7a ldrb r2, [r7, #17] 8025168: 4978 ldr r1, [pc, #480] @ (802534c ) 802516a: 4613 mov r3, r2 802516c: 005b lsls r3, r3, #1 802516e: 4413 add r3, r2 8025170: 00db lsls r3, r3, #3 8025172: 440b add r3, r1 8025174: 3314 adds r3, #20 8025176: 781b ldrb r3, [r3, #0] 8025178: 2b00 cmp r3, #0 802517a: d115 bne.n 80251a8 is_new_entry = 1; 802517c: 2301 movs r3, #1 802517e: 623b str r3, [r7, #32] arp_table[i].state = ETHARP_STATE_PENDING; 8025180: 7c7a ldrb r2, [r7, #17] 8025182: 4972 ldr r1, [pc, #456] @ (802534c ) 8025184: 4613 mov r3, r2 8025186: 005b lsls r3, r3, #1 8025188: 4413 add r3, r2 802518a: 00db lsls r3, r3, #3 802518c: 440b add r3, r1 802518e: 3314 adds r3, #20 8025190: 2201 movs r2, #1 8025192: 701a strb r2, [r3, #0] /* record network interface for re-sending arp request in etharp_tmr */ arp_table[i].netif = netif; 8025194: 7c7a ldrb r2, [r7, #17] 8025196: 496d ldr r1, [pc, #436] @ (802534c ) 8025198: 4613 mov r3, r2 802519a: 005b lsls r3, r3, #1 802519c: 4413 add r3, r2 802519e: 00db lsls r3, r3, #3 80251a0: 440b add r3, r1 80251a2: 3308 adds r3, #8 80251a4: 68fa ldr r2, [r7, #12] 80251a6: 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", 80251a8: 7c7a ldrb r2, [r7, #17] 80251aa: 4968 ldr r1, [pc, #416] @ (802534c ) 80251ac: 4613 mov r3, r2 80251ae: 005b lsls r3, r3, #1 80251b0: 4413 add r3, r2 80251b2: 00db lsls r3, r3, #3 80251b4: 440b add r3, r1 80251b6: 3314 adds r3, #20 80251b8: 781b ldrb r3, [r3, #0] 80251ba: 2b01 cmp r3, #1 80251bc: d011 beq.n 80251e2 80251be: 7c7a ldrb r2, [r7, #17] 80251c0: 4962 ldr r1, [pc, #392] @ (802534c ) 80251c2: 4613 mov r3, r2 80251c4: 005b lsls r3, r3, #1 80251c6: 4413 add r3, r2 80251c8: 00db lsls r3, r3, #3 80251ca: 440b add r3, r1 80251cc: 3314 adds r3, #20 80251ce: 781b ldrb r3, [r3, #0] 80251d0: 2b01 cmp r3, #1 80251d2: d806 bhi.n 80251e2 80251d4: 4b5a ldr r3, [pc, #360] @ (8025340 ) 80251d6: f240 32cd movw r2, #973 @ 0x3cd 80251da: 495d ldr r1, [pc, #372] @ (8025350 ) 80251dc: 485a ldr r0, [pc, #360] @ (8025348 ) 80251de: f005 fb45 bl 802a86c ((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)) { 80251e2: 6a3b ldr r3, [r7, #32] 80251e4: 2b00 cmp r3, #0 80251e6: d102 bne.n 80251ee 80251e8: 687b ldr r3, [r7, #4] 80251ea: 2b00 cmp r3, #0 80251ec: d10c bne.n 8025208 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 80251ee: 68b9 ldr r1, [r7, #8] 80251f0: 68f8 ldr r0, [r7, #12] 80251f2: f000 f963 bl 80254bc 80251f6: 4603 mov r3, r0 80251f8: 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) { 80251fc: 687b ldr r3, [r7, #4] 80251fe: 2b00 cmp r3, #0 8025200: d102 bne.n 8025208 return result; 8025202: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8025206: e096 b.n 8025336 } } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); 8025208: 687b ldr r3, [r7, #4] 802520a: 2b00 cmp r3, #0 802520c: d106 bne.n 802521c 802520e: 4b4c ldr r3, [pc, #304] @ (8025340 ) 8025210: f240 32e1 movw r2, #993 @ 0x3e1 8025214: 494f ldr r1, [pc, #316] @ (8025354 ) 8025216: 484c ldr r0, [pc, #304] @ (8025348 ) 8025218: f005 fb28 bl 802a86c /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 802521c: 7c7a ldrb r2, [r7, #17] 802521e: 494b ldr r1, [pc, #300] @ (802534c ) 8025220: 4613 mov r3, r2 8025222: 005b lsls r3, r3, #1 8025224: 4413 add r3, r2 8025226: 00db lsls r3, r3, #3 8025228: 440b add r3, r1 802522a: 3314 adds r3, #20 802522c: 781b ldrb r3, [r3, #0] 802522e: 2b01 cmp r3, #1 8025230: d917 bls.n 8025262 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_ADDRHINT(netif, i); 8025232: 4a49 ldr r2, [pc, #292] @ (8025358 ) 8025234: 7c7b ldrb r3, [r7, #17] 8025236: 7013 strb r3, [r2, #0] /* send the packet */ result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); 8025238: 7c7a ldrb r2, [r7, #17] 802523a: 4613 mov r3, r2 802523c: 005b lsls r3, r3, #1 802523e: 4413 add r3, r2 8025240: 00db lsls r3, r3, #3 8025242: 3308 adds r3, #8 8025244: 4a41 ldr r2, [pc, #260] @ (802534c ) 8025246: 4413 add r3, r2 8025248: 3304 adds r3, #4 802524a: f44f 6200 mov.w r2, #2048 @ 0x800 802524e: 9200 str r2, [sp, #0] 8025250: 697a ldr r2, [r7, #20] 8025252: 6879 ldr r1, [r7, #4] 8025254: 68f8 ldr r0, [r7, #12] 8025256: f001 fe91 bl 8026f7c 802525a: 4603 mov r3, r0 802525c: f887 3027 strb.w r3, [r7, #39] @ 0x27 8025260: e067 b.n 8025332 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8025262: 7c7a ldrb r2, [r7, #17] 8025264: 4939 ldr r1, [pc, #228] @ (802534c ) 8025266: 4613 mov r3, r2 8025268: 005b lsls r3, r3, #1 802526a: 4413 add r3, r2 802526c: 00db lsls r3, r3, #3 802526e: 440b add r3, r1 8025270: 3314 adds r3, #20 8025272: 781b ldrb r3, [r3, #0] 8025274: 2b01 cmp r3, #1 8025276: d15c bne.n 8025332 /* entry is still pending, queue the given packet 'q' */ struct pbuf *p; int copy_needed = 0; 8025278: 2300 movs r3, #0 802527a: 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; 802527c: 687b ldr r3, [r7, #4] 802527e: 61fb str r3, [r7, #28] while (p) { 8025280: e01c b.n 80252bc LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); 8025282: 69fb ldr r3, [r7, #28] 8025284: 895a ldrh r2, [r3, #10] 8025286: 69fb ldr r3, [r7, #28] 8025288: 891b ldrh r3, [r3, #8] 802528a: 429a cmp r2, r3 802528c: d10a bne.n 80252a4 802528e: 69fb ldr r3, [r7, #28] 8025290: 681b ldr r3, [r3, #0] 8025292: 2b00 cmp r3, #0 8025294: d006 beq.n 80252a4 8025296: 4b2a ldr r3, [pc, #168] @ (8025340 ) 8025298: f240 32f1 movw r2, #1009 @ 0x3f1 802529c: 492f ldr r1, [pc, #188] @ (802535c ) 802529e: 482a ldr r0, [pc, #168] @ (8025348 ) 80252a0: f005 fae4 bl 802a86c if (PBUF_NEEDS_COPY(p)) { 80252a4: 69fb ldr r3, [r7, #28] 80252a6: 7b1b ldrb r3, [r3, #12] 80252a8: f003 0340 and.w r3, r3, #64 @ 0x40 80252ac: 2b00 cmp r3, #0 80252ae: d002 beq.n 80252b6 copy_needed = 1; 80252b0: 2301 movs r3, #1 80252b2: 61bb str r3, [r7, #24] break; 80252b4: e005 b.n 80252c2 } p = p->next; 80252b6: 69fb ldr r3, [r7, #28] 80252b8: 681b ldr r3, [r3, #0] 80252ba: 61fb str r3, [r7, #28] while (p) { 80252bc: 69fb ldr r3, [r7, #28] 80252be: 2b00 cmp r3, #0 80252c0: d1df bne.n 8025282 } if (copy_needed) { 80252c2: 69bb ldr r3, [r7, #24] 80252c4: 2b00 cmp r3, #0 80252c6: d007 beq.n 80252d8 /* copy the whole packet into new pbufs */ p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); 80252c8: 687a ldr r2, [r7, #4] 80252ca: f44f 7120 mov.w r1, #640 @ 0x280 80252ce: 200e movs r0, #14 80252d0: f7f6 facc bl 801b86c 80252d4: 61f8 str r0, [r7, #28] 80252d6: e004 b.n 80252e2 } else { /* referencing the old pbuf is enough */ p = q; 80252d8: 687b ldr r3, [r7, #4] 80252da: 61fb str r3, [r7, #28] pbuf_ref(p); 80252dc: 69f8 ldr r0, [r7, #28] 80252de: f7f6 f8f3 bl 801b4c8 } /* packet could be taken over? */ if (p != NULL) { 80252e2: 69fb ldr r3, [r7, #28] 80252e4: 2b00 cmp r3, #0 80252e6: d021 beq.n 802532c 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) { 80252e8: 7c7a ldrb r2, [r7, #17] 80252ea: 4918 ldr r1, [pc, #96] @ (802534c ) 80252ec: 4613 mov r3, r2 80252ee: 005b lsls r3, r3, #1 80252f0: 4413 add r3, r2 80252f2: 00db lsls r3, r3, #3 80252f4: 440b add r3, r1 80252f6: 681b ldr r3, [r3, #0] 80252f8: 2b00 cmp r3, #0 80252fa: d00a beq.n 8025312 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); 80252fc: 7c7a ldrb r2, [r7, #17] 80252fe: 4913 ldr r1, [pc, #76] @ (802534c ) 8025300: 4613 mov r3, r2 8025302: 005b lsls r3, r3, #1 8025304: 4413 add r3, r2 8025306: 00db lsls r3, r3, #3 8025308: 440b add r3, r1 802530a: 681b ldr r3, [r3, #0] 802530c: 4618 mov r0, r3 802530e: f7f6 f835 bl 801b37c } arp_table[i].q = p; 8025312: 7c7a ldrb r2, [r7, #17] 8025314: 490d ldr r1, [pc, #52] @ (802534c ) 8025316: 4613 mov r3, r2 8025318: 005b lsls r3, r3, #1 802531a: 4413 add r3, r2 802531c: 00db lsls r3, r3, #3 802531e: 440b add r3, r1 8025320: 69fa ldr r2, [r7, #28] 8025322: 601a str r2, [r3, #0] result = ERR_OK; 8025324: 2300 movs r3, #0 8025326: f887 3027 strb.w r3, [r7, #39] @ 0x27 802532a: e002 b.n 8025332 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; 802532c: 23ff movs r3, #255 @ 0xff 802532e: f887 3027 strb.w r3, [r7, #39] @ 0x27 } } return result; 8025332: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 } 8025336: 4618 mov r0, r3 8025338: 3728 adds r7, #40 @ 0x28 802533a: 46bd mov sp, r7 802533c: bd80 pop {r7, pc} 802533e: bf00 nop 8025340: 080311f4 .word 0x080311f4 8025344: 080313a0 .word 0x080313a0 8025348: 0803126c .word 0x0803126c 802534c: 2402b000 .word 0x2402b000 8025350: 080313b0 .word 0x080313b0 8025354: 08031394 .word 0x08031394 8025358: 2402b0f0 .word 0x2402b0f0 802535c: 080313d8 .word 0x080313d8 08025360 : 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) { 8025360: b580 push {r7, lr} 8025362: b08a sub sp, #40 @ 0x28 8025364: af02 add r7, sp, #8 8025366: 60f8 str r0, [r7, #12] 8025368: 60b9 str r1, [r7, #8] 802536a: 607a str r2, [r7, #4] 802536c: 603b str r3, [r7, #0] struct pbuf *p; err_t result = ERR_OK; 802536e: 2300 movs r3, #0 8025370: 77fb strb r3, [r7, #31] struct etharp_hdr *hdr; LWIP_ASSERT("netif != NULL", netif != NULL); 8025372: 68fb ldr r3, [r7, #12] 8025374: 2b00 cmp r3, #0 8025376: d106 bne.n 8025386 8025378: 4b3a ldr r3, [pc, #232] @ (8025464 ) 802537a: f240 4257 movw r2, #1111 @ 0x457 802537e: 493a ldr r1, [pc, #232] @ (8025468 ) 8025380: 483a ldr r0, [pc, #232] @ (802546c ) 8025382: f005 fa73 bl 802a86c /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); 8025386: f44f 7220 mov.w r2, #640 @ 0x280 802538a: 211c movs r1, #28 802538c: 200e movs r0, #14 802538e: f7f5 fcdf bl 801ad50 8025392: 61b8 str r0, [r7, #24] /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 8025394: 69bb ldr r3, [r7, #24] 8025396: 2b00 cmp r3, #0 8025398: d102 bne.n 80253a0 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; 802539a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802539e: e05d b.n 802545c } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 80253a0: 69bb ldr r3, [r7, #24] 80253a2: 895b ldrh r3, [r3, #10] 80253a4: 2b1b cmp r3, #27 80253a6: d806 bhi.n 80253b6 80253a8: 4b2e ldr r3, [pc, #184] @ (8025464 ) 80253aa: f240 4262 movw r2, #1122 @ 0x462 80253ae: 4930 ldr r1, [pc, #192] @ (8025470 ) 80253b0: 482e ldr r0, [pc, #184] @ (802546c ) 80253b2: f005 fa5b bl 802a86c (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; 80253b6: 69bb ldr r3, [r7, #24] 80253b8: 685b ldr r3, [r3, #4] 80253ba: 617b str r3, [r7, #20] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = lwip_htons(opcode); 80253bc: 8ebb ldrh r3, [r7, #52] @ 0x34 80253be: 4618 mov r0, r3 80253c0: f7f4 fafa bl 80199b8 80253c4: 4603 mov r3, r0 80253c6: 461a mov r2, r3 80253c8: 697b ldr r3, [r7, #20] 80253ca: 80da strh r2, [r3, #6] LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 80253cc: 68fb ldr r3, [r7, #12] 80253ce: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 80253d2: 2b06 cmp r3, #6 80253d4: d006 beq.n 80253e4 80253d6: 4b23 ldr r3, [pc, #140] @ (8025464 ) 80253d8: f240 4269 movw r2, #1129 @ 0x469 80253dc: 4925 ldr r1, [pc, #148] @ (8025474 ) 80253de: 4823 ldr r0, [pc, #140] @ (802546c ) 80253e0: f005 fa44 bl 802a86c (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); 80253e4: 697b ldr r3, [r7, #20] 80253e6: 3308 adds r3, #8 80253e8: 2206 movs r2, #6 80253ea: 6839 ldr r1, [r7, #0] 80253ec: 4618 mov r0, r3 80253ee: f005 fcc6 bl 802ad7e SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); 80253f2: 697b ldr r3, [r7, #20] 80253f4: 3312 adds r3, #18 80253f6: 2206 movs r2, #6 80253f8: 6af9 ldr r1, [r7, #44] @ 0x2c 80253fa: 4618 mov r0, r3 80253fc: f005 fcbf bl 802ad7e /* 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); 8025400: 697b ldr r3, [r7, #20] 8025402: 330e adds r3, #14 8025404: 6aba ldr r2, [r7, #40] @ 0x28 8025406: 6812 ldr r2, [r2, #0] 8025408: 601a str r2, [r3, #0] IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); 802540a: 697b ldr r3, [r7, #20] 802540c: 3318 adds r3, #24 802540e: 6b3a ldr r2, [r7, #48] @ 0x30 8025410: 6812 ldr r2, [r2, #0] 8025412: 601a str r2, [r3, #0] hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); 8025414: 697b ldr r3, [r7, #20] 8025416: 2200 movs r2, #0 8025418: 701a strb r2, [r3, #0] 802541a: 2200 movs r2, #0 802541c: f042 0201 orr.w r2, r2, #1 8025420: 705a strb r2, [r3, #1] hdr->proto = PP_HTONS(ETHTYPE_IP); 8025422: 697b ldr r3, [r7, #20] 8025424: 2200 movs r2, #0 8025426: f042 0208 orr.w r2, r2, #8 802542a: 709a strb r2, [r3, #2] 802542c: 2200 movs r2, #0 802542e: 70da strb r2, [r3, #3] /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; 8025430: 697b ldr r3, [r7, #20] 8025432: 2206 movs r2, #6 8025434: 711a strb r2, [r3, #4] hdr->protolen = sizeof(ip4_addr_t); 8025436: 697b ldr r3, [r7, #20] 8025438: 2204 movs r2, #4 802543a: 715a strb r2, [r3, #5] if (ip4_addr_islinklocal(ipsrc_addr)) { ethernet_output(netif, p, ethsrc_addr, ðbroadcast, ETHTYPE_ARP); } else #endif /* LWIP_AUTOIP */ { ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP); 802543c: f640 0306 movw r3, #2054 @ 0x806 8025440: 9300 str r3, [sp, #0] 8025442: 687b ldr r3, [r7, #4] 8025444: 68ba ldr r2, [r7, #8] 8025446: 69b9 ldr r1, [r7, #24] 8025448: 68f8 ldr r0, [r7, #12] 802544a: f001 fd97 bl 8026f7c } ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 802544e: 69b8 ldr r0, [r7, #24] 8025450: f7f5 ff94 bl 801b37c p = NULL; 8025454: 2300 movs r3, #0 8025456: 61bb str r3, [r7, #24] /* could not allocate pbuf for ARP request */ return result; 8025458: f997 301f ldrsb.w r3, [r7, #31] } 802545c: 4618 mov r0, r3 802545e: 3720 adds r7, #32 8025460: 46bd mov sp, r7 8025462: bd80 pop {r7, pc} 8025464: 080311f4 .word 0x080311f4 8025468: 08031344 .word 0x08031344 802546c: 0803126c .word 0x0803126c 8025470: 080313f4 .word 0x080313f4 8025474: 08031428 .word 0x08031428 08025478 : * 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) { 8025478: b580 push {r7, lr} 802547a: b088 sub sp, #32 802547c: af04 add r7, sp, #16 802547e: 60f8 str r0, [r7, #12] 8025480: 60b9 str r1, [r7, #8] 8025482: 607a str r2, [r7, #4] return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 8025484: 68fb ldr r3, [r7, #12] 8025486: f103 012a add.w r1, r3, #42 @ 0x2a (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, 802548a: 68fb ldr r3, [r7, #12] 802548c: f103 002a add.w r0, r3, #42 @ 0x2a 8025490: 68fb ldr r3, [r7, #12] 8025492: 3304 adds r3, #4 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 8025494: 2201 movs r2, #1 8025496: 9203 str r2, [sp, #12] 8025498: 68ba ldr r2, [r7, #8] 802549a: 9202 str r2, [sp, #8] 802549c: 4a06 ldr r2, [pc, #24] @ (80254b8 ) 802549e: 9201 str r2, [sp, #4] 80254a0: 9300 str r3, [sp, #0] 80254a2: 4603 mov r3, r0 80254a4: 687a ldr r2, [r7, #4] 80254a6: 68f8 ldr r0, [r7, #12] 80254a8: f7ff ff5a bl 8025360 80254ac: 4603 mov r3, r0 ipaddr, ARP_REQUEST); } 80254ae: 4618 mov r0, r3 80254b0: 3710 adds r7, #16 80254b2: 46bd mov sp, r7 80254b4: bd80 pop {r7, pc} 80254b6: bf00 nop 80254b8: 08031c88 .word 0x08031c88 080254bc : * 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) { 80254bc: b580 push {r7, lr} 80254be: b082 sub sp, #8 80254c0: af00 add r7, sp, #0 80254c2: 6078 str r0, [r7, #4] 80254c4: 6039 str r1, [r7, #0] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_request_dst(netif, ipaddr, ðbroadcast); 80254c6: 4a05 ldr r2, [pc, #20] @ (80254dc ) 80254c8: 6839 ldr r1, [r7, #0] 80254ca: 6878 ldr r0, [r7, #4] 80254cc: f7ff ffd4 bl 8025478 80254d0: 4603 mov r3, r0 } 80254d2: 4618 mov r0, r3 80254d4: 3708 adds r7, #8 80254d6: 46bd mov sp, r7 80254d8: bd80 pop {r7, pc} 80254da: bf00 nop 80254dc: 08031c80 .word 0x08031c80 080254e0 : * @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) { 80254e0: b580 push {r7, lr} 80254e2: b08e sub sp, #56 @ 0x38 80254e4: af04 add r7, sp, #16 80254e6: 6078 str r0, [r7, #4] 80254e8: 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(); 80254ea: 4b89 ldr r3, [pc, #548] @ (8025710 ) 80254ec: 689b ldr r3, [r3, #8] 80254ee: 627b str r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(iphdr_in); 80254f0: 6a7b ldr r3, [r7, #36] @ 0x24 80254f2: 781b ldrb r3, [r3, #0] 80254f4: f003 030f and.w r3, r3, #15 80254f8: b2db uxtb r3, r3 80254fa: 009b lsls r3, r3, #2 80254fc: b2db uxtb r3, r3 80254fe: 847b strh r3, [r7, #34] @ 0x22 if (hlen < IP_HLEN) { 8025500: 8c7b ldrh r3, [r7, #34] @ 0x22 8025502: 2b13 cmp r3, #19 8025504: f240 80ed bls.w 80256e2 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); goto lenerr; } if (p->len < sizeof(u16_t) * 2) { 8025508: 687b ldr r3, [r7, #4] 802550a: 895b ldrh r3, [r3, #10] 802550c: 2b03 cmp r3, #3 802550e: f240 80ea bls.w 80256e6 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8025512: 687b ldr r3, [r7, #4] 8025514: 685b ldr r3, [r3, #4] 8025516: 781b ldrb r3, [r3, #0] 8025518: f887 3021 strb.w r3, [r7, #33] @ 0x21 #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload) + 1); 802551c: 687b ldr r3, [r7, #4] 802551e: 685b ldr r3, [r3, #4] 8025520: 785b ldrb r3, [r3, #1] 8025522: f887 3020 strb.w r3, [r7, #32] /* if debug is enabled but debug statement below is somehow disabled: */ LWIP_UNUSED_ARG(code); #endif /* LWIP_DEBUG */ switch (type) { 8025526: f897 3021 ldrb.w r3, [r7, #33] @ 0x21 802552a: 2b00 cmp r3, #0 802552c: f000 80d2 beq.w 80256d4 8025530: 2b08 cmp r3, #8 8025532: f040 80d2 bne.w 80256da (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(); 8025536: 4b77 ldr r3, [pc, #476] @ (8025714 ) 8025538: 61fb str r3, [r7, #28] /* multicast destination address? */ if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 802553a: 4b75 ldr r3, [pc, #468] @ (8025710 ) 802553c: 695b ldr r3, [r3, #20] 802553e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8025542: 2be0 cmp r3, #224 @ 0xe0 8025544: f000 80d6 beq.w 80256f4 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())) { 8025548: 4b71 ldr r3, [pc, #452] @ (8025710 ) 802554a: 695b ldr r3, [r3, #20] 802554c: 4a70 ldr r2, [pc, #448] @ (8025710 ) 802554e: 6812 ldr r2, [r2, #0] 8025550: 4611 mov r1, r2 8025552: 4618 mov r0, r3 8025554: f000 fc34 bl 8025dc0 8025558: 4603 mov r3, r0 802555a: 2b00 cmp r3, #0 802555c: f040 80cc bne.w 80256f8 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)) { 8025560: 687b ldr r3, [r7, #4] 8025562: 891b ldrh r3, [r3, #8] 8025564: 2b07 cmp r3, #7 8025566: f240 80c0 bls.w 80256ea LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } #if CHECKSUM_CHECK_ICMP IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { if (inet_chksum_pbuf(p) != 0) { 802556a: 6878 ldr r0, [r7, #4] 802556c: f7f4 fac1 bl 8019af2 8025570: 4603 mov r3, r0 8025572: 2b00 cmp r3, #0 8025574: d003 beq.n 802557e LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); pbuf_free(p); 8025576: 6878 ldr r0, [r7, #4] 8025578: f7f5 ff00 bl 801b37c ICMP_STATS_INC(icmp.chkerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 802557c: e0c5 b.n 802570a } } #endif #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 802557e: 8c7b ldrh r3, [r7, #34] @ 0x22 8025580: 330e adds r3, #14 8025582: 4619 mov r1, r3 8025584: 6878 ldr r0, [r7, #4] 8025586: f7f5 fe31 bl 801b1ec 802558a: 4603 mov r3, r0 802558c: 2b00 cmp r3, #0 802558e: d04b beq.n 8025628 /* 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); 8025590: 687b ldr r3, [r7, #4] 8025592: 891a ldrh r2, [r3, #8] 8025594: 8c7b ldrh r3, [r7, #34] @ 0x22 8025596: 4413 add r3, r2 8025598: 837b strh r3, [r7, #26] if (alloc_len < p->tot_len) { 802559a: 687b ldr r3, [r7, #4] 802559c: 891b ldrh r3, [r3, #8] 802559e: 8b7a ldrh r2, [r7, #26] 80255a0: 429a cmp r2, r3 80255a2: f0c0 80ab bcc.w 80256fc 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); 80255a6: 8b7b ldrh r3, [r7, #26] 80255a8: f44f 7220 mov.w r2, #640 @ 0x280 80255ac: 4619 mov r1, r3 80255ae: 200e movs r0, #14 80255b0: f7f5 fbce bl 801ad50 80255b4: 6178 str r0, [r7, #20] if (r == NULL) { 80255b6: 697b ldr r3, [r7, #20] 80255b8: 2b00 cmp r3, #0 80255ba: f000 80a1 beq.w 8025700 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); goto icmperr; } if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { 80255be: 697b ldr r3, [r7, #20] 80255c0: 895b ldrh r3, [r3, #10] 80255c2: 461a mov r2, r3 80255c4: 8c7b ldrh r3, [r7, #34] @ 0x22 80255c6: 3308 adds r3, #8 80255c8: 429a cmp r2, r3 80255ca: d203 bcs.n 80255d4 LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); pbuf_free(r); 80255cc: 6978 ldr r0, [r7, #20] 80255ce: f7f5 fed5 bl 801b37c goto icmperr; 80255d2: e096 b.n 8025702 } /* copy the ip header */ MEMCPY(r->payload, iphdr_in, hlen); 80255d4: 697b ldr r3, [r7, #20] 80255d6: 685b ldr r3, [r3, #4] 80255d8: 8c7a ldrh r2, [r7, #34] @ 0x22 80255da: 6a79 ldr r1, [r7, #36] @ 0x24 80255dc: 4618 mov r0, r3 80255de: f005 fbce bl 802ad7e /* switch r->payload back to icmp header (cannot fail) */ if (pbuf_remove_header(r, hlen)) { 80255e2: 8c7b ldrh r3, [r7, #34] @ 0x22 80255e4: 4619 mov r1, r3 80255e6: 6978 ldr r0, [r7, #20] 80255e8: f7f5 fe10 bl 801b20c 80255ec: 4603 mov r3, r0 80255ee: 2b00 cmp r3, #0 80255f0: d009 beq.n 8025606 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); 80255f2: 4b49 ldr r3, [pc, #292] @ (8025718 ) 80255f4: 22b6 movs r2, #182 @ 0xb6 80255f6: 4949 ldr r1, [pc, #292] @ (802571c ) 80255f8: 4849 ldr r0, [pc, #292] @ (8025720 ) 80255fa: f005 f937 bl 802a86c pbuf_free(r); 80255fe: 6978 ldr r0, [r7, #20] 8025600: f7f5 febc bl 801b37c goto icmperr; 8025604: e07d b.n 8025702 } /* copy the rest of the packet without ip header */ if (pbuf_copy(r, p) != ERR_OK) { 8025606: 6879 ldr r1, [r7, #4] 8025608: 6978 ldr r0, [r7, #20] 802560a: f7f5 ffeb bl 801b5e4 802560e: 4603 mov r3, r0 8025610: 2b00 cmp r3, #0 8025612: d003 beq.n 802561c LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); pbuf_free(r); 8025614: 6978 ldr r0, [r7, #20] 8025616: f7f5 feb1 bl 801b37c goto icmperr; 802561a: e072 b.n 8025702 } /* free the original p */ pbuf_free(p); 802561c: 6878 ldr r0, [r7, #4] 802561e: f7f5 fead bl 801b37c /* we now have an identical copy of p that has room for link headers */ p = r; 8025622: 697b ldr r3, [r7, #20] 8025624: 607b str r3, [r7, #4] 8025626: e00f b.n 8025648 } else { /* restore p->payload to point to icmp header (cannot fail) */ if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 8025628: 8c7b ldrh r3, [r7, #34] @ 0x22 802562a: 330e adds r3, #14 802562c: 4619 mov r1, r3 802562e: 6878 ldr r0, [r7, #4] 8025630: f7f5 fdec bl 801b20c 8025634: 4603 mov r3, r0 8025636: 2b00 cmp r3, #0 8025638: d006 beq.n 8025648 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); 802563a: 4b37 ldr r3, [pc, #220] @ (8025718 ) 802563c: 22c7 movs r2, #199 @ 0xc7 802563e: 4939 ldr r1, [pc, #228] @ (8025724 ) 8025640: 4837 ldr r0, [pc, #220] @ (8025720 ) 8025642: f005 f913 bl 802a86c goto icmperr; 8025646: e05c b.n 8025702 } #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; 8025648: 687b ldr r3, [r7, #4] 802564a: 685b ldr r3, [r3, #4] 802564c: 613b str r3, [r7, #16] if (pbuf_add_header(p, hlen)) { 802564e: 8c7b ldrh r3, [r7, #34] @ 0x22 8025650: 4619 mov r1, r3 8025652: 6878 ldr r0, [r7, #4] 8025654: f7f5 fdca bl 801b1ec 8025658: 4603 mov r3, r0 802565a: 2b00 cmp r3, #0 802565c: d13c bne.n 80256d8 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; 802565e: 687b ldr r3, [r7, #4] 8025660: 685b ldr r3, [r3, #4] 8025662: 60fb str r3, [r7, #12] ip4_addr_copy(iphdr->src, *src); 8025664: 69fb ldr r3, [r7, #28] 8025666: 681a ldr r2, [r3, #0] 8025668: 68fb ldr r3, [r7, #12] 802566a: 60da str r2, [r3, #12] ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); 802566c: 4b28 ldr r3, [pc, #160] @ (8025710 ) 802566e: 691a ldr r2, [r3, #16] 8025670: 68fb ldr r3, [r7, #12] 8025672: 611a str r2, [r3, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 8025674: 693b ldr r3, [r7, #16] 8025676: 2200 movs r2, #0 8025678: 701a strb r2, [r3, #0] #if CHECKSUM_GEN_ICMP IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) { /* adjust the checksum */ if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { 802567a: 693b ldr r3, [r7, #16] 802567c: 885b ldrh r3, [r3, #2] 802567e: b29b uxth r3, r3 8025680: f64f 72f7 movw r2, #65527 @ 0xfff7 8025684: 4293 cmp r3, r2 8025686: d907 bls.n 8025698 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); 8025688: 693b ldr r3, [r7, #16] 802568a: 885b ldrh r3, [r3, #2] 802568c: b29b uxth r3, r3 802568e: 3309 adds r3, #9 8025690: b29a uxth r2, r3 8025692: 693b ldr r3, [r7, #16] 8025694: 805a strh r2, [r3, #2] 8025696: e006 b.n 80256a6 } else { iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); 8025698: 693b ldr r3, [r7, #16] 802569a: 885b ldrh r3, [r3, #2] 802569c: b29b uxth r3, r3 802569e: 3308 adds r3, #8 80256a0: b29a uxth r2, r3 80256a2: 693b ldr r3, [r7, #16] 80256a4: 805a strh r2, [r3, #2] #else /* CHECKSUM_GEN_ICMP */ iecho->chksum = 0; #endif /* CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); 80256a6: 68fb ldr r3, [r7, #12] 80256a8: 22ff movs r2, #255 @ 0xff 80256aa: 721a strb r2, [r3, #8] IPH_CHKSUM_SET(iphdr, 0); 80256ac: 68fb ldr r3, [r7, #12] 80256ae: 2200 movs r2, #0 80256b0: 729a strb r2, [r3, #10] 80256b2: 2200 movs r2, #0 80256b4: 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, 80256b6: 683b ldr r3, [r7, #0] 80256b8: 9302 str r3, [sp, #8] 80256ba: 2301 movs r3, #1 80256bc: 9301 str r3, [sp, #4] 80256be: 2300 movs r3, #0 80256c0: 9300 str r3, [sp, #0] 80256c2: 23ff movs r3, #255 @ 0xff 80256c4: 2200 movs r2, #0 80256c6: 69f9 ldr r1, [r7, #28] 80256c8: 6878 ldr r0, [r7, #4] 80256ca: f000 fa9f bl 8025c0c 80256ce: 4603 mov r3, r0 80256d0: 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; 80256d2: e001 b.n 80256d8 break; 80256d4: bf00 nop 80256d6: e000 b.n 80256da break; 80256d8: 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); 80256da: 6878 ldr r0, [r7, #4] 80256dc: f7f5 fe4e bl 801b37c return; 80256e0: e013 b.n 802570a goto lenerr; 80256e2: bf00 nop 80256e4: e002 b.n 80256ec goto lenerr; 80256e6: bf00 nop 80256e8: e000 b.n 80256ec goto lenerr; 80256ea: bf00 nop lenerr: pbuf_free(p); 80256ec: 6878 ldr r0, [r7, #4] 80256ee: f7f5 fe45 bl 801b37c ICMP_STATS_INC(icmp.lenerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 80256f2: e00a b.n 802570a goto icmperr; 80256f4: bf00 nop 80256f6: e004 b.n 8025702 goto icmperr; 80256f8: bf00 nop 80256fa: e002 b.n 8025702 goto icmperr; 80256fc: bf00 nop 80256fe: e000 b.n 8025702 goto icmperr; 8025700: bf00 nop #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING icmperr: pbuf_free(p); 8025702: 6878 ldr r0, [r7, #4] 8025704: f7f5 fe3a bl 801b37c ICMP_STATS_INC(icmp.err); MIB2_STATS_INC(mib2.icmpinerrors); return; 8025708: bf00 nop #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ } 802570a: 3728 adds r7, #40 @ 0x28 802570c: 46bd mov sp, r7 802570e: bd80 pop {r7, pc} 8025710: 24024418 .word 0x24024418 8025714: 2402442c .word 0x2402442c 8025718: 0803146c .word 0x0803146c 802571c: 080314a4 .word 0x080314a4 8025720: 080314dc .word 0x080314dc 8025724: 08031504 .word 0x08031504 08025728 : * 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) { 8025728: b580 push {r7, lr} 802572a: b082 sub sp, #8 802572c: af00 add r7, sp, #0 802572e: 6078 str r0, [r7, #4] 8025730: 460b mov r3, r1 8025732: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpoutdestunreachs); icmp_send_response(p, ICMP_DUR, t); 8025734: 78fb ldrb r3, [r7, #3] 8025736: 461a mov r2, r3 8025738: 2103 movs r1, #3 802573a: 6878 ldr r0, [r7, #4] 802573c: f000 f814 bl 8025768 } 8025740: bf00 nop 8025742: 3708 adds r7, #8 8025744: 46bd mov sp, r7 8025746: bd80 pop {r7, pc} 08025748 : * 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) { 8025748: b580 push {r7, lr} 802574a: b082 sub sp, #8 802574c: af00 add r7, sp, #0 802574e: 6078 str r0, [r7, #4] 8025750: 460b mov r3, r1 8025752: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpouttimeexcds); icmp_send_response(p, ICMP_TE, t); 8025754: 78fb ldrb r3, [r7, #3] 8025756: 461a mov r2, r3 8025758: 210b movs r1, #11 802575a: 6878 ldr r0, [r7, #4] 802575c: f000 f804 bl 8025768 } 8025760: bf00 nop 8025762: 3708 adds r7, #8 8025764: 46bd mov sp, r7 8025766: bd80 pop {r7, pc} 08025768 : * @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) { 8025768: b580 push {r7, lr} 802576a: b08c sub sp, #48 @ 0x30 802576c: af04 add r7, sp, #16 802576e: 6078 str r0, [r7, #4] 8025770: 460b mov r3, r1 8025772: 70fb strb r3, [r7, #3] 8025774: 4613 mov r3, r2 8025776: 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, 8025778: f44f 7220 mov.w r2, #640 @ 0x280 802577c: 2124 movs r1, #36 @ 0x24 802577e: 2022 movs r0, #34 @ 0x22 8025780: f7f5 fae6 bl 801ad50 8025784: 61b8 str r0, [r7, #24] PBUF_RAM); if (q == NULL) { 8025786: 69bb ldr r3, [r7, #24] 8025788: 2b00 cmp r3, #0 802578a: d056 beq.n 802583a 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", 802578c: 69bb ldr r3, [r7, #24] 802578e: 895b ldrh r3, [r3, #10] 8025790: 2b23 cmp r3, #35 @ 0x23 8025792: d806 bhi.n 80257a2 8025794: 4b2b ldr r3, [pc, #172] @ (8025844 ) 8025796: f44f 72b4 mov.w r2, #360 @ 0x168 802579a: 492b ldr r1, [pc, #172] @ (8025848 ) 802579c: 482b ldr r0, [pc, #172] @ (802584c ) 802579e: f005 f865 bl 802a86c (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 80257a2: 687b ldr r3, [r7, #4] 80257a4: 685b ldr r3, [r3, #4] 80257a6: 617b str r3, [r7, #20] 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; 80257a8: 69bb ldr r3, [r7, #24] 80257aa: 685b ldr r3, [r3, #4] 80257ac: 613b str r3, [r7, #16] icmphdr->type = type; 80257ae: 693b ldr r3, [r7, #16] 80257b0: 78fa ldrb r2, [r7, #3] 80257b2: 701a strb r2, [r3, #0] icmphdr->code = code; 80257b4: 693b ldr r3, [r7, #16] 80257b6: 78ba ldrb r2, [r7, #2] 80257b8: 705a strb r2, [r3, #1] icmphdr->id = 0; 80257ba: 693b ldr r3, [r7, #16] 80257bc: 2200 movs r2, #0 80257be: 711a strb r2, [r3, #4] 80257c0: 2200 movs r2, #0 80257c2: 715a strb r2, [r3, #5] icmphdr->seqno = 0; 80257c4: 693b ldr r3, [r7, #16] 80257c6: 2200 movs r2, #0 80257c8: 719a strb r2, [r3, #6] 80257ca: 2200 movs r2, #0 80257cc: 71da strb r2, [r3, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 80257ce: 69bb ldr r3, [r7, #24] 80257d0: 685b ldr r3, [r3, #4] 80257d2: f103 0008 add.w r0, r3, #8 80257d6: 687b ldr r3, [r7, #4] 80257d8: 685b ldr r3, [r3, #4] 80257da: 221c movs r2, #28 80257dc: 4619 mov r1, r3 80257de: f005 face bl 802ad7e IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); ip4_addr_copy(iphdr_src, iphdr->src); 80257e2: 697b ldr r3, [r7, #20] 80257e4: 68db ldr r3, [r3, #12] 80257e6: 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); 80257e8: f107 030c add.w r3, r7, #12 80257ec: 4618 mov r0, r3 80257ee: f000 f82f bl 8025850 80257f2: 61f8 str r0, [r7, #28] #endif if (netif != NULL) { 80257f4: 69fb ldr r3, [r7, #28] 80257f6: 2b00 cmp r3, #0 80257f8: d01b beq.n 8025832 /* calculate checksum */ icmphdr->chksum = 0; 80257fa: 693b ldr r3, [r7, #16] 80257fc: 2200 movs r2, #0 80257fe: 709a strb r2, [r3, #2] 8025800: 2200 movs r2, #0 8025802: 70da strb r2, [r3, #3] #if CHECKSUM_GEN_ICMP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { icmphdr->chksum = inet_chksum(icmphdr, q->len); 8025804: 69bb ldr r3, [r7, #24] 8025806: 895b ldrh r3, [r3, #10] 8025808: 4619 mov r1, r3 802580a: 6938 ldr r0, [r7, #16] 802580c: f7f4 f95f bl 8019ace 8025810: 4603 mov r3, r0 8025812: 461a mov r2, r3 8025814: 693b ldr r3, [r7, #16] 8025816: 805a strh r2, [r3, #2] } #endif ICMP_STATS_INC(icmp.xmit); ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); 8025818: f107 020c add.w r2, r7, #12 802581c: 69fb ldr r3, [r7, #28] 802581e: 9302 str r3, [sp, #8] 8025820: 2301 movs r3, #1 8025822: 9301 str r3, [sp, #4] 8025824: 2300 movs r3, #0 8025826: 9300 str r3, [sp, #0] 8025828: 23ff movs r3, #255 @ 0xff 802582a: 2100 movs r1, #0 802582c: 69b8 ldr r0, [r7, #24] 802582e: f000 f9ed bl 8025c0c } pbuf_free(q); 8025832: 69b8 ldr r0, [r7, #24] 8025834: f7f5 fda2 bl 801b37c 8025838: e000 b.n 802583c return; 802583a: bf00 nop } 802583c: 3720 adds r7, #32 802583e: 46bd mov sp, r7 8025840: bd80 pop {r7, pc} 8025842: bf00 nop 8025844: 0803146c .word 0x0803146c 8025848: 08031538 .word 0x08031538 802584c: 080314dc .word 0x080314dc 08025850 : * @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) { 8025850: b580 push {r7, lr} 8025852: b084 sub sp, #16 8025854: af00 add r7, sp, #0 8025856: 6078 str r0, [r7, #4] #if !LWIP_SINGLE_NETIF struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 8025858: f7eb fbe0 bl 801101c /* 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) { 802585c: 4b32 ldr r3, [pc, #200] @ (8025928 ) 802585e: 681b ldr r3, [r3, #0] 8025860: 60fb str r3, [r7, #12] 8025862: e036 b.n 80258d2 /* 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))) { 8025864: 68fb ldr r3, [r7, #12] 8025866: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802586a: f003 0301 and.w r3, r3, #1 802586e: b2db uxtb r3, r3 8025870: 2b00 cmp r3, #0 8025872: d02b beq.n 80258cc 8025874: 68fb ldr r3, [r7, #12] 8025876: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802587a: 089b lsrs r3, r3, #2 802587c: f003 0301 and.w r3, r3, #1 8025880: b2db uxtb r3, r3 8025882: 2b00 cmp r3, #0 8025884: d022 beq.n 80258cc 8025886: 68fb ldr r3, [r7, #12] 8025888: 3304 adds r3, #4 802588a: 681b ldr r3, [r3, #0] 802588c: 2b00 cmp r3, #0 802588e: d01d beq.n 80258cc /* network mask matches? */ if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { 8025890: 687b ldr r3, [r7, #4] 8025892: 681a ldr r2, [r3, #0] 8025894: 68fb ldr r3, [r7, #12] 8025896: 3304 adds r3, #4 8025898: 681b ldr r3, [r3, #0] 802589a: 405a eors r2, r3 802589c: 68fb ldr r3, [r7, #12] 802589e: 3308 adds r3, #8 80258a0: 681b ldr r3, [r3, #0] 80258a2: 4013 ands r3, r2 80258a4: 2b00 cmp r3, #0 80258a6: d101 bne.n 80258ac /* return netif on which to forward IP packet */ return netif; 80258a8: 68fb ldr r3, [r7, #12] 80258aa: e038 b.n 802591e } /* 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))) { 80258ac: 68fb ldr r3, [r7, #12] 80258ae: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80258b2: f003 0302 and.w r3, r3, #2 80258b6: 2b00 cmp r3, #0 80258b8: d108 bne.n 80258cc 80258ba: 687b ldr r3, [r7, #4] 80258bc: 681a ldr r2, [r3, #0] 80258be: 68fb ldr r3, [r7, #12] 80258c0: 330c adds r3, #12 80258c2: 681b ldr r3, [r3, #0] 80258c4: 429a cmp r2, r3 80258c6: d101 bne.n 80258cc /* return netif on which to forward IP packet */ return netif; 80258c8: 68fb ldr r3, [r7, #12] 80258ca: e028 b.n 802591e NETIF_FOREACH(netif) { 80258cc: 68fb ldr r3, [r7, #12] 80258ce: 681b ldr r3, [r3, #0] 80258d0: 60fb str r3, [r7, #12] 80258d2: 68fb ldr r3, [r7, #12] 80258d4: 2b00 cmp r3, #0 80258d6: d1c5 bne.n 8025864 return netif; } #endif #endif /* !LWIP_SINGLE_NETIF */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 80258d8: 4b14 ldr r3, [pc, #80] @ (802592c ) 80258da: 681b ldr r3, [r3, #0] 80258dc: 2b00 cmp r3, #0 80258de: d01a beq.n 8025916 80258e0: 4b12 ldr r3, [pc, #72] @ (802592c ) 80258e2: 681b ldr r3, [r3, #0] 80258e4: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80258e8: f003 0301 and.w r3, r3, #1 80258ec: 2b00 cmp r3, #0 80258ee: d012 beq.n 8025916 80258f0: 4b0e ldr r3, [pc, #56] @ (802592c ) 80258f2: 681b ldr r3, [r3, #0] 80258f4: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80258f8: f003 0304 and.w r3, r3, #4 80258fc: 2b00 cmp r3, #0 80258fe: d00a beq.n 8025916 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 8025900: 4b0a ldr r3, [pc, #40] @ (802592c ) 8025902: 681b ldr r3, [r3, #0] 8025904: 3304 adds r3, #4 8025906: 681b ldr r3, [r3, #0] if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 8025908: 2b00 cmp r3, #0 802590a: d004 beq.n 8025916 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 802590c: 687b ldr r3, [r7, #4] 802590e: 681b ldr r3, [r3, #0] 8025910: b2db uxtb r3, r3 8025912: 2b7f cmp r3, #127 @ 0x7f 8025914: d101 bne.n 802591a 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; 8025916: 2300 movs r3, #0 8025918: e001 b.n 802591e } return netif_default; 802591a: 4b04 ldr r3, [pc, #16] @ (802592c ) 802591c: 681b ldr r3, [r3, #0] } 802591e: 4618 mov r0, r3 8025920: 3710 adds r7, #16 8025922: 46bd mov sp, r7 8025924: bd80 pop {r7, pc} 8025926: bf00 nop 8025928: 2402af5c .word 0x2402af5c 802592c: 2402af60 .word 0x2402af60 08025930 : #endif /* IP_FORWARD */ /** Return true if the current input packet should be accepted on this netif */ static int ip4_input_accept(struct netif *netif) { 8025930: b580 push {r7, lr} 8025932: b082 sub sp, #8 8025934: af00 add r7, sp, #0 8025936: 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)))) { 8025938: 687b ldr r3, [r7, #4] 802593a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802593e: f003 0301 and.w r3, r3, #1 8025942: b2db uxtb r3, r3 8025944: 2b00 cmp r3, #0 8025946: d016 beq.n 8025976 8025948: 687b ldr r3, [r7, #4] 802594a: 3304 adds r3, #4 802594c: 681b ldr r3, [r3, #0] 802594e: 2b00 cmp r3, #0 8025950: d011 beq.n 8025976 /* unicast to this interface address? */ if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 8025952: 4b0b ldr r3, [pc, #44] @ (8025980 ) 8025954: 695a ldr r2, [r3, #20] 8025956: 687b ldr r3, [r7, #4] 8025958: 3304 adds r3, #4 802595a: 681b ldr r3, [r3, #0] 802595c: 429a cmp r2, r3 802595e: d008 beq.n 8025972 /* or broadcast on this interface network address? */ ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) 8025960: 4b07 ldr r3, [pc, #28] @ (8025980 ) 8025962: 695b ldr r3, [r3, #20] 8025964: 6879 ldr r1, [r7, #4] 8025966: 4618 mov r0, r3 8025968: f000 fa2a bl 8025dc0 802596c: 4603 mov r3, r0 if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 802596e: 2b00 cmp r3, #0 8025970: d001 beq.n 8025976 #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; 8025972: 2301 movs r3, #1 8025974: e000 b.n 8025978 /* accept on this netif */ return 1; } #endif /* LWIP_AUTOIP */ } return 0; 8025976: 2300 movs r3, #0 } 8025978: 4618 mov r0, r3 802597a: 3708 adds r7, #8 802597c: 46bd mov sp, r7 802597e: bd80 pop {r7, pc} 8025980: 24024418 .word 0x24024418 08025984 : * @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) { 8025984: b580 push {r7, lr} 8025986: b088 sub sp, #32 8025988: af00 add r7, sp, #0 802598a: 6078 str r0, [r7, #4] 802598c: 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; 802598e: 2301 movs r3, #1 8025990: 617b str r3, [r7, #20] #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */ #if LWIP_RAW raw_input_state_t raw_status; #endif /* LWIP_RAW */ LWIP_ASSERT_CORE_LOCKED(); 8025992: f7eb fb43 bl 801101c IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8025996: 687b ldr r3, [r7, #4] 8025998: 685b ldr r3, [r3, #4] 802599a: 613b str r3, [r7, #16] if (IPH_V(iphdr) != 4) { 802599c: 693b ldr r3, [r7, #16] 802599e: 781b ldrb r3, [r3, #0] 80259a0: 091b lsrs r3, r3, #4 80259a2: b2db uxtb r3, r3 80259a4: 2b04 cmp r3, #4 80259a6: d004 beq.n 80259b2 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); 80259a8: 6878 ldr r0, [r7, #4] 80259aa: f7f5 fce7 bl 801b37c IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinhdrerrors); return ERR_OK; 80259ae: 2300 movs r3, #0 80259b0: e123 b.n 8025bfa return ERR_OK; } #endif /* obtain IP header length in bytes */ iphdr_hlen = IPH_HL_BYTES(iphdr); 80259b2: 693b ldr r3, [r7, #16] 80259b4: 781b ldrb r3, [r3, #0] 80259b6: f003 030f and.w r3, r3, #15 80259ba: b2db uxtb r3, r3 80259bc: 009b lsls r3, r3, #2 80259be: b2db uxtb r3, r3 80259c0: 81fb strh r3, [r7, #14] /* obtain ip length in bytes */ iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); 80259c2: 693b ldr r3, [r7, #16] 80259c4: 885b ldrh r3, [r3, #2] 80259c6: b29b uxth r3, r3 80259c8: 4618 mov r0, r3 80259ca: f7f3 fff5 bl 80199b8 80259ce: 4603 mov r3, r0 80259d0: 837b strh r3, [r7, #26] /* Trim pbuf. This is especially required for packets < 60 bytes. */ if (iphdr_len < p->tot_len) { 80259d2: 687b ldr r3, [r7, #4] 80259d4: 891b ldrh r3, [r3, #8] 80259d6: 8b7a ldrh r2, [r7, #26] 80259d8: 429a cmp r2, r3 80259da: d204 bcs.n 80259e6 pbuf_realloc(p, iphdr_len); 80259dc: 8b7b ldrh r3, [r7, #26] 80259de: 4619 mov r1, r3 80259e0: 6878 ldr r0, [r7, #4] 80259e2: f7f5 fb15 bl 801b010 } /* 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)) { 80259e6: 687b ldr r3, [r7, #4] 80259e8: 895b ldrh r3, [r3, #10] 80259ea: 89fa ldrh r2, [r7, #14] 80259ec: 429a cmp r2, r3 80259ee: d807 bhi.n 8025a00 80259f0: 687b ldr r3, [r7, #4] 80259f2: 891b ldrh r3, [r3, #8] 80259f4: 8b7a ldrh r2, [r7, #26] 80259f6: 429a cmp r2, r3 80259f8: d802 bhi.n 8025a00 80259fa: 89fb ldrh r3, [r7, #14] 80259fc: 2b13 cmp r3, #19 80259fe: d804 bhi.n 8025a0a 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); 8025a00: 6878 ldr r0, [r7, #4] 8025a02: f7f5 fcbb bl 801b37c IP_STATS_INC(ip.lenerr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8025a06: 2300 movs r3, #0 8025a08: e0f7 b.n 8025bfa } } #endif /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); 8025a0a: 693b ldr r3, [r7, #16] 8025a0c: 691b ldr r3, [r3, #16] 8025a0e: 4a7d ldr r2, [pc, #500] @ (8025c04 ) 8025a10: 6153 str r3, [r2, #20] ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); 8025a12: 693b ldr r3, [r7, #16] 8025a14: 68db ldr r3, [r3, #12] 8025a16: 4a7b ldr r2, [pc, #492] @ (8025c04 ) 8025a18: 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())) { 8025a1a: 4b7a ldr r3, [pc, #488] @ (8025c04 ) 8025a1c: 695b ldr r3, [r3, #20] 8025a1e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8025a22: 2be0 cmp r3, #224 @ 0xe0 8025a24: d112 bne.n 8025a4c netif = inp; } else { netif = NULL; } #else /* LWIP_IGMP */ if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { 8025a26: 683b ldr r3, [r7, #0] 8025a28: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025a2c: f003 0301 and.w r3, r3, #1 8025a30: b2db uxtb r3, r3 8025a32: 2b00 cmp r3, #0 8025a34: d007 beq.n 8025a46 8025a36: 683b ldr r3, [r7, #0] 8025a38: 3304 adds r3, #4 8025a3a: 681b ldr r3, [r3, #0] 8025a3c: 2b00 cmp r3, #0 8025a3e: d002 beq.n 8025a46 netif = inp; 8025a40: 683b ldr r3, [r7, #0] 8025a42: 61fb str r3, [r7, #28] 8025a44: e02a b.n 8025a9c } else { netif = NULL; 8025a46: 2300 movs r3, #0 8025a48: 61fb str r3, [r7, #28] 8025a4a: e027 b.n 8025a9c } #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)) { 8025a4c: 6838 ldr r0, [r7, #0] 8025a4e: f7ff ff6f bl 8025930 8025a52: 4603 mov r3, r0 8025a54: 2b00 cmp r3, #0 8025a56: d002 beq.n 8025a5e netif = inp; 8025a58: 683b ldr r3, [r7, #0] 8025a5a: 61fb str r3, [r7, #28] 8025a5c: e01e b.n 8025a9c } else { netif = NULL; 8025a5e: 2300 movs r3, #0 8025a60: 61fb str r3, [r7, #28] #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())) 8025a62: 4b68 ldr r3, [pc, #416] @ (8025c04 ) 8025a64: 695b ldr r3, [r3, #20] 8025a66: b2db uxtb r3, r3 8025a68: 2b7f cmp r3, #127 @ 0x7f 8025a6a: d017 beq.n 8025a9c #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ { #if !LWIP_SINGLE_NETIF NETIF_FOREACH(netif) { 8025a6c: 4b66 ldr r3, [pc, #408] @ (8025c08 ) 8025a6e: 681b ldr r3, [r3, #0] 8025a70: 61fb str r3, [r7, #28] 8025a72: e00e b.n 8025a92 if (netif == inp) { 8025a74: 69fa ldr r2, [r7, #28] 8025a76: 683b ldr r3, [r7, #0] 8025a78: 429a cmp r2, r3 8025a7a: d006 beq.n 8025a8a /* we checked that before already */ continue; } if (ip4_input_accept(netif)) { 8025a7c: 69f8 ldr r0, [r7, #28] 8025a7e: f7ff ff57 bl 8025930 8025a82: 4603 mov r3, r0 8025a84: 2b00 cmp r3, #0 8025a86: d108 bne.n 8025a9a 8025a88: e000 b.n 8025a8c continue; 8025a8a: bf00 nop NETIF_FOREACH(netif) { 8025a8c: 69fb ldr r3, [r7, #28] 8025a8e: 681b ldr r3, [r3, #0] 8025a90: 61fb str r3, [r7, #28] 8025a92: 69fb ldr r3, [r7, #28] 8025a94: 2b00 cmp r3, #0 8025a96: d1ed bne.n 8025a74 8025a98: e000 b.n 8025a9c break; 8025a9a: 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) { 8025a9c: 69fb ldr r3, [r7, #28] 8025a9e: 2b00 cmp r3, #0 8025aa0: d111 bne.n 8025ac6 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 8025aa2: 693b ldr r3, [r7, #16] 8025aa4: 7a5b ldrb r3, [r3, #9] 8025aa6: 2b11 cmp r3, #17 8025aa8: d10d bne.n 8025ac6 const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen); 8025aaa: 89fb ldrh r3, [r7, #14] 8025aac: 693a ldr r2, [r7, #16] 8025aae: 4413 add r3, r2 8025ab0: 60bb str r3, [r7, #8] 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)) { 8025ab2: 68bb ldr r3, [r7, #8] 8025ab4: 885b ldrh r3, [r3, #2] 8025ab6: b29b uxth r3, r3 8025ab8: f5b3 4f88 cmp.w r3, #17408 @ 0x4400 8025abc: d103 bne.n 8025ac6 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); netif = inp; 8025abe: 683b ldr r3, [r7, #0] 8025ac0: 61fb str r3, [r7, #28] check_ip_src = 0; 8025ac2: 2300 movs r3, #0 8025ac4: 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 8025ac6: 697b ldr r3, [r7, #20] 8025ac8: 2b00 cmp r3, #0 8025aca: d017 beq.n 8025afc #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()) 8025acc: 4b4d ldr r3, [pc, #308] @ (8025c04 ) 8025ace: 691b ldr r3, [r3, #16] 8025ad0: 2b00 cmp r3, #0 8025ad2: d013 beq.n 8025afc #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ ) #endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8025ad4: 4b4b ldr r3, [pc, #300] @ (8025c04 ) 8025ad6: 691b ldr r3, [r3, #16] 8025ad8: 6839 ldr r1, [r7, #0] 8025ada: 4618 mov r0, r3 8025adc: f000 f970 bl 8025dc0 8025ae0: 4603 mov r3, r0 8025ae2: 2b00 cmp r3, #0 8025ae4: d105 bne.n 8025af2 (ip4_addr_ismulticast(ip4_current_src_addr()))) { 8025ae6: 4b47 ldr r3, [pc, #284] @ (8025c04 ) 8025ae8: 691b ldr r3, [r3, #16] 8025aea: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8025aee: 2be0 cmp r3, #224 @ 0xe0 8025af0: d104 bne.n 8025afc /* 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); 8025af2: 6878 ldr r0, [r7, #4] 8025af4: f7f5 fc42 bl 801b37c IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8025af8: 2300 movs r3, #0 8025afa: e07e b.n 8025bfa } } /* packet not for us? */ if (netif == NULL) { 8025afc: 69fb ldr r3, [r7, #28] 8025afe: 2b00 cmp r3, #0 8025b00: d104 bne.n 8025b0c { IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); } pbuf_free(p); 8025b02: 6878 ldr r0, [r7, #4] 8025b04: f7f5 fc3a bl 801b37c return ERR_OK; 8025b08: 2300 movs r3, #0 8025b0a: e076 b.n 8025bfa } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8025b0c: 693b ldr r3, [r7, #16] 8025b0e: 88db ldrh r3, [r3, #6] 8025b10: b29b uxth r3, r3 8025b12: 461a mov r2, r3 8025b14: f64f 733f movw r3, #65343 @ 0xff3f 8025b18: 4013 ands r3, r2 8025b1a: 2b00 cmp r3, #0 8025b1c: d00b beq.n 8025b36 #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); 8025b1e: 6878 ldr r0, [r7, #4] 8025b20: f000 fe62 bl 80267e8 8025b24: 6078 str r0, [r7, #4] /* packet not fully reassembled yet? */ if (p == NULL) { 8025b26: 687b ldr r3, [r7, #4] 8025b28: 2b00 cmp r3, #0 8025b2a: d101 bne.n 8025b30 return ERR_OK; 8025b2c: 2300 movs r3, #0 8025b2e: e064 b.n 8025bfa } iphdr = (const struct ip_hdr *)p->payload; 8025b30: 687b ldr r3, [r7, #4] 8025b32: 685b ldr r3, [r3, #4] 8025b34: 613b str r3, [r7, #16] /* 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; 8025b36: 4a33 ldr r2, [pc, #204] @ (8025c04 ) 8025b38: 69fb ldr r3, [r7, #28] 8025b3a: 6013 str r3, [r2, #0] ip_data.current_input_netif = inp; 8025b3c: 4a31 ldr r2, [pc, #196] @ (8025c04 ) 8025b3e: 683b ldr r3, [r7, #0] 8025b40: 6053 str r3, [r2, #4] ip_data.current_ip4_header = iphdr; 8025b42: 4a30 ldr r2, [pc, #192] @ (8025c04 ) 8025b44: 693b ldr r3, [r7, #16] 8025b46: 6093 str r3, [r2, #8] ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); 8025b48: 693b ldr r3, [r7, #16] 8025b4a: 781b ldrb r3, [r3, #0] 8025b4c: f003 030f and.w r3, r3, #15 8025b50: b2db uxtb r3, r3 8025b52: 009b lsls r3, r3, #2 8025b54: b2db uxtb r3, r3 8025b56: 461a mov r2, r3 8025b58: 4b2a ldr r3, [pc, #168] @ (8025c04 ) 8025b5a: 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. */ 8025b5c: 89fb ldrh r3, [r7, #14] 8025b5e: 4619 mov r1, r3 8025b60: 6878 ldr r0, [r7, #4] 8025b62: f7f5 fb53 bl 801b20c switch (IPH_PROTO(iphdr)) { 8025b66: 693b ldr r3, [r7, #16] 8025b68: 7a5b ldrb r3, [r3, #9] 8025b6a: 2b11 cmp r3, #17 8025b6c: d006 beq.n 8025b7c 8025b6e: 2b11 cmp r3, #17 8025b70: dc13 bgt.n 8025b9a 8025b72: 2b01 cmp r3, #1 8025b74: d00c beq.n 8025b90 8025b76: 2b06 cmp r3, #6 8025b78: d005 beq.n 8025b86 8025b7a: e00e b.n 8025b9a case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ MIB2_STATS_INC(mib2.ipindelivers); udp_input(p, inp); 8025b7c: 6839 ldr r1, [r7, #0] 8025b7e: 6878 ldr r0, [r7, #4] 8025b80: f7fc f99c bl 8021ebc break; 8025b84: e026 b.n 8025bd4 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: MIB2_STATS_INC(mib2.ipindelivers); tcp_input(p, inp); 8025b86: 6839 ldr r1, [r7, #0] 8025b88: 6878 ldr r0, [r7, #4] 8025b8a: f7f7 fcdd bl 801d548 break; 8025b8e: e021 b.n 8025bd4 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: MIB2_STATS_INC(mib2.ipindelivers); icmp_input(p, inp); 8025b90: 6839 ldr r1, [r7, #0] 8025b92: 6878 ldr r0, [r7, #4] 8025b94: f7ff fca4 bl 80254e0 break; 8025b98: e01c b.n 8025bd4 } 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) && 8025b9a: 4b1a ldr r3, [pc, #104] @ (8025c04 ) 8025b9c: 695b ldr r3, [r3, #20] 8025b9e: 69f9 ldr r1, [r7, #28] 8025ba0: 4618 mov r0, r3 8025ba2: f000 f90d bl 8025dc0 8025ba6: 4603 mov r3, r0 8025ba8: 2b00 cmp r3, #0 8025baa: d10f bne.n 8025bcc !ip4_addr_ismulticast(ip4_current_dest_addr())) { 8025bac: 4b15 ldr r3, [pc, #84] @ (8025c04 ) 8025bae: 695b ldr r3, [r3, #20] 8025bb0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 8025bb4: 2be0 cmp r3, #224 @ 0xe0 8025bb6: d009 beq.n 8025bcc pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ 8025bb8: f9b7 300e ldrsh.w r3, [r7, #14] 8025bbc: 4619 mov r1, r3 8025bbe: 6878 ldr r0, [r7, #4] 8025bc0: f7f5 fb97 bl 801b2f2 icmp_dest_unreach(p, ICMP_DUR_PROTO); 8025bc4: 2102 movs r1, #2 8025bc6: 6878 ldr r0, [r7, #4] 8025bc8: f7ff fdae bl 8025728 IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinunknownprotos); } pbuf_free(p); 8025bcc: 6878 ldr r0, [r7, #4] 8025bce: f7f5 fbd5 bl 801b37c break; 8025bd2: bf00 nop } } /* @todo: this is not really necessary... */ ip_data.current_netif = NULL; 8025bd4: 4b0b ldr r3, [pc, #44] @ (8025c04 ) 8025bd6: 2200 movs r2, #0 8025bd8: 601a str r2, [r3, #0] ip_data.current_input_netif = NULL; 8025bda: 4b0a ldr r3, [pc, #40] @ (8025c04 ) 8025bdc: 2200 movs r2, #0 8025bde: 605a str r2, [r3, #4] ip_data.current_ip4_header = NULL; 8025be0: 4b08 ldr r3, [pc, #32] @ (8025c04 ) 8025be2: 2200 movs r2, #0 8025be4: 609a str r2, [r3, #8] ip_data.current_ip_header_tot_len = 0; 8025be6: 4b07 ldr r3, [pc, #28] @ (8025c04 ) 8025be8: 2200 movs r2, #0 8025bea: 819a strh r2, [r3, #12] ip4_addr_set_any(ip4_current_src_addr()); 8025bec: 4b05 ldr r3, [pc, #20] @ (8025c04 ) 8025bee: 2200 movs r2, #0 8025bf0: 611a str r2, [r3, #16] ip4_addr_set_any(ip4_current_dest_addr()); 8025bf2: 4b04 ldr r3, [pc, #16] @ (8025c04 ) 8025bf4: 2200 movs r2, #0 8025bf6: 615a str r2, [r3, #20] return ERR_OK; 8025bf8: 2300 movs r3, #0 } 8025bfa: 4618 mov r0, r3 8025bfc: 3720 adds r7, #32 8025bfe: 46bd mov sp, r7 8025c00: bd80 pop {r7, pc} 8025c02: bf00 nop 8025c04: 24024418 .word 0x24024418 8025c08: 2402af5c .word 0x2402af5c 08025c0c : */ 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) { 8025c0c: b580 push {r7, lr} 8025c0e: b08a sub sp, #40 @ 0x28 8025c10: af04 add r7, sp, #16 8025c12: 60f8 str r0, [r7, #12] 8025c14: 60b9 str r1, [r7, #8] 8025c16: 607a str r2, [r7, #4] 8025c18: 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; 8025c1a: 68bb ldr r3, [r7, #8] 8025c1c: 617b str r3, [r7, #20] if (dest != LWIP_IP_HDRINCL) { 8025c1e: 687b ldr r3, [r7, #4] 8025c20: 2b00 cmp r3, #0 8025c22: d009 beq.n 8025c38 if (ip4_addr_isany(src)) { 8025c24: 68bb ldr r3, [r7, #8] 8025c26: 2b00 cmp r3, #0 8025c28: d003 beq.n 8025c32 8025c2a: 68bb ldr r3, [r7, #8] 8025c2c: 681b ldr r3, [r3, #0] 8025c2e: 2b00 cmp r3, #0 8025c30: d102 bne.n 8025c38 src_used = netif_ip4_addr(netif); 8025c32: 6abb ldr r3, [r7, #40] @ 0x28 8025c34: 3304 adds r3, #4 8025c36: 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); 8025c38: 78fa ldrb r2, [r7, #3] 8025c3a: 6abb ldr r3, [r7, #40] @ 0x28 8025c3c: 9302 str r3, [sp, #8] 8025c3e: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 8025c42: 9301 str r3, [sp, #4] 8025c44: f897 3020 ldrb.w r3, [r7, #32] 8025c48: 9300 str r3, [sp, #0] 8025c4a: 4613 mov r3, r2 8025c4c: 687a ldr r2, [r7, #4] 8025c4e: 6979 ldr r1, [r7, #20] 8025c50: 68f8 ldr r0, [r7, #12] 8025c52: f000 f805 bl 8025c60 8025c56: 4603 mov r3, r0 #endif /* IP_OPTIONS_SEND */ } 8025c58: 4618 mov r0, r3 8025c5a: 3718 adds r7, #24 8025c5c: 46bd mov sp, r7 8025c5e: bd80 pop {r7, pc} 08025c60 : */ 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) { 8025c60: b580 push {r7, lr} 8025c62: b088 sub sp, #32 8025c64: af00 add r7, sp, #0 8025c66: 60f8 str r0, [r7, #12] 8025c68: 60b9 str r1, [r7, #8] 8025c6a: 607a str r2, [r7, #4] 8025c6c: 70fb strb r3, [r7, #3] ip4_addr_t dest_addr; #if CHECKSUM_GEN_IP_INLINE u32_t chk_sum = 0; #endif /* CHECKSUM_GEN_IP_INLINE */ LWIP_ASSERT_CORE_LOCKED(); 8025c6e: f7eb f9d5 bl 801101c LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); 8025c72: 68fb ldr r3, [r7, #12] 8025c74: 7b9b ldrb r3, [r3, #14] 8025c76: 2b01 cmp r3, #1 8025c78: d006 beq.n 8025c88 8025c7a: 4b4b ldr r3, [pc, #300] @ (8025da8 ) 8025c7c: f44f 7255 mov.w r2, #852 @ 0x354 8025c80: 494a ldr r1, [pc, #296] @ (8025dac ) 8025c82: 484b ldr r0, [pc, #300] @ (8025db0 ) 8025c84: f004 fdf2 bl 802a86c MIB2_STATS_INC(mib2.ipoutrequests); /* Should the IP header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { 8025c88: 687b ldr r3, [r7, #4] 8025c8a: 2b00 cmp r3, #0 8025c8c: d060 beq.n 8025d50 u16_t ip_hlen = IP_HLEN; 8025c8e: 2314 movs r3, #20 8025c90: 837b strh r3, [r7, #26] } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_add_header(p, IP_HLEN)) { 8025c92: 2114 movs r1, #20 8025c94: 68f8 ldr r0, [r7, #12] 8025c96: f7f5 faa9 bl 801b1ec 8025c9a: 4603 mov r3, r0 8025c9c: 2b00 cmp r3, #0 8025c9e: d002 beq.n 8025ca6 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; 8025ca0: f06f 0301 mvn.w r3, #1 8025ca4: e07c b.n 8025da0 } iphdr = (struct ip_hdr *)p->payload; 8025ca6: 68fb ldr r3, [r7, #12] 8025ca8: 685b ldr r3, [r3, #4] 8025caa: 61fb str r3, [r7, #28] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 8025cac: 68fb ldr r3, [r7, #12] 8025cae: 895b ldrh r3, [r3, #10] 8025cb0: 2b13 cmp r3, #19 8025cb2: d806 bhi.n 8025cc2 8025cb4: 4b3c ldr r3, [pc, #240] @ (8025da8 ) 8025cb6: f44f 7262 mov.w r2, #904 @ 0x388 8025cba: 493e ldr r1, [pc, #248] @ (8025db4 ) 8025cbc: 483c ldr r0, [pc, #240] @ (8025db0 ) 8025cbe: f004 fdd5 bl 802a86c (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 8025cc2: 69fb ldr r3, [r7, #28] 8025cc4: 78fa ldrb r2, [r7, #3] 8025cc6: 721a strb r2, [r3, #8] IPH_PROTO_SET(iphdr, proto); 8025cc8: 69fb ldr r3, [r7, #28] 8025cca: f897 202c ldrb.w r2, [r7, #44] @ 0x2c 8025cce: 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); 8025cd0: 687b ldr r3, [r7, #4] 8025cd2: 681a ldr r2, [r3, #0] 8025cd4: 69fb ldr r3, [r7, #28] 8025cd6: 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); 8025cd8: 8b7b ldrh r3, [r7, #26] 8025cda: 089b lsrs r3, r3, #2 8025cdc: b29b uxth r3, r3 8025cde: b2db uxtb r3, r3 8025ce0: f043 0340 orr.w r3, r3, #64 @ 0x40 8025ce4: b2da uxtb r2, r3 8025ce6: 69fb ldr r3, [r7, #28] 8025ce8: 701a strb r2, [r3, #0] IPH_TOS_SET(iphdr, tos); 8025cea: 69fb ldr r3, [r7, #28] 8025cec: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 8025cf0: 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)); 8025cf2: 68fb ldr r3, [r7, #12] 8025cf4: 891b ldrh r3, [r3, #8] 8025cf6: 4618 mov r0, r3 8025cf8: f7f3 fe5e bl 80199b8 8025cfc: 4603 mov r3, r0 8025cfe: 461a mov r2, r3 8025d00: 69fb ldr r3, [r7, #28] 8025d02: 805a strh r2, [r3, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 8025d04: 69fb ldr r3, [r7, #28] 8025d06: 2200 movs r2, #0 8025d08: 719a strb r2, [r3, #6] 8025d0a: 2200 movs r2, #0 8025d0c: 71da strb r2, [r3, #7] IPH_ID_SET(iphdr, lwip_htons(ip_id)); 8025d0e: 4b2a ldr r3, [pc, #168] @ (8025db8 ) 8025d10: 881b ldrh r3, [r3, #0] 8025d12: 4618 mov r0, r3 8025d14: f7f3 fe50 bl 80199b8 8025d18: 4603 mov r3, r0 8025d1a: 461a mov r2, r3 8025d1c: 69fb ldr r3, [r7, #28] 8025d1e: 809a strh r2, [r3, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8025d20: 4b25 ldr r3, [pc, #148] @ (8025db8 ) 8025d22: 881b ldrh r3, [r3, #0] 8025d24: 3301 adds r3, #1 8025d26: b29a uxth r2, r3 8025d28: 4b23 ldr r3, [pc, #140] @ (8025db8 ) 8025d2a: 801a strh r2, [r3, #0] if (src == NULL) { 8025d2c: 68bb ldr r3, [r7, #8] 8025d2e: 2b00 cmp r3, #0 8025d30: d104 bne.n 8025d3c ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); 8025d32: 4b22 ldr r3, [pc, #136] @ (8025dbc ) 8025d34: 681a ldr r2, [r3, #0] 8025d36: 69fb ldr r3, [r7, #28] 8025d38: 60da str r2, [r3, #12] 8025d3a: e003 b.n 8025d44 } else { /* src cannot be NULL here */ ip4_addr_copy(iphdr->src, *src); 8025d3c: 68bb ldr r3, [r7, #8] 8025d3e: 681a ldr r2, [r3, #0] 8025d40: 69fb ldr r3, [r7, #28] 8025d42: 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); 8025d44: 69fb ldr r3, [r7, #28] 8025d46: 2200 movs r2, #0 8025d48: 729a strb r2, [r3, #10] 8025d4a: 2200 movs r2, #0 8025d4c: 72da strb r2, [r3, #11] 8025d4e: e00f b.n 8025d70 } #endif /* CHECKSUM_GEN_IP */ #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ if (p->len < IP_HLEN) { 8025d50: 68fb ldr r3, [r7, #12] 8025d52: 895b ldrh r3, [r3, #10] 8025d54: 2b13 cmp r3, #19 8025d56: d802 bhi.n 8025d5e 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; 8025d58: f06f 0301 mvn.w r3, #1 8025d5c: e020 b.n 8025da0 } iphdr = (struct ip_hdr *)p->payload; 8025d5e: 68fb ldr r3, [r7, #12] 8025d60: 685b ldr r3, [r3, #4] 8025d62: 61fb str r3, [r7, #28] ip4_addr_copy(dest_addr, iphdr->dest); 8025d64: 69fb ldr r3, [r7, #28] 8025d66: 691b ldr r3, [r3, #16] 8025d68: 617b str r3, [r7, #20] dest = &dest_addr; 8025d6a: f107 0314 add.w r3, r7, #20 8025d6e: 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)) { 8025d70: 6b3b ldr r3, [r7, #48] @ 0x30 8025d72: 8d1b ldrh r3, [r3, #40] @ 0x28 8025d74: 2b00 cmp r3, #0 8025d76: d00c beq.n 8025d92 8025d78: 68fb ldr r3, [r7, #12] 8025d7a: 891a ldrh r2, [r3, #8] 8025d7c: 6b3b ldr r3, [r7, #48] @ 0x30 8025d7e: 8d1b ldrh r3, [r3, #40] @ 0x28 8025d80: 429a cmp r2, r3 8025d82: d906 bls.n 8025d92 return ip4_frag(p, netif, dest); 8025d84: 687a ldr r2, [r7, #4] 8025d86: 6b39 ldr r1, [r7, #48] @ 0x30 8025d88: 68f8 ldr r0, [r7, #12] 8025d8a: f000 ff21 bl 8026bd0 8025d8e: 4603 mov r3, r0 8025d90: e006 b.n 8025da0 } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); return netif->output(netif, p, dest); 8025d92: 6b3b ldr r3, [r7, #48] @ 0x30 8025d94: 695b ldr r3, [r3, #20] 8025d96: 687a ldr r2, [r7, #4] 8025d98: 68f9 ldr r1, [r7, #12] 8025d9a: 6b38 ldr r0, [r7, #48] @ 0x30 8025d9c: 4798 blx r3 8025d9e: 4603 mov r3, r0 } 8025da0: 4618 mov r0, r3 8025da2: 3720 adds r7, #32 8025da4: 46bd mov sp, r7 8025da6: bd80 pop {r7, pc} 8025da8: 08031564 .word 0x08031564 8025dac: 08031598 .word 0x08031598 8025db0: 080315a4 .word 0x080315a4 8025db4: 080315cc .word 0x080315cc 8025db8: 2402b0f2 .word 0x2402b0f2 8025dbc: 08031c78 .word 0x08031c78 08025dc0 : * @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) { 8025dc0: b480 push {r7} 8025dc2: b085 sub sp, #20 8025dc4: af00 add r7, sp, #0 8025dc6: 6078 str r0, [r7, #4] 8025dc8: 6039 str r1, [r7, #0] ip4_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); 8025dca: 687b ldr r3, [r7, #4] 8025dcc: 60fb str r3, [r7, #12] /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 8025dce: 687b ldr r3, [r7, #4] 8025dd0: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8025dd4: d002 beq.n 8025ddc 8025dd6: 687b ldr r3, [r7, #4] 8025dd8: 2b00 cmp r3, #0 8025dda: d101 bne.n 8025de0 (addr == IPADDR_ANY)) { return 1; 8025ddc: 2301 movs r3, #1 8025dde: e02a b.n 8025e36 /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8025de0: 683b ldr r3, [r7, #0] 8025de2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025de6: f003 0302 and.w r3, r3, #2 8025dea: 2b00 cmp r3, #0 8025dec: d101 bne.n 8025df2 /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 8025dee: 2300 movs r3, #0 8025df0: e021 b.n 8025e36 /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { 8025df2: 683b ldr r3, [r7, #0] 8025df4: 3304 adds r3, #4 8025df6: 681b ldr r3, [r3, #0] 8025df8: 687a ldr r2, [r7, #4] 8025dfa: 429a cmp r2, r3 8025dfc: d101 bne.n 8025e02 return 0; 8025dfe: 2300 movs r3, #0 8025e00: e019 b.n 8025e36 /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) 8025e02: 68fa ldr r2, [r7, #12] 8025e04: 683b ldr r3, [r7, #0] 8025e06: 3304 adds r3, #4 8025e08: 681b ldr r3, [r3, #0] 8025e0a: 405a eors r2, r3 8025e0c: 683b ldr r3, [r7, #0] 8025e0e: 3308 adds r3, #8 8025e10: 681b ldr r3, [r3, #0] 8025e12: 4013 ands r3, r2 8025e14: 2b00 cmp r3, #0 8025e16: d10d bne.n 8025e34 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8025e18: 683b ldr r3, [r7, #0] 8025e1a: 3308 adds r3, #8 8025e1c: 681b ldr r3, [r3, #0] 8025e1e: 43da mvns r2, r3 8025e20: 687b ldr r3, [r7, #4] 8025e22: 401a ands r2, r3 (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { 8025e24: 683b ldr r3, [r7, #0] 8025e26: 3308 adds r3, #8 8025e28: 681b ldr r3, [r3, #0] 8025e2a: 43db mvns r3, r3 && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8025e2c: 429a cmp r2, r3 8025e2e: d101 bne.n 8025e34 /* => network broadcast address */ return 1; 8025e30: 2301 movs r3, #1 8025e32: e000 b.n 8025e36 } else { return 0; 8025e34: 2300 movs r3, #0 } } 8025e36: 4618 mov r0, r3 8025e38: 3714 adds r7, #20 8025e3a: 46bd mov sp, r7 8025e3c: f85d 7b04 ldr.w r7, [sp], #4 8025e40: 4770 bx lr 08025e42 : * @param cp IP address in ascii representation (e.g. "127.0.0.1") * @return ip address in network order */ u32_t ipaddr_addr(const char *cp) { 8025e42: b580 push {r7, lr} 8025e44: b084 sub sp, #16 8025e46: af00 add r7, sp, #0 8025e48: 6078 str r0, [r7, #4] ip4_addr_t val; if (ip4addr_aton(cp, &val)) { 8025e4a: f107 030c add.w r3, r7, #12 8025e4e: 4619 mov r1, r3 8025e50: 6878 ldr r0, [r7, #4] 8025e52: f000 f80b bl 8025e6c 8025e56: 4603 mov r3, r0 8025e58: 2b00 cmp r3, #0 8025e5a: d001 beq.n 8025e60 return ip4_addr_get_u32(&val); 8025e5c: 68fb ldr r3, [r7, #12] 8025e5e: e001 b.n 8025e64 } return (IPADDR_NONE); 8025e60: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8025e64: 4618 mov r0, r3 8025e66: 3710 adds r7, #16 8025e68: 46bd mov sp, r7 8025e6a: bd80 pop {r7, pc} 08025e6c : * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ip4addr_aton(const char *cp, ip4_addr_t *addr) { 8025e6c: b580 push {r7, lr} 8025e6e: b08a sub sp, #40 @ 0x28 8025e70: af00 add r7, sp, #0 8025e72: 6078 str r0, [r7, #4] 8025e74: 6039 str r1, [r7, #0] u32_t val; u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; 8025e76: f107 030c add.w r3, r7, #12 8025e7a: 61fb str r3, [r7, #28] c = *cp; 8025e7c: 687b ldr r3, [r7, #4] 8025e7e: 781b ldrb r3, [r3, #0] 8025e80: f887 3022 strb.w r3, [r7, #34] @ 0x22 /* * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!lwip_isdigit(c)) { 8025e84: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025e88: 3301 adds r3, #1 8025e8a: 4a89 ldr r2, [pc, #548] @ (80260b0 ) 8025e8c: 4413 add r3, r2 8025e8e: 781b ldrb r3, [r3, #0] 8025e90: f003 0304 and.w r3, r3, #4 8025e94: 2b00 cmp r3, #0 8025e96: d101 bne.n 8025e9c return 0; 8025e98: 2300 movs r3, #0 8025e9a: e105 b.n 80260a8 } val = 0; 8025e9c: 2300 movs r3, #0 8025e9e: 627b str r3, [r7, #36] @ 0x24 base = 10; 8025ea0: 230a movs r3, #10 8025ea2: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (c == '0') { 8025ea6: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025eaa: 2b30 cmp r3, #48 @ 0x30 8025eac: d11c bne.n 8025ee8 c = *++cp; 8025eae: 687b ldr r3, [r7, #4] 8025eb0: 3301 adds r3, #1 8025eb2: 607b str r3, [r7, #4] 8025eb4: 687b ldr r3, [r7, #4] 8025eb6: 781b ldrb r3, [r3, #0] 8025eb8: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (c == 'x' || c == 'X') { 8025ebc: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025ec0: 2b78 cmp r3, #120 @ 0x78 8025ec2: d003 beq.n 8025ecc 8025ec4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025ec8: 2b58 cmp r3, #88 @ 0x58 8025eca: d10a bne.n 8025ee2 base = 16; 8025ecc: 2310 movs r3, #16 8025ece: f887 3023 strb.w r3, [r7, #35] @ 0x23 c = *++cp; 8025ed2: 687b ldr r3, [r7, #4] 8025ed4: 3301 adds r3, #1 8025ed6: 607b str r3, [r7, #4] 8025ed8: 687b ldr r3, [r7, #4] 8025eda: 781b ldrb r3, [r3, #0] 8025edc: f887 3022 strb.w r3, [r7, #34] @ 0x22 8025ee0: e002 b.n 8025ee8 } else { base = 8; 8025ee2: 2308 movs r3, #8 8025ee4: f887 3023 strb.w r3, [r7, #35] @ 0x23 } } for (;;) { if (lwip_isdigit(c)) { 8025ee8: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025eec: 3301 adds r3, #1 8025eee: 4a70 ldr r2, [pc, #448] @ (80260b0 ) 8025ef0: 4413 add r3, r2 8025ef2: 781b ldrb r3, [r3, #0] 8025ef4: f003 0304 and.w r3, r3, #4 8025ef8: 2b00 cmp r3, #0 8025efa: d011 beq.n 8025f20 val = (val * base) + (u32_t)(c - '0'); 8025efc: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025f00: 6a7a ldr r2, [r7, #36] @ 0x24 8025f02: fb03 f202 mul.w r2, r3, r2 8025f06: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f0a: 4413 add r3, r2 8025f0c: 3b30 subs r3, #48 @ 0x30 8025f0e: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 8025f10: 687b ldr r3, [r7, #4] 8025f12: 3301 adds r3, #1 8025f14: 607b str r3, [r7, #4] 8025f16: 687b ldr r3, [r7, #4] 8025f18: 781b ldrb r3, [r3, #0] 8025f1a: f887 3022 strb.w r3, [r7, #34] @ 0x22 8025f1e: e7e3 b.n 8025ee8 } else if (base == 16 && lwip_isxdigit(c)) { 8025f20: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025f24: 2b10 cmp r3, #16 8025f26: d127 bne.n 8025f78 8025f28: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f2c: 3301 adds r3, #1 8025f2e: 4a60 ldr r2, [pc, #384] @ (80260b0 ) 8025f30: 4413 add r3, r2 8025f32: 781b ldrb r3, [r3, #0] 8025f34: f003 0344 and.w r3, r3, #68 @ 0x44 8025f38: 2b00 cmp r3, #0 8025f3a: d01d beq.n 8025f78 val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); 8025f3c: 6a7b ldr r3, [r7, #36] @ 0x24 8025f3e: 011b lsls r3, r3, #4 8025f40: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 8025f44: f102 010a add.w r1, r2, #10 8025f48: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 8025f4c: 3201 adds r2, #1 8025f4e: 4858 ldr r0, [pc, #352] @ (80260b0 ) 8025f50: 4402 add r2, r0 8025f52: 7812 ldrb r2, [r2, #0] 8025f54: f002 0203 and.w r2, r2, #3 8025f58: 2a02 cmp r2, #2 8025f5a: d101 bne.n 8025f60 8025f5c: 2261 movs r2, #97 @ 0x61 8025f5e: e000 b.n 8025f62 8025f60: 2241 movs r2, #65 @ 0x41 8025f62: 1a8a subs r2, r1, r2 8025f64: 4313 orrs r3, r2 8025f66: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 8025f68: 687b ldr r3, [r7, #4] 8025f6a: 3301 adds r3, #1 8025f6c: 607b str r3, [r7, #4] 8025f6e: 687b ldr r3, [r7, #4] 8025f70: 781b ldrb r3, [r3, #0] 8025f72: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (lwip_isdigit(c)) { 8025f76: e7b7 b.n 8025ee8 } else { break; } } if (c == '.') { 8025f78: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f7c: 2b2e cmp r3, #46 @ 0x2e 8025f7e: d114 bne.n 8025faa * Internet format: * a.b.c.d * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ if (pp >= parts + 3) { 8025f80: f107 030c add.w r3, r7, #12 8025f84: 330c adds r3, #12 8025f86: 69fa ldr r2, [r7, #28] 8025f88: 429a cmp r2, r3 8025f8a: d301 bcc.n 8025f90 return 0; 8025f8c: 2300 movs r3, #0 8025f8e: e08b b.n 80260a8 } *pp++ = val; 8025f90: 69fb ldr r3, [r7, #28] 8025f92: 1d1a adds r2, r3, #4 8025f94: 61fa str r2, [r7, #28] 8025f96: 6a7a ldr r2, [r7, #36] @ 0x24 8025f98: 601a str r2, [r3, #0] c = *++cp; 8025f9a: 687b ldr r3, [r7, #4] 8025f9c: 3301 adds r3, #1 8025f9e: 607b str r3, [r7, #4] 8025fa0: 687b ldr r3, [r7, #4] 8025fa2: 781b ldrb r3, [r3, #0] 8025fa4: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (!lwip_isdigit(c)) { 8025fa8: e76c b.n 8025e84 } else { break; 8025faa: bf00 nop } } /* * Check for trailing characters. */ if (c != '\0' && !lwip_isspace(c)) { 8025fac: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025fb0: 2b00 cmp r3, #0 8025fb2: d00b beq.n 8025fcc 8025fb4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025fb8: 3301 adds r3, #1 8025fba: 4a3d ldr r2, [pc, #244] @ (80260b0 ) 8025fbc: 4413 add r3, r2 8025fbe: 781b ldrb r3, [r3, #0] 8025fc0: f003 0308 and.w r3, r3, #8 8025fc4: 2b00 cmp r3, #0 8025fc6: d101 bne.n 8025fcc return 0; 8025fc8: 2300 movs r3, #0 8025fca: e06d b.n 80260a8 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8025fcc: f107 030c add.w r3, r7, #12 8025fd0: 69fa ldr r2, [r7, #28] 8025fd2: 1ad3 subs r3, r2, r3 8025fd4: 109b asrs r3, r3, #2 8025fd6: 3301 adds r3, #1 8025fd8: 2b04 cmp r3, #4 8025fda: d853 bhi.n 8026084 8025fdc: a201 add r2, pc, #4 @ (adr r2, 8025fe4 ) 8025fde: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8025fe2: bf00 nop 8025fe4: 08025ff9 .word 0x08025ff9 8025fe8: 08026093 .word 0x08026093 8025fec: 08025ffd .word 0x08025ffd 8025ff0: 0802601f .word 0x0802601f 8025ff4: 0802604d .word 0x0802604d case 0: return 0; /* initial nondigit */ 8025ff8: 2300 movs r3, #0 8025ffa: e055 b.n 80260a8 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 8025ffc: 6a7b ldr r3, [r7, #36] @ 0x24 8025ffe: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 8026002: d301 bcc.n 8026008 return 0; 8026004: 2300 movs r3, #0 8026006: e04f b.n 80260a8 } if (parts[0] > 0xff) { 8026008: 68fb ldr r3, [r7, #12] 802600a: 2bff cmp r3, #255 @ 0xff 802600c: d901 bls.n 8026012 return 0; 802600e: 2300 movs r3, #0 8026010: e04a b.n 80260a8 } val |= parts[0] << 24; 8026012: 68fb ldr r3, [r7, #12] 8026014: 061b lsls r3, r3, #24 8026016: 6a7a ldr r2, [r7, #36] @ 0x24 8026018: 4313 orrs r3, r2 802601a: 627b str r3, [r7, #36] @ 0x24 break; 802601c: e03a b.n 8026094 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 802601e: 6a7b ldr r3, [r7, #36] @ 0x24 8026020: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8026024: d301 bcc.n 802602a return 0; 8026026: 2300 movs r3, #0 8026028: e03e b.n 80260a8 } if ((parts[0] > 0xff) || (parts[1] > 0xff)) { 802602a: 68fb ldr r3, [r7, #12] 802602c: 2bff cmp r3, #255 @ 0xff 802602e: d802 bhi.n 8026036 8026030: 693b ldr r3, [r7, #16] 8026032: 2bff cmp r3, #255 @ 0xff 8026034: d901 bls.n 802603a return 0; 8026036: 2300 movs r3, #0 8026038: e036 b.n 80260a8 } val |= (parts[0] << 24) | (parts[1] << 16); 802603a: 68fb ldr r3, [r7, #12] 802603c: 061a lsls r2, r3, #24 802603e: 693b ldr r3, [r7, #16] 8026040: 041b lsls r3, r3, #16 8026042: 4313 orrs r3, r2 8026044: 6a7a ldr r2, [r7, #36] @ 0x24 8026046: 4313 orrs r3, r2 8026048: 627b str r3, [r7, #36] @ 0x24 break; 802604a: e023 b.n 8026094 case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 802604c: 6a7b ldr r3, [r7, #36] @ 0x24 802604e: 2bff cmp r3, #255 @ 0xff 8026050: d901 bls.n 8026056 return 0; 8026052: 2300 movs r3, #0 8026054: e028 b.n 80260a8 } if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { 8026056: 68fb ldr r3, [r7, #12] 8026058: 2bff cmp r3, #255 @ 0xff 802605a: d805 bhi.n 8026068 802605c: 693b ldr r3, [r7, #16] 802605e: 2bff cmp r3, #255 @ 0xff 8026060: d802 bhi.n 8026068 8026062: 697b ldr r3, [r7, #20] 8026064: 2bff cmp r3, #255 @ 0xff 8026066: d901 bls.n 802606c return 0; 8026068: 2300 movs r3, #0 802606a: e01d b.n 80260a8 } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 802606c: 68fb ldr r3, [r7, #12] 802606e: 061a lsls r2, r3, #24 8026070: 693b ldr r3, [r7, #16] 8026072: 041b lsls r3, r3, #16 8026074: 431a orrs r2, r3 8026076: 697b ldr r3, [r7, #20] 8026078: 021b lsls r3, r3, #8 802607a: 4313 orrs r3, r2 802607c: 6a7a ldr r2, [r7, #36] @ 0x24 802607e: 4313 orrs r3, r2 8026080: 627b str r3, [r7, #36] @ 0x24 break; 8026082: e007 b.n 8026094 default: LWIP_ASSERT("unhandled", 0); 8026084: 4b0b ldr r3, [pc, #44] @ (80260b4 ) 8026086: 22f9 movs r2, #249 @ 0xf9 8026088: 490b ldr r1, [pc, #44] @ (80260b8 ) 802608a: 480c ldr r0, [pc, #48] @ (80260bc ) 802608c: f004 fbee bl 802a86c break; 8026090: e000 b.n 8026094 break; 8026092: bf00 nop } if (addr) { 8026094: 683b ldr r3, [r7, #0] 8026096: 2b00 cmp r3, #0 8026098: d005 beq.n 80260a6 ip4_addr_set_u32(addr, lwip_htonl(val)); 802609a: 6a78 ldr r0, [r7, #36] @ 0x24 802609c: f7f3 fca1 bl 80199e2 80260a0: 4602 mov r2, r0 80260a2: 683b ldr r3, [r7, #0] 80260a4: 601a str r2, [r3, #0] } return 1; 80260a6: 2301 movs r3, #1 } 80260a8: 4618 mov r0, r3 80260aa: 3728 adds r7, #40 @ 0x28 80260ac: 46bd mov sp, r7 80260ae: bd80 pop {r7, pc} 80260b0: 08031d50 .word 0x08031d50 80260b4: 080315fc .word 0x080315fc 80260b8: 08031638 .word 0x08031638 80260bc: 08031644 .word 0x08031644 080260c0 : * @return pointer to a global static (!) buffer that holds the ASCII * representation of addr */ char * ip4addr_ntoa(const ip4_addr_t *addr) { 80260c0: b580 push {r7, lr} 80260c2: b082 sub sp, #8 80260c4: af00 add r7, sp, #0 80260c6: 6078 str r0, [r7, #4] static char str[IP4ADDR_STRLEN_MAX]; return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); 80260c8: 2210 movs r2, #16 80260ca: 4904 ldr r1, [pc, #16] @ (80260dc ) 80260cc: 6878 ldr r0, [r7, #4] 80260ce: f000 f807 bl 80260e0 80260d2: 4603 mov r3, r0 } 80260d4: 4618 mov r0, r3 80260d6: 3708 adds r7, #8 80260d8: 46bd mov sp, r7 80260da: bd80 pop {r7, pc} 80260dc: 2402b0f4 .word 0x2402b0f4 080260e0 : * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char * ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen) { 80260e0: b480 push {r7} 80260e2: b08d sub sp, #52 @ 0x34 80260e4: af00 add r7, sp, #0 80260e6: 60f8 str r0, [r7, #12] 80260e8: 60b9 str r1, [r7, #8] 80260ea: 607a str r2, [r7, #4] char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 80260ec: 2300 movs r3, #0 80260ee: 623b str r3, [r7, #32] s_addr = ip4_addr_get_u32(addr); 80260f0: 68fb ldr r3, [r7, #12] 80260f2: 681b ldr r3, [r3, #0] 80260f4: 61bb str r3, [r7, #24] rp = buf; 80260f6: 68bb ldr r3, [r7, #8] 80260f8: 62fb str r3, [r7, #44] @ 0x2c ap = (u8_t *)&s_addr; 80260fa: f107 0318 add.w r3, r7, #24 80260fe: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 8026100: 2300 movs r3, #0 8026102: f887 3027 strb.w r3, [r7, #39] @ 0x27 8026106: e058 b.n 80261ba i = 0; 8026108: 2300 movs r3, #0 802610a: f887 3026 strb.w r3, [r7, #38] @ 0x26 do { rem = *ap % (u8_t)10; 802610e: 6abb ldr r3, [r7, #40] @ 0x28 8026110: 781a ldrb r2, [r3, #0] 8026112: 4b32 ldr r3, [pc, #200] @ (80261dc ) 8026114: fba3 1302 umull r1, r3, r3, r2 8026118: 08d9 lsrs r1, r3, #3 802611a: 460b mov r3, r1 802611c: 009b lsls r3, r3, #2 802611e: 440b add r3, r1 8026120: 005b lsls r3, r3, #1 8026122: 1ad3 subs r3, r2, r3 8026124: 77fb strb r3, [r7, #31] *ap /= (u8_t)10; 8026126: 6abb ldr r3, [r7, #40] @ 0x28 8026128: 781b ldrb r3, [r3, #0] 802612a: 4a2c ldr r2, [pc, #176] @ (80261dc ) 802612c: fba2 2303 umull r2, r3, r2, r3 8026130: 08db lsrs r3, r3, #3 8026132: b2da uxtb r2, r3 8026134: 6abb ldr r3, [r7, #40] @ 0x28 8026136: 701a strb r2, [r3, #0] inv[i++] = (char)('0' + rem); 8026138: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802613c: 1c5a adds r2, r3, #1 802613e: f887 2026 strb.w r2, [r7, #38] @ 0x26 8026142: 4619 mov r1, r3 8026144: 7ffb ldrb r3, [r7, #31] 8026146: 3330 adds r3, #48 @ 0x30 8026148: b2da uxtb r2, r3 802614a: f101 0330 add.w r3, r1, #48 @ 0x30 802614e: 443b add r3, r7 8026150: f803 2c1c strb.w r2, [r3, #-28] } while (*ap); 8026154: 6abb ldr r3, [r7, #40] @ 0x28 8026156: 781b ldrb r3, [r3, #0] 8026158: 2b00 cmp r3, #0 802615a: d1d8 bne.n 802610e while (i--) { 802615c: e011 b.n 8026182 if (len++ >= buflen) { 802615e: 6a3b ldr r3, [r7, #32] 8026160: 1c5a adds r2, r3, #1 8026162: 623a str r2, [r7, #32] 8026164: 687a ldr r2, [r7, #4] 8026166: 429a cmp r2, r3 8026168: dc01 bgt.n 802616e return NULL; 802616a: 2300 movs r3, #0 802616c: e030 b.n 80261d0 } *rp++ = inv[i]; 802616e: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 8026172: 6afb ldr r3, [r7, #44] @ 0x2c 8026174: 1c59 adds r1, r3, #1 8026176: 62f9 str r1, [r7, #44] @ 0x2c 8026178: 3230 adds r2, #48 @ 0x30 802617a: 443a add r2, r7 802617c: f812 2c1c ldrb.w r2, [r2, #-28] 8026180: 701a strb r2, [r3, #0] while (i--) { 8026182: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 8026186: 1e5a subs r2, r3, #1 8026188: f887 2026 strb.w r2, [r7, #38] @ 0x26 802618c: 2b00 cmp r3, #0 802618e: d1e6 bne.n 802615e } if (len++ >= buflen) { 8026190: 6a3b ldr r3, [r7, #32] 8026192: 1c5a adds r2, r3, #1 8026194: 623a str r2, [r7, #32] 8026196: 687a ldr r2, [r7, #4] 8026198: 429a cmp r2, r3 802619a: dc01 bgt.n 80261a0 return NULL; 802619c: 2300 movs r3, #0 802619e: e017 b.n 80261d0 } *rp++ = '.'; 80261a0: 6afb ldr r3, [r7, #44] @ 0x2c 80261a2: 1c5a adds r2, r3, #1 80261a4: 62fa str r2, [r7, #44] @ 0x2c 80261a6: 222e movs r2, #46 @ 0x2e 80261a8: 701a strb r2, [r3, #0] ap++; 80261aa: 6abb ldr r3, [r7, #40] @ 0x28 80261ac: 3301 adds r3, #1 80261ae: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 80261b0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80261b4: 3301 adds r3, #1 80261b6: f887 3027 strb.w r3, [r7, #39] @ 0x27 80261ba: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80261be: 2b03 cmp r3, #3 80261c0: d9a2 bls.n 8026108 } *--rp = 0; 80261c2: 6afb ldr r3, [r7, #44] @ 0x2c 80261c4: 3b01 subs r3, #1 80261c6: 62fb str r3, [r7, #44] @ 0x2c 80261c8: 6afb ldr r3, [r7, #44] @ 0x2c 80261ca: 2200 movs r2, #0 80261cc: 701a strb r2, [r3, #0] return buf; 80261ce: 68bb ldr r3, [r7, #8] } 80261d0: 4618 mov r0, r3 80261d2: 3734 adds r7, #52 @ 0x34 80261d4: 46bd mov sp, r7 80261d6: f85d 7b04 ldr.w r7, [sp], #4 80261da: 4770 bx lr 80261dc: cccccccd .word 0xcccccccd 080261e0 : * * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). */ void ip_reass_tmr(void) { 80261e0: b580 push {r7, lr} 80261e2: b084 sub sp, #16 80261e4: af00 add r7, sp, #0 struct ip_reassdata *r, *prev = NULL; 80261e6: 2300 movs r3, #0 80261e8: 60bb str r3, [r7, #8] r = reassdatagrams; 80261ea: 4b12 ldr r3, [pc, #72] @ (8026234 ) 80261ec: 681b ldr r3, [r3, #0] 80261ee: 60fb str r3, [r7, #12] while (r != NULL) { 80261f0: e018 b.n 8026224 /* Decrement the timer. Once it reaches 0, * clean up the incomplete fragment assembly */ if (r->timer > 0) { 80261f2: 68fb ldr r3, [r7, #12] 80261f4: 7fdb ldrb r3, [r3, #31] 80261f6: 2b00 cmp r3, #0 80261f8: d00b beq.n 8026212 r->timer--; 80261fa: 68fb ldr r3, [r7, #12] 80261fc: 7fdb ldrb r3, [r3, #31] 80261fe: 3b01 subs r3, #1 8026200: b2da uxtb r2, r3 8026202: 68fb ldr r3, [r7, #12] 8026204: 77da strb r2, [r3, #31] LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; 8026206: 68fb ldr r3, [r7, #12] 8026208: 60bb str r3, [r7, #8] r = r->next; 802620a: 68fb ldr r3, [r7, #12] 802620c: 681b ldr r3, [r3, #0] 802620e: 60fb str r3, [r7, #12] 8026210: e008 b.n 8026224 } else { /* reassembly timed out */ struct ip_reassdata *tmp; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); tmp = r; 8026212: 68fb ldr r3, [r7, #12] 8026214: 607b str r3, [r7, #4] /* get the next pointer before freeing */ r = r->next; 8026216: 68fb ldr r3, [r7, #12] 8026218: 681b ldr r3, [r3, #0] 802621a: 60fb str r3, [r7, #12] /* free the helper struct and all enqueued pbufs */ ip_reass_free_complete_datagram(tmp, prev); 802621c: 68b9 ldr r1, [r7, #8] 802621e: 6878 ldr r0, [r7, #4] 8026220: f000 f80a bl 8026238 while (r != NULL) { 8026224: 68fb ldr r3, [r7, #12] 8026226: 2b00 cmp r3, #0 8026228: d1e3 bne.n 80261f2 } } } 802622a: bf00 nop 802622c: bf00 nop 802622e: 3710 adds r7, #16 8026230: 46bd mov sp, r7 8026232: bd80 pop {r7, pc} 8026234: 2402b104 .word 0x2402b104 08026238 : * @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) { 8026238: b580 push {r7, lr} 802623a: b088 sub sp, #32 802623c: af00 add r7, sp, #0 802623e: 6078 str r0, [r7, #4] 8026240: 6039 str r1, [r7, #0] u16_t pbufs_freed = 0; 8026242: 2300 movs r3, #0 8026244: 83fb strh r3, [r7, #30] u16_t clen; struct pbuf *p; struct ip_reass_helper *iprh; LWIP_ASSERT("prev != ipr", prev != ipr); 8026246: 683a ldr r2, [r7, #0] 8026248: 687b ldr r3, [r7, #4] 802624a: 429a cmp r2, r3 802624c: d105 bne.n 802625a 802624e: 4b45 ldr r3, [pc, #276] @ (8026364 ) 8026250: 22ab movs r2, #171 @ 0xab 8026252: 4945 ldr r1, [pc, #276] @ (8026368 ) 8026254: 4845 ldr r0, [pc, #276] @ (802636c ) 8026256: f004 fb09 bl 802a86c if (prev != NULL) { 802625a: 683b ldr r3, [r7, #0] 802625c: 2b00 cmp r3, #0 802625e: d00a beq.n 8026276 LWIP_ASSERT("prev->next == ipr", prev->next == ipr); 8026260: 683b ldr r3, [r7, #0] 8026262: 681b ldr r3, [r3, #0] 8026264: 687a ldr r2, [r7, #4] 8026266: 429a cmp r2, r3 8026268: d005 beq.n 8026276 802626a: 4b3e ldr r3, [pc, #248] @ (8026364 ) 802626c: 22ad movs r2, #173 @ 0xad 802626e: 4940 ldr r1, [pc, #256] @ (8026370 ) 8026270: 483e ldr r0, [pc, #248] @ (802636c ) 8026272: f004 fafb bl 802a86c } MIB2_STATS_INC(mib2.ipreasmfails); #if LWIP_ICMP iprh = (struct ip_reass_helper *)ipr->p->payload; 8026276: 687b ldr r3, [r7, #4] 8026278: 685b ldr r3, [r3, #4] 802627a: 685b ldr r3, [r3, #4] 802627c: 617b str r3, [r7, #20] if (iprh->start == 0) { 802627e: 697b ldr r3, [r7, #20] 8026280: 889b ldrh r3, [r3, #4] 8026282: b29b uxth r3, r3 8026284: 2b00 cmp r3, #0 8026286: d12a bne.n 80262de /* The first fragment was received, send ICMP time exceeded. */ /* First, de-queue the first pbuf from r->p. */ p = ipr->p; 8026288: 687b ldr r3, [r7, #4] 802628a: 685b ldr r3, [r3, #4] 802628c: 61bb str r3, [r7, #24] ipr->p = iprh->next_pbuf; 802628e: 697b ldr r3, [r7, #20] 8026290: 681a ldr r2, [r3, #0] 8026292: 687b ldr r3, [r7, #4] 8026294: 605a str r2, [r3, #4] /* Then, copy the original header into it. */ SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); 8026296: 69bb ldr r3, [r7, #24] 8026298: 6858 ldr r0, [r3, #4] 802629a: 687b ldr r3, [r7, #4] 802629c: 3308 adds r3, #8 802629e: 2214 movs r2, #20 80262a0: 4619 mov r1, r3 80262a2: f004 fd6c bl 802ad7e icmp_time_exceeded(p, ICMP_TE_FRAG); 80262a6: 2101 movs r1, #1 80262a8: 69b8 ldr r0, [r7, #24] 80262aa: f7ff fa4d bl 8025748 clen = pbuf_clen(p); 80262ae: 69b8 ldr r0, [r7, #24] 80262b0: f7f5 f8f2 bl 801b498 80262b4: 4603 mov r3, r0 80262b6: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 80262b8: 8bfa ldrh r2, [r7, #30] 80262ba: 8a7b ldrh r3, [r7, #18] 80262bc: 4413 add r3, r2 80262be: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 80262c2: db05 blt.n 80262d0 80262c4: 4b27 ldr r3, [pc, #156] @ (8026364 ) 80262c6: 22bc movs r2, #188 @ 0xbc 80262c8: 492a ldr r1, [pc, #168] @ (8026374 ) 80262ca: 4828 ldr r0, [pc, #160] @ (802636c ) 80262cc: f004 face bl 802a86c pbufs_freed = (u16_t)(pbufs_freed + clen); 80262d0: 8bfa ldrh r2, [r7, #30] 80262d2: 8a7b ldrh r3, [r7, #18] 80262d4: 4413 add r3, r2 80262d6: 83fb strh r3, [r7, #30] pbuf_free(p); 80262d8: 69b8 ldr r0, [r7, #24] 80262da: f7f5 f84f bl 801b37c } #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; 80262de: 687b ldr r3, [r7, #4] 80262e0: 685b ldr r3, [r3, #4] 80262e2: 61bb str r3, [r7, #24] while (p != NULL) { 80262e4: e01f b.n 8026326 struct pbuf *pcur; iprh = (struct ip_reass_helper *)p->payload; 80262e6: 69bb ldr r3, [r7, #24] 80262e8: 685b ldr r3, [r3, #4] 80262ea: 617b str r3, [r7, #20] pcur = p; 80262ec: 69bb ldr r3, [r7, #24] 80262ee: 60fb str r3, [r7, #12] /* get the next pointer before freeing */ p = iprh->next_pbuf; 80262f0: 697b ldr r3, [r7, #20] 80262f2: 681b ldr r3, [r3, #0] 80262f4: 61bb str r3, [r7, #24] clen = pbuf_clen(pcur); 80262f6: 68f8 ldr r0, [r7, #12] 80262f8: f7f5 f8ce bl 801b498 80262fc: 4603 mov r3, r0 80262fe: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 8026300: 8bfa ldrh r2, [r7, #30] 8026302: 8a7b ldrh r3, [r7, #18] 8026304: 4413 add r3, r2 8026306: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802630a: db05 blt.n 8026318 802630c: 4b15 ldr r3, [pc, #84] @ (8026364 ) 802630e: 22cc movs r2, #204 @ 0xcc 8026310: 4918 ldr r1, [pc, #96] @ (8026374 ) 8026312: 4816 ldr r0, [pc, #88] @ (802636c ) 8026314: f004 faaa bl 802a86c pbufs_freed = (u16_t)(pbufs_freed + clen); 8026318: 8bfa ldrh r2, [r7, #30] 802631a: 8a7b ldrh r3, [r7, #18] 802631c: 4413 add r3, r2 802631e: 83fb strh r3, [r7, #30] pbuf_free(pcur); 8026320: 68f8 ldr r0, [r7, #12] 8026322: f7f5 f82b bl 801b37c while (p != NULL) { 8026326: 69bb ldr r3, [r7, #24] 8026328: 2b00 cmp r3, #0 802632a: d1dc bne.n 80262e6 } /* Then, unchain the struct ip_reassdata from the list and free it. */ ip_reass_dequeue_datagram(ipr, prev); 802632c: 6839 ldr r1, [r7, #0] 802632e: 6878 ldr r0, [r7, #4] 8026330: f000 f8c2 bl 80264b8 LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 8026334: 4b10 ldr r3, [pc, #64] @ (8026378 ) 8026336: 881b ldrh r3, [r3, #0] 8026338: 8bfa ldrh r2, [r7, #30] 802633a: 429a cmp r2, r3 802633c: d905 bls.n 802634a 802633e: 4b09 ldr r3, [pc, #36] @ (8026364 ) 8026340: 22d2 movs r2, #210 @ 0xd2 8026342: 490e ldr r1, [pc, #56] @ (802637c ) 8026344: 4809 ldr r0, [pc, #36] @ (802636c ) 8026346: f004 fa91 bl 802a86c ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); 802634a: 4b0b ldr r3, [pc, #44] @ (8026378 ) 802634c: 881a ldrh r2, [r3, #0] 802634e: 8bfb ldrh r3, [r7, #30] 8026350: 1ad3 subs r3, r2, r3 8026352: b29a uxth r2, r3 8026354: 4b08 ldr r3, [pc, #32] @ (8026378 ) 8026356: 801a strh r2, [r3, #0] return pbufs_freed; 8026358: 8bfb ldrh r3, [r7, #30] } 802635a: 4618 mov r0, r3 802635c: 3720 adds r7, #32 802635e: 46bd mov sp, r7 8026360: bd80 pop {r7, pc} 8026362: bf00 nop 8026364: 0803166c .word 0x0803166c 8026368: 080316a8 .word 0x080316a8 802636c: 080316b4 .word 0x080316b4 8026370: 080316dc .word 0x080316dc 8026374: 080316f0 .word 0x080316f0 8026378: 2402b108 .word 0x2402b108 802637c: 08031710 .word 0x08031710 08026380 : * (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) { 8026380: b580 push {r7, lr} 8026382: b08a sub sp, #40 @ 0x28 8026384: af00 add r7, sp, #0 8026386: 6078 str r0, [r7, #4] 8026388: 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; 802638a: 2300 movs r3, #0 802638c: 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; 802638e: 2300 movs r3, #0 8026390: 623b str r3, [r7, #32] prev = NULL; 8026392: 2300 movs r3, #0 8026394: 61fb str r3, [r7, #28] oldest_prev = NULL; 8026396: 2300 movs r3, #0 8026398: 61bb str r3, [r7, #24] other_datagrams = 0; 802639a: 2300 movs r3, #0 802639c: 613b str r3, [r7, #16] r = reassdatagrams; 802639e: 4b28 ldr r3, [pc, #160] @ (8026440 ) 80263a0: 681b ldr r3, [r3, #0] 80263a2: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 80263a4: e030 b.n 8026408 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 80263a6: 6a7b ldr r3, [r7, #36] @ 0x24 80263a8: 695a ldr r2, [r3, #20] 80263aa: 687b ldr r3, [r7, #4] 80263ac: 68db ldr r3, [r3, #12] 80263ae: 429a cmp r2, r3 80263b0: d10c bne.n 80263cc 80263b2: 6a7b ldr r3, [r7, #36] @ 0x24 80263b4: 699a ldr r2, [r3, #24] 80263b6: 687b ldr r3, [r7, #4] 80263b8: 691b ldr r3, [r3, #16] 80263ba: 429a cmp r2, r3 80263bc: d106 bne.n 80263cc 80263be: 6a7b ldr r3, [r7, #36] @ 0x24 80263c0: 899a ldrh r2, [r3, #12] 80263c2: 687b ldr r3, [r7, #4] 80263c4: 889b ldrh r3, [r3, #4] 80263c6: b29b uxth r3, r3 80263c8: 429a cmp r2, r3 80263ca: d014 beq.n 80263f6 /* Not the same datagram as fraghdr */ other_datagrams++; 80263cc: 693b ldr r3, [r7, #16] 80263ce: 3301 adds r3, #1 80263d0: 613b str r3, [r7, #16] if (oldest == NULL) { 80263d2: 6a3b ldr r3, [r7, #32] 80263d4: 2b00 cmp r3, #0 80263d6: d104 bne.n 80263e2 oldest = r; 80263d8: 6a7b ldr r3, [r7, #36] @ 0x24 80263da: 623b str r3, [r7, #32] oldest_prev = prev; 80263dc: 69fb ldr r3, [r7, #28] 80263de: 61bb str r3, [r7, #24] 80263e0: e009 b.n 80263f6 } else if (r->timer <= oldest->timer) { 80263e2: 6a7b ldr r3, [r7, #36] @ 0x24 80263e4: 7fda ldrb r2, [r3, #31] 80263e6: 6a3b ldr r3, [r7, #32] 80263e8: 7fdb ldrb r3, [r3, #31] 80263ea: 429a cmp r2, r3 80263ec: d803 bhi.n 80263f6 /* older than the previous oldest */ oldest = r; 80263ee: 6a7b ldr r3, [r7, #36] @ 0x24 80263f0: 623b str r3, [r7, #32] oldest_prev = prev; 80263f2: 69fb ldr r3, [r7, #28] 80263f4: 61bb str r3, [r7, #24] } } if (r->next != NULL) { 80263f6: 6a7b ldr r3, [r7, #36] @ 0x24 80263f8: 681b ldr r3, [r3, #0] 80263fa: 2b00 cmp r3, #0 80263fc: d001 beq.n 8026402 prev = r; 80263fe: 6a7b ldr r3, [r7, #36] @ 0x24 8026400: 61fb str r3, [r7, #28] } r = r->next; 8026402: 6a7b ldr r3, [r7, #36] @ 0x24 8026404: 681b ldr r3, [r3, #0] 8026406: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 8026408: 6a7b ldr r3, [r7, #36] @ 0x24 802640a: 2b00 cmp r3, #0 802640c: d1cb bne.n 80263a6 } if (oldest != NULL) { 802640e: 6a3b ldr r3, [r7, #32] 8026410: 2b00 cmp r3, #0 8026412: d008 beq.n 8026426 pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); 8026414: 69b9 ldr r1, [r7, #24] 8026416: 6a38 ldr r0, [r7, #32] 8026418: f7ff ff0e bl 8026238 802641c: 60f8 str r0, [r7, #12] pbufs_freed += pbufs_freed_current; 802641e: 697a ldr r2, [r7, #20] 8026420: 68fb ldr r3, [r7, #12] 8026422: 4413 add r3, r2 8026424: 617b str r3, [r7, #20] } } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); 8026426: 697a ldr r2, [r7, #20] 8026428: 683b ldr r3, [r7, #0] 802642a: 429a cmp r2, r3 802642c: da02 bge.n 8026434 802642e: 693b ldr r3, [r7, #16] 8026430: 2b01 cmp r3, #1 8026432: dcac bgt.n 802638e return pbufs_freed; 8026434: 697b ldr r3, [r7, #20] } 8026436: 4618 mov r0, r3 8026438: 3728 adds r7, #40 @ 0x28 802643a: 46bd mov sp, r7 802643c: bd80 pop {r7, pc} 802643e: bf00 nop 8026440: 2402b104 .word 0x2402b104 08026444 : * @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) { 8026444: b580 push {r7, lr} 8026446: b084 sub sp, #16 8026448: af00 add r7, sp, #0 802644a: 6078 str r0, [r7, #4] 802644c: 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); 802644e: 2004 movs r0, #4 8026450: f7f4 f830 bl 801a4b4 8026454: 60f8 str r0, [r7, #12] if (ipr == NULL) { 8026456: 68fb ldr r3, [r7, #12] 8026458: 2b00 cmp r3, #0 802645a: d110 bne.n 802647e #if IP_REASS_FREE_OLDEST if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { 802645c: 6839 ldr r1, [r7, #0] 802645e: 6878 ldr r0, [r7, #4] 8026460: f7ff ff8e bl 8026380 8026464: 4602 mov r2, r0 8026466: 683b ldr r3, [r7, #0] 8026468: 4293 cmp r3, r2 802646a: dc03 bgt.n 8026474 ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 802646c: 2004 movs r0, #4 802646e: f7f4 f821 bl 801a4b4 8026472: 60f8 str r0, [r7, #12] } if (ipr == NULL) 8026474: 68fb ldr r3, [r7, #12] 8026476: 2b00 cmp r3, #0 8026478: d101 bne.n 802647e #endif /* IP_REASS_FREE_OLDEST */ { IPFRAG_STATS_INC(ip_frag.memerr); LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n")); return NULL; 802647a: 2300 movs r3, #0 802647c: e016 b.n 80264ac } } memset(ipr, 0, sizeof(struct ip_reassdata)); 802647e: 2220 movs r2, #32 8026480: 2100 movs r1, #0 8026482: 68f8 ldr r0, [r7, #12] 8026484: f004 fb84 bl 802ab90 ipr->timer = IP_REASS_MAXAGE; 8026488: 68fb ldr r3, [r7, #12] 802648a: 220f movs r2, #15 802648c: 77da strb r2, [r3, #31] /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; 802648e: 4b09 ldr r3, [pc, #36] @ (80264b4 ) 8026490: 681a ldr r2, [r3, #0] 8026492: 68fb ldr r3, [r7, #12] 8026494: 601a str r2, [r3, #0] reassdatagrams = ipr; 8026496: 4a07 ldr r2, [pc, #28] @ (80264b4 ) 8026498: 68fb ldr r3, [r7, #12] 802649a: 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); 802649c: 68fb ldr r3, [r7, #12] 802649e: 3308 adds r3, #8 80264a0: 2214 movs r2, #20 80264a2: 6879 ldr r1, [r7, #4] 80264a4: 4618 mov r0, r3 80264a6: f004 fc6a bl 802ad7e return ipr; 80264aa: 68fb ldr r3, [r7, #12] } 80264ac: 4618 mov r0, r3 80264ae: 3710 adds r7, #16 80264b0: 46bd mov sp, r7 80264b2: bd80 pop {r7, pc} 80264b4: 2402b104 .word 0x2402b104 080264b8 : * 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) { 80264b8: b580 push {r7, lr} 80264ba: b082 sub sp, #8 80264bc: af00 add r7, sp, #0 80264be: 6078 str r0, [r7, #4] 80264c0: 6039 str r1, [r7, #0] /* dequeue the reass struct */ if (reassdatagrams == ipr) { 80264c2: 4b10 ldr r3, [pc, #64] @ (8026504 ) 80264c4: 681b ldr r3, [r3, #0] 80264c6: 687a ldr r2, [r7, #4] 80264c8: 429a cmp r2, r3 80264ca: d104 bne.n 80264d6 /* it was the first in the list */ reassdatagrams = ipr->next; 80264cc: 687b ldr r3, [r7, #4] 80264ce: 681b ldr r3, [r3, #0] 80264d0: 4a0c ldr r2, [pc, #48] @ (8026504 ) 80264d2: 6013 str r3, [r2, #0] 80264d4: e00d b.n 80264f2 } else { /* it wasn't the first, so it must have a valid 'prev' */ LWIP_ASSERT("sanity check linked list", prev != NULL); 80264d6: 683b ldr r3, [r7, #0] 80264d8: 2b00 cmp r3, #0 80264da: d106 bne.n 80264ea 80264dc: 4b0a ldr r3, [pc, #40] @ (8026508 ) 80264de: f240 1245 movw r2, #325 @ 0x145 80264e2: 490a ldr r1, [pc, #40] @ (802650c ) 80264e4: 480a ldr r0, [pc, #40] @ (8026510 ) 80264e6: f004 f9c1 bl 802a86c prev->next = ipr->next; 80264ea: 687b ldr r3, [r7, #4] 80264ec: 681a ldr r2, [r3, #0] 80264ee: 683b ldr r3, [r7, #0] 80264f0: 601a str r2, [r3, #0] } /* now we can free the ip_reassdata struct */ memp_free(MEMP_REASSDATA, ipr); 80264f2: 6879 ldr r1, [r7, #4] 80264f4: 2004 movs r0, #4 80264f6: f7f4 f853 bl 801a5a0 } 80264fa: bf00 nop 80264fc: 3708 adds r7, #8 80264fe: 46bd mov sp, r7 8026500: bd80 pop {r7, pc} 8026502: bf00 nop 8026504: 2402b104 .word 0x2402b104 8026508: 0803166c .word 0x0803166c 802650c: 08031734 .word 0x08031734 8026510: 080316b4 .word 0x080316b4 08026514 : * @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) { 8026514: b580 push {r7, lr} 8026516: b08c sub sp, #48 @ 0x30 8026518: af00 add r7, sp, #0 802651a: 60f8 str r0, [r7, #12] 802651c: 60b9 str r1, [r7, #8] 802651e: 607a str r2, [r7, #4] struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; 8026520: 2300 movs r3, #0 8026522: 62bb str r3, [r7, #40] @ 0x28 struct pbuf *q; u16_t offset, len; u8_t hlen; struct ip_hdr *fraghdr; int valid = 1; 8026524: 2301 movs r3, #1 8026526: 623b str r3, [r7, #32] /* Extract length and fragment offset from current fragment */ fraghdr = (struct ip_hdr *)new_p->payload; 8026528: 68bb ldr r3, [r7, #8] 802652a: 685b ldr r3, [r3, #4] 802652c: 61fb str r3, [r7, #28] len = lwip_ntohs(IPH_LEN(fraghdr)); 802652e: 69fb ldr r3, [r7, #28] 8026530: 885b ldrh r3, [r3, #2] 8026532: b29b uxth r3, r3 8026534: 4618 mov r0, r3 8026536: f7f3 fa3f bl 80199b8 802653a: 4603 mov r3, r0 802653c: 837b strh r3, [r7, #26] hlen = IPH_HL_BYTES(fraghdr); 802653e: 69fb ldr r3, [r7, #28] 8026540: 781b ldrb r3, [r3, #0] 8026542: f003 030f and.w r3, r3, #15 8026546: b2db uxtb r3, r3 8026548: 009b lsls r3, r3, #2 802654a: 767b strb r3, [r7, #25] if (hlen > len) { 802654c: 7e7b ldrb r3, [r7, #25] 802654e: b29b uxth r3, r3 8026550: 8b7a ldrh r2, [r7, #26] 8026552: 429a cmp r2, r3 8026554: d202 bcs.n 802655c /* invalid datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802655a: e135 b.n 80267c8 } len = (u16_t)(len - hlen); 802655c: 7e7b ldrb r3, [r7, #25] 802655e: b29b uxth r3, r3 8026560: 8b7a ldrh r2, [r7, #26] 8026562: 1ad3 subs r3, r2, r3 8026564: 837b strh r3, [r7, #26] offset = IPH_OFFSET_BYTES(fraghdr); 8026566: 69fb ldr r3, [r7, #28] 8026568: 88db ldrh r3, [r3, #6] 802656a: b29b uxth r3, r3 802656c: 4618 mov r0, r3 802656e: f7f3 fa23 bl 80199b8 8026572: 4603 mov r3, r0 8026574: f3c3 030c ubfx r3, r3, #0, #13 8026578: b29b uxth r3, r3 802657a: 00db lsls r3, r3, #3 802657c: 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; 802657e: 68bb ldr r3, [r7, #8] 8026580: 685b ldr r3, [r3, #4] 8026582: 62fb str r3, [r7, #44] @ 0x2c iprh->next_pbuf = NULL; 8026584: 6afb ldr r3, [r7, #44] @ 0x2c 8026586: 2200 movs r2, #0 8026588: 701a strb r2, [r3, #0] 802658a: 2200 movs r2, #0 802658c: 705a strb r2, [r3, #1] 802658e: 2200 movs r2, #0 8026590: 709a strb r2, [r3, #2] 8026592: 2200 movs r2, #0 8026594: 70da strb r2, [r3, #3] iprh->start = offset; 8026596: 6afb ldr r3, [r7, #44] @ 0x2c 8026598: 8afa ldrh r2, [r7, #22] 802659a: 809a strh r2, [r3, #4] iprh->end = (u16_t)(offset + len); 802659c: 8afa ldrh r2, [r7, #22] 802659e: 8b7b ldrh r3, [r7, #26] 80265a0: 4413 add r3, r2 80265a2: b29a uxth r2, r3 80265a4: 6afb ldr r3, [r7, #44] @ 0x2c 80265a6: 80da strh r2, [r3, #6] if (iprh->end < offset) { 80265a8: 6afb ldr r3, [r7, #44] @ 0x2c 80265aa: 88db ldrh r3, [r3, #6] 80265ac: b29b uxth r3, r3 80265ae: 8afa ldrh r2, [r7, #22] 80265b0: 429a cmp r2, r3 80265b2: d902 bls.n 80265ba /* u16_t overflow, cannot handle this */ return IP_REASS_VALIDATE_PBUF_DROPPED; 80265b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80265b8: e106 b.n 80267c8 } /* 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;) { 80265ba: 68fb ldr r3, [r7, #12] 80265bc: 685b ldr r3, [r3, #4] 80265be: 627b str r3, [r7, #36] @ 0x24 80265c0: e068 b.n 8026694 iprh_tmp = (struct ip_reass_helper *)q->payload; 80265c2: 6a7b ldr r3, [r7, #36] @ 0x24 80265c4: 685b ldr r3, [r3, #4] 80265c6: 613b str r3, [r7, #16] if (iprh->start < iprh_tmp->start) { 80265c8: 6afb ldr r3, [r7, #44] @ 0x2c 80265ca: 889b ldrh r3, [r3, #4] 80265cc: b29a uxth r2, r3 80265ce: 693b ldr r3, [r7, #16] 80265d0: 889b ldrh r3, [r3, #4] 80265d2: b29b uxth r3, r3 80265d4: 429a cmp r2, r3 80265d6: d235 bcs.n 8026644 /* the new pbuf should be inserted before this */ iprh->next_pbuf = q; 80265d8: 6afb ldr r3, [r7, #44] @ 0x2c 80265da: 6a7a ldr r2, [r7, #36] @ 0x24 80265dc: 601a str r2, [r3, #0] if (iprh_prev != NULL) { 80265de: 6abb ldr r3, [r7, #40] @ 0x28 80265e0: 2b00 cmp r3, #0 80265e2: d020 beq.n 8026626 /* not the fragment with the lowest offset */ #if IP_REASS_CHECK_OVERLAP if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { 80265e4: 6afb ldr r3, [r7, #44] @ 0x2c 80265e6: 889b ldrh r3, [r3, #4] 80265e8: b29a uxth r2, r3 80265ea: 6abb ldr r3, [r7, #40] @ 0x28 80265ec: 88db ldrh r3, [r3, #6] 80265ee: b29b uxth r3, r3 80265f0: 429a cmp r2, r3 80265f2: d307 bcc.n 8026604 80265f4: 6afb ldr r3, [r7, #44] @ 0x2c 80265f6: 88db ldrh r3, [r3, #6] 80265f8: b29a uxth r2, r3 80265fa: 693b ldr r3, [r7, #16] 80265fc: 889b ldrh r3, [r3, #4] 80265fe: b29b uxth r3, r3 8026600: 429a cmp r2, r3 8026602: d902 bls.n 802660a /* fragment overlaps with previous or following, throw away */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026604: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026608: e0de b.n 80267c8 } #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 802660a: 6abb ldr r3, [r7, #40] @ 0x28 802660c: 68ba ldr r2, [r7, #8] 802660e: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 8026610: 6abb ldr r3, [r7, #40] @ 0x28 8026612: 88db ldrh r3, [r3, #6] 8026614: b29a uxth r2, r3 8026616: 6afb ldr r3, [r7, #44] @ 0x2c 8026618: 889b ldrh r3, [r3, #4] 802661a: b29b uxth r3, r3 802661c: 429a cmp r2, r3 802661e: d03d beq.n 802669c /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 8026620: 2300 movs r3, #0 8026622: 623b str r3, [r7, #32] } #endif /* IP_REASS_CHECK_OVERLAP */ /* fragment with the lowest offset */ ipr->p = new_p; } break; 8026624: e03a b.n 802669c if (iprh->end > iprh_tmp->start) { 8026626: 6afb ldr r3, [r7, #44] @ 0x2c 8026628: 88db ldrh r3, [r3, #6] 802662a: b29a uxth r2, r3 802662c: 693b ldr r3, [r7, #16] 802662e: 889b ldrh r3, [r3, #4] 8026630: b29b uxth r3, r3 8026632: 429a cmp r2, r3 8026634: d902 bls.n 802663c return IP_REASS_VALIDATE_PBUF_DROPPED; 8026636: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802663a: e0c5 b.n 80267c8 ipr->p = new_p; 802663c: 68fb ldr r3, [r7, #12] 802663e: 68ba ldr r2, [r7, #8] 8026640: 605a str r2, [r3, #4] break; 8026642: e02b b.n 802669c } else if (iprh->start == iprh_tmp->start) { 8026644: 6afb ldr r3, [r7, #44] @ 0x2c 8026646: 889b ldrh r3, [r3, #4] 8026648: b29a uxth r2, r3 802664a: 693b ldr r3, [r7, #16] 802664c: 889b ldrh r3, [r3, #4] 802664e: b29b uxth r3, r3 8026650: 429a cmp r2, r3 8026652: d102 bne.n 802665a /* received the same datagram twice: no need to keep the datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026654: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026658: e0b6 b.n 80267c8 #if IP_REASS_CHECK_OVERLAP } else if (iprh->start < iprh_tmp->end) { 802665a: 6afb ldr r3, [r7, #44] @ 0x2c 802665c: 889b ldrh r3, [r3, #4] 802665e: b29a uxth r2, r3 8026660: 693b ldr r3, [r7, #16] 8026662: 88db ldrh r3, [r3, #6] 8026664: b29b uxth r3, r3 8026666: 429a cmp r2, r3 8026668: d202 bcs.n 8026670 /* overlap: no need to keep the new datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 802666a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802666e: e0ab b.n 80267c8 #endif /* IP_REASS_CHECK_OVERLAP */ } else { /* Check if the fragments received so far have no holes. */ if (iprh_prev != NULL) { 8026670: 6abb ldr r3, [r7, #40] @ 0x28 8026672: 2b00 cmp r3, #0 8026674: d009 beq.n 802668a if (iprh_prev->end != iprh_tmp->start) { 8026676: 6abb ldr r3, [r7, #40] @ 0x28 8026678: 88db ldrh r3, [r3, #6] 802667a: b29a uxth r2, r3 802667c: 693b ldr r3, [r7, #16] 802667e: 889b ldrh r3, [r3, #4] 8026680: b29b uxth r3, r3 8026682: 429a cmp r2, r3 8026684: d001 beq.n 802668a /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 8026686: 2300 movs r3, #0 8026688: 623b str r3, [r7, #32] } } } q = iprh_tmp->next_pbuf; 802668a: 693b ldr r3, [r7, #16] 802668c: 681b ldr r3, [r3, #0] 802668e: 627b str r3, [r7, #36] @ 0x24 iprh_prev = iprh_tmp; 8026690: 693b ldr r3, [r7, #16] 8026692: 62bb str r3, [r7, #40] @ 0x28 for (q = ipr->p; q != NULL;) { 8026694: 6a7b ldr r3, [r7, #36] @ 0x24 8026696: 2b00 cmp r3, #0 8026698: d193 bne.n 80265c2 802669a: e000 b.n 802669e break; 802669c: bf00 nop } /* If q is NULL, then we made it to the end of the list. Determine what to do now */ if (q == NULL) { 802669e: 6a7b ldr r3, [r7, #36] @ 0x24 80266a0: 2b00 cmp r3, #0 80266a2: d12d bne.n 8026700 if (iprh_prev != NULL) { 80266a4: 6abb ldr r3, [r7, #40] @ 0x28 80266a6: 2b00 cmp r3, #0 80266a8: d01c beq.n 80266e4 /* 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); 80266aa: 6abb ldr r3, [r7, #40] @ 0x28 80266ac: 88db ldrh r3, [r3, #6] 80266ae: b29a uxth r2, r3 80266b0: 6afb ldr r3, [r7, #44] @ 0x2c 80266b2: 889b ldrh r3, [r3, #4] 80266b4: b29b uxth r3, r3 80266b6: 429a cmp r2, r3 80266b8: d906 bls.n 80266c8 80266ba: 4b45 ldr r3, [pc, #276] @ (80267d0 ) 80266bc: f44f 72db mov.w r2, #438 @ 0x1b6 80266c0: 4944 ldr r1, [pc, #272] @ (80267d4 ) 80266c2: 4845 ldr r0, [pc, #276] @ (80267d8 ) 80266c4: f004 f8d2 bl 802a86c #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 80266c8: 6abb ldr r3, [r7, #40] @ 0x28 80266ca: 68ba ldr r2, [r7, #8] 80266cc: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 80266ce: 6abb ldr r3, [r7, #40] @ 0x28 80266d0: 88db ldrh r3, [r3, #6] 80266d2: b29a uxth r2, r3 80266d4: 6afb ldr r3, [r7, #44] @ 0x2c 80266d6: 889b ldrh r3, [r3, #4] 80266d8: b29b uxth r3, r3 80266da: 429a cmp r2, r3 80266dc: d010 beq.n 8026700 valid = 0; 80266de: 2300 movs r3, #0 80266e0: 623b str r3, [r7, #32] 80266e2: e00d b.n 8026700 } } else { #if IP_REASS_CHECK_OVERLAP LWIP_ASSERT("no previous fragment, this must be the first fragment!", 80266e4: 68fb ldr r3, [r7, #12] 80266e6: 685b ldr r3, [r3, #4] 80266e8: 2b00 cmp r3, #0 80266ea: d006 beq.n 80266fa 80266ec: 4b38 ldr r3, [pc, #224] @ (80267d0 ) 80266ee: f44f 72df mov.w r2, #446 @ 0x1be 80266f2: 493a ldr r1, [pc, #232] @ (80267dc ) 80266f4: 4838 ldr r0, [pc, #224] @ (80267d8 ) 80266f6: f004 f8b9 bl 802a86c ipr->p == NULL); #endif /* IP_REASS_CHECK_OVERLAP */ /* this is the first fragment we ever received for this ip datagram */ ipr->p = new_p; 80266fa: 68fb ldr r3, [r7, #12] 80266fc: 68ba ldr r2, [r7, #8] 80266fe: 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)) { 8026700: 687b ldr r3, [r7, #4] 8026702: 2b00 cmp r3, #0 8026704: d105 bne.n 8026712 8026706: 68fb ldr r3, [r7, #12] 8026708: 7f9b ldrb r3, [r3, #30] 802670a: f003 0301 and.w r3, r3, #1 802670e: 2b00 cmp r3, #0 8026710: d059 beq.n 80267c6 /* and had no holes so far */ if (valid) { 8026712: 6a3b ldr r3, [r7, #32] 8026714: 2b00 cmp r3, #0 8026716: d04f beq.n 80267b8 /* 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)) { 8026718: 68fb ldr r3, [r7, #12] 802671a: 685b ldr r3, [r3, #4] 802671c: 2b00 cmp r3, #0 802671e: d006 beq.n 802672e 8026720: 68fb ldr r3, [r7, #12] 8026722: 685b ldr r3, [r3, #4] 8026724: 685b ldr r3, [r3, #4] 8026726: 889b ldrh r3, [r3, #4] 8026728: b29b uxth r3, r3 802672a: 2b00 cmp r3, #0 802672c: d002 beq.n 8026734 valid = 0; 802672e: 2300 movs r3, #0 8026730: 623b str r3, [r7, #32] 8026732: e041 b.n 80267b8 } else { /* and check that there are no holes after this datagram */ iprh_prev = iprh; 8026734: 6afb ldr r3, [r7, #44] @ 0x2c 8026736: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 8026738: 6afb ldr r3, [r7, #44] @ 0x2c 802673a: 681b ldr r3, [r3, #0] 802673c: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 802673e: e012 b.n 8026766 iprh = (struct ip_reass_helper *)q->payload; 8026740: 6a7b ldr r3, [r7, #36] @ 0x24 8026742: 685b ldr r3, [r3, #4] 8026744: 62fb str r3, [r7, #44] @ 0x2c if (iprh_prev->end != iprh->start) { 8026746: 6abb ldr r3, [r7, #40] @ 0x28 8026748: 88db ldrh r3, [r3, #6] 802674a: b29a uxth r2, r3 802674c: 6afb ldr r3, [r7, #44] @ 0x2c 802674e: 889b ldrh r3, [r3, #4] 8026750: b29b uxth r3, r3 8026752: 429a cmp r2, r3 8026754: d002 beq.n 802675c valid = 0; 8026756: 2300 movs r3, #0 8026758: 623b str r3, [r7, #32] break; 802675a: e007 b.n 802676c } iprh_prev = iprh; 802675c: 6afb ldr r3, [r7, #44] @ 0x2c 802675e: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 8026760: 6afb ldr r3, [r7, #44] @ 0x2c 8026762: 681b ldr r3, [r3, #0] 8026764: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 8026766: 6a7b ldr r3, [r7, #36] @ 0x24 8026768: 2b00 cmp r3, #0 802676a: d1e9 bne.n 8026740 } /* if still valid, all fragments are received * (because to the MF==0 already arrived */ if (valid) { 802676c: 6a3b ldr r3, [r7, #32] 802676e: 2b00 cmp r3, #0 8026770: d022 beq.n 80267b8 LWIP_ASSERT("sanity check", ipr->p != NULL); 8026772: 68fb ldr r3, [r7, #12] 8026774: 685b ldr r3, [r3, #4] 8026776: 2b00 cmp r3, #0 8026778: d106 bne.n 8026788 802677a: 4b15 ldr r3, [pc, #84] @ (80267d0 ) 802677c: f240 12df movw r2, #479 @ 0x1df 8026780: 4917 ldr r1, [pc, #92] @ (80267e0 ) 8026782: 4815 ldr r0, [pc, #84] @ (80267d8 ) 8026784: f004 f872 bl 802a86c LWIP_ASSERT("sanity check", 8026788: 68fb ldr r3, [r7, #12] 802678a: 685b ldr r3, [r3, #4] 802678c: 685b ldr r3, [r3, #4] 802678e: 6afa ldr r2, [r7, #44] @ 0x2c 8026790: 429a cmp r2, r3 8026792: d106 bne.n 80267a2 8026794: 4b0e ldr r3, [pc, #56] @ (80267d0 ) 8026796: f44f 72f0 mov.w r2, #480 @ 0x1e0 802679a: 4911 ldr r1, [pc, #68] @ (80267e0 ) 802679c: 480e ldr r0, [pc, #56] @ (80267d8 ) 802679e: f004 f865 bl 802a86c ((struct ip_reass_helper *)ipr->p->payload) != iprh); LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", 80267a2: 6afb ldr r3, [r7, #44] @ 0x2c 80267a4: 681b ldr r3, [r3, #0] 80267a6: 2b00 cmp r3, #0 80267a8: d006 beq.n 80267b8 80267aa: 4b09 ldr r3, [pc, #36] @ (80267d0 ) 80267ac: f44f 72f1 mov.w r2, #482 @ 0x1e2 80267b0: 490c ldr r1, [pc, #48] @ (80267e4 ) 80267b2: 4809 ldr r0, [pc, #36] @ (80267d8 ) 80267b4: f004 f85a bl 802a86c } } /* 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; 80267b8: 6a3b ldr r3, [r7, #32] 80267ba: 2b00 cmp r3, #0 80267bc: bf14 ite ne 80267be: 2301 movne r3, #1 80267c0: 2300 moveq r3, #0 80267c2: b2db uxtb r3, r3 80267c4: e000 b.n 80267c8 } /* If we come here, not all fragments were received, yet! */ return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ 80267c6: 2300 movs r3, #0 } 80267c8: 4618 mov r0, r3 80267ca: 3730 adds r7, #48 @ 0x30 80267cc: 46bd mov sp, r7 80267ce: bd80 pop {r7, pc} 80267d0: 0803166c .word 0x0803166c 80267d4: 08031750 .word 0x08031750 80267d8: 080316b4 .word 0x080316b4 80267dc: 08031770 .word 0x08031770 80267e0: 080317a8 .word 0x080317a8 80267e4: 080317b8 .word 0x080317b8 080267e8 : * @param p points to a pbuf chain of the fragment * @return NULL if reassembly is incomplete, ? otherwise */ struct pbuf * ip4_reass(struct pbuf *p) { 80267e8: b580 push {r7, lr} 80267ea: b08e sub sp, #56 @ 0x38 80267ec: af00 add r7, sp, #0 80267ee: 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; 80267f0: 687b ldr r3, [r7, #4] 80267f2: 685b ldr r3, [r3, #4] 80267f4: 62bb str r3, [r7, #40] @ 0x28 if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { 80267f6: 6abb ldr r3, [r7, #40] @ 0x28 80267f8: 781b ldrb r3, [r3, #0] 80267fa: f003 030f and.w r3, r3, #15 80267fe: b2db uxtb r3, r3 8026800: 009b lsls r3, r3, #2 8026802: b2db uxtb r3, r3 8026804: 2b14 cmp r3, #20 8026806: f040 8171 bne.w 8026aec 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); 802680a: 6abb ldr r3, [r7, #40] @ 0x28 802680c: 88db ldrh r3, [r3, #6] 802680e: b29b uxth r3, r3 8026810: 4618 mov r0, r3 8026812: f7f3 f8d1 bl 80199b8 8026816: 4603 mov r3, r0 8026818: f3c3 030c ubfx r3, r3, #0, #13 802681c: b29b uxth r3, r3 802681e: 00db lsls r3, r3, #3 8026820: 84fb strh r3, [r7, #38] @ 0x26 len = lwip_ntohs(IPH_LEN(fraghdr)); 8026822: 6abb ldr r3, [r7, #40] @ 0x28 8026824: 885b ldrh r3, [r3, #2] 8026826: b29b uxth r3, r3 8026828: 4618 mov r0, r3 802682a: f7f3 f8c5 bl 80199b8 802682e: 4603 mov r3, r0 8026830: 84bb strh r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(fraghdr); 8026832: 6abb ldr r3, [r7, #40] @ 0x28 8026834: 781b ldrb r3, [r3, #0] 8026836: f003 030f and.w r3, r3, #15 802683a: b2db uxtb r3, r3 802683c: 009b lsls r3, r3, #2 802683e: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (hlen > len) { 8026842: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8026846: b29b uxth r3, r3 8026848: 8cba ldrh r2, [r7, #36] @ 0x24 802684a: 429a cmp r2, r3 802684c: f0c0 8150 bcc.w 8026af0 /* invalid datagram */ goto nullreturn; } len = (u16_t)(len - hlen); 8026850: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8026854: b29b uxth r3, r3 8026856: 8cba ldrh r2, [r7, #36] @ 0x24 8026858: 1ad3 subs r3, r2, r3 802685a: 84bb strh r3, [r7, #36] @ 0x24 /* Check if we are allowed to enqueue more datagrams. */ clen = pbuf_clen(p); 802685c: 6878 ldr r0, [r7, #4] 802685e: f7f4 fe1b bl 801b498 8026862: 4603 mov r3, r0 8026864: 843b strh r3, [r7, #32] if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { 8026866: 4b8c ldr r3, [pc, #560] @ (8026a98 ) 8026868: 881b ldrh r3, [r3, #0] 802686a: 461a mov r2, r3 802686c: 8c3b ldrh r3, [r7, #32] 802686e: 4413 add r3, r2 8026870: 2b0a cmp r3, #10 8026872: dd10 ble.n 8026896 #if IP_REASS_FREE_OLDEST if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 8026874: 8c3b ldrh r3, [r7, #32] 8026876: 4619 mov r1, r3 8026878: 6ab8 ldr r0, [r7, #40] @ 0x28 802687a: f7ff fd81 bl 8026380 802687e: 4603 mov r3, r0 8026880: 2b00 cmp r3, #0 8026882: f000 8137 beq.w 8026af4 ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) 8026886: 4b84 ldr r3, [pc, #528] @ (8026a98 ) 8026888: 881b ldrh r3, [r3, #0] 802688a: 461a mov r2, r3 802688c: 8c3b ldrh r3, [r7, #32] 802688e: 4413 add r3, r2 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 8026890: 2b0a cmp r3, #10 8026892: f300 812f bgt.w 8026af4 } } /* 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) { 8026896: 4b81 ldr r3, [pc, #516] @ (8026a9c ) 8026898: 681b ldr r3, [r3, #0] 802689a: 633b str r3, [r7, #48] @ 0x30 802689c: e015 b.n 80268ca /* 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)) { 802689e: 6b3b ldr r3, [r7, #48] @ 0x30 80268a0: 695a ldr r2, [r3, #20] 80268a2: 6abb ldr r3, [r7, #40] @ 0x28 80268a4: 68db ldr r3, [r3, #12] 80268a6: 429a cmp r2, r3 80268a8: d10c bne.n 80268c4 80268aa: 6b3b ldr r3, [r7, #48] @ 0x30 80268ac: 699a ldr r2, [r3, #24] 80268ae: 6abb ldr r3, [r7, #40] @ 0x28 80268b0: 691b ldr r3, [r3, #16] 80268b2: 429a cmp r2, r3 80268b4: d106 bne.n 80268c4 80268b6: 6b3b ldr r3, [r7, #48] @ 0x30 80268b8: 899a ldrh r2, [r3, #12] 80268ba: 6abb ldr r3, [r7, #40] @ 0x28 80268bc: 889b ldrh r3, [r3, #4] 80268be: b29b uxth r3, r3 80268c0: 429a cmp r2, r3 80268c2: d006 beq.n 80268d2 for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 80268c4: 6b3b ldr r3, [r7, #48] @ 0x30 80268c6: 681b ldr r3, [r3, #0] 80268c8: 633b str r3, [r7, #48] @ 0x30 80268ca: 6b3b ldr r3, [r7, #48] @ 0x30 80268cc: 2b00 cmp r3, #0 80268ce: d1e6 bne.n 802689e 80268d0: e000 b.n 80268d4 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; 80268d2: bf00 nop } } if (ipr == NULL) { 80268d4: 6b3b ldr r3, [r7, #48] @ 0x30 80268d6: 2b00 cmp r3, #0 80268d8: d109 bne.n 80268ee /* Enqueue a new datagram into the datagram queue */ ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); 80268da: 8c3b ldrh r3, [r7, #32] 80268dc: 4619 mov r1, r3 80268de: 6ab8 ldr r0, [r7, #40] @ 0x28 80268e0: f7ff fdb0 bl 8026444 80268e4: 6338 str r0, [r7, #48] @ 0x30 /* Bail if unable to enqueue */ if (ipr == NULL) { 80268e6: 6b3b ldr r3, [r7, #48] @ 0x30 80268e8: 2b00 cmp r3, #0 80268ea: d11c bne.n 8026926 goto nullreturn; 80268ec: e105 b.n 8026afa } } else { if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 80268ee: 6abb ldr r3, [r7, #40] @ 0x28 80268f0: 88db ldrh r3, [r3, #6] 80268f2: b29b uxth r3, r3 80268f4: 4618 mov r0, r3 80268f6: f7f3 f85f bl 80199b8 80268fa: 4603 mov r3, r0 80268fc: f3c3 030c ubfx r3, r3, #0, #13 8026900: 2b00 cmp r3, #0 8026902: d110 bne.n 8026926 ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { 8026904: 6b3b ldr r3, [r7, #48] @ 0x30 8026906: 89db ldrh r3, [r3, #14] 8026908: 4618 mov r0, r3 802690a: f7f3 f855 bl 80199b8 802690e: 4603 mov r3, r0 8026910: f3c3 030c ubfx r3, r3, #0, #13 if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 8026914: 2b00 cmp r3, #0 8026916: d006 beq.n 8026926 /* 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); 8026918: 6b3b ldr r3, [r7, #48] @ 0x30 802691a: 3308 adds r3, #8 802691c: 2214 movs r2, #20 802691e: 6ab9 ldr r1, [r7, #40] @ 0x28 8026920: 4618 mov r0, r3 8026922: f004 fa2c bl 802ad7e /* 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; 8026926: 6abb ldr r3, [r7, #40] @ 0x28 8026928: 88db ldrh r3, [r3, #6] 802692a: b29b uxth r3, r3 802692c: f003 0320 and.w r3, r3, #32 8026930: 2b00 cmp r3, #0 8026932: bf0c ite eq 8026934: 2301 moveq r3, #1 8026936: 2300 movne r3, #0 8026938: b2db uxtb r3, r3 802693a: 61fb str r3, [r7, #28] if (is_last) { 802693c: 69fb ldr r3, [r7, #28] 802693e: 2b00 cmp r3, #0 8026940: d00e beq.n 8026960 u16_t datagram_len = (u16_t)(offset + len); 8026942: 8cfa ldrh r2, [r7, #38] @ 0x26 8026944: 8cbb ldrh r3, [r7, #36] @ 0x24 8026946: 4413 add r3, r2 8026948: 837b strh r3, [r7, #26] if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { 802694a: 8b7a ldrh r2, [r7, #26] 802694c: 8cfb ldrh r3, [r7, #38] @ 0x26 802694e: 429a cmp r2, r3 8026950: f0c0 80a0 bcc.w 8026a94 8026954: 8b7b ldrh r3, [r7, #26] 8026956: f64f 72eb movw r2, #65515 @ 0xffeb 802695a: 4293 cmp r3, r2 802695c: f200 809a bhi.w 8026a94 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); 8026960: 69fa ldr r2, [r7, #28] 8026962: 6879 ldr r1, [r7, #4] 8026964: 6b38 ldr r0, [r7, #48] @ 0x30 8026966: f7ff fdd5 bl 8026514 802696a: 6178 str r0, [r7, #20] if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { 802696c: 697b ldr r3, [r7, #20] 802696e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8026972: f000 809b beq.w 8026aac /* 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); 8026976: 4b48 ldr r3, [pc, #288] @ (8026a98 ) 8026978: 881a ldrh r2, [r3, #0] 802697a: 8c3b ldrh r3, [r7, #32] 802697c: 4413 add r3, r2 802697e: b29a uxth r2, r3 8026980: 4b45 ldr r3, [pc, #276] @ (8026a98 ) 8026982: 801a strh r2, [r3, #0] if (is_last) { 8026984: 69fb ldr r3, [r7, #28] 8026986: 2b00 cmp r3, #0 8026988: d00d beq.n 80269a6 u16_t datagram_len = (u16_t)(offset + len); 802698a: 8cfa ldrh r2, [r7, #38] @ 0x26 802698c: 8cbb ldrh r3, [r7, #36] @ 0x24 802698e: 4413 add r3, r2 8026990: 827b strh r3, [r7, #18] ipr->datagram_len = datagram_len; 8026992: 6b3b ldr r3, [r7, #48] @ 0x30 8026994: 8a7a ldrh r2, [r7, #18] 8026996: 839a strh r2, [r3, #28] ipr->flags |= IP_REASS_FLAG_LASTFRAG; 8026998: 6b3b ldr r3, [r7, #48] @ 0x30 802699a: 7f9b ldrb r3, [r3, #30] 802699c: f043 0301 orr.w r3, r3, #1 80269a0: b2da uxtb r2, r3 80269a2: 6b3b ldr r3, [r7, #48] @ 0x30 80269a4: 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) { 80269a6: 697b ldr r3, [r7, #20] 80269a8: 2b01 cmp r3, #1 80269aa: d171 bne.n 8026a90 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); 80269ac: 6b3b ldr r3, [r7, #48] @ 0x30 80269ae: 8b9b ldrh r3, [r3, #28] 80269b0: 3314 adds r3, #20 80269b2: 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; 80269b4: 6b3b ldr r3, [r7, #48] @ 0x30 80269b6: 685b ldr r3, [r3, #4] 80269b8: 685b ldr r3, [r3, #4] 80269ba: 681b ldr r3, [r3, #0] 80269bc: 62fb str r3, [r7, #44] @ 0x2c /* copy the original ip header back to the first pbuf */ fraghdr = (struct ip_hdr *)(ipr->p->payload); 80269be: 6b3b ldr r3, [r7, #48] @ 0x30 80269c0: 685b ldr r3, [r3, #4] 80269c2: 685b ldr r3, [r3, #4] 80269c4: 62bb str r3, [r7, #40] @ 0x28 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); 80269c6: 6b3b ldr r3, [r7, #48] @ 0x30 80269c8: 3308 adds r3, #8 80269ca: 2214 movs r2, #20 80269cc: 4619 mov r1, r3 80269ce: 6ab8 ldr r0, [r7, #40] @ 0x28 80269d0: f004 f9d5 bl 802ad7e IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); 80269d4: 8a3b ldrh r3, [r7, #16] 80269d6: 4618 mov r0, r3 80269d8: f7f2 ffee bl 80199b8 80269dc: 4603 mov r3, r0 80269de: 461a mov r2, r3 80269e0: 6abb ldr r3, [r7, #40] @ 0x28 80269e2: 805a strh r2, [r3, #2] IPH_OFFSET_SET(fraghdr, 0); 80269e4: 6abb ldr r3, [r7, #40] @ 0x28 80269e6: 2200 movs r2, #0 80269e8: 719a strb r2, [r3, #6] 80269ea: 2200 movs r2, #0 80269ec: 71da strb r2, [r3, #7] IPH_CHKSUM_SET(fraghdr, 0); 80269ee: 6abb ldr r3, [r7, #40] @ 0x28 80269f0: 2200 movs r2, #0 80269f2: 729a strb r2, [r3, #10] 80269f4: 2200 movs r2, #0 80269f6: 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; 80269f8: 6b3b ldr r3, [r7, #48] @ 0x30 80269fa: 685b ldr r3, [r3, #4] 80269fc: 607b str r3, [r7, #4] /* chain together the pbufs contained within the reass_data list. */ while (r != NULL) { 80269fe: e00d b.n 8026a1c iprh = (struct ip_reass_helper *)r->payload; 8026a00: 6afb ldr r3, [r7, #44] @ 0x2c 8026a02: 685b ldr r3, [r3, #4] 8026a04: 60fb str r3, [r7, #12] /* hide the ip header for every succeeding fragment */ pbuf_remove_header(r, IP_HLEN); 8026a06: 2114 movs r1, #20 8026a08: 6af8 ldr r0, [r7, #44] @ 0x2c 8026a0a: f7f4 fbff bl 801b20c pbuf_cat(p, r); 8026a0e: 6af9 ldr r1, [r7, #44] @ 0x2c 8026a10: 6878 ldr r0, [r7, #4] 8026a12: f7f4 fd81 bl 801b518 r = iprh->next_pbuf; 8026a16: 68fb ldr r3, [r7, #12] 8026a18: 681b ldr r3, [r3, #0] 8026a1a: 62fb str r3, [r7, #44] @ 0x2c while (r != NULL) { 8026a1c: 6afb ldr r3, [r7, #44] @ 0x2c 8026a1e: 2b00 cmp r3, #0 8026a20: d1ee bne.n 8026a00 } /* find the previous entry in the linked list */ if (ipr == reassdatagrams) { 8026a22: 4b1e ldr r3, [pc, #120] @ (8026a9c ) 8026a24: 681b ldr r3, [r3, #0] 8026a26: 6b3a ldr r2, [r7, #48] @ 0x30 8026a28: 429a cmp r2, r3 8026a2a: d102 bne.n 8026a32 ipr_prev = NULL; 8026a2c: 2300 movs r3, #0 8026a2e: 637b str r3, [r7, #52] @ 0x34 8026a30: e010 b.n 8026a54 } else { for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8026a32: 4b1a ldr r3, [pc, #104] @ (8026a9c ) 8026a34: 681b ldr r3, [r3, #0] 8026a36: 637b str r3, [r7, #52] @ 0x34 8026a38: e007 b.n 8026a4a if (ipr_prev->next == ipr) { 8026a3a: 6b7b ldr r3, [r7, #52] @ 0x34 8026a3c: 681b ldr r3, [r3, #0] 8026a3e: 6b3a ldr r2, [r7, #48] @ 0x30 8026a40: 429a cmp r2, r3 8026a42: d006 beq.n 8026a52 for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8026a44: 6b7b ldr r3, [r7, #52] @ 0x34 8026a46: 681b ldr r3, [r3, #0] 8026a48: 637b str r3, [r7, #52] @ 0x34 8026a4a: 6b7b ldr r3, [r7, #52] @ 0x34 8026a4c: 2b00 cmp r3, #0 8026a4e: d1f4 bne.n 8026a3a 8026a50: e000 b.n 8026a54 break; 8026a52: bf00 nop } } } /* release the sources allocate for the fragment queue entry */ ip_reass_dequeue_datagram(ipr, ipr_prev); 8026a54: 6b79 ldr r1, [r7, #52] @ 0x34 8026a56: 6b38 ldr r0, [r7, #48] @ 0x30 8026a58: f7ff fd2e bl 80264b8 /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); 8026a5c: 6878 ldr r0, [r7, #4] 8026a5e: f7f4 fd1b bl 801b498 8026a62: 4603 mov r3, r0 8026a64: 843b strh r3, [r7, #32] LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 8026a66: 4b0c ldr r3, [pc, #48] @ (8026a98 ) 8026a68: 881b ldrh r3, [r3, #0] 8026a6a: 8c3a ldrh r2, [r7, #32] 8026a6c: 429a cmp r2, r3 8026a6e: d906 bls.n 8026a7e 8026a70: 4b0b ldr r3, [pc, #44] @ (8026aa0 ) 8026a72: f240 229b movw r2, #667 @ 0x29b 8026a76: 490b ldr r1, [pc, #44] @ (8026aa4 ) 8026a78: 480b ldr r0, [pc, #44] @ (8026aa8 ) 8026a7a: f003 fef7 bl 802a86c ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); 8026a7e: 4b06 ldr r3, [pc, #24] @ (8026a98 ) 8026a80: 881a ldrh r2, [r3, #0] 8026a82: 8c3b ldrh r3, [r7, #32] 8026a84: 1ad3 subs r3, r2, r3 8026a86: b29a uxth r2, r3 8026a88: 4b03 ldr r3, [pc, #12] @ (8026a98 ) 8026a8a: 801a strh r2, [r3, #0] MIB2_STATS_INC(mib2.ipreasmoks); /* Return the pbuf chain */ return p; 8026a8c: 687b ldr r3, [r7, #4] 8026a8e: e038 b.n 8026b02 } /* the datagram is not (yet?) reassembled completely */ LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); return NULL; 8026a90: 2300 movs r3, #0 8026a92: e036 b.n 8026b02 goto nullreturn_ipr; 8026a94: bf00 nop 8026a96: e00a b.n 8026aae 8026a98: 2402b108 .word 0x2402b108 8026a9c: 2402b104 .word 0x2402b104 8026aa0: 0803166c .word 0x0803166c 8026aa4: 080317dc .word 0x080317dc 8026aa8: 080316b4 .word 0x080316b4 goto nullreturn_ipr; 8026aac: bf00 nop nullreturn_ipr: LWIP_ASSERT("ipr != NULL", ipr != NULL); 8026aae: 6b3b ldr r3, [r7, #48] @ 0x30 8026ab0: 2b00 cmp r3, #0 8026ab2: d106 bne.n 8026ac2 8026ab4: 4b15 ldr r3, [pc, #84] @ (8026b0c ) 8026ab6: f44f 722a mov.w r2, #680 @ 0x2a8 8026aba: 4915 ldr r1, [pc, #84] @ (8026b10 ) 8026abc: 4815 ldr r0, [pc, #84] @ (8026b14 ) 8026abe: f003 fed5 bl 802a86c if (ipr->p == NULL) { 8026ac2: 6b3b ldr r3, [r7, #48] @ 0x30 8026ac4: 685b ldr r3, [r3, #4] 8026ac6: 2b00 cmp r3, #0 8026ac8: d116 bne.n 8026af8 /* dropped pbuf after creating a new datagram entry: remove the entry, too */ LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); 8026aca: 4b13 ldr r3, [pc, #76] @ (8026b18 ) 8026acc: 681b ldr r3, [r3, #0] 8026ace: 6b3a ldr r2, [r7, #48] @ 0x30 8026ad0: 429a cmp r2, r3 8026ad2: d006 beq.n 8026ae2 8026ad4: 4b0d ldr r3, [pc, #52] @ (8026b0c ) 8026ad6: f240 22ab movw r2, #683 @ 0x2ab 8026ada: 4910 ldr r1, [pc, #64] @ (8026b1c ) 8026adc: 480d ldr r0, [pc, #52] @ (8026b14 ) 8026ade: f003 fec5 bl 802a86c ip_reass_dequeue_datagram(ipr, NULL); 8026ae2: 2100 movs r1, #0 8026ae4: 6b38 ldr r0, [r7, #48] @ 0x30 8026ae6: f7ff fce7 bl 80264b8 8026aea: e006 b.n 8026afa goto nullreturn; 8026aec: bf00 nop 8026aee: e004 b.n 8026afa goto nullreturn; 8026af0: bf00 nop 8026af2: e002 b.n 8026afa goto nullreturn; 8026af4: bf00 nop 8026af6: e000 b.n 8026afa } nullreturn: 8026af8: bf00 nop LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n")); IPFRAG_STATS_INC(ip_frag.drop); pbuf_free(p); 8026afa: 6878 ldr r0, [r7, #4] 8026afc: f7f4 fc3e bl 801b37c return NULL; 8026b00: 2300 movs r3, #0 } 8026b02: 4618 mov r0, r3 8026b04: 3738 adds r7, #56 @ 0x38 8026b06: 46bd mov sp, r7 8026b08: bd80 pop {r7, pc} 8026b0a: bf00 nop 8026b0c: 0803166c .word 0x0803166c 8026b10: 080317f8 .word 0x080317f8 8026b14: 080316b4 .word 0x080316b4 8026b18: 2402b104 .word 0x2402b104 8026b1c: 08031804 .word 0x08031804 08026b20 : #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) { 8026b20: b580 push {r7, lr} 8026b22: af00 add r7, sp, #0 return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); 8026b24: 2005 movs r0, #5 8026b26: f7f3 fcc5 bl 801a4b4 8026b2a: 4603 mov r3, r0 } 8026b2c: 4618 mov r0, r3 8026b2e: bd80 pop {r7, pc} 08026b30 : /** Free a struct pbuf_custom_ref */ static void ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { 8026b30: b580 push {r7, lr} 8026b32: b082 sub sp, #8 8026b34: af00 add r7, sp, #0 8026b36: 6078 str r0, [r7, #4] LWIP_ASSERT("p != NULL", p != NULL); 8026b38: 687b ldr r3, [r7, #4] 8026b3a: 2b00 cmp r3, #0 8026b3c: d106 bne.n 8026b4c 8026b3e: 4b07 ldr r3, [pc, #28] @ (8026b5c ) 8026b40: f44f 7231 mov.w r2, #708 @ 0x2c4 8026b44: 4906 ldr r1, [pc, #24] @ (8026b60 ) 8026b46: 4807 ldr r0, [pc, #28] @ (8026b64 ) 8026b48: f003 fe90 bl 802a86c memp_free(MEMP_FRAG_PBUF, p); 8026b4c: 6879 ldr r1, [r7, #4] 8026b4e: 2005 movs r0, #5 8026b50: f7f3 fd26 bl 801a5a0 } 8026b54: bf00 nop 8026b56: 3708 adds r7, #8 8026b58: 46bd mov sp, r7 8026b5a: bd80 pop {r7, pc} 8026b5c: 0803166c .word 0x0803166c 8026b60: 08031824 .word 0x08031824 8026b64: 080316b4 .word 0x080316b4 08026b68 : /** Free-callback function to free a 'struct pbuf_custom_ref', called by * pbuf_free. */ static void ipfrag_free_pbuf_custom(struct pbuf *p) { 8026b68: b580 push {r7, lr} 8026b6a: b084 sub sp, #16 8026b6c: af00 add r7, sp, #0 8026b6e: 6078 str r0, [r7, #4] struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; 8026b70: 687b ldr r3, [r7, #4] 8026b72: 60fb str r3, [r7, #12] LWIP_ASSERT("pcr != NULL", pcr != NULL); 8026b74: 68fb ldr r3, [r7, #12] 8026b76: 2b00 cmp r3, #0 8026b78: d106 bne.n 8026b88 8026b7a: 4b11 ldr r3, [pc, #68] @ (8026bc0 ) 8026b7c: f240 22ce movw r2, #718 @ 0x2ce 8026b80: 4910 ldr r1, [pc, #64] @ (8026bc4 ) 8026b82: 4811 ldr r0, [pc, #68] @ (8026bc8 ) 8026b84: f003 fe72 bl 802a86c LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); 8026b88: 68fa ldr r2, [r7, #12] 8026b8a: 687b ldr r3, [r7, #4] 8026b8c: 429a cmp r2, r3 8026b8e: d006 beq.n 8026b9e 8026b90: 4b0b ldr r3, [pc, #44] @ (8026bc0 ) 8026b92: f240 22cf movw r2, #719 @ 0x2cf 8026b96: 490d ldr r1, [pc, #52] @ (8026bcc ) 8026b98: 480b ldr r0, [pc, #44] @ (8026bc8 ) 8026b9a: f003 fe67 bl 802a86c if (pcr->original != NULL) { 8026b9e: 68fb ldr r3, [r7, #12] 8026ba0: 695b ldr r3, [r3, #20] 8026ba2: 2b00 cmp r3, #0 8026ba4: d004 beq.n 8026bb0 pbuf_free(pcr->original); 8026ba6: 68fb ldr r3, [r7, #12] 8026ba8: 695b ldr r3, [r3, #20] 8026baa: 4618 mov r0, r3 8026bac: f7f4 fbe6 bl 801b37c } ip_frag_free_pbuf_custom_ref(pcr); 8026bb0: 68f8 ldr r0, [r7, #12] 8026bb2: f7ff ffbd bl 8026b30 } 8026bb6: bf00 nop 8026bb8: 3710 adds r7, #16 8026bba: 46bd mov sp, r7 8026bbc: bd80 pop {r7, pc} 8026bbe: bf00 nop 8026bc0: 0803166c .word 0x0803166c 8026bc4: 08031830 .word 0x08031830 8026bc8: 080316b4 .word 0x080316b4 8026bcc: 0803183c .word 0x0803183c 08026bd0 : * * @return ERR_OK if sent successfully, err_t otherwise */ err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) { 8026bd0: b580 push {r7, lr} 8026bd2: b094 sub sp, #80 @ 0x50 8026bd4: af02 add r7, sp, #8 8026bd6: 60f8 str r0, [r7, #12] 8026bd8: 60b9 str r1, [r7, #8] 8026bda: 607a str r2, [r7, #4] struct pbuf *rambuf; #if !LWIP_NETIF_TX_SINGLE_PBUF struct pbuf *newpbuf; u16_t newpbuflen = 0; 8026bdc: 2300 movs r3, #0 8026bde: 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); 8026be2: 68bb ldr r3, [r7, #8] 8026be4: 8d1b ldrh r3, [r3, #40] @ 0x28 8026be6: 3b14 subs r3, #20 8026be8: 2b00 cmp r3, #0 8026bea: da00 bge.n 8026bee 8026bec: 3307 adds r3, #7 8026bee: 10db asrs r3, r3, #3 8026bf0: 877b strh r3, [r7, #58] @ 0x3a u16_t left, fragsize; u16_t ofo; int last; u16_t poff = IP_HLEN; 8026bf2: 2314 movs r3, #20 8026bf4: 87fb strh r3, [r7, #62] @ 0x3e u16_t tmp; int mf_set; original_iphdr = (struct ip_hdr *)p->payload; 8026bf6: 68fb ldr r3, [r7, #12] 8026bf8: 685b ldr r3, [r3, #4] 8026bfa: 637b str r3, [r7, #52] @ 0x34 iphdr = original_iphdr; 8026bfc: 6b7b ldr r3, [r7, #52] @ 0x34 8026bfe: 633b str r3, [r7, #48] @ 0x30 if (IPH_HL_BYTES(iphdr) != IP_HLEN) { 8026c00: 6b3b ldr r3, [r7, #48] @ 0x30 8026c02: 781b ldrb r3, [r3, #0] 8026c04: f003 030f and.w r3, r3, #15 8026c08: b2db uxtb r3, r3 8026c0a: 009b lsls r3, r3, #2 8026c0c: b2db uxtb r3, r3 8026c0e: 2b14 cmp r3, #20 8026c10: d002 beq.n 8026c18 /* ip4_frag() does not support IP options */ return ERR_VAL; 8026c12: f06f 0305 mvn.w r3, #5 8026c16: e110 b.n 8026e3a } LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 8026c18: 68fb ldr r3, [r7, #12] 8026c1a: 895b ldrh r3, [r3, #10] 8026c1c: 2b13 cmp r3, #19 8026c1e: d809 bhi.n 8026c34 8026c20: 4b88 ldr r3, [pc, #544] @ (8026e44 ) 8026c22: f44f 723f mov.w r2, #764 @ 0x2fc 8026c26: 4988 ldr r1, [pc, #544] @ (8026e48 ) 8026c28: 4888 ldr r0, [pc, #544] @ (8026e4c ) 8026c2a: f003 fe1f bl 802a86c 8026c2e: f06f 0305 mvn.w r3, #5 8026c32: e102 b.n 8026e3a /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); 8026c34: 6b3b ldr r3, [r7, #48] @ 0x30 8026c36: 88db ldrh r3, [r3, #6] 8026c38: b29b uxth r3, r3 8026c3a: 4618 mov r0, r3 8026c3c: f7f2 febc bl 80199b8 8026c40: 4603 mov r3, r0 8026c42: 87bb strh r3, [r7, #60] @ 0x3c ofo = tmp & IP_OFFMASK; 8026c44: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026c46: f3c3 030c ubfx r3, r3, #0, #13 8026c4a: 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; 8026c4e: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026c50: f403 5300 and.w r3, r3, #8192 @ 0x2000 8026c54: 62fb str r3, [r7, #44] @ 0x2c left = (u16_t)(p->tot_len - IP_HLEN); 8026c56: 68fb ldr r3, [r7, #12] 8026c58: 891b ldrh r3, [r3, #8] 8026c5a: 3b14 subs r3, #20 8026c5c: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 while (left) { 8026c60: e0e1 b.n 8026e26 /* Fill this fragment */ fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); 8026c62: 8f7b ldrh r3, [r7, #58] @ 0x3a 8026c64: 00db lsls r3, r3, #3 8026c66: b29b uxth r3, r3 8026c68: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8026c6c: 4293 cmp r3, r2 8026c6e: bf28 it cs 8026c70: 4613 movcs r3, r2 8026c72: 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); 8026c74: f44f 7220 mov.w r2, #640 @ 0x280 8026c78: 2114 movs r1, #20 8026c7a: 200e movs r0, #14 8026c7c: f7f4 f868 bl 801ad50 8026c80: 6278 str r0, [r7, #36] @ 0x24 if (rambuf == NULL) { 8026c82: 6a7b ldr r3, [r7, #36] @ 0x24 8026c84: 2b00 cmp r3, #0 8026c86: f000 80d5 beq.w 8026e34 goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", 8026c8a: 6a7b ldr r3, [r7, #36] @ 0x24 8026c8c: 895b ldrh r3, [r3, #10] 8026c8e: 2b13 cmp r3, #19 8026c90: d806 bhi.n 8026ca0 8026c92: 4b6c ldr r3, [pc, #432] @ (8026e44 ) 8026c94: f44f 7249 mov.w r2, #804 @ 0x324 8026c98: 496d ldr r1, [pc, #436] @ (8026e50 ) 8026c9a: 486c ldr r0, [pc, #432] @ (8026e4c ) 8026c9c: f003 fde6 bl 802a86c (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); 8026ca0: 6a7b ldr r3, [r7, #36] @ 0x24 8026ca2: 685b ldr r3, [r3, #4] 8026ca4: 2214 movs r2, #20 8026ca6: 6b79 ldr r1, [r7, #52] @ 0x34 8026ca8: 4618 mov r0, r3 8026caa: f004 f868 bl 802ad7e iphdr = (struct ip_hdr *)rambuf->payload; 8026cae: 6a7b ldr r3, [r7, #36] @ 0x24 8026cb0: 685b ldr r3, [r3, #4] 8026cb2: 633b str r3, [r7, #48] @ 0x30 left_to_copy = fragsize; 8026cb4: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026cb6: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 while (left_to_copy) { 8026cba: e064 b.n 8026d86 struct pbuf_custom_ref *pcr; u16_t plen = (u16_t)(p->len - poff); 8026cbc: 68fb ldr r3, [r7, #12] 8026cbe: 895a ldrh r2, [r3, #10] 8026cc0: 8ffb ldrh r3, [r7, #62] @ 0x3e 8026cc2: 1ad3 subs r3, r2, r3 8026cc4: 83fb strh r3, [r7, #30] LWIP_ASSERT("p->len >= poff", p->len >= poff); 8026cc6: 68fb ldr r3, [r7, #12] 8026cc8: 895b ldrh r3, [r3, #10] 8026cca: 8ffa ldrh r2, [r7, #62] @ 0x3e 8026ccc: 429a cmp r2, r3 8026cce: d906 bls.n 8026cde 8026cd0: 4b5c ldr r3, [pc, #368] @ (8026e44 ) 8026cd2: f240 322d movw r2, #813 @ 0x32d 8026cd6: 495f ldr r1, [pc, #380] @ (8026e54 ) 8026cd8: 485c ldr r0, [pc, #368] @ (8026e4c ) 8026cda: f003 fdc7 bl 802a86c newpbuflen = LWIP_MIN(left_to_copy, plen); 8026cde: 8bfa ldrh r2, [r7, #30] 8026ce0: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026ce4: 4293 cmp r3, r2 8026ce6: bf28 it cs 8026ce8: 4613 movcs r3, r2 8026cea: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 /* Is this pbuf already empty? */ if (!newpbuflen) { 8026cee: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026cf2: 2b00 cmp r3, #0 8026cf4: d105 bne.n 8026d02 poff = 0; 8026cf6: 2300 movs r3, #0 8026cf8: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8026cfa: 68fb ldr r3, [r7, #12] 8026cfc: 681b ldr r3, [r3, #0] 8026cfe: 60fb str r3, [r7, #12] continue; 8026d00: e041 b.n 8026d86 } pcr = ip_frag_alloc_pbuf_custom_ref(); 8026d02: f7ff ff0d bl 8026b20 8026d06: 61b8 str r0, [r7, #24] if (pcr == NULL) { 8026d08: 69bb ldr r3, [r7, #24] 8026d0a: 2b00 cmp r3, #0 8026d0c: d103 bne.n 8026d16 pbuf_free(rambuf); 8026d0e: 6a78 ldr r0, [r7, #36] @ 0x24 8026d10: f7f4 fb34 bl 801b37c goto memerr; 8026d14: e08f b.n 8026e36 } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8026d16: 69b8 ldr r0, [r7, #24] (u8_t *)p->payload + poff, newpbuflen); 8026d18: 68fb ldr r3, [r7, #12] 8026d1a: 685a ldr r2, [r3, #4] newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8026d1c: 8ffb ldrh r3, [r7, #62] @ 0x3e 8026d1e: 4413 add r3, r2 8026d20: f8b7 1046 ldrh.w r1, [r7, #70] @ 0x46 8026d24: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8026d28: 9201 str r2, [sp, #4] 8026d2a: 9300 str r3, [sp, #0] 8026d2c: 4603 mov r3, r0 8026d2e: 2241 movs r2, #65 @ 0x41 8026d30: 2000 movs r0, #0 8026d32: f7f4 f939 bl 801afa8 8026d36: 6178 str r0, [r7, #20] if (newpbuf == NULL) { 8026d38: 697b ldr r3, [r7, #20] 8026d3a: 2b00 cmp r3, #0 8026d3c: d106 bne.n 8026d4c ip_frag_free_pbuf_custom_ref(pcr); 8026d3e: 69b8 ldr r0, [r7, #24] 8026d40: f7ff fef6 bl 8026b30 pbuf_free(rambuf); 8026d44: 6a78 ldr r0, [r7, #36] @ 0x24 8026d46: f7f4 fb19 bl 801b37c goto memerr; 8026d4a: e074 b.n 8026e36 } pbuf_ref(p); 8026d4c: 68f8 ldr r0, [r7, #12] 8026d4e: f7f4 fbbb bl 801b4c8 pcr->original = p; 8026d52: 69bb ldr r3, [r7, #24] 8026d54: 68fa ldr r2, [r7, #12] 8026d56: 615a str r2, [r3, #20] pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; 8026d58: 69bb ldr r3, [r7, #24] 8026d5a: 4a3f ldr r2, [pc, #252] @ (8026e58 ) 8026d5c: 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); 8026d5e: 6979 ldr r1, [r7, #20] 8026d60: 6a78 ldr r0, [r7, #36] @ 0x24 8026d62: f7f4 fbd9 bl 801b518 left_to_copy = (u16_t)(left_to_copy - newpbuflen); 8026d66: f8b7 2044 ldrh.w r2, [r7, #68] @ 0x44 8026d6a: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026d6e: 1ad3 subs r3, r2, r3 8026d70: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 if (left_to_copy) { 8026d74: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026d78: 2b00 cmp r3, #0 8026d7a: d004 beq.n 8026d86 poff = 0; 8026d7c: 2300 movs r3, #0 8026d7e: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8026d80: 68fb ldr r3, [r7, #12] 8026d82: 681b ldr r3, [r3, #0] 8026d84: 60fb str r3, [r7, #12] while (left_to_copy) { 8026d86: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026d8a: 2b00 cmp r3, #0 8026d8c: d196 bne.n 8026cbc } } poff = (u16_t)(poff + newpbuflen); 8026d8e: 8ffa ldrh r2, [r7, #62] @ 0x3e 8026d90: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026d94: 4413 add r3, r2 8026d96: 87fb strh r3, [r7, #62] @ 0x3e #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /* Correct header */ last = (left <= netif->mtu - IP_HLEN); 8026d98: 68bb ldr r3, [r7, #8] 8026d9a: 8d1b ldrh r3, [r3, #40] @ 0x28 8026d9c: f1a3 0213 sub.w r2, r3, #19 8026da0: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8026da4: 429a cmp r2, r3 8026da6: bfcc ite gt 8026da8: 2301 movgt r3, #1 8026daa: 2300 movle r3, #0 8026dac: b2db uxtb r3, r3 8026dae: 623b str r3, [r7, #32] /* Set new offset and MF flag */ tmp = (IP_OFFMASK & (ofo)); 8026db0: f8b7 3040 ldrh.w r3, [r7, #64] @ 0x40 8026db4: f3c3 030c ubfx r3, r3, #0, #13 8026db8: 87bb strh r3, [r7, #60] @ 0x3c if (!last || mf_set) { 8026dba: 6a3b ldr r3, [r7, #32] 8026dbc: 2b00 cmp r3, #0 8026dbe: d002 beq.n 8026dc6 8026dc0: 6afb ldr r3, [r7, #44] @ 0x2c 8026dc2: 2b00 cmp r3, #0 8026dc4: d003 beq.n 8026dce /* the last fragment has MF set if the input frame had it */ tmp = tmp | IP_MF; 8026dc6: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026dc8: f443 5300 orr.w r3, r3, #8192 @ 0x2000 8026dcc: 87bb strh r3, [r7, #60] @ 0x3c } IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); 8026dce: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026dd0: 4618 mov r0, r3 8026dd2: f7f2 fdf1 bl 80199b8 8026dd6: 4603 mov r3, r0 8026dd8: 461a mov r2, r3 8026dda: 6b3b ldr r3, [r7, #48] @ 0x30 8026ddc: 80da strh r2, [r3, #6] IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); 8026dde: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026de0: 3314 adds r3, #20 8026de2: b29b uxth r3, r3 8026de4: 4618 mov r0, r3 8026de6: f7f2 fde7 bl 80199b8 8026dea: 4603 mov r3, r0 8026dec: 461a mov r2, r3 8026dee: 6b3b ldr r3, [r7, #48] @ 0x30 8026df0: 805a strh r2, [r3, #2] IPH_CHKSUM_SET(iphdr, 0); 8026df2: 6b3b ldr r3, [r7, #48] @ 0x30 8026df4: 2200 movs r2, #0 8026df6: 729a strb r2, [r3, #10] 8026df8: 2200 movs r2, #0 8026dfa: 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); 8026dfc: 68bb ldr r3, [r7, #8] 8026dfe: 695b ldr r3, [r3, #20] 8026e00: 687a ldr r2, [r7, #4] 8026e02: 6a79 ldr r1, [r7, #36] @ 0x24 8026e04: 68b8 ldr r0, [r7, #8] 8026e06: 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); 8026e08: 6a78 ldr r0, [r7, #36] @ 0x24 8026e0a: f7f4 fab7 bl 801b37c left = (u16_t)(left - fragsize); 8026e0e: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8026e12: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026e14: 1ad3 subs r3, r2, r3 8026e16: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 ofo = (u16_t)(ofo + nfb); 8026e1a: f8b7 2040 ldrh.w r2, [r7, #64] @ 0x40 8026e1e: 8f7b ldrh r3, [r7, #58] @ 0x3a 8026e20: 4413 add r3, r2 8026e22: f8a7 3040 strh.w r3, [r7, #64] @ 0x40 while (left) { 8026e26: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8026e2a: 2b00 cmp r3, #0 8026e2c: f47f af19 bne.w 8026c62 } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; 8026e30: 2300 movs r3, #0 8026e32: e002 b.n 8026e3a goto memerr; 8026e34: bf00 nop memerr: MIB2_STATS_INC(mib2.ipfragfails); return ERR_MEM; 8026e36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8026e3a: 4618 mov r0, r3 8026e3c: 3748 adds r7, #72 @ 0x48 8026e3e: 46bd mov sp, r7 8026e40: bd80 pop {r7, pc} 8026e42: bf00 nop 8026e44: 0803166c .word 0x0803166c 8026e48: 08031848 .word 0x08031848 8026e4c: 080316b4 .word 0x080316b4 8026e50: 08031864 .word 0x08031864 8026e54: 08031884 .word 0x08031884 8026e58: 08026b69 .word 0x08026b69 08026e5c : * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 8026e5c: b580 push {r7, lr} 8026e5e: b086 sub sp, #24 8026e60: af00 add r7, sp, #0 8026e62: 6078 str r0, [r7, #4] 8026e64: 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; 8026e66: 230e movs r3, #14 8026e68: 82fb strh r3, [r7, #22] #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ LWIP_ASSERT_CORE_LOCKED(); 8026e6a: f7ea f8d7 bl 801101c if (p->len <= SIZEOF_ETH_HDR) { 8026e6e: 687b ldr r3, [r7, #4] 8026e70: 895b ldrh r3, [r3, #10] 8026e72: 2b0e cmp r3, #14 8026e74: d96e bls.n 8026f54 ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinerrors); goto free_and_return; } if (p->if_idx == NETIF_NO_INDEX) { 8026e76: 687b ldr r3, [r7, #4] 8026e78: 7bdb ldrb r3, [r3, #15] 8026e7a: 2b00 cmp r3, #0 8026e7c: d106 bne.n 8026e8c p->if_idx = netif_get_index(netif); 8026e7e: 683b ldr r3, [r7, #0] 8026e80: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8026e84: 3301 adds r3, #1 8026e86: b2da uxtb r2, r3 8026e88: 687b ldr r3, [r7, #4] 8026e8a: 73da strb r2, [r3, #15] } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 8026e8c: 687b ldr r3, [r7, #4] 8026e8e: 685b ldr r3, [r3, #4] 8026e90: 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; 8026e92: 693b ldr r3, [r7, #16] 8026e94: 7b1a ldrb r2, [r3, #12] 8026e96: 7b5b ldrb r3, [r3, #13] 8026e98: 021b lsls r3, r3, #8 8026e9a: 4313 orrs r3, r2 8026e9c: 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) { 8026e9e: 693b ldr r3, [r7, #16] 8026ea0: 781b ldrb r3, [r3, #0] 8026ea2: f003 0301 and.w r3, r3, #1 8026ea6: 2b00 cmp r3, #0 8026ea8: d023 beq.n 8026ef2 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { 8026eaa: 693b ldr r3, [r7, #16] 8026eac: 781b ldrb r3, [r3, #0] 8026eae: 2b01 cmp r3, #1 8026eb0: d10f bne.n 8026ed2 #if LWIP_IPV4 if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8026eb2: 693b ldr r3, [r7, #16] 8026eb4: 785b ldrb r3, [r3, #1] 8026eb6: 2b00 cmp r3, #0 8026eb8: d11b bne.n 8026ef2 (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { 8026eba: 693b ldr r3, [r7, #16] 8026ebc: 789b ldrb r3, [r3, #2] if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8026ebe: 2b5e cmp r3, #94 @ 0x5e 8026ec0: d117 bne.n 8026ef2 /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 8026ec2: 687b ldr r3, [r7, #4] 8026ec4: 7b5b ldrb r3, [r3, #13] 8026ec6: f043 0310 orr.w r3, r3, #16 8026eca: b2da uxtb r2, r3 8026ecc: 687b ldr r3, [r7, #4] 8026ece: 735a strb r2, [r3, #13] 8026ed0: e00f b.n 8026ef2 (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(ðhdr->dest, ðbroadcast)) { 8026ed2: 693b ldr r3, [r7, #16] 8026ed4: 2206 movs r2, #6 8026ed6: 4928 ldr r1, [pc, #160] @ (8026f78 ) 8026ed8: 4618 mov r0, r3 8026eda: f003 fe2f bl 802ab3c 8026ede: 4603 mov r3, r0 8026ee0: 2b00 cmp r3, #0 8026ee2: d106 bne.n 8026ef2 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8026ee4: 687b ldr r3, [r7, #4] 8026ee6: 7b5b ldrb r3, [r3, #13] 8026ee8: f043 0308 orr.w r3, r3, #8 8026eec: b2da uxtb r2, r3 8026eee: 687b ldr r3, [r7, #4] 8026ef0: 735a strb r2, [r3, #13] } } switch (type) { 8026ef2: 89fb ldrh r3, [r7, #14] 8026ef4: 2b08 cmp r3, #8 8026ef6: d003 beq.n 8026f00 8026ef8: f5b3 6fc1 cmp.w r3, #1544 @ 0x608 8026efc: d014 beq.n 8026f28 } #endif ETHARP_STATS_INC(etharp.proterr); ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); goto free_and_return; 8026efe: e032 b.n 8026f66 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026f00: 683b ldr r3, [r7, #0] 8026f02: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8026f06: f003 0308 and.w r3, r3, #8 8026f0a: 2b00 cmp r3, #0 8026f0c: d024 beq.n 8026f58 if (pbuf_remove_header(p, next_hdr_offset)) { 8026f0e: 8afb ldrh r3, [r7, #22] 8026f10: 4619 mov r1, r3 8026f12: 6878 ldr r0, [r7, #4] 8026f14: f7f4 f97a bl 801b20c 8026f18: 4603 mov r3, r0 8026f1a: 2b00 cmp r3, #0 8026f1c: d11e bne.n 8026f5c ip4_input(p, netif); 8026f1e: 6839 ldr r1, [r7, #0] 8026f20: 6878 ldr r0, [r7, #4] 8026f22: f7fe fd2f bl 8025984 break; 8026f26: e013 b.n 8026f50 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026f28: 683b ldr r3, [r7, #0] 8026f2a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8026f2e: f003 0308 and.w r3, r3, #8 8026f32: 2b00 cmp r3, #0 8026f34: d014 beq.n 8026f60 if (pbuf_remove_header(p, next_hdr_offset)) { 8026f36: 8afb ldrh r3, [r7, #22] 8026f38: 4619 mov r1, r3 8026f3a: 6878 ldr r0, [r7, #4] 8026f3c: f7f4 f966 bl 801b20c 8026f40: 4603 mov r3, r0 8026f42: 2b00 cmp r3, #0 8026f44: d10e bne.n 8026f64 etharp_input(p, netif); 8026f46: 6839 ldr r1, [r7, #0] 8026f48: 6878 ldr r0, [r7, #4] 8026f4a: f7fd fe9d bl 8024c88 break; 8026f4e: bf00 nop } /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; 8026f50: 2300 movs r3, #0 8026f52: e00c b.n 8026f6e goto free_and_return; 8026f54: bf00 nop 8026f56: e006 b.n 8026f66 goto free_and_return; 8026f58: bf00 nop 8026f5a: e004 b.n 8026f66 goto free_and_return; 8026f5c: bf00 nop 8026f5e: e002 b.n 8026f66 goto free_and_return; 8026f60: bf00 nop 8026f62: e000 b.n 8026f66 goto free_and_return; 8026f64: bf00 nop free_and_return: pbuf_free(p); 8026f66: 6878 ldr r0, [r7, #4] 8026f68: f7f4 fa08 bl 801b37c return ERR_OK; 8026f6c: 2300 movs r3, #0 } 8026f6e: 4618 mov r0, r3 8026f70: 3718 adds r7, #24 8026f72: 46bd mov sp, r7 8026f74: bd80 pop {r7, pc} 8026f76: bf00 nop 8026f78: 08031c80 .word 0x08031c80 08026f7c : * @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) { 8026f7c: b580 push {r7, lr} 8026f7e: b086 sub sp, #24 8026f80: af00 add r7, sp, #0 8026f82: 60f8 str r0, [r7, #12] 8026f84: 60b9 str r1, [r7, #8] 8026f86: 607a str r2, [r7, #4] 8026f88: 603b str r3, [r7, #0] struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); 8026f8a: 8c3b ldrh r3, [r7, #32] 8026f8c: 4618 mov r0, r3 8026f8e: f7f2 fd13 bl 80199b8 8026f92: 4603 mov r3, r0 8026f94: 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) { 8026f96: 210e movs r1, #14 8026f98: 68b8 ldr r0, [r7, #8] 8026f9a: f7f4 f927 bl 801b1ec 8026f9e: 4603 mov r3, r0 8026fa0: 2b00 cmp r3, #0 8026fa2: d127 bne.n 8026ff4 goto pbuf_header_failed; } } LWIP_ASSERT_CORE_LOCKED(); 8026fa4: f7ea f83a bl 801101c ethhdr = (struct eth_hdr *)p->payload; 8026fa8: 68bb ldr r3, [r7, #8] 8026faa: 685b ldr r3, [r3, #4] 8026fac: 613b str r3, [r7, #16] ethhdr->type = eth_type_be; 8026fae: 693b ldr r3, [r7, #16] 8026fb0: 8afa ldrh r2, [r7, #22] 8026fb2: 819a strh r2, [r3, #12] SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); 8026fb4: 693b ldr r3, [r7, #16] 8026fb6: 2206 movs r2, #6 8026fb8: 6839 ldr r1, [r7, #0] 8026fba: 4618 mov r0, r3 8026fbc: f003 fedf bl 802ad7e SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); 8026fc0: 693b ldr r3, [r7, #16] 8026fc2: 3306 adds r3, #6 8026fc4: 2206 movs r2, #6 8026fc6: 6879 ldr r1, [r7, #4] 8026fc8: 4618 mov r0, r3 8026fca: f003 fed8 bl 802ad7e LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 8026fce: 68fb ldr r3, [r7, #12] 8026fd0: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8026fd4: 2b06 cmp r3, #6 8026fd6: d006 beq.n 8026fe6 8026fd8: 4b0a ldr r3, [pc, #40] @ (8027004 ) 8026fda: f44f 7299 mov.w r2, #306 @ 0x132 8026fde: 490a ldr r1, [pc, #40] @ (8027008 ) 8026fe0: 480a ldr r0, [pc, #40] @ (802700c ) 8026fe2: f003 fc43 bl 802a86c (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); 8026fe6: 68fb ldr r3, [r7, #12] 8026fe8: 699b ldr r3, [r3, #24] 8026fea: 68b9 ldr r1, [r7, #8] 8026fec: 68f8 ldr r0, [r7, #12] 8026fee: 4798 blx r3 8026ff0: 4603 mov r3, r0 8026ff2: e002 b.n 8026ffa goto pbuf_header_failed; 8026ff4: 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; 8026ff6: f06f 0301 mvn.w r3, #1 } 8026ffa: 4618 mov r0, r3 8026ffc: 3718 adds r7, #24 8026ffe: 46bd mov sp, r7 8027000: bd80 pop {r7, pc} 8027002: bf00 nop 8027004: 08031894 .word 0x08031894 8027008: 080318cc .word 0x080318cc 802700c: 08031900 .word 0x08031900 08027010 : #endif /*-----------------------------------------------------------------------------------*/ // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) { 8027010: b580 push {r7, lr} 8027012: b082 sub sp, #8 8027014: af00 add r7, sp, #0 8027016: 6078 str r0, [r7, #4] 8027018: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) osMessageQDef(QUEUE, size, void *); *mbox = osMessageCreate(osMessageQ(QUEUE), NULL); #else *mbox = osMessageQueueNew(size, sizeof(void *), NULL); 802701a: 683b ldr r3, [r7, #0] 802701c: 2200 movs r2, #0 802701e: 2104 movs r1, #4 8027020: 4618 mov r0, r3 8027022: f7ea fd87 bl 8011b34 8027026: 4602 mov r2, r0 8027028: 687b ldr r3, [r7, #4] 802702a: 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) 802702c: 687b ldr r3, [r7, #4] 802702e: 681b ldr r3, [r3, #0] 8027030: 2b00 cmp r3, #0 8027032: d102 bne.n 802703a return ERR_MEM; 8027034: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027038: e000 b.n 802703c return ERR_OK; 802703a: 2300 movs r3, #0 } 802703c: 4618 mov r0, r3 802703e: 3708 adds r7, #8 8027040: 46bd mov sp, r7 8027042: bd80 pop {r7, pc} 08027044 : Deallocates a mailbox. If there are messages still present in the mailbox when the mailbox is deallocated, it is an indication of a programming error in lwIP and the developer should be notified. */ void sys_mbox_free(sys_mbox_t *mbox) { 8027044: b580 push {r7, lr} 8027046: b082 sub sp, #8 8027048: af00 add r7, sp, #0 802704a: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) if(osMessageWaiting(*mbox)) #else if(osMessageQueueGetCount(*mbox)) 802704c: 687b ldr r3, [r7, #4] 802704e: 681b ldr r3, [r3, #0] 8027050: 4618 mov r0, r3 8027052: f7ea fea1 bl 8011d98 } #if (osCMSIS < 0x20000U) osMessageDelete(*mbox); #else osMessageQueueDelete(*mbox); 8027056: 687b ldr r3, [r7, #4] 8027058: 681b ldr r3, [r3, #0] 802705a: 4618 mov r0, r3 802705c: f7ea febc bl 8011dd8 #endif #if SYS_STATS --lwip_stats.sys.mbox.used; #endif /* SYS_STATS */ } 8027060: bf00 nop 8027062: 3708 adds r7, #8 8027064: 46bd mov sp, r7 8027066: bd80 pop {r7, pc} 08027068 : /*-----------------------------------------------------------------------------------*/ // Try to post the "msg" to the mailbox. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { 8027068: b580 push {r7, lr} 802706a: b084 sub sp, #16 802706c: af00 add r7, sp, #0 802706e: 6078 str r0, [r7, #4] 8027070: 6039 str r1, [r7, #0] err_t result; #if (osCMSIS < 0x20000U) if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK) #else if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK) 8027072: 687b ldr r3, [r7, #4] 8027074: 6818 ldr r0, [r3, #0] 8027076: 4639 mov r1, r7 8027078: 2300 movs r3, #0 802707a: 2200 movs r2, #0 802707c: f7ea fdce bl 8011c1c 8027080: 4603 mov r3, r0 8027082: 2b00 cmp r3, #0 8027084: d102 bne.n 802708c #endif { result = ERR_OK; 8027086: 2300 movs r3, #0 8027088: 73fb strb r3, [r7, #15] 802708a: e001 b.n 8027090 } else { // could not post, queue must be full result = ERR_MEM; 802708c: 23ff movs r3, #255 @ 0xff 802708e: 73fb strb r3, [r7, #15] #if SYS_STATS lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ } return result; 8027090: f997 300f ldrsb.w r3, [r7, #15] } 8027094: 4618 mov r0, r3 8027096: 3710 adds r7, #16 8027098: 46bd mov sp, r7 802709a: bd80 pop {r7, pc} 0802709c : 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) { 802709c: b580 push {r7, lr} 802709e: b086 sub sp, #24 80270a0: af00 add r7, sp, #0 80270a2: 60f8 str r0, [r7, #12] 80270a4: 60b9 str r1, [r7, #8] 80270a6: 607a str r2, [r7, #4] #if (osCMSIS < 0x20000U) osEvent event; uint32_t starttime = osKernelSysTick(); #else osStatus_t status; uint32_t starttime = osKernelGetTickCount(); 80270a8: f7ea f92e bl 8011308 80270ac: 6178 str r0, [r7, #20] #endif if(timeout != 0) 80270ae: 687b ldr r3, [r7, #4] 80270b0: 2b00 cmp r3, #0 80270b2: d013 beq.n 80270dc { *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); } #else status = osMessageQueueGet(*mbox, msg, 0, timeout); 80270b4: 68fb ldr r3, [r7, #12] 80270b6: 6818 ldr r0, [r3, #0] 80270b8: 687b ldr r3, [r7, #4] 80270ba: 2200 movs r2, #0 80270bc: 68b9 ldr r1, [r7, #8] 80270be: f7ea fe0d bl 8011cdc 80270c2: 6138 str r0, [r7, #16] if (status == osOK) 80270c4: 693b ldr r3, [r7, #16] 80270c6: 2b00 cmp r3, #0 80270c8: d105 bne.n 80270d6 { return (osKernelGetTickCount() - starttime); 80270ca: f7ea f91d bl 8011308 80270ce: 4602 mov r2, r0 80270d0: 697b ldr r3, [r7, #20] 80270d2: 1ad3 subs r3, r2, r3 80270d4: e00f b.n 80270f6 } #endif else { return SYS_ARCH_TIMEOUT; 80270d6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80270da: e00c b.n 80270f6 #if (osCMSIS < 0x20000U) event = osMessageGet (*mbox, osWaitForever); *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); #else osMessageQueueGet(*mbox, msg, 0, osWaitForever ); 80270dc: 68fb ldr r3, [r7, #12] 80270de: 6818 ldr r0, [r3, #0] 80270e0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80270e4: 2200 movs r2, #0 80270e6: 68b9 ldr r1, [r7, #8] 80270e8: f7ea fdf8 bl 8011cdc return (osKernelGetTickCount() - starttime); 80270ec: f7ea f90c bl 8011308 80270f0: 4602 mov r2, r0 80270f2: 697b ldr r3, [r7, #20] 80270f4: 1ad3 subs r3, r2, r3 #endif } } 80270f6: 4618 mov r0, r3 80270f8: 3718 adds r7, #24 80270fa: 46bd mov sp, r7 80270fc: bd80 pop {r7, pc} 080270fe : /* Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll return with SYS_MBOX_EMPTY. On success, 0 is returned. */ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) { 80270fe: b580 push {r7, lr} 8027100: b082 sub sp, #8 8027102: af00 add r7, sp, #0 8027104: 6078 str r0, [r7, #4] 8027106: 6039 str r1, [r7, #0] if(event.status == osEventMessage) { *msg = (void *)event.value.v; #else if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK) 8027108: 687b ldr r3, [r7, #4] 802710a: 6818 ldr r0, [r3, #0] 802710c: 2300 movs r3, #0 802710e: 2200 movs r2, #0 8027110: 6839 ldr r1, [r7, #0] 8027112: f7ea fde3 bl 8011cdc 8027116: 4603 mov r3, r0 8027118: 2b00 cmp r3, #0 802711a: d101 bne.n 8027120 { #endif return ERR_OK; 802711c: 2300 movs r3, #0 802711e: e001 b.n 8027124 } else { return SYS_MBOX_EMPTY; 8027120: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } } 8027124: 4618 mov r0, r3 8027126: 3708 adds r7, #8 8027128: 46bd mov sp, r7 802712a: bd80 pop {r7, pc} 0802712c : /*----------------------------------------------------------------------------------*/ int sys_mbox_valid(sys_mbox_t *mbox) { 802712c: b480 push {r7} 802712e: b083 sub sp, #12 8027130: af00 add r7, sp, #0 8027132: 6078 str r0, [r7, #4] if (*mbox == SYS_MBOX_NULL) 8027134: 687b ldr r3, [r7, #4] 8027136: 681b ldr r3, [r3, #0] 8027138: 2b00 cmp r3, #0 802713a: d101 bne.n 8027140 return 0; 802713c: 2300 movs r3, #0 802713e: e000 b.n 8027142 else return 1; 8027140: 2301 movs r3, #1 } 8027142: 4618 mov r0, r3 8027144: 370c adds r7, #12 8027146: 46bd mov sp, r7 8027148: f85d 7b04 ldr.w r7, [sp], #4 802714c: 4770 bx lr 0802714e : /*-----------------------------------------------------------------------------------*/ void sys_mbox_set_invalid(sys_mbox_t *mbox) { 802714e: b480 push {r7} 8027150: b083 sub sp, #12 8027152: af00 add r7, sp, #0 8027154: 6078 str r0, [r7, #4] *mbox = SYS_MBOX_NULL; 8027156: 687b ldr r3, [r7, #4] 8027158: 2200 movs r2, #0 802715a: 601a str r2, [r3, #0] } 802715c: bf00 nop 802715e: 370c adds r7, #12 8027160: 46bd mov sp, r7 8027162: f85d 7b04 ldr.w r7, [sp], #4 8027166: 4770 bx lr 08027168 : /*-----------------------------------------------------------------------------------*/ // Creates a new semaphore. The "count" argument specifies // the initial state of the semaphore. err_t sys_sem_new(sys_sem_t *sem, u8_t count) { 8027168: b580 push {r7, lr} 802716a: b082 sub sp, #8 802716c: af00 add r7, sp, #0 802716e: 6078 str r0, [r7, #4] 8027170: 460b mov r3, r1 8027172: 70fb strb r3, [r7, #3] #if (osCMSIS < 0x20000U) osSemaphoreDef(SEM); *sem = osSemaphoreCreate (osSemaphore(SEM), 1); #else *sem = osSemaphoreNew(UINT16_MAX, count, NULL); 8027174: 78fb ldrb r3, [r7, #3] 8027176: 2200 movs r2, #0 8027178: 4619 mov r1, r3 802717a: f64f 70ff movw r0, #65535 @ 0xffff 802717e: f7ea fb96 bl 80118ae 8027182: 4602 mov r2, r0 8027184: 687b ldr r3, [r7, #4] 8027186: 601a str r2, [r3, #0] #endif if(*sem == NULL) 8027188: 687b ldr r3, [r7, #4] 802718a: 681b ldr r3, [r3, #0] 802718c: 2b00 cmp r3, #0 802718e: d102 bne.n 8027196 { #if SYS_STATS ++lwip_stats.sys.sem.err; #endif /* SYS_STATS */ return ERR_MEM; 8027190: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027194: e009 b.n 80271aa } if(count == 0) // Means it can't be taken 8027196: 78fb ldrb r3, [r7, #3] 8027198: 2b00 cmp r3, #0 802719a: d105 bne.n 80271a8 { #if (osCMSIS < 0x20000U) osSemaphoreWait(*sem, 0); #else osSemaphoreAcquire(*sem, 0); 802719c: 687b ldr r3, [r7, #4] 802719e: 681b ldr r3, [r3, #0] 80271a0: 2100 movs r1, #0 80271a2: 4618 mov r0, r3 80271a4: f7ea fc0c bl 80119c0 if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) { lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; } #endif /* SYS_STATS */ return ERR_OK; 80271a8: 2300 movs r3, #0 } 80271aa: 4618 mov r0, r3 80271ac: 3708 adds r7, #8 80271ae: 46bd mov sp, r7 80271b0: bd80 pop {r7, pc} 080271b2 : Notice that lwIP implements a function with a similar name, sys_sem_wait(), that uses the sys_arch_sem_wait() function. */ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { 80271b2: b580 push {r7, lr} 80271b4: b084 sub sp, #16 80271b6: af00 add r7, sp, #0 80271b8: 6078 str r0, [r7, #4] 80271ba: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) uint32_t starttime = osKernelSysTick(); #else uint32_t starttime = osKernelGetTickCount(); 80271bc: f7ea f8a4 bl 8011308 80271c0: 60f8 str r0, [r7, #12] #endif if(timeout != 0) 80271c2: 683b ldr r3, [r7, #0] 80271c4: 2b00 cmp r3, #0 80271c6: d011 beq.n 80271ec #if (osCMSIS < 0x20000U) if(osSemaphoreWait (*sem, timeout) == osOK) { return (osKernelSysTick() - starttime); #else if(osSemaphoreAcquire(*sem, timeout) == osOK) 80271c8: 687b ldr r3, [r7, #4] 80271ca: 681b ldr r3, [r3, #0] 80271cc: 6839 ldr r1, [r7, #0] 80271ce: 4618 mov r0, r3 80271d0: f7ea fbf6 bl 80119c0 80271d4: 4603 mov r3, r0 80271d6: 2b00 cmp r3, #0 80271d8: d105 bne.n 80271e6 { return (osKernelGetTickCount() - starttime); 80271da: f7ea f895 bl 8011308 80271de: 4602 mov r2, r0 80271e0: 68fb ldr r3, [r7, #12] 80271e2: 1ad3 subs r3, r2, r3 80271e4: e012 b.n 802720c #endif } else { return SYS_ARCH_TIMEOUT; 80271e6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80271ea: e00f b.n 802720c { #if (osCMSIS < 0x20000U) while(osSemaphoreWait (*sem, osWaitForever) != osOK); return (osKernelSysTick() - starttime); #else while(osSemaphoreAcquire(*sem, osWaitForever) != osOK); 80271ec: bf00 nop 80271ee: 687b ldr r3, [r7, #4] 80271f0: 681b ldr r3, [r3, #0] 80271f2: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80271f6: 4618 mov r0, r3 80271f8: f7ea fbe2 bl 80119c0 80271fc: 4603 mov r3, r0 80271fe: 2b00 cmp r3, #0 8027200: d1f5 bne.n 80271ee return (osKernelGetTickCount() - starttime); 8027202: f7ea f881 bl 8011308 8027206: 4602 mov r2, r0 8027208: 68fb ldr r3, [r7, #12] 802720a: 1ad3 subs r3, r2, r3 #endif } } 802720c: 4618 mov r0, r3 802720e: 3710 adds r7, #16 8027210: 46bd mov sp, r7 8027212: bd80 pop {r7, pc} 08027214 : /*-----------------------------------------------------------------------------------*/ // Signals a semaphore void sys_sem_signal(sys_sem_t *sem) { 8027214: b580 push {r7, lr} 8027216: b082 sub sp, #8 8027218: af00 add r7, sp, #0 802721a: 6078 str r0, [r7, #4] osSemaphoreRelease(*sem); 802721c: 687b ldr r3, [r7, #4] 802721e: 681b ldr r3, [r3, #0] 8027220: 4618 mov r0, r3 8027222: f7ea fc1f bl 8011a64 } 8027226: bf00 nop 8027228: 3708 adds r7, #8 802722a: 46bd mov sp, r7 802722c: bd80 pop {r7, pc} 0802722e : /*-----------------------------------------------------------------------------------*/ // Deallocates a semaphore void sys_sem_free(sys_sem_t *sem) { 802722e: b580 push {r7, lr} 8027230: b082 sub sp, #8 8027232: af00 add r7, sp, #0 8027234: 6078 str r0, [r7, #4] #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ osSemaphoreDelete(*sem); 8027236: 687b ldr r3, [r7, #4] 8027238: 681b ldr r3, [r3, #0] 802723a: 4618 mov r0, r3 802723c: f7ea fc56 bl 8011aec } 8027240: bf00 nop 8027242: 3708 adds r7, #8 8027244: 46bd mov sp, r7 8027246: bd80 pop {r7, pc} 08027248 : /*-----------------------------------------------------------------------------------*/ int sys_sem_valid(sys_sem_t *sem) { 8027248: b480 push {r7} 802724a: b083 sub sp, #12 802724c: af00 add r7, sp, #0 802724e: 6078 str r0, [r7, #4] if (*sem == SYS_SEM_NULL) 8027250: 687b ldr r3, [r7, #4] 8027252: 681b ldr r3, [r3, #0] 8027254: 2b00 cmp r3, #0 8027256: d101 bne.n 802725c return 0; 8027258: 2300 movs r3, #0 802725a: e000 b.n 802725e else return 1; 802725c: 2301 movs r3, #1 } 802725e: 4618 mov r0, r3 8027260: 370c adds r7, #12 8027262: 46bd mov sp, r7 8027264: f85d 7b04 ldr.w r7, [sp], #4 8027268: 4770 bx lr 0802726a : /*-----------------------------------------------------------------------------------*/ void sys_sem_set_invalid(sys_sem_t *sem) { 802726a: b480 push {r7} 802726c: b083 sub sp, #12 802726e: af00 add r7, sp, #0 8027270: 6078 str r0, [r7, #4] *sem = SYS_SEM_NULL; 8027272: 687b ldr r3, [r7, #4] 8027274: 2200 movs r2, #0 8027276: 601a str r2, [r3, #0] } 8027278: bf00 nop 802727a: 370c adds r7, #12 802727c: 46bd mov sp, r7 802727e: f85d 7b04 ldr.w r7, [sp], #4 8027282: 4770 bx lr 08027284 : #else osMutexId_t lwip_sys_mutex; #endif // Initialize sys arch void sys_init(void) { 8027284: b580 push {r7, lr} 8027286: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex)); #else lwip_sys_mutex = osMutexNew(NULL); 8027288: 2000 movs r0, #0 802728a: f7ea fa02 bl 8011692 802728e: 4603 mov r3, r0 8027290: 4a01 ldr r2, [pc, #4] @ (8027298 ) 8027292: 6013 str r3, [r2, #0] #endif } 8027294: bf00 nop 8027296: bd80 pop {r7, pc} 8027298: 2402b10c .word 0x2402b10c 0802729c : /* Mutexes*/ /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ #if LWIP_COMPAT_MUTEX == 0 /* Create a new mutex*/ err_t sys_mutex_new(sys_mutex_t *mutex) { 802729c: b580 push {r7, lr} 802729e: b082 sub sp, #8 80272a0: af00 add r7, sp, #0 80272a2: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexDef(MUTEX); *mutex = osMutexCreate(osMutex(MUTEX)); #else *mutex = osMutexNew(NULL); 80272a4: 2000 movs r0, #0 80272a6: f7ea f9f4 bl 8011692 80272aa: 4602 mov r2, r0 80272ac: 687b ldr r3, [r7, #4] 80272ae: 601a str r2, [r3, #0] #endif if(*mutex == NULL) 80272b0: 687b ldr r3, [r7, #4] 80272b2: 681b ldr r3, [r3, #0] 80272b4: 2b00 cmp r3, #0 80272b6: d102 bne.n 80272be { #if SYS_STATS ++lwip_stats.sys.mutex.err; #endif /* SYS_STATS */ return ERR_MEM; 80272b8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80272bc: e000 b.n 80272c0 ++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; 80272be: 2300 movs r3, #0 } 80272c0: 4618 mov r0, r3 80272c2: 3708 adds r7, #8 80272c4: 46bd mov sp, r7 80272c6: bd80 pop {r7, pc} 080272c8 : osMutexDelete(*mutex); } /*-----------------------------------------------------------------------------------*/ /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { 80272c8: b580 push {r7, lr} 80272ca: b082 sub sp, #8 80272cc: af00 add r7, sp, #0 80272ce: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexWait(*mutex, osWaitForever); #else osMutexAcquire(*mutex, osWaitForever); 80272d0: 687b ldr r3, [r7, #4] 80272d2: 681b ldr r3, [r3, #0] 80272d4: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80272d8: 4618 mov r0, r3 80272da: f7ea fa60 bl 801179e #endif } 80272de: bf00 nop 80272e0: 3708 adds r7, #8 80272e2: 46bd mov sp, r7 80272e4: bd80 pop {r7, pc} 080272e6 : /*-----------------------------------------------------------------------------------*/ /* Unlock a mutex*/ void sys_mutex_unlock(sys_mutex_t *mutex) { 80272e6: b580 push {r7, lr} 80272e8: b082 sub sp, #8 80272ea: af00 add r7, sp, #0 80272ec: 6078 str r0, [r7, #4] osMutexRelease(*mutex); 80272ee: 687b ldr r3, [r7, #4] 80272f0: 681b ldr r3, [r3, #0] 80272f2: 4618 mov r0, r3 80272f4: f7ea fa9e bl 8011834 } 80272f8: bf00 nop 80272fa: 3708 adds r7, #8 80272fc: 46bd mov sp, r7 80272fe: bd80 pop {r7, pc} 08027300 : 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) { 8027300: b580 push {r7, lr} 8027302: b08e sub sp, #56 @ 0x38 8027304: af00 add r7, sp, #0 8027306: 60f8 str r0, [r7, #12] 8027308: 60b9 str r1, [r7, #8] 802730a: 607a str r2, [r7, #4] 802730c: 603b str r3, [r7, #0] #if (osCMSIS < 0x20000U) const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize}; return osThreadCreate(&os_thread_def, arg); #else const osThreadAttr_t attributes = { 802730e: f107 0314 add.w r3, r7, #20 8027312: 2224 movs r2, #36 @ 0x24 8027314: 2100 movs r1, #0 8027316: 4618 mov r0, r3 8027318: f003 fc3a bl 802ab90 802731c: 68fb ldr r3, [r7, #12] 802731e: 617b str r3, [r7, #20] 8027320: 683b ldr r3, [r7, #0] 8027322: 62bb str r3, [r7, #40] @ 0x28 8027324: 6c3b ldr r3, [r7, #64] @ 0x40 8027326: 62fb str r3, [r7, #44] @ 0x2c .name = name, .stack_size = stacksize, .priority = (osPriority_t)prio, }; return osThreadNew(thread, arg, &attributes); 8027328: f107 0314 add.w r3, r7, #20 802732c: 461a mov r2, r3 802732e: 6879 ldr r1, [r7, #4] 8027330: 68b8 ldr r0, [r7, #8] 8027332: f7e9 fffe bl 8011332 8027336: 4603 mov r3, r0 #endif } 8027338: 4618 mov r0, r3 802733a: 3738 adds r7, #56 @ 0x38 802733c: 46bd mov sp, r7 802733e: bd80 pop {r7, pc} 08027340 : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ sys_prot_t sys_arch_protect(void) { 8027340: b580 push {r7, lr} 8027342: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) osMutexWait(lwip_sys_mutex, osWaitForever); #else osMutexAcquire(lwip_sys_mutex, osWaitForever); 8027344: 4b04 ldr r3, [pc, #16] @ (8027358 ) 8027346: 681b ldr r3, [r3, #0] 8027348: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 802734c: 4618 mov r0, r3 802734e: f7ea fa26 bl 801179e #endif return (sys_prot_t)1; 8027352: 2301 movs r3, #1 } 8027354: 4618 mov r0, r3 8027356: bd80 pop {r7, pc} 8027358: 2402b10c .word 0x2402b10c 0802735c : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ void sys_arch_unprotect(sys_prot_t pval) { 802735c: b580 push {r7, lr} 802735e: b082 sub sp, #8 8027360: af00 add r7, sp, #0 8027362: 6078 str r0, [r7, #4] ( void ) pval; osMutexRelease(lwip_sys_mutex); 8027364: 4b04 ldr r3, [pc, #16] @ (8027378 ) 8027366: 681b ldr r3, [r3, #0] 8027368: 4618 mov r0, r3 802736a: f7ea fa63 bl 8011834 } 802736e: bf00 nop 8027370: 3708 adds r7, #8 8027372: 46bd mov sp, r7 8027374: bd80 pop {r7, pc} 8027376: bf00 nop 8027378: 2402b10c .word 0x2402b10c 0802737c : #include //#include "cmsis_os.h" osMutexId_t mqttMutex; static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) { 802737c: b480 push {r7} 802737e: b085 sub sp, #20 8027380: af00 add r7, sp, #0 8027382: 60f8 str r0, [r7, #12] 8027384: 60b9 str r1, [r7, #8] 8027386: 607a str r2, [r7, #4] md->topicName = aTopicName; 8027388: 68fb ldr r3, [r7, #12] 802738a: 68ba ldr r2, [r7, #8] 802738c: 605a str r2, [r3, #4] md->message = aMessage; 802738e: 68fb ldr r3, [r7, #12] 8027390: 687a ldr r2, [r7, #4] 8027392: 601a str r2, [r3, #0] } 8027394: bf00 nop 8027396: 3714 adds r7, #20 8027398: 46bd mov sp, r7 802739a: f85d 7b04 ldr.w r7, [sp], #4 802739e: 4770 bx lr 080273a0 : static int getNextPacketId(MQTTClient *c) { 80273a0: b480 push {r7} 80273a2: b083 sub sp, #12 80273a4: af00 add r7, sp, #0 80273a6: 6078 str r0, [r7, #4] return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1; 80273a8: 687b ldr r3, [r7, #4] 80273aa: 681b ldr r3, [r3, #0] 80273ac: f64f 72ff movw r2, #65535 @ 0xffff 80273b0: 4293 cmp r3, r2 80273b2: d003 beq.n 80273bc 80273b4: 687b ldr r3, [r7, #4] 80273b6: 681b ldr r3, [r3, #0] 80273b8: 3301 adds r3, #1 80273ba: e000 b.n 80273be 80273bc: 2301 movs r3, #1 80273be: 687a ldr r2, [r7, #4] 80273c0: 6013 str r3, [r2, #0] 80273c2: 687b ldr r3, [r7, #4] 80273c4: 681b ldr r3, [r3, #0] } 80273c6: 4618 mov r0, r3 80273c8: 370c adds r7, #12 80273ca: 46bd mov sp, r7 80273cc: f85d 7b04 ldr.w r7, [sp], #4 80273d0: 4770 bx lr 080273d2 : static int sendPacket(MQTTClient* c, int length, Timer* timer) { 80273d2: b5f0 push {r4, r5, r6, r7, lr} 80273d4: b087 sub sp, #28 80273d6: af00 add r7, sp, #0 80273d8: 60f8 str r0, [r7, #12] 80273da: 60b9 str r1, [r7, #8] 80273dc: 607a str r2, [r7, #4] int rc = FAILURE, 80273de: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80273e2: 617b str r3, [r7, #20] sent = 0; 80273e4: 2300 movs r3, #0 80273e6: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 80273e8: e018 b.n 802741c { rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer)); 80273ea: 68fb ldr r3, [r7, #12] 80273ec: 6d5b ldr r3, [r3, #84] @ 0x54 80273ee: 689c ldr r4, [r3, #8] 80273f0: 68fb ldr r3, [r7, #12] 80273f2: 6d5d ldr r5, [r3, #84] @ 0x54 80273f4: 68fb ldr r3, [r7, #12] 80273f6: 691a ldr r2, [r3, #16] 80273f8: 693b ldr r3, [r7, #16] 80273fa: 18d6 adds r6, r2, r3 80273fc: 6878 ldr r0, [r7, #4] 80273fe: f000 fed3 bl 80281a8 8027402: 4603 mov r3, r0 8027404: 68ba ldr r2, [r7, #8] 8027406: 4631 mov r1, r6 8027408: 4628 mov r0, r5 802740a: 47a0 blx r4 802740c: 6178 str r0, [r7, #20] if (rc < 0) // there was an error writing the data 802740e: 697b ldr r3, [r7, #20] 8027410: 2b00 cmp r3, #0 8027412: db0e blt.n 8027432 break; sent += rc; 8027414: 693a ldr r2, [r7, #16] 8027416: 697b ldr r3, [r7, #20] 8027418: 4413 add r3, r2 802741a: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 802741c: 693a ldr r2, [r7, #16] 802741e: 68bb ldr r3, [r7, #8] 8027420: 429a cmp r2, r3 8027422: da07 bge.n 8027434 8027424: 6878 ldr r0, [r7, #4] 8027426: f000 fe7d bl 8028124 802742a: 4603 mov r3, r0 802742c: 2b00 cmp r3, #0 802742e: d0dc beq.n 80273ea 8027430: e000 b.n 8027434 break; 8027432: bf00 nop } if (sent == length) 8027434: 693a ldr r2, [r7, #16] 8027436: 68bb ldr r3, [r7, #8] 8027438: 429a cmp r2, r3 802743a: d10b bne.n 8027454 { TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet 802743c: 68fb ldr r3, [r7, #12] 802743e: f103 0258 add.w r2, r3, #88 @ 0x58 8027442: 68fb ldr r3, [r7, #12] 8027444: 699b ldr r3, [r3, #24] 8027446: 4619 mov r1, r3 8027448: 4610 mov r0, r2 802744a: f000 fe95 bl 8028178 rc = MQTT_SUCCESS; 802744e: 2300 movs r3, #0 8027450: 617b str r3, [r7, #20] 8027452: e002 b.n 802745a } else rc = FAILURE; 8027454: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027458: 617b str r3, [r7, #20] return rc; 802745a: 697b ldr r3, [r7, #20] } 802745c: 4618 mov r0, r3 802745e: 371c adds r7, #28 8027460: 46bd mov sp, r7 8027462: bdf0 pop {r4, r5, r6, r7, pc} 08027464 : void MQTTClientInit(MQTTClient* c, Network* network, unsigned int command_timeout_ms, unsigned char* sendbuf, size_t sendbuf_size, unsigned char* readbuf, size_t readbuf_size) { 8027464: b580 push {r7, lr} 8027466: b086 sub sp, #24 8027468: af00 add r7, sp, #0 802746a: 60f8 str r0, [r7, #12] 802746c: 60b9 str r1, [r7, #8] 802746e: 607a str r2, [r7, #4] 8027470: 603b str r3, [r7, #0] int i; c->ipstack = network; 8027472: 68fb ldr r3, [r7, #12] 8027474: 68ba ldr r2, [r7, #8] 8027476: 655a str r2, [r3, #84] @ 0x54 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027478: 2300 movs r3, #0 802747a: 617b str r3, [r7, #20] 802747c: e008 b.n 8027490 c->messageHandlers[i].topicFilter = 0; 802747e: 68fb ldr r3, [r7, #12] 8027480: 697a ldr r2, [r7, #20] 8027482: 3205 adds r2, #5 8027484: 2100 movs r1, #0 8027486: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 802748a: 697b ldr r3, [r7, #20] 802748c: 3301 adds r3, #1 802748e: 617b str r3, [r7, #20] 8027490: 697b ldr r3, [r7, #20] 8027492: 2b04 cmp r3, #4 8027494: ddf3 ble.n 802747e c->command_timeout_ms = command_timeout_ms; 8027496: 68fb ldr r3, [r7, #12] 8027498: 687a ldr r2, [r7, #4] 802749a: 605a str r2, [r3, #4] c->buf = sendbuf; 802749c: 68fb ldr r3, [r7, #12] 802749e: 683a ldr r2, [r7, #0] 80274a0: 611a str r2, [r3, #16] c->buf_size = sendbuf_size; 80274a2: 68fb ldr r3, [r7, #12] 80274a4: 6a3a ldr r2, [r7, #32] 80274a6: 609a str r2, [r3, #8] c->readbuf = readbuf; 80274a8: 68fb ldr r3, [r7, #12] 80274aa: 6a7a ldr r2, [r7, #36] @ 0x24 80274ac: 615a str r2, [r3, #20] c->readbuf_size = readbuf_size; 80274ae: 68fb ldr r3, [r7, #12] 80274b0: 6aba ldr r2, [r7, #40] @ 0x28 80274b2: 60da str r2, [r3, #12] c->isconnected = 0; 80274b4: 68fb ldr r3, [r7, #12] 80274b6: 2200 movs r2, #0 80274b8: 621a str r2, [r3, #32] c->cleansession = 0; 80274ba: 68fb ldr r3, [r7, #12] 80274bc: 2200 movs r2, #0 80274be: 625a str r2, [r3, #36] @ 0x24 c->ping_outstanding = 0; 80274c0: 68fb ldr r3, [r7, #12] 80274c2: 2200 movs r2, #0 80274c4: 771a strb r2, [r3, #28] c->defaultMessageHandler = NULL; 80274c6: 68fb ldr r3, [r7, #12] 80274c8: 2200 movs r2, #0 80274ca: 651a str r2, [r3, #80] @ 0x50 c->next_packetid = 1; 80274cc: 68fb ldr r3, [r7, #12] 80274ce: 2201 movs r2, #1 80274d0: 601a str r2, [r3, #0] TimerInit(&c->last_sent); 80274d2: 68fb ldr r3, [r7, #12] 80274d4: 3358 adds r3, #88 @ 0x58 80274d6: 4618 mov r0, r3 80274d8: f000 fe7c bl 80281d4 TimerInit(&c->last_received); 80274dc: 68fb ldr r3, [r7, #12] 80274de: 3360 adds r3, #96 @ 0x60 80274e0: 4618 mov r0, r3 80274e2: f000 fe77 bl 80281d4 #if defined(MQTT_TASK) MutexInit(&c->mutex); #endif if(mqttMutex == NULL) 80274e6: 4b07 ldr r3, [pc, #28] @ (8027504 ) 80274e8: 681b ldr r3, [r3, #0] 80274ea: 2b00 cmp r3, #0 80274ec: d105 bne.n 80274fa { // osMutexDef(mqttMutex); // mqttMutex = osMutexNew(NULL); c->mutex = osMutexNew(NULL); 80274ee: 2000 movs r0, #0 80274f0: f7ea f8cf bl 8011692 80274f4: 4602 mov r2, r0 80274f6: 68fb ldr r3, [r7, #12] 80274f8: 669a str r2, [r3, #104] @ 0x68 } } 80274fa: bf00 nop 80274fc: 3718 adds r7, #24 80274fe: 46bd mov sp, r7 8027500: bd80 pop {r7, pc} 8027502: bf00 nop 8027504: 2402b110 .word 0x2402b110 08027508 : static int decodePacket(MQTTClient* c, int* value, int timeout) { 8027508: b590 push {r4, r7, lr} 802750a: b08b sub sp, #44 @ 0x2c 802750c: af00 add r7, sp, #0 802750e: 60f8 str r0, [r7, #12] 8027510: 60b9 str r1, [r7, #8] 8027512: 607a str r2, [r7, #4] unsigned char i; int multiplier = 1; 8027514: 2301 movs r3, #1 8027516: 627b str r3, [r7, #36] @ 0x24 int len = 0; 8027518: 2300 movs r3, #0 802751a: 623b str r3, [r7, #32] const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4; 802751c: 2304 movs r3, #4 802751e: 61fb str r3, [r7, #28] *value = 0; 8027520: 68bb ldr r3, [r7, #8] 8027522: 2200 movs r2, #0 8027524: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 8027526: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802752a: 61bb str r3, [r7, #24] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 802752c: 6a3b ldr r3, [r7, #32] 802752e: 3301 adds r3, #1 8027530: 623b str r3, [r7, #32] 8027532: 6a3a ldr r2, [r7, #32] 8027534: 69fb ldr r3, [r7, #28] 8027536: 429a cmp r2, r3 8027538: dd03 ble.n 8027542 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 802753a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802753e: 61bb str r3, [r7, #24] goto exit; 8027540: e021 b.n 8027586 } rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout); 8027542: 68fb ldr r3, [r7, #12] 8027544: 6d5b ldr r3, [r3, #84] @ 0x54 8027546: 685c ldr r4, [r3, #4] 8027548: 68fb ldr r3, [r7, #12] 802754a: 6d58 ldr r0, [r3, #84] @ 0x54 802754c: f107 0117 add.w r1, r7, #23 8027550: 687b ldr r3, [r7, #4] 8027552: 2201 movs r2, #1 8027554: 47a0 blx r4 8027556: 61b8 str r0, [r7, #24] if (rc != 1) 8027558: 69bb ldr r3, [r7, #24] 802755a: 2b01 cmp r3, #1 802755c: d112 bne.n 8027584 goto exit; *value += (i & 127) * multiplier; 802755e: 68bb ldr r3, [r7, #8] 8027560: 681a ldr r2, [r3, #0] 8027562: 7dfb ldrb r3, [r7, #23] 8027564: f003 037f and.w r3, r3, #127 @ 0x7f 8027568: 6a79 ldr r1, [r7, #36] @ 0x24 802756a: fb01 f303 mul.w r3, r1, r3 802756e: 441a add r2, r3 8027570: 68bb ldr r3, [r7, #8] 8027572: 601a str r2, [r3, #0] multiplier *= 128; 8027574: 6a7b ldr r3, [r7, #36] @ 0x24 8027576: 01db lsls r3, r3, #7 8027578: 627b str r3, [r7, #36] @ 0x24 } while ((i & 128) != 0); 802757a: 7dfb ldrb r3, [r7, #23] 802757c: b25b sxtb r3, r3 802757e: 2b00 cmp r3, #0 8027580: dbd1 blt.n 8027526 exit: 8027582: e000 b.n 8027586 goto exit; 8027584: bf00 nop return len; 8027586: 6a3b ldr r3, [r7, #32] } 8027588: 4618 mov r0, r3 802758a: 372c adds r7, #44 @ 0x2c 802758c: 46bd mov sp, r7 802758e: bd90 pop {r4, r7, pc} 08027590 : static int readPacket(MQTTClient* c, Timer* timer) { 8027590: b5f0 push {r4, r5, r6, r7, lr} 8027592: b089 sub sp, #36 @ 0x24 8027594: af00 add r7, sp, #0 8027596: 60f8 str r0, [r7, #12] 8027598: 60b9 str r1, [r7, #8] MQTTHeader header = {0}; 802759a: 2300 movs r3, #0 802759c: 617b str r3, [r7, #20] int len = 0; 802759e: 2300 movs r3, #0 80275a0: 61bb str r3, [r7, #24] int rem_len = 0; 80275a2: 2300 movs r3, #0 80275a4: 613b str r3, [r7, #16] /* 1. read the header byte. This has the packet type in it */ int rc = c->ipstack->mqttread(c->ipstack, c->readbuf, 1, TimerLeftMS(timer)); 80275a6: 68fb ldr r3, [r7, #12] 80275a8: 6d5b ldr r3, [r3, #84] @ 0x54 80275aa: 685c ldr r4, [r3, #4] 80275ac: 68fb ldr r3, [r7, #12] 80275ae: 6d5d ldr r5, [r3, #84] @ 0x54 80275b0: 68fb ldr r3, [r7, #12] 80275b2: 695e ldr r6, [r3, #20] 80275b4: 68b8 ldr r0, [r7, #8] 80275b6: f000 fdf7 bl 80281a8 80275ba: 4603 mov r3, r0 80275bc: 2201 movs r2, #1 80275be: 4631 mov r1, r6 80275c0: 4628 mov r0, r5 80275c2: 47a0 blx r4 80275c4: 61f8 str r0, [r7, #28] if (rc != 1) 80275c6: 69fb ldr r3, [r7, #28] 80275c8: 2b01 cmp r3, #1 80275ca: d15d bne.n 8027688 goto exit; len = 1; 80275cc: 2301 movs r3, #1 80275ce: 61bb str r3, [r7, #24] /* 2. read the remaining length. This is variable in itself */ decodePacket(c, &rem_len, TimerLeftMS(timer)); 80275d0: 68b8 ldr r0, [r7, #8] 80275d2: f000 fde9 bl 80281a8 80275d6: 4602 mov r2, r0 80275d8: f107 0310 add.w r3, r7, #16 80275dc: 4619 mov r1, r3 80275de: 68f8 ldr r0, [r7, #12] 80275e0: f7ff ff92 bl 8027508 len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */ 80275e4: 68fb ldr r3, [r7, #12] 80275e6: 695b ldr r3, [r3, #20] 80275e8: 3301 adds r3, #1 80275ea: 693a ldr r2, [r7, #16] 80275ec: 4611 mov r1, r2 80275ee: 4618 mov r0, r3 80275f0: f001 f959 bl 80288a6 80275f4: 4602 mov r2, r0 80275f6: 69bb ldr r3, [r7, #24] 80275f8: 4413 add r3, r2 80275fa: 61bb str r3, [r7, #24] if (rem_len > (c->readbuf_size - len)) 80275fc: 68fb ldr r3, [r7, #12] 80275fe: 68da ldr r2, [r3, #12] 8027600: 69bb ldr r3, [r7, #24] 8027602: 1ad3 subs r3, r2, r3 8027604: 693a ldr r2, [r7, #16] 8027606: 4293 cmp r3, r2 8027608: d203 bcs.n 8027612 { rc = BUFFER_OVERFLOW; 802760a: f06f 0301 mvn.w r3, #1 802760e: 61fb str r3, [r7, #28] goto exit; 8027610: e03d b.n 802768e } /* 3. read the rest of the buffer using a callback to supply the rest of the data */ if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) { 8027612: 693b ldr r3, [r7, #16] 8027614: 2b00 cmp r3, #0 8027616: dd20 ble.n 802765a 8027618: 68fb ldr r3, [r7, #12] 802761a: 6d5b ldr r3, [r3, #84] @ 0x54 802761c: 685c ldr r4, [r3, #4] 802761e: 68fb ldr r3, [r7, #12] 8027620: 6d5d ldr r5, [r3, #84] @ 0x54 8027622: 68fb ldr r3, [r7, #12] 8027624: 695a ldr r2, [r3, #20] 8027626: 69bb ldr r3, [r7, #24] 8027628: 18d6 adds r6, r2, r3 802762a: 693b ldr r3, [r7, #16] 802762c: 607b str r3, [r7, #4] 802762e: 68b8 ldr r0, [r7, #8] 8027630: f000 fdba bl 80281a8 8027634: 4603 mov r3, r0 8027636: 687a ldr r2, [r7, #4] 8027638: 4631 mov r1, r6 802763a: 4628 mov r0, r5 802763c: 47a0 blx r4 802763e: 4602 mov r2, r0 8027640: 693b ldr r3, [r7, #16] 8027642: 429a cmp r2, r3 8027644: bf14 ite ne 8027646: 2301 movne r3, #1 8027648: 2300 moveq r3, #0 802764a: b2db uxtb r3, r3 802764c: 61fb str r3, [r7, #28] 802764e: 69fb ldr r3, [r7, #28] 8027650: 2b00 cmp r3, #0 8027652: d002 beq.n 802765a rc = 0; 8027654: 2300 movs r3, #0 8027656: 61fb str r3, [r7, #28] goto exit; 8027658: e019 b.n 802768e } header.byte = c->readbuf[0]; 802765a: 68fb ldr r3, [r7, #12] 802765c: 695b ldr r3, [r3, #20] 802765e: 781b ldrb r3, [r3, #0] 8027660: 753b strb r3, [r7, #20] rc = header.bits.type; 8027662: 7d3b ldrb r3, [r7, #20] 8027664: f3c3 1303 ubfx r3, r3, #4, #4 8027668: b2db uxtb r3, r3 802766a: 61fb str r3, [r7, #28] if (c->keepAliveInterval > 0) 802766c: 68fb ldr r3, [r7, #12] 802766e: 699b ldr r3, [r3, #24] 8027670: 2b00 cmp r3, #0 8027672: d00b beq.n 802768c TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet 8027674: 68fb ldr r3, [r7, #12] 8027676: f103 0260 add.w r2, r3, #96 @ 0x60 802767a: 68fb ldr r3, [r7, #12] 802767c: 699b ldr r3, [r3, #24] 802767e: 4619 mov r1, r3 8027680: 4610 mov r0, r2 8027682: f000 fd79 bl 8028178 8027686: e002 b.n 802768e goto exit; 8027688: bf00 nop 802768a: e000 b.n 802768e exit: 802768c: bf00 nop return rc; 802768e: 69fb ldr r3, [r7, #28] } 8027690: 4618 mov r0, r3 8027692: 3724 adds r7, #36 @ 0x24 8027694: 46bd mov sp, r7 8027696: bdf0 pop {r4, r5, r6, r7, pc} 08027698 : // assume topic filter and name is in correct format // # can only be at end // + and # can only be next to separator static char isTopicMatched(char* topicFilter, MQTTString* topicName) { 8027698: b480 push {r7} 802769a: b087 sub sp, #28 802769c: af00 add r7, sp, #0 802769e: 6078 str r0, [r7, #4] 80276a0: 6039 str r1, [r7, #0] char* curf = topicFilter; 80276a2: 687b ldr r3, [r7, #4] 80276a4: 617b str r3, [r7, #20] char* curn = topicName->lenstring.data; 80276a6: 683b ldr r3, [r7, #0] 80276a8: 689b ldr r3, [r3, #8] 80276aa: 613b str r3, [r7, #16] char* curn_end = curn + topicName->lenstring.len; 80276ac: 683b ldr r3, [r7, #0] 80276ae: 685b ldr r3, [r3, #4] 80276b0: 461a mov r2, r3 80276b2: 693b ldr r3, [r7, #16] 80276b4: 4413 add r3, r2 80276b6: 60bb str r3, [r7, #8] while (*curf && curn < curn_end) 80276b8: e039 b.n 802772e { if (*curn == '/' && *curf != '/') 80276ba: 693b ldr r3, [r7, #16] 80276bc: 781b ldrb r3, [r3, #0] 80276be: 2b2f cmp r3, #47 @ 0x2f 80276c0: d103 bne.n 80276ca 80276c2: 697b ldr r3, [r7, #20] 80276c4: 781b ldrb r3, [r3, #0] 80276c6: 2b2f cmp r3, #47 @ 0x2f 80276c8: d13a bne.n 8027740 break; if (*curf != '+' && *curf != '#' && *curf != *curn) 80276ca: 697b ldr r3, [r7, #20] 80276cc: 781b ldrb r3, [r3, #0] 80276ce: 2b2b cmp r3, #43 @ 0x2b 80276d0: d009 beq.n 80276e6 80276d2: 697b ldr r3, [r7, #20] 80276d4: 781b ldrb r3, [r3, #0] 80276d6: 2b23 cmp r3, #35 @ 0x23 80276d8: d005 beq.n 80276e6 80276da: 697b ldr r3, [r7, #20] 80276dc: 781a ldrb r2, [r3, #0] 80276de: 693b ldr r3, [r7, #16] 80276e0: 781b ldrb r3, [r3, #0] 80276e2: 429a cmp r2, r3 80276e4: d12e bne.n 8027744 break; if (*curf == '+') 80276e6: 697b ldr r3, [r7, #20] 80276e8: 781b ldrb r3, [r3, #0] 80276ea: 2b2b cmp r3, #43 @ 0x2b 80276ec: d112 bne.n 8027714 { // skip until we meet the next separator, or end of string char* nextpos = curn + 1; 80276ee: 693b ldr r3, [r7, #16] 80276f0: 3301 adds r3, #1 80276f2: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 80276f4: e005 b.n 8027702 nextpos = ++curn + 1; 80276f6: 693b ldr r3, [r7, #16] 80276f8: 3301 adds r3, #1 80276fa: 613b str r3, [r7, #16] 80276fc: 693b ldr r3, [r7, #16] 80276fe: 3301 adds r3, #1 8027700: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 8027702: 68fa ldr r2, [r7, #12] 8027704: 68bb ldr r3, [r7, #8] 8027706: 429a cmp r2, r3 8027708: d20b bcs.n 8027722 802770a: 68fb ldr r3, [r7, #12] 802770c: 781b ldrb r3, [r3, #0] 802770e: 2b2f cmp r3, #47 @ 0x2f 8027710: d1f1 bne.n 80276f6 8027712: e006 b.n 8027722 } else if (*curf == '#') 8027714: 697b ldr r3, [r7, #20] 8027716: 781b ldrb r3, [r3, #0] 8027718: 2b23 cmp r3, #35 @ 0x23 802771a: d102 bne.n 8027722 curn = curn_end - 1; // skip until end of string 802771c: 68bb ldr r3, [r7, #8] 802771e: 3b01 subs r3, #1 8027720: 613b str r3, [r7, #16] curf++; 8027722: 697b ldr r3, [r7, #20] 8027724: 3301 adds r3, #1 8027726: 617b str r3, [r7, #20] curn++; 8027728: 693b ldr r3, [r7, #16] 802772a: 3301 adds r3, #1 802772c: 613b str r3, [r7, #16] while (*curf && curn < curn_end) 802772e: 697b ldr r3, [r7, #20] 8027730: 781b ldrb r3, [r3, #0] 8027732: 2b00 cmp r3, #0 8027734: d007 beq.n 8027746 8027736: 693a ldr r2, [r7, #16] 8027738: 68bb ldr r3, [r7, #8] 802773a: 429a cmp r2, r3 802773c: d3bd bcc.n 80276ba 802773e: e002 b.n 8027746 break; 8027740: bf00 nop 8027742: e000 b.n 8027746 break; 8027744: bf00 nop }; return (curn == curn_end) && (*curf == '\0'); 8027746: 693a ldr r2, [r7, #16] 8027748: 68bb ldr r3, [r7, #8] 802774a: 429a cmp r2, r3 802774c: d105 bne.n 802775a 802774e: 697b ldr r3, [r7, #20] 8027750: 781b ldrb r3, [r3, #0] 8027752: 2b00 cmp r3, #0 8027754: d101 bne.n 802775a 8027756: 2301 movs r3, #1 8027758: e000 b.n 802775c 802775a: 2300 movs r3, #0 802775c: b2db uxtb r3, r3 } 802775e: 4618 mov r0, r3 8027760: 371c adds r7, #28 8027762: 46bd mov sp, r7 8027764: f85d 7b04 ldr.w r7, [sp], #4 8027768: 4770 bx lr 0802776a : int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message) { 802776a: b580 push {r7, lr} 802776c: b08a sub sp, #40 @ 0x28 802776e: af00 add r7, sp, #0 8027770: 60f8 str r0, [r7, #12] 8027772: 60b9 str r1, [r7, #8] 8027774: 607a str r2, [r7, #4] int i; int rc = FAILURE; 8027776: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802777a: 623b str r3, [r7, #32] // we have to find the right message handler - indexed by topic for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 802777c: 2300 movs r3, #0 802777e: 627b str r3, [r7, #36] @ 0x24 8027780: e03c b.n 80277fc { if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 8027782: 68fb ldr r3, [r7, #12] 8027784: 6a7a ldr r2, [r7, #36] @ 0x24 8027786: 3205 adds r2, #5 8027788: f853 3032 ldr.w r3, [r3, r2, lsl #3] 802778c: 2b00 cmp r3, #0 802778e: d032 beq.n 80277f6 8027790: 68fb ldr r3, [r7, #12] 8027792: 6a7a ldr r2, [r7, #36] @ 0x24 8027794: 3205 adds r2, #5 8027796: f853 3032 ldr.w r3, [r3, r2, lsl #3] 802779a: 4619 mov r1, r3 802779c: 68b8 ldr r0, [r7, #8] 802779e: f001 fa51 bl 8028c44 80277a2: 4603 mov r3, r0 80277a4: 2b00 cmp r3, #0 80277a6: d10b bne.n 80277c0 isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName))) 80277a8: 68fb ldr r3, [r7, #12] 80277aa: 6a7a ldr r2, [r7, #36] @ 0x24 80277ac: 3205 adds r2, #5 80277ae: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80277b2: 68b9 ldr r1, [r7, #8] 80277b4: 4618 mov r0, r3 80277b6: f7ff ff6f bl 8027698 80277ba: 4603 mov r3, r0 if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 80277bc: 2b00 cmp r3, #0 80277be: d01a beq.n 80277f6 { if (c->messageHandlers[i].fp != NULL) 80277c0: 68fa ldr r2, [r7, #12] 80277c2: 6a7b ldr r3, [r7, #36] @ 0x24 80277c4: 3305 adds r3, #5 80277c6: 00db lsls r3, r3, #3 80277c8: 4413 add r3, r2 80277ca: 685b ldr r3, [r3, #4] 80277cc: 2b00 cmp r3, #0 80277ce: d012 beq.n 80277f6 { MessageData md; NewMessageData(&md, topicName, message); 80277d0: f107 0318 add.w r3, r7, #24 80277d4: 687a ldr r2, [r7, #4] 80277d6: 68b9 ldr r1, [r7, #8] 80277d8: 4618 mov r0, r3 80277da: f7ff fdcf bl 802737c c->messageHandlers[i].fp(&md); 80277de: 68fa ldr r2, [r7, #12] 80277e0: 6a7b ldr r3, [r7, #36] @ 0x24 80277e2: 3305 adds r3, #5 80277e4: 00db lsls r3, r3, #3 80277e6: 4413 add r3, r2 80277e8: 685b ldr r3, [r3, #4] 80277ea: f107 0218 add.w r2, r7, #24 80277ee: 4610 mov r0, r2 80277f0: 4798 blx r3 rc = MQTT_SUCCESS; 80277f2: 2300 movs r3, #0 80277f4: 623b str r3, [r7, #32] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80277f6: 6a7b ldr r3, [r7, #36] @ 0x24 80277f8: 3301 adds r3, #1 80277fa: 627b str r3, [r7, #36] @ 0x24 80277fc: 6a7b ldr r3, [r7, #36] @ 0x24 80277fe: 2b04 cmp r3, #4 8027800: ddbf ble.n 8027782 } } } if (rc == FAILURE && c->defaultMessageHandler != NULL) 8027802: 6a3b ldr r3, [r7, #32] 8027804: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027808: d112 bne.n 8027830 802780a: 68fb ldr r3, [r7, #12] 802780c: 6d1b ldr r3, [r3, #80] @ 0x50 802780e: 2b00 cmp r3, #0 8027810: d00e beq.n 8027830 { MessageData md; NewMessageData(&md, topicName, message); 8027812: f107 0310 add.w r3, r7, #16 8027816: 687a ldr r2, [r7, #4] 8027818: 68b9 ldr r1, [r7, #8] 802781a: 4618 mov r0, r3 802781c: f7ff fdae bl 802737c c->defaultMessageHandler(&md); 8027820: 68fb ldr r3, [r7, #12] 8027822: 6d1b ldr r3, [r3, #80] @ 0x50 8027824: f107 0210 add.w r2, r7, #16 8027828: 4610 mov r0, r2 802782a: 4798 blx r3 rc = MQTT_SUCCESS; 802782c: 2300 movs r3, #0 802782e: 623b str r3, [r7, #32] } return rc; 8027830: 6a3b ldr r3, [r7, #32] } 8027832: 4618 mov r0, r3 8027834: 3728 adds r7, #40 @ 0x28 8027836: 46bd mov sp, r7 8027838: bd80 pop {r7, pc} 0802783a : int keepalive(MQTTClient* c) { 802783a: b580 push {r7, lr} 802783c: b086 sub sp, #24 802783e: af00 add r7, sp, #0 8027840: 6078 str r0, [r7, #4] int rc = MQTT_SUCCESS; 8027842: 2300 movs r3, #0 8027844: 617b str r3, [r7, #20] if (c->keepAliveInterval == 0) 8027846: 687b ldr r3, [r7, #4] 8027848: 699b ldr r3, [r3, #24] 802784a: 2b00 cmp r3, #0 802784c: d03e beq.n 80278cc goto exit; if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received)) 802784e: 687b ldr r3, [r7, #4] 8027850: 3358 adds r3, #88 @ 0x58 8027852: 4618 mov r0, r3 8027854: f000 fc66 bl 8028124 8027858: 4603 mov r3, r0 802785a: 2b00 cmp r3, #0 802785c: d107 bne.n 802786e 802785e: 687b ldr r3, [r7, #4] 8027860: 3360 adds r3, #96 @ 0x60 8027862: 4618 mov r0, r3 8027864: f000 fc5e bl 8028124 8027868: 4603 mov r3, r0 802786a: 2b00 cmp r3, #0 802786c: d030 beq.n 80278d0 { if (c->ping_outstanding) 802786e: 687b ldr r3, [r7, #4] 8027870: 7f1b ldrb r3, [r3, #28] 8027872: 2b00 cmp r3, #0 8027874: d003 beq.n 802787e rc = FAILURE; /* PINGRESP not received in keepalive interval */ 8027876: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802787a: 617b str r3, [r7, #20] 802787c: e029 b.n 80278d2 else { Timer timer; TimerInit(&timer); 802787e: f107 0308 add.w r3, r7, #8 8027882: 4618 mov r0, r3 8027884: f000 fca6 bl 80281d4 TimerCountdownMS(&timer, 1000); 8027888: f107 0308 add.w r3, r7, #8 802788c: f44f 717a mov.w r1, #1000 @ 0x3e8 8027890: 4618 mov r0, r3 8027892: f000 fc5d bl 8028150 int len = MQTTSerialize_pingreq(c->buf, c->buf_size); 8027896: 687b ldr r3, [r7, #4] 8027898: 691a ldr r2, [r3, #16] 802789a: 687b ldr r3, [r7, #4] 802789c: 689b ldr r3, [r3, #8] 802789e: 4619 mov r1, r3 80278a0: 4610 mov r0, r2 80278a2: f000 ff34 bl 802870e 80278a6: 6138 str r0, [r7, #16] if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet 80278a8: 693b ldr r3, [r7, #16] 80278aa: 2b00 cmp r3, #0 80278ac: dd11 ble.n 80278d2 80278ae: f107 0308 add.w r3, r7, #8 80278b2: 461a mov r2, r3 80278b4: 6939 ldr r1, [r7, #16] 80278b6: 6878 ldr r0, [r7, #4] 80278b8: f7ff fd8b bl 80273d2 80278bc: 6178 str r0, [r7, #20] 80278be: 697b ldr r3, [r7, #20] 80278c0: 2b00 cmp r3, #0 80278c2: d106 bne.n 80278d2 c->ping_outstanding = 1; 80278c4: 687b ldr r3, [r7, #4] 80278c6: 2201 movs r2, #1 80278c8: 771a strb r2, [r3, #28] 80278ca: e002 b.n 80278d2 goto exit; 80278cc: bf00 nop 80278ce: e000 b.n 80278d2 } } exit: 80278d0: bf00 nop return rc; 80278d2: 697b ldr r3, [r7, #20] } 80278d4: 4618 mov r0, r3 80278d6: 3718 adds r7, #24 80278d8: 46bd mov sp, r7 80278da: bd80 pop {r7, pc} 080278dc : void MQTTCleanSession(MQTTClient* c) { 80278dc: b480 push {r7} 80278de: b085 sub sp, #20 80278e0: af00 add r7, sp, #0 80278e2: 6078 str r0, [r7, #4] int i = 0; 80278e4: 2300 movs r3, #0 80278e6: 60fb str r3, [r7, #12] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80278e8: 2300 movs r3, #0 80278ea: 60fb str r3, [r7, #12] 80278ec: e008 b.n 8027900 c->messageHandlers[i].topicFilter = NULL; 80278ee: 687b ldr r3, [r7, #4] 80278f0: 68fa ldr r2, [r7, #12] 80278f2: 3205 adds r2, #5 80278f4: 2100 movs r1, #0 80278f6: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80278fa: 68fb ldr r3, [r7, #12] 80278fc: 3301 adds r3, #1 80278fe: 60fb str r3, [r7, #12] 8027900: 68fb ldr r3, [r7, #12] 8027902: 2b04 cmp r3, #4 8027904: ddf3 ble.n 80278ee } 8027906: bf00 nop 8027908: bf00 nop 802790a: 3714 adds r7, #20 802790c: 46bd mov sp, r7 802790e: f85d 7b04 ldr.w r7, [sp], #4 8027912: 4770 bx lr 08027914 : void MQTTCloseSession(MQTTClient* c) { 8027914: b580 push {r7, lr} 8027916: b082 sub sp, #8 8027918: af00 add r7, sp, #0 802791a: 6078 str r0, [r7, #4] c->ping_outstanding = 0; 802791c: 687b ldr r3, [r7, #4] 802791e: 2200 movs r2, #0 8027920: 771a strb r2, [r3, #28] c->isconnected = 0; 8027922: 687b ldr r3, [r7, #4] 8027924: 2200 movs r2, #0 8027926: 621a str r2, [r3, #32] if (c->cleansession) 8027928: 687b ldr r3, [r7, #4] 802792a: 6a5b ldr r3, [r3, #36] @ 0x24 802792c: 2b00 cmp r3, #0 802792e: d002 beq.n 8027936 MQTTCleanSession(c); 8027930: 6878 ldr r0, [r7, #4] 8027932: f7ff ffd3 bl 80278dc } 8027936: bf00 nop 8027938: 3708 adds r7, #8 802793a: 46bd mov sp, r7 802793c: bd80 pop {r7, pc} ... 08027940 : int cycle(MQTTClient* c, Timer* timer) { 8027940: b5f0 push {r4, r5, r6, r7, lr} 8027942: b095 sub sp, #84 @ 0x54 8027944: af06 add r7, sp, #24 8027946: 6078 str r0, [r7, #4] 8027948: 6039 str r1, [r7, #0] int len = 0, 802794a: 2300 movs r3, #0 802794c: 637b str r3, [r7, #52] @ 0x34 rc = MQTT_SUCCESS; 802794e: 2300 movs r3, #0 8027950: 633b str r3, [r7, #48] @ 0x30 int packet_type = readPacket(c, timer); /* read the socket, see what work is due */ 8027952: 6839 ldr r1, [r7, #0] 8027954: 6878 ldr r0, [r7, #4] 8027956: f7ff fe1b bl 8027590 802795a: 62f8 str r0, [r7, #44] @ 0x2c switch (packet_type) 802795c: 6afb ldr r3, [r7, #44] @ 0x2c 802795e: 2b0d cmp r3, #13 8027960: d81e bhi.n 80279a0 8027962: a201 add r2, pc, #4 @ (adr r2, 8027968 ) 8027964: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8027968: 08027af7 .word 0x08027af7 802796c: 080279a1 .word 0x080279a1 8027970: 08027af7 .word 0x08027af7 8027974: 080279a7 .word 0x080279a7 8027978: 08027af7 .word 0x08027af7 802797c: 08027a73 .word 0x08027a73 8027980: 08027a73 .word 0x08027a73 8027984: 08027af7 .word 0x08027af7 8027988: 080279a1 .word 0x080279a1 802798c: 08027af7 .word 0x08027af7 8027990: 080279a1 .word 0x080279a1 8027994: 08027af7 .word 0x08027af7 8027998: 080279a1 .word 0x080279a1 802799c: 08027aef .word 0x08027aef { default: /* no more data to read, unrecoverable. Or read packet fails due to unexpected network error */ rc = packet_type; 80279a0: 6afb ldr r3, [r7, #44] @ 0x2c 80279a2: 633b str r3, [r7, #48] @ 0x30 goto exit; 80279a4: e0b9 b.n 8027b1a case PUBLISH: { MQTTString topicName; MQTTMessage msg; int intQoS; msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */ 80279a6: 2300 movs r3, #0 80279a8: 61fb str r3, [r7, #28] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 80279aa: 687b ldr r3, [r7, #4] 80279ac: 695b ldr r3, [r3, #20] (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1) 80279ae: 687a ldr r2, [r7, #4] 80279b0: 68d2 ldr r2, [r2, #12] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 80279b2: 4616 mov r6, r2 80279b4: f107 0210 add.w r2, r7, #16 80279b8: 1d15 adds r5, r2, #4 80279ba: f107 0210 add.w r2, r7, #16 80279be: 1c54 adds r4, r2, #1 80279c0: f107 010c add.w r1, r7, #12 80279c4: f107 0210 add.w r2, r7, #16 80279c8: 1c90 adds r0, r2, #2 80279ca: 9604 str r6, [sp, #16] 80279cc: 9303 str r3, [sp, #12] 80279ce: f107 0310 add.w r3, r7, #16 80279d2: 330c adds r3, #12 80279d4: 9302 str r3, [sp, #8] 80279d6: f107 0310 add.w r3, r7, #16 80279da: 3308 adds r3, #8 80279dc: 9301 str r3, [sp, #4] 80279de: f107 0320 add.w r3, r7, #32 80279e2: 9300 str r3, [sp, #0] 80279e4: 462b mov r3, r5 80279e6: 4622 mov r2, r4 80279e8: f000 fea0 bl 802872c 80279ec: 4603 mov r3, r0 80279ee: 2b01 cmp r3, #1 80279f0: f040 8090 bne.w 8027b14 goto exit; msg.qos = (enum QoS)intQoS; 80279f4: 68fb ldr r3, [r7, #12] 80279f6: b2db uxtb r3, r3 80279f8: 743b strb r3, [r7, #16] deliverMessage(c, &topicName, &msg); 80279fa: f107 0210 add.w r2, r7, #16 80279fe: f107 0320 add.w r3, r7, #32 8027a02: 4619 mov r1, r3 8027a04: 6878 ldr r0, [r7, #4] 8027a06: f7ff feb0 bl 802776a if (msg.qos != QOS0) 8027a0a: 7c3b ldrb r3, [r7, #16] 8027a0c: 2b00 cmp r3, #0 8027a0e: d074 beq.n 8027afa { if (msg.qos == QOS1) 8027a10: 7c3b ldrb r3, [r7, #16] 8027a12: 2b01 cmp r3, #1 8027a14: d10c bne.n 8027a30 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id); 8027a16: 687b ldr r3, [r7, #4] 8027a18: 6918 ldr r0, [r3, #16] 8027a1a: 687b ldr r3, [r7, #4] 8027a1c: 689b ldr r3, [r3, #8] 8027a1e: 4619 mov r1, r3 8027a20: 8abb ldrh r3, [r7, #20] 8027a22: 9300 str r3, [sp, #0] 8027a24: 2300 movs r3, #0 8027a26: 2204 movs r2, #4 8027a28: f001 f9d9 bl 8028dde 8027a2c: 6378 str r0, [r7, #52] @ 0x34 8027a2e: e00e b.n 8027a4e else if (msg.qos == QOS2) 8027a30: 7c3b ldrb r3, [r7, #16] 8027a32: 2b02 cmp r3, #2 8027a34: d10b bne.n 8027a4e len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id); 8027a36: 687b ldr r3, [r7, #4] 8027a38: 6918 ldr r0, [r3, #16] 8027a3a: 687b ldr r3, [r7, #4] 8027a3c: 689b ldr r3, [r3, #8] 8027a3e: 4619 mov r1, r3 8027a40: 8abb ldrh r3, [r7, #20] 8027a42: 9300 str r3, [sp, #0] 8027a44: 2300 movs r3, #0 8027a46: 2205 movs r2, #5 8027a48: f001 f9c9 bl 8028dde 8027a4c: 6378 str r0, [r7, #52] @ 0x34 if (len <= 0) 8027a4e: 6b7b ldr r3, [r7, #52] @ 0x34 8027a50: 2b00 cmp r3, #0 8027a52: dc03 bgt.n 8027a5c rc = FAILURE; 8027a54: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027a58: 633b str r3, [r7, #48] @ 0x30 8027a5a: e005 b.n 8027a68 else rc = sendPacket(c, len, timer); 8027a5c: 683a ldr r2, [r7, #0] 8027a5e: 6b79 ldr r1, [r7, #52] @ 0x34 8027a60: 6878 ldr r0, [r7, #4] 8027a62: f7ff fcb6 bl 80273d2 8027a66: 6338 str r0, [r7, #48] @ 0x30 if (rc == FAILURE) 8027a68: 6b3b ldr r3, [r7, #48] @ 0x30 8027a6a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027a6e: d144 bne.n 8027afa goto exit; // there was a problem 8027a70: e053 b.n 8027b1a case PUBREC: case PUBREL: { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8027a72: 687b ldr r3, [r7, #4] 8027a74: 695c ldr r4, [r3, #20] 8027a76: 687b ldr r3, [r7, #4] 8027a78: 68db ldr r3, [r3, #12] 8027a7a: f107 020a add.w r2, r7, #10 8027a7e: f107 0109 add.w r1, r7, #9 8027a82: f107 0008 add.w r0, r7, #8 8027a86: 9300 str r3, [sp, #0] 8027a88: 4623 mov r3, r4 8027a8a: f000 fec1 bl 8028810 8027a8e: 4603 mov r3, r0 8027a90: 2b01 cmp r3, #1 8027a92: d003 beq.n 8027a9c rc = FAILURE; 8027a94: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027a98: 633b str r3, [r7, #48] @ 0x30 8027a9a: e023 b.n 8027ae4 else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, 8027a9c: 687b ldr r3, [r7, #4] 8027a9e: 6918 ldr r0, [r3, #16] 8027aa0: 687b ldr r3, [r7, #4] 8027aa2: 689b ldr r3, [r3, #8] 8027aa4: 4619 mov r1, r3 8027aa6: 6afb ldr r3, [r7, #44] @ 0x2c 8027aa8: 2b05 cmp r3, #5 8027aaa: d101 bne.n 8027ab0 8027aac: 2206 movs r2, #6 8027aae: e000 b.n 8027ab2 8027ab0: 2207 movs r2, #7 8027ab2: 897b ldrh r3, [r7, #10] 8027ab4: 9300 str r3, [sp, #0] 8027ab6: 2300 movs r3, #0 8027ab8: f001 f991 bl 8028dde 8027abc: 6378 str r0, [r7, #52] @ 0x34 8027abe: 6b7b ldr r3, [r7, #52] @ 0x34 8027ac0: 2b00 cmp r3, #0 8027ac2: dc03 bgt.n 8027acc (packet_type == PUBREC) ? PUBREL : PUBCOMP, 0, mypacketid)) <= 0) rc = FAILURE; 8027ac4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027ac8: 633b str r3, [r7, #48] @ 0x30 8027aca: e00b b.n 8027ae4 else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet 8027acc: 683a ldr r2, [r7, #0] 8027ace: 6b79 ldr r1, [r7, #52] @ 0x34 8027ad0: 6878 ldr r0, [r7, #4] 8027ad2: f7ff fc7e bl 80273d2 8027ad6: 6338 str r0, [r7, #48] @ 0x30 8027ad8: 6b3b ldr r3, [r7, #48] @ 0x30 8027ada: 2b00 cmp r3, #0 8027adc: d002 beq.n 8027ae4 rc = FAILURE; // there was a problem 8027ade: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027ae2: 633b str r3, [r7, #48] @ 0x30 if (rc == FAILURE) 8027ae4: 6b3b ldr r3, [r7, #48] @ 0x30 8027ae6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027aea: d108 bne.n 8027afe goto exit; // there was a problem 8027aec: e015 b.n 8027b1a } case PUBCOMP: break; case PINGRESP: c->ping_outstanding = 0; 8027aee: 687b ldr r3, [r7, #4] 8027af0: 2200 movs r2, #0 8027af2: 771a strb r2, [r3, #28] break; 8027af4: e004 b.n 8027b00 break; 8027af6: bf00 nop 8027af8: e002 b.n 8027b00 break; 8027afa: bf00 nop 8027afc: e000 b.n 8027b00 break; 8027afe: bf00 nop } if (keepalive(c) != MQTT_SUCCESS) { 8027b00: 6878 ldr r0, [r7, #4] 8027b02: f7ff fe9a bl 802783a 8027b06: 4603 mov r3, r0 8027b08: 2b00 cmp r3, #0 8027b0a: d005 beq.n 8027b18 //check only keepalive FAILURE status so that previous FAILURE status can be considered as FAULT rc = FAILURE; 8027b0c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027b10: 633b str r3, [r7, #48] @ 0x30 8027b12: e002 b.n 8027b1a goto exit; 8027b14: bf00 nop 8027b16: e000 b.n 8027b1a } exit: 8027b18: bf00 nop if (rc == MQTT_SUCCESS) 8027b1a: 6b3b ldr r3, [r7, #48] @ 0x30 8027b1c: 2b00 cmp r3, #0 8027b1e: d102 bne.n 8027b26 rc = packet_type; 8027b20: 6afb ldr r3, [r7, #44] @ 0x2c 8027b22: 633b str r3, [r7, #48] @ 0x30 8027b24: e006 b.n 8027b34 else if (c->isconnected) 8027b26: 687b ldr r3, [r7, #4] 8027b28: 6a1b ldr r3, [r3, #32] 8027b2a: 2b00 cmp r3, #0 8027b2c: d002 beq.n 8027b34 MQTTCloseSession(c); 8027b2e: 6878 ldr r0, [r7, #4] 8027b30: f7ff fef0 bl 8027914 return rc; 8027b34: 6b3b ldr r3, [r7, #48] @ 0x30 } 8027b36: 4618 mov r0, r3 8027b38: 373c adds r7, #60 @ 0x3c 8027b3a: 46bd mov sp, r7 8027b3c: bdf0 pop {r4, r5, r6, r7, pc} 8027b3e: bf00 nop 08027b40 : int MQTTYield(MQTTClient* c, int timeout_ms) { 8027b40: b580 push {r7, lr} 8027b42: b086 sub sp, #24 8027b44: af00 add r7, sp, #0 8027b46: 6078 str r0, [r7, #4] 8027b48: 6039 str r1, [r7, #0] int rc = MQTT_SUCCESS; 8027b4a: 2300 movs r3, #0 8027b4c: 617b str r3, [r7, #20] Timer timer; TimerInit(&timer); 8027b4e: f107 030c add.w r3, r7, #12 8027b52: 4618 mov r0, r3 8027b54: f000 fb3e bl 80281d4 TimerCountdownMS(&timer, timeout_ms); 8027b58: 683a ldr r2, [r7, #0] 8027b5a: f107 030c add.w r3, r7, #12 8027b5e: 4611 mov r1, r2 8027b60: 4618 mov r0, r3 8027b62: f000 faf5 bl 8028150 do { if (cycle(c, &timer) < 0) 8027b66: f107 030c add.w r3, r7, #12 8027b6a: 4619 mov r1, r3 8027b6c: 6878 ldr r0, [r7, #4] 8027b6e: f7ff fee7 bl 8027940 8027b72: 4603 mov r3, r0 8027b74: 2b00 cmp r3, #0 8027b76: da03 bge.n 8027b80 { rc = FAILURE; 8027b78: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027b7c: 617b str r3, [r7, #20] break; 8027b7e: e007 b.n 8027b90 } } while (!TimerIsExpired(&timer)); 8027b80: f107 030c add.w r3, r7, #12 8027b84: 4618 mov r0, r3 8027b86: f000 facd bl 8028124 8027b8a: 4603 mov r3, r0 8027b8c: 2b00 cmp r3, #0 8027b8e: d0ea beq.n 8027b66 return rc; 8027b90: 697b ldr r3, [r7, #20] } 8027b92: 4618 mov r0, r3 8027b94: 3718 adds r7, #24 8027b96: 46bd mov sp, r7 8027b98: bd80 pop {r7, pc} 08027b9a : } #endif int waitfor(MQTTClient* c, int packet_type, Timer* timer) { 8027b9a: b580 push {r7, lr} 8027b9c: b086 sub sp, #24 8027b9e: af00 add r7, sp, #0 8027ba0: 60f8 str r0, [r7, #12] 8027ba2: 60b9 str r1, [r7, #8] 8027ba4: 607a str r2, [r7, #4] int rc = FAILURE; 8027ba6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027baa: 617b str r3, [r7, #20] do { if (TimerIsExpired(timer)) 8027bac: 6878 ldr r0, [r7, #4] 8027bae: f000 fab9 bl 8028124 8027bb2: 4603 mov r3, r0 8027bb4: 2b00 cmp r3, #0 8027bb6: d10c bne.n 8027bd2 break; // we timed out rc = cycle(c, timer); 8027bb8: 6879 ldr r1, [r7, #4] 8027bba: 68f8 ldr r0, [r7, #12] 8027bbc: f7ff fec0 bl 8027940 8027bc0: 6178 str r0, [r7, #20] } while (rc != packet_type && rc >= 0); 8027bc2: 697a ldr r2, [r7, #20] 8027bc4: 68bb ldr r3, [r7, #8] 8027bc6: 429a cmp r2, r3 8027bc8: d004 beq.n 8027bd4 8027bca: 697b ldr r3, [r7, #20] 8027bcc: 2b00 cmp r3, #0 8027bce: daed bge.n 8027bac 8027bd0: e000 b.n 8027bd4 break; // we timed out 8027bd2: bf00 nop return rc; 8027bd4: 697b ldr r3, [r7, #20] } 8027bd6: 4618 mov r0, r3 8027bd8: 3718 adds r7, #24 8027bda: 46bd mov sp, r7 8027bdc: bd80 pop {r7, pc} ... 08027be0 : int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data) { 8027be0: b580 push {r7, lr} 8027be2: b09e sub sp, #120 @ 0x78 8027be4: af00 add r7, sp, #0 8027be6: 60f8 str r0, [r7, #12] 8027be8: 60b9 str r1, [r7, #8] 8027bea: 607a str r2, [r7, #4] Timer connect_timer; int rc = FAILURE; 8027bec: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027bf0: 677b str r3, [r7, #116] @ 0x74 MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer; 8027bf2: 4a49 ldr r2, [pc, #292] @ (8027d18 ) 8027bf4: f107 0310 add.w r3, r7, #16 8027bf8: 4611 mov r1, r2 8027bfa: 2258 movs r2, #88 @ 0x58 8027bfc: 4618 mov r0, r3 8027bfe: f003 f8be bl 802ad7e int len = 0; 8027c02: 2300 movs r3, #0 8027c04: 673b str r3, [r7, #112] @ 0x70 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027c06: 68fb ldr r3, [r7, #12] 8027c08: 6e9b ldr r3, [r3, #104] @ 0x68 8027c0a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027c0e: 4618 mov r0, r3 8027c10: f7e9 fdc5 bl 801179e if (c->isconnected) /* don't send connect packet again if we are already connected */ 8027c14: 68fb ldr r3, [r7, #12] 8027c16: 6a1b ldr r3, [r3, #32] 8027c18: 2b00 cmp r3, #0 8027c1a: d164 bne.n 8027ce6 goto exit; TimerInit(&connect_timer); 8027c1c: f107 0368 add.w r3, r7, #104 @ 0x68 8027c20: 4618 mov r0, r3 8027c22: f000 fad7 bl 80281d4 TimerCountdownMS(&connect_timer, c->command_timeout_ms); 8027c26: 68fb ldr r3, [r7, #12] 8027c28: 685a ldr r2, [r3, #4] 8027c2a: f107 0368 add.w r3, r7, #104 @ 0x68 8027c2e: 4611 mov r1, r2 8027c30: 4618 mov r0, r3 8027c32: f000 fa8d bl 8028150 if (options == 0) 8027c36: 68bb ldr r3, [r7, #8] 8027c38: 2b00 cmp r3, #0 8027c3a: d102 bne.n 8027c42 options = &default_options; /* set default options if none were supplied */ 8027c3c: f107 0310 add.w r3, r7, #16 8027c40: 60bb str r3, [r7, #8] c->keepAliveInterval = options->keepAliveInterval; 8027c42: 68bb ldr r3, [r7, #8] 8027c44: 8b1b ldrh r3, [r3, #24] 8027c46: 461a mov r2, r3 8027c48: 68fb ldr r3, [r7, #12] 8027c4a: 619a str r2, [r3, #24] c->cleansession = options->cleansession; 8027c4c: 68bb ldr r3, [r7, #8] 8027c4e: 7e9b ldrb r3, [r3, #26] 8027c50: 461a mov r2, r3 8027c52: 68fb ldr r3, [r7, #12] 8027c54: 625a str r2, [r3, #36] @ 0x24 TimerCountdown(&c->last_received, c->keepAliveInterval); 8027c56: 68fb ldr r3, [r7, #12] 8027c58: f103 0260 add.w r2, r3, #96 @ 0x60 8027c5c: 68fb ldr r3, [r7, #12] 8027c5e: 699b ldr r3, [r3, #24] 8027c60: 4619 mov r1, r3 8027c62: 4610 mov r0, r2 8027c64: f000 fa88 bl 8028178 if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0) 8027c68: 68fb ldr r3, [r7, #12] 8027c6a: 6918 ldr r0, [r3, #16] 8027c6c: 68fb ldr r3, [r7, #12] 8027c6e: 689b ldr r3, [r3, #8] 8027c70: 68ba ldr r2, [r7, #8] 8027c72: 4619 mov r1, r3 8027c74: f000 fbd2 bl 802841c 8027c78: 6738 str r0, [r7, #112] @ 0x70 8027c7a: 6f3b ldr r3, [r7, #112] @ 0x70 8027c7c: 2b00 cmp r3, #0 8027c7e: dd34 ble.n 8027cea goto exit; if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet 8027c80: f107 0368 add.w r3, r7, #104 @ 0x68 8027c84: 461a mov r2, r3 8027c86: 6f39 ldr r1, [r7, #112] @ 0x70 8027c88: 68f8 ldr r0, [r7, #12] 8027c8a: f7ff fba2 bl 80273d2 8027c8e: 6778 str r0, [r7, #116] @ 0x74 8027c90: 6f7b ldr r3, [r7, #116] @ 0x74 8027c92: 2b00 cmp r3, #0 8027c94: d12b bne.n 8027cee goto exit; // there was a problem // this will be a blocking call, wait for the connack if (waitfor(c, CONNACK, &connect_timer) == CONNACK) 8027c96: f107 0368 add.w r3, r7, #104 @ 0x68 8027c9a: 461a mov r2, r3 8027c9c: 2102 movs r1, #2 8027c9e: 68f8 ldr r0, [r7, #12] 8027ca0: f7ff ff7b bl 8027b9a 8027ca4: 4603 mov r3, r0 8027ca6: 2b02 cmp r3, #2 8027ca8: d119 bne.n 8027cde { data->rc = 0; 8027caa: 687b ldr r3, [r7, #4] 8027cac: 2200 movs r2, #0 8027cae: 701a strb r2, [r3, #0] data->sessionPresent = 0; 8027cb0: 687b ldr r3, [r7, #4] 8027cb2: 2200 movs r2, #0 8027cb4: 705a strb r2, [r3, #1] if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1) 8027cb6: 687b ldr r3, [r7, #4] 8027cb8: 1c58 adds r0, r3, #1 8027cba: 6879 ldr r1, [r7, #4] 8027cbc: 68fb ldr r3, [r7, #12] 8027cbe: 695a ldr r2, [r3, #20] 8027cc0: 68fb ldr r3, [r7, #12] 8027cc2: 68db ldr r3, [r3, #12] 8027cc4: f000 fc96 bl 80285f4 8027cc8: 4603 mov r3, r0 8027cca: 2b01 cmp r3, #1 8027ccc: d103 bne.n 8027cd6 rc = data->rc; 8027cce: 687b ldr r3, [r7, #4] 8027cd0: 781b ldrb r3, [r3, #0] 8027cd2: 677b str r3, [r7, #116] @ 0x74 8027cd4: e00c b.n 8027cf0 // rc = MQTT_SUCCESS; else rc = FAILURE; 8027cd6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027cda: 677b str r3, [r7, #116] @ 0x74 8027cdc: e008 b.n 8027cf0 } else rc = FAILURE; 8027cde: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027ce2: 677b str r3, [r7, #116] @ 0x74 8027ce4: e004 b.n 8027cf0 goto exit; 8027ce6: bf00 nop 8027ce8: e002 b.n 8027cf0 goto exit; 8027cea: bf00 nop 8027cec: e000 b.n 8027cf0 goto exit; // there was a problem 8027cee: bf00 nop exit: if (rc == MQTT_SUCCESS) 8027cf0: 6f7b ldr r3, [r7, #116] @ 0x74 8027cf2: 2b00 cmp r3, #0 8027cf4: d105 bne.n 8027d02 { c->isconnected = 1; 8027cf6: 68fb ldr r3, [r7, #12] 8027cf8: 2201 movs r2, #1 8027cfa: 621a str r2, [r3, #32] c->ping_outstanding = 0; 8027cfc: 68fb ldr r3, [r7, #12] 8027cfe: 2200 movs r2, #0 8027d00: 771a strb r2, [r3, #28] #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 8027d02: 68fb ldr r3, [r7, #12] 8027d04: 6e9b ldr r3, [r3, #104] @ 0x68 8027d06: 4618 mov r0, r3 8027d08: f7e9 fd94 bl 8011834 return rc; 8027d0c: 6f7b ldr r3, [r7, #116] @ 0x74 } 8027d0e: 4618 mov r0, r3 8027d10: 3778 adds r7, #120 @ 0x78 8027d12: 46bd mov sp, r7 8027d14: bd80 pop {r7, pc} 8027d16: bf00 nop 8027d18: 08031928 .word 0x08031928 08027d1c : int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options) { 8027d1c: b580 push {r7, lr} 8027d1e: b084 sub sp, #16 8027d20: af00 add r7, sp, #0 8027d22: 6078 str r0, [r7, #4] 8027d24: 6039 str r1, [r7, #0] MQTTConnackData data; return MQTTConnectWithResults(c, options, &data); 8027d26: f107 030c add.w r3, r7, #12 8027d2a: 461a mov r2, r3 8027d2c: 6839 ldr r1, [r7, #0] 8027d2e: 6878 ldr r0, [r7, #4] 8027d30: f7ff ff56 bl 8027be0 8027d34: 4603 mov r3, r0 } 8027d36: 4618 mov r0, r3 8027d38: 3710 adds r7, #16 8027d3a: 46bd mov sp, r7 8027d3c: bd80 pop {r7, pc} 08027d3e : int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler) { 8027d3e: b580 push {r7, lr} 8027d40: b086 sub sp, #24 8027d42: af00 add r7, sp, #0 8027d44: 60f8 str r0, [r7, #12] 8027d46: 60b9 str r1, [r7, #8] 8027d48: 607a str r2, [r7, #4] int rc = FAILURE; 8027d4a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d4e: 617b str r3, [r7, #20] int i = -1; 8027d50: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d54: 613b str r3, [r7, #16] /* first check for an existing matching slot */ for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027d56: 2300 movs r3, #0 8027d58: 613b str r3, [r7, #16] 8027d5a: e028 b.n 8027dae { if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0) 8027d5c: 68fb ldr r3, [r7, #12] 8027d5e: 693a ldr r2, [r7, #16] 8027d60: 3205 adds r2, #5 8027d62: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027d66: 2b00 cmp r3, #0 8027d68: d01e beq.n 8027da8 8027d6a: 68fb ldr r3, [r7, #12] 8027d6c: 693a ldr r2, [r7, #16] 8027d6e: 3205 adds r2, #5 8027d70: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027d74: 68b9 ldr r1, [r7, #8] 8027d76: 4618 mov r0, r3 8027d78: f7d8 fab2 bl 80002e0 8027d7c: 4603 mov r3, r0 8027d7e: 2b00 cmp r3, #0 8027d80: d112 bne.n 8027da8 { if (messageHandler == NULL) /* remove existing */ 8027d82: 687b ldr r3, [r7, #4] 8027d84: 2b00 cmp r3, #0 8027d86: d10c bne.n 8027da2 { c->messageHandlers[i].topicFilter = NULL; 8027d88: 68fb ldr r3, [r7, #12] 8027d8a: 693a ldr r2, [r7, #16] 8027d8c: 3205 adds r2, #5 8027d8e: 2100 movs r1, #0 8027d90: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = NULL; 8027d94: 68fa ldr r2, [r7, #12] 8027d96: 693b ldr r3, [r7, #16] 8027d98: 3305 adds r3, #5 8027d9a: 00db lsls r3, r3, #3 8027d9c: 4413 add r3, r2 8027d9e: 2200 movs r2, #0 8027da0: 605a str r2, [r3, #4] } rc = MQTT_SUCCESS; /* return i when adding new subscription */ 8027da2: 2300 movs r3, #0 8027da4: 617b str r3, [r7, #20] break; 8027da6: e005 b.n 8027db4 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027da8: 693b ldr r3, [r7, #16] 8027daa: 3301 adds r3, #1 8027dac: 613b str r3, [r7, #16] 8027dae: 693b ldr r3, [r7, #16] 8027db0: 2b04 cmp r3, #4 8027db2: ddd3 ble.n 8027d5c } } /* if no existing, look for empty slot (unless we are removing) */ if (messageHandler != NULL) { 8027db4: 687b ldr r3, [r7, #4] 8027db6: 2b00 cmp r3, #0 8027db8: d026 beq.n 8027e08 if (rc == FAILURE) 8027dba: 697b ldr r3, [r7, #20] 8027dbc: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027dc0: d112 bne.n 8027de8 { for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027dc2: 2300 movs r3, #0 8027dc4: 613b str r3, [r7, #16] 8027dc6: e00c b.n 8027de2 { if (c->messageHandlers[i].topicFilter == NULL) 8027dc8: 68fb ldr r3, [r7, #12] 8027dca: 693a ldr r2, [r7, #16] 8027dcc: 3205 adds r2, #5 8027dce: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027dd2: 2b00 cmp r3, #0 8027dd4: d102 bne.n 8027ddc { rc = MQTT_SUCCESS; 8027dd6: 2300 movs r3, #0 8027dd8: 617b str r3, [r7, #20] break; 8027dda: e005 b.n 8027de8 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027ddc: 693b ldr r3, [r7, #16] 8027dde: 3301 adds r3, #1 8027de0: 613b str r3, [r7, #16] 8027de2: 693b ldr r3, [r7, #16] 8027de4: 2b04 cmp r3, #4 8027de6: ddef ble.n 8027dc8 } } } if (i < MAX_MESSAGE_HANDLERS) 8027de8: 693b ldr r3, [r7, #16] 8027dea: 2b04 cmp r3, #4 8027dec: dc0c bgt.n 8027e08 { c->messageHandlers[i].topicFilter = topicFilter; 8027dee: 68fb ldr r3, [r7, #12] 8027df0: 693a ldr r2, [r7, #16] 8027df2: 3205 adds r2, #5 8027df4: 68b9 ldr r1, [r7, #8] 8027df6: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = messageHandler; 8027dfa: 68fa ldr r2, [r7, #12] 8027dfc: 693b ldr r3, [r7, #16] 8027dfe: 3305 adds r3, #5 8027e00: 00db lsls r3, r3, #3 8027e02: 4413 add r3, r2 8027e04: 687a ldr r2, [r7, #4] 8027e06: 605a str r2, [r3, #4] } } return rc; 8027e08: 697b ldr r3, [r7, #20] } 8027e0a: 4618 mov r0, r3 8027e0c: 3718 adds r7, #24 8027e0e: 46bd mov sp, r7 8027e10: bd80 pop {r7, pc} 08027e12 : int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, MQTTSubackData* data) { 8027e12: b5b0 push {r4, r5, r7, lr} 8027e14: b094 sub sp, #80 @ 0x50 8027e16: af04 add r7, sp, #16 8027e18: 60f8 str r0, [r7, #12] 8027e1a: 60b9 str r1, [r7, #8] 8027e1c: 603b str r3, [r7, #0] 8027e1e: 4613 mov r3, r2 8027e20: 71fb strb r3, [r7, #7] int rc = FAILURE; 8027e22: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027e26: 63fb str r3, [r7, #60] @ 0x3c Timer timer; int len = 0; 8027e28: 2300 movs r3, #0 8027e2a: 63bb str r3, [r7, #56] @ 0x38 MQTTString topic = MQTTString_initializer; 8027e2c: 2300 movs r3, #0 8027e2e: 627b str r3, [r7, #36] @ 0x24 8027e30: 2300 movs r3, #0 8027e32: 62bb str r3, [r7, #40] @ 0x28 8027e34: 2300 movs r3, #0 8027e36: 62fb str r3, [r7, #44] @ 0x2c topic.cstring = (char *)topicFilter; 8027e38: 68bb ldr r3, [r7, #8] 8027e3a: 627b str r3, [r7, #36] @ 0x24 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027e3c: 68fb ldr r3, [r7, #12] 8027e3e: 6e9b ldr r3, [r3, #104] @ 0x68 8027e40: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027e44: 4618 mov r0, r3 8027e46: f7e9 fcaa bl 801179e if (!c->isconnected) 8027e4a: 68fb ldr r3, [r7, #12] 8027e4c: 6a1b ldr r3, [r3, #32] 8027e4e: 2b00 cmp r3, #0 8027e50: d069 beq.n 8027f26 goto exit; TimerInit(&timer); 8027e52: f107 0330 add.w r3, r7, #48 @ 0x30 8027e56: 4618 mov r0, r3 8027e58: f000 f9bc bl 80281d4 TimerCountdownMS(&timer, c->command_timeout_ms); 8027e5c: 68fb ldr r3, [r7, #12] 8027e5e: 685a ldr r2, [r3, #4] 8027e60: f107 0330 add.w r3, r7, #48 @ 0x30 8027e64: 4611 mov r1, r2 8027e66: 4618 mov r0, r3 8027e68: f000 f972 bl 8028150 int _qos[1] = {(int)qos}; 8027e6c: 79fb ldrb r3, [r7, #7] 8027e6e: 623b str r3, [r7, #32] len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, _qos); 8027e70: 68fb ldr r3, [r7, #12] 8027e72: 691c ldr r4, [r3, #16] 8027e74: 68fb ldr r3, [r7, #12] 8027e76: 689b ldr r3, [r3, #8] 8027e78: 461d mov r5, r3 8027e7a: 68f8 ldr r0, [r7, #12] 8027e7c: f7ff fa90 bl 80273a0 8027e80: 4603 mov r3, r0 8027e82: b29a uxth r2, r3 8027e84: f107 0320 add.w r3, r7, #32 8027e88: 9302 str r3, [sp, #8] 8027e8a: f107 0324 add.w r3, r7, #36 @ 0x24 8027e8e: 9301 str r3, [sp, #4] 8027e90: 2301 movs r3, #1 8027e92: 9300 str r3, [sp, #0] 8027e94: 4613 mov r3, r2 8027e96: 2200 movs r2, #0 8027e98: 4629 mov r1, r5 8027e9a: 4620 mov r0, r4 8027e9c: f001 f81b bl 8028ed6 8027ea0: 63b8 str r0, [r7, #56] @ 0x38 // len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos); if (len <= 0) 8027ea2: 6bbb ldr r3, [r7, #56] @ 0x38 8027ea4: 2b00 cmp r3, #0 8027ea6: dd40 ble.n 8027f2a goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8027ea8: f107 0330 add.w r3, r7, #48 @ 0x30 8027eac: 461a mov r2, r3 8027eae: 6bb9 ldr r1, [r7, #56] @ 0x38 8027eb0: 68f8 ldr r0, [r7, #12] 8027eb2: f7ff fa8e bl 80273d2 8027eb6: 63f8 str r0, [r7, #60] @ 0x3c 8027eb8: 6bfb ldr r3, [r7, #60] @ 0x3c 8027eba: 2b00 cmp r3, #0 8027ebc: d137 bne.n 8027f2e goto exit; // there was a problem if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback 8027ebe: f107 0330 add.w r3, r7, #48 @ 0x30 8027ec2: 461a mov r2, r3 8027ec4: 2109 movs r1, #9 8027ec6: 68f8 ldr r0, [r7, #12] 8027ec8: f7ff fe67 bl 8027b9a 8027ecc: 4603 mov r3, r0 8027ece: 2b09 cmp r3, #9 8027ed0: d125 bne.n 8027f1e { int count = 0; 8027ed2: 2300 movs r3, #0 8027ed4: 61fb str r3, [r7, #28] unsigned short mypacketid; data->grantedQoS = QOS0; 8027ed6: 6d3b ldr r3, [r7, #80] @ 0x50 8027ed8: 2200 movs r2, #0 8027eda: 701a strb r2, [r3, #0] int _grantedQoS[1] = {(int)&data->grantedQoS}; 8027edc: 6d3b ldr r3, [r7, #80] @ 0x50 8027ede: 617b str r3, [r7, #20] // if (MQTTDeserialize_suback(&mypacketid, 1, &count, (int*)&data->grantedQoS, c->readbuf, c->readbuf_size) == 1) if (MQTTDeserialize_suback(&mypacketid, 1, &count, _grantedQoS, c->readbuf, c->readbuf_size) == 1) 8027ee0: 68fb ldr r3, [r7, #12] 8027ee2: 695b ldr r3, [r3, #20] 8027ee4: 68fa ldr r2, [r7, #12] 8027ee6: 68d2 ldr r2, [r2, #12] 8027ee8: 4614 mov r4, r2 8027eea: f107 0114 add.w r1, r7, #20 8027eee: f107 021c add.w r2, r7, #28 8027ef2: f107 001a add.w r0, r7, #26 8027ef6: 9401 str r4, [sp, #4] 8027ef8: 9300 str r3, [sp, #0] 8027efa: 460b mov r3, r1 8027efc: 2101 movs r1, #1 8027efe: f001 f866 bl 8028fce 8027f02: 4603 mov r3, r0 8027f04: 2b01 cmp r3, #1 8027f06: d113 bne.n 8027f30 { if (data->grantedQoS != 0x80) 8027f08: 6d3b ldr r3, [r7, #80] @ 0x50 8027f0a: 781b ldrb r3, [r3, #0] 8027f0c: 2b80 cmp r3, #128 @ 0x80 8027f0e: d00f beq.n 8027f30 rc = MQTTSetMessageHandler(c, topicFilter, messageHandler); 8027f10: 683a ldr r2, [r7, #0] 8027f12: 68b9 ldr r1, [r7, #8] 8027f14: 68f8 ldr r0, [r7, #12] 8027f16: f7ff ff12 bl 8027d3e 8027f1a: 63f8 str r0, [r7, #60] @ 0x3c 8027f1c: e008 b.n 8027f30 } } else rc = FAILURE; 8027f1e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027f22: 63fb str r3, [r7, #60] @ 0x3c 8027f24: e004 b.n 8027f30 goto exit; 8027f26: bf00 nop 8027f28: e002 b.n 8027f30 goto exit; 8027f2a: bf00 nop 8027f2c: e000 b.n 8027f30 goto exit; // there was a problem 8027f2e: bf00 nop exit: if (rc == FAILURE) 8027f30: 6bfb ldr r3, [r7, #60] @ 0x3c 8027f32: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027f36: d102 bne.n 8027f3e MQTTCloseSession(c); 8027f38: 68f8 ldr r0, [r7, #12] 8027f3a: f7ff fceb bl 8027914 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 8027f3e: 68fb ldr r3, [r7, #12] 8027f40: 6e9b ldr r3, [r3, #104] @ 0x68 8027f42: 4618 mov r0, r3 8027f44: f7e9 fc76 bl 8011834 return rc; 8027f48: 6bfb ldr r3, [r7, #60] @ 0x3c } 8027f4a: 4618 mov r0, r3 8027f4c: 3740 adds r7, #64 @ 0x40 8027f4e: 46bd mov sp, r7 8027f50: bdb0 pop {r4, r5, r7, pc} 08027f52 : int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler) { 8027f52: b580 push {r7, lr} 8027f54: b088 sub sp, #32 8027f56: af02 add r7, sp, #8 8027f58: 60f8 str r0, [r7, #12] 8027f5a: 60b9 str r1, [r7, #8] 8027f5c: 603b str r3, [r7, #0] 8027f5e: 4613 mov r3, r2 8027f60: 71fb strb r3, [r7, #7] MQTTSubackData data; return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data); 8027f62: 79fa ldrb r2, [r7, #7] 8027f64: f107 0314 add.w r3, r7, #20 8027f68: 9300 str r3, [sp, #0] 8027f6a: 683b ldr r3, [r7, #0] 8027f6c: 68b9 ldr r1, [r7, #8] 8027f6e: 68f8 ldr r0, [r7, #12] 8027f70: f7ff ff4f bl 8027e12 8027f74: 4603 mov r3, r0 } 8027f76: 4618 mov r0, r3 8027f78: 3718 adds r7, #24 8027f7a: 46bd mov sp, r7 8027f7c: bd80 pop {r7, pc} 08027f7e : return rc; } int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message) { 8027f7e: b5f0 push {r4, r5, r6, r7, lr} 8027f80: b097 sub sp, #92 @ 0x5c 8027f82: af08 add r7, sp, #32 8027f84: 60f8 str r0, [r7, #12] 8027f86: 60b9 str r1, [r7, #8] 8027f88: 607a str r2, [r7, #4] int rc = FAILURE; 8027f8a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027f8e: 637b str r3, [r7, #52] @ 0x34 Timer timer; MQTTString topic = MQTTString_initializer; 8027f90: 2300 movs r3, #0 8027f92: 61fb str r3, [r7, #28] 8027f94: 2300 movs r3, #0 8027f96: 623b str r3, [r7, #32] 8027f98: 2300 movs r3, #0 8027f9a: 627b str r3, [r7, #36] @ 0x24 topic.cstring = (char *)topicName; 8027f9c: 68bb ldr r3, [r7, #8] 8027f9e: 61fb str r3, [r7, #28] int len = 0; 8027fa0: 2300 movs r3, #0 8027fa2: 633b str r3, [r7, #48] @ 0x30 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027fa4: 68fb ldr r3, [r7, #12] 8027fa6: 6e9b ldr r3, [r3, #104] @ 0x68 8027fa8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027fac: 4618 mov r0, r3 8027fae: f7e9 fbf6 bl 801179e if (!c->isconnected) 8027fb2: 68fb ldr r3, [r7, #12] 8027fb4: 6a1b ldr r3, [r3, #32] 8027fb6: 2b00 cmp r3, #0 8027fb8: f000 809b beq.w 80280f2 goto exit; TimerInit(&timer); 8027fbc: f107 0328 add.w r3, r7, #40 @ 0x28 8027fc0: 4618 mov r0, r3 8027fc2: f000 f907 bl 80281d4 TimerCountdownMS(&timer, c->command_timeout_ms); 8027fc6: 68fb ldr r3, [r7, #12] 8027fc8: 685a ldr r2, [r3, #4] 8027fca: f107 0328 add.w r3, r7, #40 @ 0x28 8027fce: 4611 mov r1, r2 8027fd0: 4618 mov r0, r3 8027fd2: f000 f8bd bl 8028150 if (message->qos == QOS1 || message->qos == QOS2) 8027fd6: 687b ldr r3, [r7, #4] 8027fd8: 781b ldrb r3, [r3, #0] 8027fda: 2b01 cmp r3, #1 8027fdc: d003 beq.n 8027fe6 8027fde: 687b ldr r3, [r7, #4] 8027fe0: 781b ldrb r3, [r3, #0] 8027fe2: 2b02 cmp r3, #2 8027fe4: d106 bne.n 8027ff4 message->id = getNextPacketId(c); 8027fe6: 68f8 ldr r0, [r7, #12] 8027fe8: f7ff f9da bl 80273a0 8027fec: 4603 mov r3, r0 8027fee: b29a uxth r2, r3 8027ff0: 687b ldr r3, [r7, #4] 8027ff2: 809a strh r2, [r3, #4] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8027ff4: 68fb ldr r3, [r7, #12] 8027ff6: 691b ldr r3, [r3, #16] 8027ff8: 603b str r3, [r7, #0] 8027ffa: 68fb ldr r3, [r7, #12] 8027ffc: 689b ldr r3, [r3, #8] 8027ffe: 469c mov ip, r3 8028000: 687b ldr r3, [r7, #4] 8028002: 781b ldrb r3, [r3, #0] 8028004: 469e mov lr, r3 8028006: 687b ldr r3, [r7, #4] 8028008: 785d ldrb r5, [r3, #1] 802800a: 687b ldr r3, [r7, #4] 802800c: 889e ldrh r6, [r3, #4] topic, (unsigned char*)message->payload, message->payloadlen); 802800e: 687b ldr r3, [r7, #4] 8028010: 689b ldr r3, [r3, #8] 8028012: 687a ldr r2, [r7, #4] 8028014: 68d2 ldr r2, [r2, #12] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8028016: 9206 str r2, [sp, #24] 8028018: 9305 str r3, [sp, #20] 802801a: ac02 add r4, sp, #8 802801c: f107 031c add.w r3, r7, #28 8028020: e893 0007 ldmia.w r3, {r0, r1, r2} 8028024: e884 0007 stmia.w r4, {r0, r1, r2} 8028028: 9601 str r6, [sp, #4] 802802a: 9500 str r5, [sp, #0] 802802c: 4673 mov r3, lr 802802e: 2200 movs r2, #0 8028030: 4661 mov r1, ip 8028032: 6838 ldr r0, [r7, #0] 8028034: f000 fe5d bl 8028cf2 8028038: 6338 str r0, [r7, #48] @ 0x30 if (len <= 0) 802803a: 6b3b ldr r3, [r7, #48] @ 0x30 802803c: 2b00 cmp r3, #0 802803e: dd5a ble.n 80280f6 goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8028040: f107 0328 add.w r3, r7, #40 @ 0x28 8028044: 461a mov r2, r3 8028046: 6b39 ldr r1, [r7, #48] @ 0x30 8028048: 68f8 ldr r0, [r7, #12] 802804a: f7ff f9c2 bl 80273d2 802804e: 6378 str r0, [r7, #52] @ 0x34 8028050: 6b7b ldr r3, [r7, #52] @ 0x34 8028052: 2b00 cmp r3, #0 8028054: d151 bne.n 80280fa goto exit; // there was a problem if (message->qos == QOS1) 8028056: 687b ldr r3, [r7, #4] 8028058: 781b ldrb r3, [r3, #0] 802805a: 2b01 cmp r3, #1 802805c: d122 bne.n 80280a4 { if (waitfor(c, PUBACK, &timer) == PUBACK) 802805e: f107 0328 add.w r3, r7, #40 @ 0x28 8028062: 461a mov r2, r3 8028064: 2104 movs r1, #4 8028066: 68f8 ldr r0, [r7, #12] 8028068: f7ff fd97 bl 8027b9a 802806c: 4603 mov r3, r0 802806e: 2b04 cmp r3, #4 8028070: d114 bne.n 802809c { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8028072: 68fb ldr r3, [r7, #12] 8028074: 695c ldr r4, [r3, #20] 8028076: 68fb ldr r3, [r7, #12] 8028078: 68db ldr r3, [r3, #12] 802807a: f107 021a add.w r2, r7, #26 802807e: f107 0119 add.w r1, r7, #25 8028082: f107 0018 add.w r0, r7, #24 8028086: 9300 str r3, [sp, #0] 8028088: 4623 mov r3, r4 802808a: f000 fbc1 bl 8028810 802808e: 4603 mov r3, r0 8028090: 2b01 cmp r3, #1 8028092: d035 beq.n 8028100 rc = FAILURE; 8028094: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028098: 637b str r3, [r7, #52] @ 0x34 802809a: e031 b.n 8028100 } else rc = FAILURE; 802809c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80280a0: 637b str r3, [r7, #52] @ 0x34 80280a2: e02d b.n 8028100 } else if (message->qos == QOS2) 80280a4: 687b ldr r3, [r7, #4] 80280a6: 781b ldrb r3, [r3, #0] 80280a8: 2b02 cmp r3, #2 80280aa: d128 bne.n 80280fe { if (waitfor(c, PUBCOMP, &timer) == PUBCOMP) 80280ac: f107 0328 add.w r3, r7, #40 @ 0x28 80280b0: 461a mov r2, r3 80280b2: 2107 movs r1, #7 80280b4: 68f8 ldr r0, [r7, #12] 80280b6: f7ff fd70 bl 8027b9a 80280ba: 4603 mov r3, r0 80280bc: 2b07 cmp r3, #7 80280be: d114 bne.n 80280ea { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 80280c0: 68fb ldr r3, [r7, #12] 80280c2: 695c ldr r4, [r3, #20] 80280c4: 68fb ldr r3, [r7, #12] 80280c6: 68db ldr r3, [r3, #12] 80280c8: f107 0216 add.w r2, r7, #22 80280cc: f107 0115 add.w r1, r7, #21 80280d0: f107 0014 add.w r0, r7, #20 80280d4: 9300 str r3, [sp, #0] 80280d6: 4623 mov r3, r4 80280d8: f000 fb9a bl 8028810 80280dc: 4603 mov r3, r0 80280de: 2b01 cmp r3, #1 80280e0: d00e beq.n 8028100 rc = FAILURE; 80280e2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80280e6: 637b str r3, [r7, #52] @ 0x34 80280e8: e00a b.n 8028100 } else rc = FAILURE; 80280ea: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80280ee: 637b str r3, [r7, #52] @ 0x34 80280f0: e006 b.n 8028100 goto exit; 80280f2: bf00 nop 80280f4: e004 b.n 8028100 goto exit; 80280f6: bf00 nop 80280f8: e002 b.n 8028100 goto exit; // there was a problem 80280fa: bf00 nop 80280fc: e000 b.n 8028100 } exit: 80280fe: bf00 nop if (rc == FAILURE) 8028100: 6b7b ldr r3, [r7, #52] @ 0x34 8028102: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8028106: d102 bne.n 802810e MQTTCloseSession(c); 8028108: 68f8 ldr r0, [r7, #12] 802810a: f7ff fc03 bl 8027914 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 802810e: 68fb ldr r3, [r7, #12] 8028110: 6e9b ldr r3, [r3, #104] @ 0x68 8028112: 4618 mov r0, r3 8028114: f7e9 fb8e bl 8011834 return rc; 8028118: 6b7b ldr r3, [r7, #52] @ 0x34 } 802811a: 4618 mov r0, r3 802811c: 373c adds r7, #60 @ 0x3c 802811e: 46bd mov sp, r7 8028120: bdf0 pop {r4, r5, r6, r7, pc} ... 08028124 : #define SERVER_IP4 34 uint32_t MilliTimer; //Timer functions char TimerIsExpired(Timer *timer) { 8028124: b480 push {r7} 8028126: b085 sub sp, #20 8028128: af00 add r7, sp, #0 802812a: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 802812c: 687b ldr r3, [r7, #4] 802812e: 685a ldr r2, [r3, #4] 8028130: 4b06 ldr r3, [pc, #24] @ (802814c ) 8028132: 681b ldr r3, [r3, #0] 8028134: 1ad3 subs r3, r2, r3 8028136: 60fb str r3, [r7, #12] return (left < 0); 8028138: 68fb ldr r3, [r7, #12] 802813a: 0fdb lsrs r3, r3, #31 802813c: b2db uxtb r3, r3 } 802813e: 4618 mov r0, r3 8028140: 3714 adds r7, #20 8028142: 46bd mov sp, r7 8028144: f85d 7b04 ldr.w r7, [sp], #4 8028148: 4770 bx lr 802814a: bf00 nop 802814c: 2402b114 .word 0x2402b114 08028150 : void TimerCountdownMS(Timer *timer, unsigned int timeout) { 8028150: b480 push {r7} 8028152: b083 sub sp, #12 8028154: af00 add r7, sp, #0 8028156: 6078 str r0, [r7, #4] 8028158: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + timeout; 802815a: 4b06 ldr r3, [pc, #24] @ (8028174 ) 802815c: 681a ldr r2, [r3, #0] 802815e: 683b ldr r3, [r7, #0] 8028160: 441a add r2, r3 8028162: 687b ldr r3, [r7, #4] 8028164: 605a str r2, [r3, #4] } 8028166: bf00 nop 8028168: 370c adds r7, #12 802816a: 46bd mov sp, r7 802816c: f85d 7b04 ldr.w r7, [sp], #4 8028170: 4770 bx lr 8028172: bf00 nop 8028174: 2402b114 .word 0x2402b114 08028178 : void TimerCountdown(Timer *timer, unsigned int timeout) { 8028178: b480 push {r7} 802817a: b083 sub sp, #12 802817c: af00 add r7, sp, #0 802817e: 6078 str r0, [r7, #4] 8028180: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + (timeout * 1000); 8028182: 683b ldr r3, [r7, #0] 8028184: f44f 727a mov.w r2, #1000 @ 0x3e8 8028188: fb03 f202 mul.w r2, r3, r2 802818c: 4b05 ldr r3, [pc, #20] @ (80281a4 ) 802818e: 681b ldr r3, [r3, #0] 8028190: 441a add r2, r3 8028192: 687b ldr r3, [r7, #4] 8028194: 605a str r2, [r3, #4] } 8028196: bf00 nop 8028198: 370c adds r7, #12 802819a: 46bd mov sp, r7 802819c: f85d 7b04 ldr.w r7, [sp], #4 80281a0: 4770 bx lr 80281a2: bf00 nop 80281a4: 2402b114 .word 0x2402b114 080281a8 : int TimerLeftMS(Timer *timer) { 80281a8: b480 push {r7} 80281aa: b085 sub sp, #20 80281ac: af00 add r7, sp, #0 80281ae: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 80281b0: 687b ldr r3, [r7, #4] 80281b2: 685a ldr r2, [r3, #4] 80281b4: 4b06 ldr r3, [pc, #24] @ (80281d0 ) 80281b6: 681b ldr r3, [r3, #0] 80281b8: 1ad3 subs r3, r2, r3 80281ba: 60fb str r3, [r7, #12] return (left < 0) ? 0 : left; 80281bc: 68fb ldr r3, [r7, #12] 80281be: ea23 73e3 bic.w r3, r3, r3, asr #31 } 80281c2: 4618 mov r0, r3 80281c4: 3714 adds r7, #20 80281c6: 46bd mov sp, r7 80281c8: f85d 7b04 ldr.w r7, [sp], #4 80281cc: 4770 bx lr 80281ce: bf00 nop 80281d0: 2402b114 .word 0x2402b114 080281d4 : void TimerInit(Timer *timer) { 80281d4: b480 push {r7} 80281d6: b083 sub sp, #12 80281d8: af00 add r7, sp, #0 80281da: 6078 str r0, [r7, #4] timer->end_time = 0; 80281dc: 687b ldr r3, [r7, #4] 80281de: 2200 movs r2, #0 80281e0: 605a str r2, [r3, #4] } 80281e2: bf00 nop 80281e4: 370c adds r7, #12 80281e6: 46bd mov sp, r7 80281e8: f85d 7b04 ldr.w r7, [sp], #4 80281ec: 4770 bx lr ... 080281f0 : #ifdef MQTT_LWIP_SOCKET void NewNetwork(Network *n) { 80281f0: b480 push {r7} 80281f2: b083 sub sp, #12 80281f4: af00 add r7, sp, #0 80281f6: 6078 str r0, [r7, #4] n->socket = 0; //clear 80281f8: 687b ldr r3, [r7, #4] 80281fa: 2200 movs r2, #0 80281fc: 601a str r2, [r3, #0] n->mqttread = net_read; //receive function 80281fe: 687b ldr r3, [r7, #4] 8028200: 4a06 ldr r2, [pc, #24] @ (802821c ) 8028202: 605a str r2, [r3, #4] n->mqttwrite = net_write; //send function 8028204: 687b ldr r3, [r7, #4] 8028206: 4a06 ldr r2, [pc, #24] @ (8028220 ) 8028208: 609a str r2, [r3, #8] n->disconnect = net_disconnect; //disconnection function 802820a: 687b ldr r3, [r7, #4] 802820c: 4a05 ldr r2, [pc, #20] @ (8028224 ) 802820e: 60da str r2, [r3, #12] } 8028210: bf00 nop 8028212: 370c adds r7, #12 8028214: 46bd mov sp, r7 8028216: f85d 7b04 ldr.w r7, [sp], #4 802821a: 4770 bx lr 802821c: 080282c5 .word 0x080282c5 8028220: 08028315 .word 0x08028315 8028224: 0802833b .word 0x0802833b 08028228 : int ConnectNetwork(Network *n, char *ip, int port) { 8028228: b580 push {r7, lr} 802822a: b088 sub sp, #32 802822c: af00 add r7, sp, #0 802822e: 60f8 str r0, [r7, #12] 8028230: 60b9 str r1, [r7, #8] 8028232: 607a str r2, [r7, #4] struct sockaddr_in server_addr; if(n->socket) 8028234: 68fb ldr r3, [r7, #12] 8028236: 681b ldr r3, [r3, #0] 8028238: 2b00 cmp r3, #0 802823a: d004 beq.n 8028246 { close(n->socket); 802823c: 68fb ldr r3, [r7, #12] 802823e: 681b ldr r3, [r3, #0] 8028240: 4618 mov r0, r3 8028242: f7f0 fa65 bl 8018710 } n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket 8028246: 2200 movs r2, #0 8028248: 2101 movs r1, #1 802824a: 2002 movs r0, #2 802824c: f7f0 ff72 bl 8019134 8028250: 4602 mov r2, r0 8028252: 68fb ldr r3, [r7, #12] 8028254: 601a str r2, [r3, #0] if(n->socket < 0) 8028256: 68fb ldr r3, [r7, #12] 8028258: 681b ldr r3, [r3, #0] 802825a: 2b00 cmp r3, #0 802825c: da05 bge.n 802826a { n->socket = 0; 802825e: 68fb ldr r3, [r7, #12] 8028260: 2200 movs r2, #0 8028262: 601a str r2, [r3, #0] return -1; 8028264: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028268: e028 b.n 80282bc } memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info 802826a: f107 0310 add.w r3, r7, #16 802826e: 2210 movs r2, #16 8028270: 2100 movs r1, #0 8028272: 4618 mov r0, r3 8028274: f002 fc8c bl 802ab90 server_addr.sin_family = AF_INET; 8028278: 2302 movs r3, #2 802827a: 747b strb r3, [r7, #17] server_addr.sin_addr.s_addr = inet_addr(ip); 802827c: 68b8 ldr r0, [r7, #8] 802827e: f7fd fde0 bl 8025e42 8028282: 4603 mov r3, r0 8028284: 617b str r3, [r7, #20] server_addr.sin_port = htons(port); 8028286: 687b ldr r3, [r7, #4] 8028288: b29b uxth r3, r3 802828a: 4618 mov r0, r3 802828c: f7f1 fb94 bl 80199b8 8028290: 4603 mov r3, r0 8028292: 827b strh r3, [r7, #18] if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker 8028294: 68fb ldr r3, [r7, #12] 8028296: 681b ldr r3, [r3, #0] 8028298: f107 0110 add.w r1, r7, #16 802829c: 2210 movs r2, #16 802829e: 4618 mov r0, r3 80282a0: f7f0 fa8c bl 80187bc 80282a4: 4603 mov r3, r0 80282a6: 2b00 cmp r3, #0 80282a8: da07 bge.n 80282ba { close(n->socket); 80282aa: 68fb ldr r3, [r7, #12] 80282ac: 681b ldr r3, [r3, #0] 80282ae: 4618 mov r0, r3 80282b0: f7f0 fa2e bl 8018710 return -1; 80282b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80282b8: e000 b.n 80282bc } return 0; 80282ba: 2300 movs r3, #0 } 80282bc: 4618 mov r0, r3 80282be: 3720 adds r7, #32 80282c0: 46bd mov sp, r7 80282c2: bd80 pop {r7, pc} 080282c4 : int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) { 80282c4: b580 push {r7, lr} 80282c6: b086 sub sp, #24 80282c8: af00 add r7, sp, #0 80282ca: 60f8 str r0, [r7, #12] 80282cc: 60b9 str r1, [r7, #8] 80282ce: 607a str r2, [r7, #4] 80282d0: 603b str r3, [r7, #0] int available; /* !!! LWIP_SO_RCVBUF must be enabled !!! */ if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer 80282d2: 68fb ldr r3, [r7, #12] 80282d4: 681b ldr r3, [r3, #0] 80282d6: f107 0214 add.w r2, r7, #20 80282da: 490d ldr r1, [pc, #52] @ (8028310 ) 80282dc: 4618 mov r0, r3 80282de: f7f1 f917 bl 8019510 80282e2: 4603 mov r3, r0 80282e4: 2b00 cmp r3, #0 80282e6: da02 bge.n 80282ee 80282e8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80282ec: e00c b.n 8028308 if(available > 0) 80282ee: 697b ldr r3, [r7, #20] 80282f0: 2b00 cmp r3, #0 80282f2: dd08 ble.n 8028306 { return recv(n->socket, buffer, len, 0); 80282f4: 68fb ldr r3, [r7, #12] 80282f6: 6818 ldr r0, [r3, #0] 80282f8: 687a ldr r2, [r7, #4] 80282fa: 2300 movs r3, #0 80282fc: 68b9 ldr r1, [r7, #8] 80282fe: f7f0 fdf3 bl 8018ee8 8028302: 4603 mov r3, r0 8028304: e000 b.n 8028308 } return 0; 8028306: 2300 movs r3, #0 } 8028308: 4618 mov r0, r3 802830a: 3718 adds r7, #24 802830c: 46bd mov sp, r7 802830e: bd80 pop {r7, pc} 8028310: 4004667f .word 0x4004667f 08028314 : int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) { 8028314: b580 push {r7, lr} 8028316: b084 sub sp, #16 8028318: af00 add r7, sp, #0 802831a: 60f8 str r0, [r7, #12] 802831c: 60b9 str r1, [r7, #8] 802831e: 607a str r2, [r7, #4] 8028320: 603b str r3, [r7, #0] return send(n->socket, buffer, len, 0); 8028322: 68fb ldr r3, [r7, #12] 8028324: 6818 ldr r0, [r3, #0] 8028326: 687a ldr r2, [r7, #4] 8028328: 2300 movs r3, #0 802832a: 68b9 ldr r1, [r7, #8] 802832c: f7f0 fdf2 bl 8018f14 8028330: 4603 mov r3, r0 } 8028332: 4618 mov r0, r3 8028334: 3710 adds r7, #16 8028336: 46bd mov sp, r7 8028338: bd80 pop {r7, pc} 0802833a : void net_disconnect(Network *n) { 802833a: b580 push {r7, lr} 802833c: b082 sub sp, #8 802833e: af00 add r7, sp, #0 8028340: 6078 str r0, [r7, #4] close(n->socket); 8028342: 687b ldr r3, [r7, #4] 8028344: 681b ldr r3, [r3, #0] 8028346: 4618 mov r0, r3 8028348: f7f0 f9e2 bl 8018710 n->socket = 0; 802834c: 687b ldr r3, [r7, #4] 802834e: 2200 movs r2, #0 8028350: 601a str r2, [r3, #0] } 8028352: bf00 nop 8028354: 3708 adds r7, #8 8028356: 46bd mov sp, r7 8028358: bd80 pop {r7, pc} 0802835a : * Determines the length of the MQTT connect packet that would be produced using the supplied connect options. * @param options the options to be used to build the connect packet * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_connectLength(MQTTPacket_connectData* options) { 802835a: b590 push {r4, r7, lr} 802835c: b085 sub sp, #20 802835e: af00 add r7, sp, #0 8028360: 6078 str r0, [r7, #4] int len = 0; 8028362: 2300 movs r3, #0 8028364: 60fb str r3, [r7, #12] FUNC_ENTRY; if (options->MQTTVersion == 3) 8028366: 687b ldr r3, [r7, #4] 8028368: 7a1b ldrb r3, [r3, #8] 802836a: 2b03 cmp r3, #3 802836c: d102 bne.n 8028374 len = 12; /* variable depending on MQTT or MQIsdp */ 802836e: 230c movs r3, #12 8028370: 60fb str r3, [r7, #12] 8028372: e005 b.n 8028380 else if (options->MQTTVersion == 4) 8028374: 687b ldr r3, [r7, #4] 8028376: 7a1b ldrb r3, [r3, #8] 8028378: 2b04 cmp r3, #4 802837a: d101 bne.n 8028380 len = 10; 802837c: 230a movs r3, #10 802837e: 60fb str r3, [r7, #12] len += MQTTstrlen(options->clientID)+2; 8028380: 687b ldr r3, [r7, #4] 8028382: 330c adds r3, #12 8028384: e893 0007 ldmia.w r3, {r0, r1, r2} 8028388: f000 fc43 bl 8028c12 802838c: 4603 mov r3, r0 802838e: 3302 adds r3, #2 8028390: 68fa ldr r2, [r7, #12] 8028392: 4413 add r3, r2 8028394: 60fb str r3, [r7, #12] if (options->willFlag) 8028396: 687b ldr r3, [r7, #4] 8028398: 7edb ldrb r3, [r3, #27] 802839a: 2b00 cmp r3, #0 802839c: d013 beq.n 80283c6 len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2; 802839e: 687b ldr r3, [r7, #4] 80283a0: 3324 adds r3, #36 @ 0x24 80283a2: e893 0007 ldmia.w r3, {r0, r1, r2} 80283a6: f000 fc34 bl 8028c12 80283aa: 4603 mov r3, r0 80283ac: 1c9c adds r4, r3, #2 80283ae: 687b ldr r3, [r7, #4] 80283b0: 3330 adds r3, #48 @ 0x30 80283b2: e893 0007 ldmia.w r3, {r0, r1, r2} 80283b6: f000 fc2c bl 8028c12 80283ba: 4603 mov r3, r0 80283bc: 4423 add r3, r4 80283be: 3302 adds r3, #2 80283c0: 68fa ldr r2, [r7, #12] 80283c2: 4413 add r3, r2 80283c4: 60fb str r3, [r7, #12] if (options->username.cstring || options->username.lenstring.data) 80283c6: 687b ldr r3, [r7, #4] 80283c8: 6c1b ldr r3, [r3, #64] @ 0x40 80283ca: 2b00 cmp r3, #0 80283cc: d103 bne.n 80283d6 80283ce: 687b ldr r3, [r7, #4] 80283d0: 6c9b ldr r3, [r3, #72] @ 0x48 80283d2: 2b00 cmp r3, #0 80283d4: d00a beq.n 80283ec len += MQTTstrlen(options->username)+2; 80283d6: 687b ldr r3, [r7, #4] 80283d8: 3340 adds r3, #64 @ 0x40 80283da: e893 0007 ldmia.w r3, {r0, r1, r2} 80283de: f000 fc18 bl 8028c12 80283e2: 4603 mov r3, r0 80283e4: 3302 adds r3, #2 80283e6: 68fa ldr r2, [r7, #12] 80283e8: 4413 add r3, r2 80283ea: 60fb str r3, [r7, #12] if (options->password.cstring || options->password.lenstring.data) 80283ec: 687b ldr r3, [r7, #4] 80283ee: 6cdb ldr r3, [r3, #76] @ 0x4c 80283f0: 2b00 cmp r3, #0 80283f2: d103 bne.n 80283fc 80283f4: 687b ldr r3, [r7, #4] 80283f6: 6d5b ldr r3, [r3, #84] @ 0x54 80283f8: 2b00 cmp r3, #0 80283fa: d00a beq.n 8028412 len += MQTTstrlen(options->password)+2; 80283fc: 687b ldr r3, [r7, #4] 80283fe: 334c adds r3, #76 @ 0x4c 8028400: e893 0007 ldmia.w r3, {r0, r1, r2} 8028404: f000 fc05 bl 8028c12 8028408: 4603 mov r3, r0 802840a: 3302 adds r3, #2 802840c: 68fa ldr r2, [r7, #12] 802840e: 4413 add r3, r2 8028410: 60fb str r3, [r7, #12] FUNC_EXIT_RC(len); return len; 8028412: 68fb ldr r3, [r7, #12] } 8028414: 4618 mov r0, r3 8028416: 3714 adds r7, #20 8028418: 46bd mov sp, r7 802841a: bd90 pop {r4, r7, pc} 0802841c : * @param len the length in bytes of the supplied buffer * @param options the options to be used to build the connect packet * @return serialized length, or error if 0 */ int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options) { 802841c: b580 push {r7, lr} 802841e: b08a sub sp, #40 @ 0x28 8028420: af00 add r7, sp, #0 8028422: 60f8 str r0, [r7, #12] 8028424: 60b9 str r1, [r7, #8] 8028426: 607a str r2, [r7, #4] unsigned char *ptr = buf; 8028428: 68fb ldr r3, [r7, #12] 802842a: 61fb str r3, [r7, #28] MQTTHeader header = {0}; 802842c: 2300 movs r3, #0 802842e: 61bb str r3, [r7, #24] MQTTConnectFlags flags = {0}; 8028430: 2300 movs r3, #0 8028432: 617b str r3, [r7, #20] int len = 0; 8028434: 2300 movs r3, #0 8028436: 623b str r3, [r7, #32] int rc = -1; 8028438: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802843c: 627b str r3, [r7, #36] @ 0x24 FUNC_ENTRY; if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen) 802843e: 6878 ldr r0, [r7, #4] 8028440: f7ff ff8b bl 802835a 8028444: 6238 str r0, [r7, #32] 8028446: 6a38 ldr r0, [r7, #32] 8028448: f000 fa98 bl 802897c 802844c: 4602 mov r2, r0 802844e: 68bb ldr r3, [r7, #8] 8028450: 4293 cmp r3, r2 8028452: da03 bge.n 802845c { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028454: f06f 0301 mvn.w r3, #1 8028458: 627b str r3, [r7, #36] @ 0x24 goto exit; 802845a: e0c2 b.n 80285e2 } header.byte = 0; 802845c: 2300 movs r3, #0 802845e: 763b strb r3, [r7, #24] header.bits.type = CONNECT; 8028460: 7e3b ldrb r3, [r7, #24] 8028462: 2201 movs r2, #1 8028464: f362 1307 bfi r3, r2, #4, #4 8028468: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 802846a: 7e3a ldrb r2, [r7, #24] 802846c: f107 031c add.w r3, r7, #28 8028470: 4611 mov r1, r2 8028472: 4618 mov r0, r3 8028474: f000 fb11 bl 8028a9a ptr += MQTTPacket_encode(ptr, len); /* write remaining length */ 8028478: 69fb ldr r3, [r7, #28] 802847a: 6a39 ldr r1, [r7, #32] 802847c: 4618 mov r0, r3 802847e: f000 fa12 bl 80288a6 8028482: 4602 mov r2, r0 8028484: 69fb ldr r3, [r7, #28] 8028486: 4413 add r3, r2 8028488: 61fb str r3, [r7, #28] if (options->MQTTVersion == 4) 802848a: 687b ldr r3, [r7, #4] 802848c: 7a1b ldrb r3, [r3, #8] 802848e: 2b04 cmp r3, #4 8028490: d10c bne.n 80284ac { writeCString(&ptr, "MQTT"); 8028492: f107 031c add.w r3, r7, #28 8028496: 4955 ldr r1, [pc, #340] @ (80285ec ) 8028498: 4618 mov r0, r3 802849a: f000 fb3c bl 8028b16 writeChar(&ptr, (char) 4); 802849e: f107 031c add.w r3, r7, #28 80284a2: 2104 movs r1, #4 80284a4: 4618 mov r0, r3 80284a6: f000 faf8 bl 8028a9a 80284aa: e00b b.n 80284c4 } else { writeCString(&ptr, "MQIsdp"); 80284ac: f107 031c add.w r3, r7, #28 80284b0: 494f ldr r1, [pc, #316] @ (80285f0 ) 80284b2: 4618 mov r0, r3 80284b4: f000 fb2f bl 8028b16 writeChar(&ptr, (char) 3); 80284b8: f107 031c add.w r3, r7, #28 80284bc: 2103 movs r1, #3 80284be: 4618 mov r0, r3 80284c0: f000 faeb bl 8028a9a } flags.all = 0; 80284c4: 2300 movs r3, #0 80284c6: 753b strb r3, [r7, #20] flags.bits.cleansession = options->cleansession; 80284c8: 687b ldr r3, [r7, #4] 80284ca: 7e9b ldrb r3, [r3, #26] 80284cc: f003 0301 and.w r3, r3, #1 80284d0: b2da uxtb r2, r3 80284d2: 7d3b ldrb r3, [r7, #20] 80284d4: f362 0341 bfi r3, r2, #1, #1 80284d8: 753b strb r3, [r7, #20] flags.bits.will = (options->willFlag) ? 1 : 0; 80284da: 687b ldr r3, [r7, #4] 80284dc: 7edb ldrb r3, [r3, #27] 80284de: 2b00 cmp r3, #0 80284e0: bf14 ite ne 80284e2: 2301 movne r3, #1 80284e4: 2300 moveq r3, #0 80284e6: b2da uxtb r2, r3 80284e8: 7d3b ldrb r3, [r7, #20] 80284ea: f362 0382 bfi r3, r2, #2, #1 80284ee: 753b strb r3, [r7, #20] if (flags.bits.will) 80284f0: 7d3b ldrb r3, [r7, #20] 80284f2: f003 0304 and.w r3, r3, #4 80284f6: b2db uxtb r3, r3 80284f8: 2b00 cmp r3, #0 80284fa: d013 beq.n 8028524 { flags.bits.willQoS = options->will.qos; 80284fc: 687b ldr r3, [r7, #4] 80284fe: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 8028502: f003 0303 and.w r3, r3, #3 8028506: b2da uxtb r2, r3 8028508: 7d3b ldrb r3, [r7, #20] 802850a: f362 03c4 bfi r3, r2, #3, #2 802850e: 753b strb r3, [r7, #20] flags.bits.willRetain = options->will.retained; 8028510: 687b ldr r3, [r7, #4] 8028512: f893 303c ldrb.w r3, [r3, #60] @ 0x3c 8028516: f003 0301 and.w r3, r3, #1 802851a: b2da uxtb r2, r3 802851c: 7d3b ldrb r3, [r7, #20] 802851e: f362 1345 bfi r3, r2, #5, #1 8028522: 753b strb r3, [r7, #20] } if (options->username.cstring || options->username.lenstring.data) 8028524: 687b ldr r3, [r7, #4] 8028526: 6c1b ldr r3, [r3, #64] @ 0x40 8028528: 2b00 cmp r3, #0 802852a: d103 bne.n 8028534 802852c: 687b ldr r3, [r7, #4] 802852e: 6c9b ldr r3, [r3, #72] @ 0x48 8028530: 2b00 cmp r3, #0 8028532: d003 beq.n 802853c flags.bits.username = 1; 8028534: 7d3b ldrb r3, [r7, #20] 8028536: f043 0380 orr.w r3, r3, #128 @ 0x80 802853a: 753b strb r3, [r7, #20] if (options->password.cstring || options->password.lenstring.data) 802853c: 687b ldr r3, [r7, #4] 802853e: 6cdb ldr r3, [r3, #76] @ 0x4c 8028540: 2b00 cmp r3, #0 8028542: d103 bne.n 802854c 8028544: 687b ldr r3, [r7, #4] 8028546: 6d5b ldr r3, [r3, #84] @ 0x54 8028548: 2b00 cmp r3, #0 802854a: d003 beq.n 8028554 flags.bits.password = 1; 802854c: 7d3b ldrb r3, [r7, #20] 802854e: f043 0340 orr.w r3, r3, #64 @ 0x40 8028552: 753b strb r3, [r7, #20] writeChar(&ptr, flags.all); 8028554: 7d3a ldrb r2, [r7, #20] 8028556: f107 031c add.w r3, r7, #28 802855a: 4611 mov r1, r2 802855c: 4618 mov r0, r3 802855e: f000 fa9c bl 8028a9a writeInt(&ptr, options->keepAliveInterval); 8028562: 687b ldr r3, [r7, #4] 8028564: 8b1b ldrh r3, [r3, #24] 8028566: 461a mov r2, r3 8028568: f107 031c add.w r3, r7, #28 802856c: 4611 mov r1, r2 802856e: 4618 mov r0, r3 8028570: f000 faa8 bl 8028ac4 writeMQTTString(&ptr, options->clientID); 8028574: 687b ldr r3, [r7, #4] 8028576: f107 001c add.w r0, r7, #28 802857a: 330c adds r3, #12 802857c: cb0e ldmia r3, {r1, r2, r3} 802857e: f000 fae9 bl 8028b54 if (options->willFlag) 8028582: 687b ldr r3, [r7, #4] 8028584: 7edb ldrb r3, [r3, #27] 8028586: 2b00 cmp r3, #0 8028588: d00d beq.n 80285a6 { writeMQTTString(&ptr, options->will.topicName); 802858a: 687b ldr r3, [r7, #4] 802858c: f107 001c add.w r0, r7, #28 8028590: 3324 adds r3, #36 @ 0x24 8028592: cb0e ldmia r3, {r1, r2, r3} 8028594: f000 fade bl 8028b54 writeMQTTString(&ptr, options->will.message); 8028598: 687b ldr r3, [r7, #4] 802859a: f107 001c add.w r0, r7, #28 802859e: 3330 adds r3, #48 @ 0x30 80285a0: cb0e ldmia r3, {r1, r2, r3} 80285a2: f000 fad7 bl 8028b54 } if (flags.bits.username) 80285a6: 7d3b ldrb r3, [r7, #20] 80285a8: f023 037f bic.w r3, r3, #127 @ 0x7f 80285ac: b2db uxtb r3, r3 80285ae: 2b00 cmp r3, #0 80285b0: d006 beq.n 80285c0 writeMQTTString(&ptr, options->username); 80285b2: 687b ldr r3, [r7, #4] 80285b4: f107 001c add.w r0, r7, #28 80285b8: 3340 adds r3, #64 @ 0x40 80285ba: cb0e ldmia r3, {r1, r2, r3} 80285bc: f000 faca bl 8028b54 if (flags.bits.password) 80285c0: 7d3b ldrb r3, [r7, #20] 80285c2: f003 0340 and.w r3, r3, #64 @ 0x40 80285c6: b2db uxtb r3, r3 80285c8: 2b00 cmp r3, #0 80285ca: d006 beq.n 80285da writeMQTTString(&ptr, options->password); 80285cc: 687b ldr r3, [r7, #4] 80285ce: f107 001c add.w r0, r7, #28 80285d2: 334c adds r3, #76 @ 0x4c 80285d4: cb0e ldmia r3, {r1, r2, r3} 80285d6: f000 fabd bl 8028b54 rc = ptr - buf; 80285da: 69fa ldr r2, [r7, #28] 80285dc: 68fb ldr r3, [r7, #12] 80285de: 1ad3 subs r3, r2, r3 80285e0: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 80285e2: 6a7b ldr r3, [r7, #36] @ 0x24 } 80285e4: 4618 mov r0, r3 80285e6: 3728 adds r7, #40 @ 0x28 80285e8: 46bd mov sp, r7 80285ea: bd80 pop {r7, pc} 80285ec: 08031980 .word 0x08031980 80285f0: 08031988 .word 0x08031988 080285f4 : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param len the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen) { 80285f4: b580 push {r7, lr} 80285f6: b08a sub sp, #40 @ 0x28 80285f8: af00 add r7, sp, #0 80285fa: 60f8 str r0, [r7, #12] 80285fc: 60b9 str r1, [r7, #8] 80285fe: 607a str r2, [r7, #4] 8028600: 603b str r3, [r7, #0] MQTTHeader header = {0}; 8028602: 2300 movs r3, #0 8028604: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028606: 687b ldr r3, [r7, #4] 8028608: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 802860a: 2300 movs r3, #0 802860c: 623b str r3, [r7, #32] int rc = 0; 802860e: 2300 movs r3, #0 8028610: 627b str r3, [r7, #36] @ 0x24 int mylen; MQTTConnackFlags flags = {0}; 8028612: 2300 movs r3, #0 8028614: 613b str r3, [r7, #16] FUNC_ENTRY; header.byte = readChar(&curdata); 8028616: f107 0318 add.w r3, r7, #24 802861a: 4618 mov r0, r3 802861c: f000 fa29 bl 8028a72 8028620: 4603 mov r3, r0 8028622: 773b strb r3, [r7, #28] if (header.bits.type != CONNACK) 8028624: 7f3b ldrb r3, [r7, #28] 8028626: f023 030f bic.w r3, r3, #15 802862a: b2db uxtb r3, r3 802862c: 2b20 cmp r3, #32 802862e: d12e bne.n 802868e goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028630: 69bb ldr r3, [r7, #24] 8028632: f107 0214 add.w r2, r7, #20 8028636: 4611 mov r1, r2 8028638: 4618 mov r0, r3 802863a: f000 f9e9 bl 8028a10 802863e: 6278 str r0, [r7, #36] @ 0x24 8028640: 6a7a ldr r2, [r7, #36] @ 0x24 8028642: 69bb ldr r3, [r7, #24] 8028644: 4413 add r3, r2 8028646: 61bb str r3, [r7, #24] enddata = curdata + mylen; 8028648: 69bb ldr r3, [r7, #24] 802864a: 697a ldr r2, [r7, #20] 802864c: 4413 add r3, r2 802864e: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8028650: 69bb ldr r3, [r7, #24] 8028652: 6a3a ldr r2, [r7, #32] 8028654: 1ad3 subs r3, r2, r3 8028656: 2b01 cmp r3, #1 8028658: dd1b ble.n 8028692 goto exit; flags.all = readChar(&curdata); 802865a: f107 0318 add.w r3, r7, #24 802865e: 4618 mov r0, r3 8028660: f000 fa07 bl 8028a72 8028664: 4603 mov r3, r0 8028666: 743b strb r3, [r7, #16] *sessionPresent = flags.bits.sessionpresent; 8028668: 7c3b ldrb r3, [r7, #16] 802866a: f3c3 0300 ubfx r3, r3, #0, #1 802866e: b2db uxtb r3, r3 8028670: 461a mov r2, r3 8028672: 68fb ldr r3, [r7, #12] 8028674: 701a strb r2, [r3, #0] *connack_rc = readChar(&curdata); 8028676: f107 0318 add.w r3, r7, #24 802867a: 4618 mov r0, r3 802867c: f000 f9f9 bl 8028a72 8028680: 4603 mov r3, r0 8028682: 461a mov r2, r3 8028684: 68bb ldr r3, [r7, #8] 8028686: 701a strb r2, [r3, #0] rc = 1; 8028688: 2301 movs r3, #1 802868a: 627b str r3, [r7, #36] @ 0x24 802868c: e002 b.n 8028694 goto exit; 802868e: bf00 nop 8028690: e000 b.n 8028694 goto exit; 8028692: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 8028694: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028696: 4618 mov r0, r3 8028698: 3728 adds r7, #40 @ 0x28 802869a: 46bd mov sp, r7 802869c: bd80 pop {r7, pc} 0802869e : * @param buflen the length in bytes of the supplied buffer, to avoid overruns * @param packettype the message type * @return serialized length, or error if 0 */ int MQTTSerialize_zero(unsigned char* buf, int buflen, unsigned char packettype) { 802869e: b580 push {r7, lr} 80286a0: b088 sub sp, #32 80286a2: af00 add r7, sp, #0 80286a4: 60f8 str r0, [r7, #12] 80286a6: 60b9 str r1, [r7, #8] 80286a8: 4613 mov r3, r2 80286aa: 71fb strb r3, [r7, #7] MQTTHeader header = {0}; 80286ac: 2300 movs r3, #0 80286ae: 61bb str r3, [r7, #24] int rc = -1; 80286b0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80286b4: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 80286b6: 68fb ldr r3, [r7, #12] 80286b8: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 2) 80286ba: 68bb ldr r3, [r7, #8] 80286bc: 2b01 cmp r3, #1 80286be: dc03 bgt.n 80286c8 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 80286c0: f06f 0301 mvn.w r3, #1 80286c4: 61fb str r3, [r7, #28] goto exit; 80286c6: e01d b.n 8028704 } header.byte = 0; 80286c8: 2300 movs r3, #0 80286ca: 763b strb r3, [r7, #24] header.bits.type = packettype; 80286cc: 79fb ldrb r3, [r7, #7] 80286ce: f003 030f and.w r3, r3, #15 80286d2: b2da uxtb r2, r3 80286d4: 7e3b ldrb r3, [r7, #24] 80286d6: f362 1307 bfi r3, r2, #4, #4 80286da: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 80286dc: 7e3a ldrb r2, [r7, #24] 80286de: f107 0314 add.w r3, r7, #20 80286e2: 4611 mov r1, r2 80286e4: 4618 mov r0, r3 80286e6: f000 f9d8 bl 8028a9a ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */ 80286ea: 697b ldr r3, [r7, #20] 80286ec: 2100 movs r1, #0 80286ee: 4618 mov r0, r3 80286f0: f000 f8d9 bl 80288a6 80286f4: 4602 mov r2, r0 80286f6: 697b ldr r3, [r7, #20] 80286f8: 4413 add r3, r2 80286fa: 617b str r3, [r7, #20] rc = ptr - buf; 80286fc: 697a ldr r2, [r7, #20] 80286fe: 68fb ldr r3, [r7, #12] 8028700: 1ad3 subs r3, r2, r3 8028702: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028704: 69fb ldr r3, [r7, #28] } 8028706: 4618 mov r0, r3 8028708: 3720 adds r7, #32 802870a: 46bd mov sp, r7 802870c: bd80 pop {r7, pc} 0802870e : * @param buf the buffer into which the packet will be serialized * @param buflen the length in bytes of the supplied buffer, to avoid overruns * @return serialized length, or error if 0 */ int MQTTSerialize_pingreq(unsigned char* buf, int buflen) { 802870e: b580 push {r7, lr} 8028710: b082 sub sp, #8 8028712: af00 add r7, sp, #0 8028714: 6078 str r0, [r7, #4] 8028716: 6039 str r1, [r7, #0] return MQTTSerialize_zero(buf, buflen, PINGREQ); 8028718: 220c movs r2, #12 802871a: 6839 ldr r1, [r7, #0] 802871c: 6878 ldr r0, [r7, #4] 802871e: f7ff ffbe bl 802869e 8028722: 4603 mov r3, r0 } 8028724: 4618 mov r0, r3 8028726: 3708 adds r7, #8 8028728: 46bd mov sp, r7 802872a: bd80 pop {r7, pc} 0802872c : * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success */ int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName, unsigned char** payload, int* payloadlen, unsigned char* buf, int buflen) { 802872c: b580 push {r7, lr} 802872e: b08a sub sp, #40 @ 0x28 8028730: af00 add r7, sp, #0 8028732: 60f8 str r0, [r7, #12] 8028734: 60b9 str r1, [r7, #8] 8028736: 607a str r2, [r7, #4] 8028738: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802873a: 2300 movs r3, #0 802873c: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 802873e: 6bfb ldr r3, [r7, #60] @ 0x3c 8028740: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028742: 2300 movs r3, #0 8028744: 623b str r3, [r7, #32] int rc = 0; 8028746: 2300 movs r3, #0 8028748: 627b str r3, [r7, #36] @ 0x24 int mylen = 0; 802874a: 2300 movs r3, #0 802874c: 617b str r3, [r7, #20] FUNC_ENTRY; header.byte = readChar(&curdata); 802874e: f107 0318 add.w r3, r7, #24 8028752: 4618 mov r0, r3 8028754: f000 f98d bl 8028a72 8028758: 4603 mov r3, r0 802875a: 773b strb r3, [r7, #28] if (header.bits.type != PUBLISH) 802875c: 7f3b ldrb r3, [r7, #28] 802875e: f023 030f bic.w r3, r3, #15 8028762: b2db uxtb r3, r3 8028764: 2b30 cmp r3, #48 @ 0x30 8028766: d14b bne.n 8028800 goto exit; *dup = header.bits.dup; 8028768: 7f3b ldrb r3, [r7, #28] 802876a: f3c3 03c0 ubfx r3, r3, #3, #1 802876e: b2db uxtb r3, r3 8028770: 461a mov r2, r3 8028772: 68fb ldr r3, [r7, #12] 8028774: 701a strb r2, [r3, #0] *qos = header.bits.qos; 8028776: 7f3b ldrb r3, [r7, #28] 8028778: f3c3 0341 ubfx r3, r3, #1, #2 802877c: b2db uxtb r3, r3 802877e: 461a mov r2, r3 8028780: 68bb ldr r3, [r7, #8] 8028782: 601a str r2, [r3, #0] *retained = header.bits.retain; 8028784: 7f3b ldrb r3, [r7, #28] 8028786: f3c3 0300 ubfx r3, r3, #0, #1 802878a: b2db uxtb r3, r3 802878c: 461a mov r2, r3 802878e: 687b ldr r3, [r7, #4] 8028790: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028792: 69bb ldr r3, [r7, #24] 8028794: f107 0214 add.w r2, r7, #20 8028798: 4611 mov r1, r2 802879a: 4618 mov r0, r3 802879c: f000 f938 bl 8028a10 80287a0: 6278 str r0, [r7, #36] @ 0x24 80287a2: 6a7a ldr r2, [r7, #36] @ 0x24 80287a4: 69bb ldr r3, [r7, #24] 80287a6: 4413 add r3, r2 80287a8: 61bb str r3, [r7, #24] enddata = curdata + mylen; 80287aa: 69bb ldr r3, [r7, #24] 80287ac: 697a ldr r2, [r7, #20] 80287ae: 4413 add r3, r2 80287b0: 623b str r3, [r7, #32] if (!readMQTTLenString(topicName, &curdata, enddata) || 80287b2: f107 0318 add.w r3, r7, #24 80287b6: 6a3a ldr r2, [r7, #32] 80287b8: 4619 mov r1, r3 80287ba: 6b38 ldr r0, [r7, #48] @ 0x30 80287bc: f000 f9f8 bl 8028bb0 80287c0: 4603 mov r3, r0 80287c2: 2b00 cmp r3, #0 80287c4: d01e beq.n 8028804 enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */ 80287c6: 69bb ldr r3, [r7, #24] 80287c8: 6a3a ldr r2, [r7, #32] 80287ca: 1ad3 subs r3, r2, r3 if (!readMQTTLenString(topicName, &curdata, enddata) || 80287cc: 2b00 cmp r3, #0 80287ce: db19 blt.n 8028804 goto exit; if (*qos > 0) 80287d0: 68bb ldr r3, [r7, #8] 80287d2: 681b ldr r3, [r3, #0] 80287d4: 2b00 cmp r3, #0 80287d6: dd08 ble.n 80287ea *packetid = readInt(&curdata); 80287d8: f107 0318 add.w r3, r7, #24 80287dc: 4618 mov r0, r3 80287de: f000 f92d bl 8028a3c 80287e2: 4603 mov r3, r0 80287e4: b29a uxth r2, r3 80287e6: 683b ldr r3, [r7, #0] 80287e8: 801a strh r2, [r3, #0] *payloadlen = enddata - curdata; 80287ea: 69bb ldr r3, [r7, #24] 80287ec: 6a3a ldr r2, [r7, #32] 80287ee: 1ad2 subs r2, r2, r3 80287f0: 6bbb ldr r3, [r7, #56] @ 0x38 80287f2: 601a str r2, [r3, #0] *payload = curdata; 80287f4: 69ba ldr r2, [r7, #24] 80287f6: 6b7b ldr r3, [r7, #52] @ 0x34 80287f8: 601a str r2, [r3, #0] rc = 1; 80287fa: 2301 movs r3, #1 80287fc: 627b str r3, [r7, #36] @ 0x24 80287fe: e002 b.n 8028806 goto exit; 8028800: bf00 nop 8028802: e000 b.n 8028806 goto exit; 8028804: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 8028806: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028808: 4618 mov r0, r3 802880a: 3728 adds r7, #40 @ 0x28 802880c: 46bd mov sp, r7 802880e: bd80 pop {r7, pc} 08028810 : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen) { 8028810: b580 push {r7, lr} 8028812: b08a sub sp, #40 @ 0x28 8028814: af00 add r7, sp, #0 8028816: 60f8 str r0, [r7, #12] 8028818: 60b9 str r1, [r7, #8] 802881a: 607a str r2, [r7, #4] 802881c: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802881e: 2300 movs r3, #0 8028820: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028822: 683b ldr r3, [r7, #0] 8028824: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028826: 2300 movs r3, #0 8028828: 623b str r3, [r7, #32] int rc = 0; 802882a: 2300 movs r3, #0 802882c: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 802882e: f107 0318 add.w r3, r7, #24 8028832: 4618 mov r0, r3 8028834: f000 f91d bl 8028a72 8028838: 4603 mov r3, r0 802883a: 773b strb r3, [r7, #28] *dup = header.bits.dup; 802883c: 7f3b ldrb r3, [r7, #28] 802883e: f3c3 03c0 ubfx r3, r3, #3, #1 8028842: b2db uxtb r3, r3 8028844: 461a mov r2, r3 8028846: 68bb ldr r3, [r7, #8] 8028848: 701a strb r2, [r3, #0] *packettype = header.bits.type; 802884a: 7f3b ldrb r3, [r7, #28] 802884c: f3c3 1303 ubfx r3, r3, #4, #4 8028850: b2db uxtb r3, r3 8028852: 461a mov r2, r3 8028854: 68fb ldr r3, [r7, #12] 8028856: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028858: 69bb ldr r3, [r7, #24] 802885a: f107 0214 add.w r2, r7, #20 802885e: 4611 mov r1, r2 8028860: 4618 mov r0, r3 8028862: f000 f8d5 bl 8028a10 8028866: 6278 str r0, [r7, #36] @ 0x24 8028868: 6a7a ldr r2, [r7, #36] @ 0x24 802886a: 69bb ldr r3, [r7, #24] 802886c: 4413 add r3, r2 802886e: 61bb str r3, [r7, #24] enddata = curdata + mylen; 8028870: 69bb ldr r3, [r7, #24] 8028872: 697a ldr r2, [r7, #20] 8028874: 4413 add r3, r2 8028876: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8028878: 69bb ldr r3, [r7, #24] 802887a: 6a3a ldr r2, [r7, #32] 802887c: 1ad3 subs r3, r2, r3 802887e: 2b01 cmp r3, #1 8028880: dd0b ble.n 802889a goto exit; *packetid = readInt(&curdata); 8028882: f107 0318 add.w r3, r7, #24 8028886: 4618 mov r0, r3 8028888: f000 f8d8 bl 8028a3c 802888c: 4603 mov r3, r0 802888e: b29a uxth r2, r3 8028890: 687b ldr r3, [r7, #4] 8028892: 801a strh r2, [r3, #0] rc = 1; 8028894: 2301 movs r3, #1 8028896: 627b str r3, [r7, #36] @ 0x24 8028898: e000 b.n 802889c goto exit; 802889a: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 802889c: 6a7b ldr r3, [r7, #36] @ 0x24 } 802889e: 4618 mov r0, r3 80288a0: 3728 adds r7, #40 @ 0x28 80288a2: 46bd mov sp, r7 80288a4: bd80 pop {r7, pc} 080288a6 : * @param buf the buffer into which the encoded data is written * @param length the length to be encoded * @return the number of bytes written to buffer */ int MQTTPacket_encode(unsigned char* buf, int length) { 80288a6: b480 push {r7} 80288a8: b085 sub sp, #20 80288aa: af00 add r7, sp, #0 80288ac: 6078 str r0, [r7, #4] 80288ae: 6039 str r1, [r7, #0] int rc = 0; 80288b0: 2300 movs r3, #0 80288b2: 60fb str r3, [r7, #12] FUNC_ENTRY; do { char d = length % 128; 80288b4: 683b ldr r3, [r7, #0] 80288b6: 425a negs r2, r3 80288b8: f003 037f and.w r3, r3, #127 @ 0x7f 80288bc: f002 027f and.w r2, r2, #127 @ 0x7f 80288c0: bf58 it pl 80288c2: 4253 negpl r3, r2 80288c4: 72fb strb r3, [r7, #11] length /= 128; 80288c6: 683b ldr r3, [r7, #0] 80288c8: 2b00 cmp r3, #0 80288ca: da00 bge.n 80288ce 80288cc: 337f adds r3, #127 @ 0x7f 80288ce: 11db asrs r3, r3, #7 80288d0: 603b str r3, [r7, #0] /* if there are more digits to encode, set the top bit of this digit */ if (length > 0) 80288d2: 683b ldr r3, [r7, #0] 80288d4: 2b00 cmp r3, #0 80288d6: dd03 ble.n 80288e0 d |= 0x80; 80288d8: 7afb ldrb r3, [r7, #11] 80288da: f063 037f orn r3, r3, #127 @ 0x7f 80288de: 72fb strb r3, [r7, #11] buf[rc++] = d; 80288e0: 68fb ldr r3, [r7, #12] 80288e2: 1c5a adds r2, r3, #1 80288e4: 60fa str r2, [r7, #12] 80288e6: 461a mov r2, r3 80288e8: 687b ldr r3, [r7, #4] 80288ea: 4413 add r3, r2 80288ec: 7afa ldrb r2, [r7, #11] 80288ee: 701a strb r2, [r3, #0] } while (length > 0); 80288f0: 683b ldr r3, [r7, #0] 80288f2: 2b00 cmp r3, #0 80288f4: dcde bgt.n 80288b4 FUNC_EXIT_RC(rc); return rc; 80288f6: 68fb ldr r3, [r7, #12] } 80288f8: 4618 mov r0, r3 80288fa: 3714 adds r7, #20 80288fc: 46bd mov sp, r7 80288fe: f85d 7b04 ldr.w r7, [sp], #4 8028902: 4770 bx lr 08028904 : * @param getcharfn pointer to function to read the next character from the data source * @param value the decoded length returned * @return the number of bytes read from the socket */ int MQTTPacket_decode(int (*getcharfn)(unsigned char*, int), int* value) { 8028904: b580 push {r7, lr} 8028906: b086 sub sp, #24 8028908: af00 add r7, sp, #0 802890a: 6078 str r0, [r7, #4] 802890c: 6039 str r1, [r7, #0] unsigned char c; int multiplier = 1; 802890e: 2301 movs r3, #1 8028910: 617b str r3, [r7, #20] int len = 0; 8028912: 2300 movs r3, #0 8028914: 613b str r3, [r7, #16] #define MAX_NO_OF_REMAINING_LENGTH_BYTES 4 FUNC_ENTRY; *value = 0; 8028916: 683b ldr r3, [r7, #0] 8028918: 2200 movs r2, #0 802891a: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 802891c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028920: 60fb str r3, [r7, #12] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 8028922: 693b ldr r3, [r7, #16] 8028924: 3301 adds r3, #1 8028926: 613b str r3, [r7, #16] 8028928: 693b ldr r3, [r7, #16] 802892a: 2b04 cmp r3, #4 802892c: dd03 ble.n 8028936 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 802892e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028932: 60fb str r3, [r7, #12] goto exit; 8028934: e01d b.n 8028972 } rc = (*getcharfn)(&c, 1); 8028936: f107 020b add.w r2, r7, #11 802893a: 687b ldr r3, [r7, #4] 802893c: 2101 movs r1, #1 802893e: 4610 mov r0, r2 8028940: 4798 blx r3 8028942: 60f8 str r0, [r7, #12] if (rc != 1) 8028944: 68fb ldr r3, [r7, #12] 8028946: 2b01 cmp r3, #1 8028948: d112 bne.n 8028970 goto exit; *value += (c & 127) * multiplier; 802894a: 683b ldr r3, [r7, #0] 802894c: 681a ldr r2, [r3, #0] 802894e: 7afb ldrb r3, [r7, #11] 8028950: f003 037f and.w r3, r3, #127 @ 0x7f 8028954: 6979 ldr r1, [r7, #20] 8028956: fb01 f303 mul.w r3, r1, r3 802895a: 441a add r2, r3 802895c: 683b ldr r3, [r7, #0] 802895e: 601a str r2, [r3, #0] multiplier *= 128; 8028960: 697b ldr r3, [r7, #20] 8028962: 01db lsls r3, r3, #7 8028964: 617b str r3, [r7, #20] } while ((c & 128) != 0); 8028966: 7afb ldrb r3, [r7, #11] 8028968: b25b sxtb r3, r3 802896a: 2b00 cmp r3, #0 802896c: dbd6 blt.n 802891c exit: 802896e: e000 b.n 8028972 goto exit; 8028970: bf00 nop FUNC_EXIT_RC(len); return len; 8028972: 693b ldr r3, [r7, #16] } 8028974: 4618 mov r0, r3 8028976: 3718 adds r7, #24 8028978: 46bd mov sp, r7 802897a: bd80 pop {r7, pc} 0802897c : int MQTTPacket_len(int rem_len) { 802897c: b480 push {r7} 802897e: b083 sub sp, #12 8028980: af00 add r7, sp, #0 8028982: 6078 str r0, [r7, #4] rem_len += 1; /* header byte */ 8028984: 687b ldr r3, [r7, #4] 8028986: 3301 adds r3, #1 8028988: 607b str r3, [r7, #4] /* now remaining_length field */ if (rem_len < 128) 802898a: 687b ldr r3, [r7, #4] 802898c: 2b7f cmp r3, #127 @ 0x7f 802898e: dc03 bgt.n 8028998 rem_len += 1; 8028990: 687b ldr r3, [r7, #4] 8028992: 3301 adds r3, #1 8028994: 607b str r3, [r7, #4] 8028996: e012 b.n 80289be else if (rem_len < 16384) 8028998: 687b ldr r3, [r7, #4] 802899a: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 802899e: da03 bge.n 80289a8 rem_len += 2; 80289a0: 687b ldr r3, [r7, #4] 80289a2: 3302 adds r3, #2 80289a4: 607b str r3, [r7, #4] 80289a6: e00a b.n 80289be else if (rem_len < 2097151) 80289a8: 687b ldr r3, [r7, #4] 80289aa: 4a08 ldr r2, [pc, #32] @ (80289cc ) 80289ac: 4293 cmp r3, r2 80289ae: dc03 bgt.n 80289b8 rem_len += 3; 80289b0: 687b ldr r3, [r7, #4] 80289b2: 3303 adds r3, #3 80289b4: 607b str r3, [r7, #4] 80289b6: e002 b.n 80289be else rem_len += 4; 80289b8: 687b ldr r3, [r7, #4] 80289ba: 3304 adds r3, #4 80289bc: 607b str r3, [r7, #4] return rem_len; 80289be: 687b ldr r3, [r7, #4] } 80289c0: 4618 mov r0, r3 80289c2: 370c adds r7, #12 80289c4: 46bd mov sp, r7 80289c6: f85d 7b04 ldr.w r7, [sp], #4 80289ca: 4770 bx lr 80289cc: 001ffffe .word 0x001ffffe 080289d0 : static unsigned char* bufptr; int bufchar(unsigned char* c, int count) { 80289d0: b480 push {r7} 80289d2: b085 sub sp, #20 80289d4: af00 add r7, sp, #0 80289d6: 6078 str r0, [r7, #4] 80289d8: 6039 str r1, [r7, #0] int i; for (i = 0; i < count; ++i) 80289da: 2300 movs r3, #0 80289dc: 60fb str r3, [r7, #12] 80289de: e00a b.n 80289f6 *c = *bufptr++; 80289e0: 4b0a ldr r3, [pc, #40] @ (8028a0c ) 80289e2: 681b ldr r3, [r3, #0] 80289e4: 1c5a adds r2, r3, #1 80289e6: 4909 ldr r1, [pc, #36] @ (8028a0c ) 80289e8: 600a str r2, [r1, #0] 80289ea: 781a ldrb r2, [r3, #0] 80289ec: 687b ldr r3, [r7, #4] 80289ee: 701a strb r2, [r3, #0] for (i = 0; i < count; ++i) 80289f0: 68fb ldr r3, [r7, #12] 80289f2: 3301 adds r3, #1 80289f4: 60fb str r3, [r7, #12] 80289f6: 68fa ldr r2, [r7, #12] 80289f8: 683b ldr r3, [r7, #0] 80289fa: 429a cmp r2, r3 80289fc: dbf0 blt.n 80289e0 return count; 80289fe: 683b ldr r3, [r7, #0] } 8028a00: 4618 mov r0, r3 8028a02: 3714 adds r7, #20 8028a04: 46bd mov sp, r7 8028a06: f85d 7b04 ldr.w r7, [sp], #4 8028a0a: 4770 bx lr 8028a0c: 2402b118 .word 0x2402b118 08028a10 : int MQTTPacket_decodeBuf(unsigned char* buf, int* value) { 8028a10: b580 push {r7, lr} 8028a12: b082 sub sp, #8 8028a14: af00 add r7, sp, #0 8028a16: 6078 str r0, [r7, #4] 8028a18: 6039 str r1, [r7, #0] bufptr = buf; 8028a1a: 4a06 ldr r2, [pc, #24] @ (8028a34 ) 8028a1c: 687b ldr r3, [r7, #4] 8028a1e: 6013 str r3, [r2, #0] return MQTTPacket_decode(bufchar, value); 8028a20: 6839 ldr r1, [r7, #0] 8028a22: 4805 ldr r0, [pc, #20] @ (8028a38 ) 8028a24: f7ff ff6e bl 8028904 8028a28: 4603 mov r3, r0 } 8028a2a: 4618 mov r0, r3 8028a2c: 3708 adds r7, #8 8028a2e: 46bd mov sp, r7 8028a30: bd80 pop {r7, pc} 8028a32: bf00 nop 8028a34: 2402b118 .word 0x2402b118 8028a38: 080289d1 .word 0x080289d1 08028a3c : * Calculates an integer from two bytes read from the input buffer * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned * @return the integer value calculated */ int readInt(unsigned char** pptr) { 8028a3c: b480 push {r7} 8028a3e: b085 sub sp, #20 8028a40: af00 add r7, sp, #0 8028a42: 6078 str r0, [r7, #4] unsigned char* ptr = *pptr; 8028a44: 687b ldr r3, [r7, #4] 8028a46: 681b ldr r3, [r3, #0] 8028a48: 60fb str r3, [r7, #12] int len = 256*(*ptr) + (*(ptr+1)); 8028a4a: 68fb ldr r3, [r7, #12] 8028a4c: 781b ldrb r3, [r3, #0] 8028a4e: 021b lsls r3, r3, #8 8028a50: 68fa ldr r2, [r7, #12] 8028a52: 3201 adds r2, #1 8028a54: 7812 ldrb r2, [r2, #0] 8028a56: 4413 add r3, r2 8028a58: 60bb str r3, [r7, #8] *pptr += 2; 8028a5a: 687b ldr r3, [r7, #4] 8028a5c: 681b ldr r3, [r3, #0] 8028a5e: 1c9a adds r2, r3, #2 8028a60: 687b ldr r3, [r7, #4] 8028a62: 601a str r2, [r3, #0] return len; 8028a64: 68bb ldr r3, [r7, #8] } 8028a66: 4618 mov r0, r3 8028a68: 3714 adds r7, #20 8028a6a: 46bd mov sp, r7 8028a6c: f85d 7b04 ldr.w r7, [sp], #4 8028a70: 4770 bx lr 08028a72 : * Reads one character from the input buffer. * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned * @return the character read */ char readChar(unsigned char** pptr) { 8028a72: b480 push {r7} 8028a74: b085 sub sp, #20 8028a76: af00 add r7, sp, #0 8028a78: 6078 str r0, [r7, #4] char c = **pptr; 8028a7a: 687b ldr r3, [r7, #4] 8028a7c: 681b ldr r3, [r3, #0] 8028a7e: 781b ldrb r3, [r3, #0] 8028a80: 73fb strb r3, [r7, #15] (*pptr)++; 8028a82: 687b ldr r3, [r7, #4] 8028a84: 681b ldr r3, [r3, #0] 8028a86: 1c5a adds r2, r3, #1 8028a88: 687b ldr r3, [r7, #4] 8028a8a: 601a str r2, [r3, #0] return c; 8028a8c: 7bfb ldrb r3, [r7, #15] } 8028a8e: 4618 mov r0, r3 8028a90: 3714 adds r7, #20 8028a92: 46bd mov sp, r7 8028a94: f85d 7b04 ldr.w r7, [sp], #4 8028a98: 4770 bx lr 08028a9a : * Writes one character to an output buffer. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param c the character to write */ void writeChar(unsigned char** pptr, char c) { 8028a9a: b480 push {r7} 8028a9c: b083 sub sp, #12 8028a9e: af00 add r7, sp, #0 8028aa0: 6078 str r0, [r7, #4] 8028aa2: 460b mov r3, r1 8028aa4: 70fb strb r3, [r7, #3] **pptr = c; 8028aa6: 687b ldr r3, [r7, #4] 8028aa8: 681b ldr r3, [r3, #0] 8028aaa: 78fa ldrb r2, [r7, #3] 8028aac: 701a strb r2, [r3, #0] (*pptr)++; 8028aae: 687b ldr r3, [r7, #4] 8028ab0: 681b ldr r3, [r3, #0] 8028ab2: 1c5a adds r2, r3, #1 8028ab4: 687b ldr r3, [r7, #4] 8028ab6: 601a str r2, [r3, #0] } 8028ab8: bf00 nop 8028aba: 370c adds r7, #12 8028abc: 46bd mov sp, r7 8028abe: f85d 7b04 ldr.w r7, [sp], #4 8028ac2: 4770 bx lr 08028ac4 : * Writes an integer as 2 bytes to an output buffer. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param anInt the integer to write */ void writeInt(unsigned char** pptr, int anInt) { 8028ac4: b480 push {r7} 8028ac6: b083 sub sp, #12 8028ac8: af00 add r7, sp, #0 8028aca: 6078 str r0, [r7, #4] 8028acc: 6039 str r1, [r7, #0] **pptr = (unsigned char)(anInt / 256); 8028ace: 683b ldr r3, [r7, #0] 8028ad0: 2b00 cmp r3, #0 8028ad2: da00 bge.n 8028ad6 8028ad4: 33ff adds r3, #255 @ 0xff 8028ad6: 121b asrs r3, r3, #8 8028ad8: 461a mov r2, r3 8028ada: 687b ldr r3, [r7, #4] 8028adc: 681b ldr r3, [r3, #0] 8028ade: b2d2 uxtb r2, r2 8028ae0: 701a strb r2, [r3, #0] (*pptr)++; 8028ae2: 687b ldr r3, [r7, #4] 8028ae4: 681b ldr r3, [r3, #0] 8028ae6: 1c5a adds r2, r3, #1 8028ae8: 687b ldr r3, [r7, #4] 8028aea: 601a str r2, [r3, #0] **pptr = (unsigned char)(anInt % 256); 8028aec: 683b ldr r3, [r7, #0] 8028aee: 425a negs r2, r3 8028af0: b2db uxtb r3, r3 8028af2: b2d2 uxtb r2, r2 8028af4: bf58 it pl 8028af6: 4253 negpl r3, r2 8028af8: 687a ldr r2, [r7, #4] 8028afa: 6812 ldr r2, [r2, #0] 8028afc: b2db uxtb r3, r3 8028afe: 7013 strb r3, [r2, #0] (*pptr)++; 8028b00: 687b ldr r3, [r7, #4] 8028b02: 681b ldr r3, [r3, #0] 8028b04: 1c5a adds r2, r3, #1 8028b06: 687b ldr r3, [r7, #4] 8028b08: 601a str r2, [r3, #0] } 8028b0a: bf00 nop 8028b0c: 370c adds r7, #12 8028b0e: 46bd mov sp, r7 8028b10: f85d 7b04 ldr.w r7, [sp], #4 8028b14: 4770 bx lr 08028b16 : * Writes a "UTF" string to an output buffer. Converts C string to length-delimited. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param string the C string to write */ void writeCString(unsigned char** pptr, const char* string) { 8028b16: b580 push {r7, lr} 8028b18: b084 sub sp, #16 8028b1a: af00 add r7, sp, #0 8028b1c: 6078 str r0, [r7, #4] 8028b1e: 6039 str r1, [r7, #0] int len = strlen(string); 8028b20: 6838 ldr r0, [r7, #0] 8028b22: f7d7 fc3d bl 80003a0 8028b26: 4603 mov r3, r0 8028b28: 60fb str r3, [r7, #12] writeInt(pptr, len); 8028b2a: 68f9 ldr r1, [r7, #12] 8028b2c: 6878 ldr r0, [r7, #4] 8028b2e: f7ff ffc9 bl 8028ac4 memcpy(*pptr, string, len); 8028b32: 687b ldr r3, [r7, #4] 8028b34: 681b ldr r3, [r3, #0] 8028b36: 68fa ldr r2, [r7, #12] 8028b38: 6839 ldr r1, [r7, #0] 8028b3a: 4618 mov r0, r3 8028b3c: f002 f91f bl 802ad7e *pptr += len; 8028b40: 687b ldr r3, [r7, #4] 8028b42: 681a ldr r2, [r3, #0] 8028b44: 68fb ldr r3, [r7, #12] 8028b46: 441a add r2, r3 8028b48: 687b ldr r3, [r7, #4] 8028b4a: 601a str r2, [r3, #0] } 8028b4c: bf00 nop 8028b4e: 3710 adds r7, #16 8028b50: 46bd mov sp, r7 8028b52: bd80 pop {r7, pc} 08028b54 : return len; } void writeMQTTString(unsigned char** pptr, MQTTString mqttstring) { 8028b54: b580 push {r7, lr} 8028b56: b084 sub sp, #16 8028b58: af00 add r7, sp, #0 8028b5a: 60f8 str r0, [r7, #12] 8028b5c: 4638 mov r0, r7 8028b5e: e880 000e stmia.w r0, {r1, r2, r3} if (mqttstring.lenstring.len > 0) 8028b62: 687b ldr r3, [r7, #4] 8028b64: 2b00 cmp r3, #0 8028b66: dd12 ble.n 8028b8e { writeInt(pptr, mqttstring.lenstring.len); 8028b68: 687b ldr r3, [r7, #4] 8028b6a: 4619 mov r1, r3 8028b6c: 68f8 ldr r0, [r7, #12] 8028b6e: f7ff ffa9 bl 8028ac4 memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len); 8028b72: 68fb ldr r3, [r7, #12] 8028b74: 681b ldr r3, [r3, #0] 8028b76: 68b9 ldr r1, [r7, #8] 8028b78: 687a ldr r2, [r7, #4] 8028b7a: 4618 mov r0, r3 8028b7c: f002 f8ff bl 802ad7e *pptr += mqttstring.lenstring.len; 8028b80: 68fb ldr r3, [r7, #12] 8028b82: 681b ldr r3, [r3, #0] 8028b84: 687a ldr r2, [r7, #4] 8028b86: 441a add r2, r3 8028b88: 68fb ldr r3, [r7, #12] 8028b8a: 601a str r2, [r3, #0] } else if (mqttstring.cstring) writeCString(pptr, mqttstring.cstring); else writeInt(pptr, 0); } 8028b8c: e00c b.n 8028ba8 else if (mqttstring.cstring) 8028b8e: 683b ldr r3, [r7, #0] 8028b90: 2b00 cmp r3, #0 8028b92: d005 beq.n 8028ba0 writeCString(pptr, mqttstring.cstring); 8028b94: 683b ldr r3, [r7, #0] 8028b96: 4619 mov r1, r3 8028b98: 68f8 ldr r0, [r7, #12] 8028b9a: f7ff ffbc bl 8028b16 } 8028b9e: e003 b.n 8028ba8 writeInt(pptr, 0); 8028ba0: 2100 movs r1, #0 8028ba2: 68f8 ldr r0, [r7, #12] 8028ba4: f7ff ff8e bl 8028ac4 } 8028ba8: bf00 nop 8028baa: 3710 adds r7, #16 8028bac: 46bd mov sp, r7 8028bae: bd80 pop {r7, pc} 08028bb0 : * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param enddata pointer to the end of the data: do not read beyond * @return 1 if successful, 0 if not */ int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata) { 8028bb0: b580 push {r7, lr} 8028bb2: b086 sub sp, #24 8028bb4: af00 add r7, sp, #0 8028bb6: 60f8 str r0, [r7, #12] 8028bb8: 60b9 str r1, [r7, #8] 8028bba: 607a str r2, [r7, #4] int rc = 0; 8028bbc: 2300 movs r3, #0 8028bbe: 617b str r3, [r7, #20] FUNC_ENTRY; /* the first two bytes are the length of the string */ if (enddata - (*pptr) > 1) /* enough length to read the integer? */ 8028bc0: 68bb ldr r3, [r7, #8] 8028bc2: 681b ldr r3, [r3, #0] 8028bc4: 687a ldr r2, [r7, #4] 8028bc6: 1ad3 subs r3, r2, r3 8028bc8: 2b01 cmp r3, #1 8028bca: dd1a ble.n 8028c02 { mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */ 8028bcc: 68b8 ldr r0, [r7, #8] 8028bce: f7ff ff35 bl 8028a3c 8028bd2: 4602 mov r2, r0 8028bd4: 68fb ldr r3, [r7, #12] 8028bd6: 605a str r2, [r3, #4] if (&(*pptr)[mqttstring->lenstring.len] <= enddata) 8028bd8: 68bb ldr r3, [r7, #8] 8028bda: 681b ldr r3, [r3, #0] 8028bdc: 68fa ldr r2, [r7, #12] 8028bde: 6852 ldr r2, [r2, #4] 8028be0: 4413 add r3, r2 8028be2: 687a ldr r2, [r7, #4] 8028be4: 429a cmp r2, r3 8028be6: d30c bcc.n 8028c02 { mqttstring->lenstring.data = (char*)*pptr; 8028be8: 68bb ldr r3, [r7, #8] 8028bea: 681a ldr r2, [r3, #0] 8028bec: 68fb ldr r3, [r7, #12] 8028bee: 609a str r2, [r3, #8] *pptr += mqttstring->lenstring.len; 8028bf0: 68bb ldr r3, [r7, #8] 8028bf2: 681b ldr r3, [r3, #0] 8028bf4: 68fa ldr r2, [r7, #12] 8028bf6: 6852 ldr r2, [r2, #4] 8028bf8: 441a add r2, r3 8028bfa: 68bb ldr r3, [r7, #8] 8028bfc: 601a str r2, [r3, #0] rc = 1; 8028bfe: 2301 movs r3, #1 8028c00: 617b str r3, [r7, #20] } } mqttstring->cstring = NULL; 8028c02: 68fb ldr r3, [r7, #12] 8028c04: 2200 movs r2, #0 8028c06: 601a str r2, [r3, #0] FUNC_EXIT_RC(rc); return rc; 8028c08: 697b ldr r3, [r7, #20] } 8028c0a: 4618 mov r0, r3 8028c0c: 3718 adds r7, #24 8028c0e: 46bd mov sp, r7 8028c10: bd80 pop {r7, pc} 08028c12 : * Return the length of the MQTTstring - C string if there is one, otherwise the length delimited string * @param mqttstring the string to return the length of * @return the length of the string */ int MQTTstrlen(MQTTString mqttstring) { 8028c12: b580 push {r7, lr} 8028c14: b086 sub sp, #24 8028c16: af00 add r7, sp, #0 8028c18: 1d3b adds r3, r7, #4 8028c1a: e883 0007 stmia.w r3, {r0, r1, r2} int rc = 0; 8028c1e: 2300 movs r3, #0 8028c20: 617b str r3, [r7, #20] if (mqttstring.cstring) 8028c22: 687b ldr r3, [r7, #4] 8028c24: 2b00 cmp r3, #0 8028c26: d006 beq.n 8028c36 rc = strlen(mqttstring.cstring); 8028c28: 687b ldr r3, [r7, #4] 8028c2a: 4618 mov r0, r3 8028c2c: f7d7 fbb8 bl 80003a0 8028c30: 4603 mov r3, r0 8028c32: 617b str r3, [r7, #20] 8028c34: e001 b.n 8028c3a else rc = mqttstring.lenstring.len; 8028c36: 68bb ldr r3, [r7, #8] 8028c38: 617b str r3, [r7, #20] return rc; 8028c3a: 697b ldr r3, [r7, #20] } 8028c3c: 4618 mov r0, r3 8028c3e: 3718 adds r7, #24 8028c40: 46bd mov sp, r7 8028c42: bd80 pop {r7, pc} 08028c44 : * @param a the MQTTString to compare * @param bptr the C string to compare * @return boolean - equal or not */ int MQTTPacket_equals(MQTTString* a, char* bptr) { 8028c44: b580 push {r7, lr} 8028c46: b086 sub sp, #24 8028c48: af00 add r7, sp, #0 8028c4a: 6078 str r0, [r7, #4] 8028c4c: 6039 str r1, [r7, #0] int alen = 0, 8028c4e: 2300 movs r3, #0 8028c50: 617b str r3, [r7, #20] blen = 0; 8028c52: 2300 movs r3, #0 8028c54: 60fb str r3, [r7, #12] char *aptr; if (a->cstring) 8028c56: 687b ldr r3, [r7, #4] 8028c58: 681b ldr r3, [r3, #0] 8028c5a: 2b00 cmp r3, #0 8028c5c: d00a beq.n 8028c74 { aptr = a->cstring; 8028c5e: 687b ldr r3, [r7, #4] 8028c60: 681b ldr r3, [r3, #0] 8028c62: 613b str r3, [r7, #16] alen = strlen(a->cstring); 8028c64: 687b ldr r3, [r7, #4] 8028c66: 681b ldr r3, [r3, #0] 8028c68: 4618 mov r0, r3 8028c6a: f7d7 fb99 bl 80003a0 8028c6e: 4603 mov r3, r0 8028c70: 617b str r3, [r7, #20] 8028c72: e005 b.n 8028c80 } else { aptr = a->lenstring.data; 8028c74: 687b ldr r3, [r7, #4] 8028c76: 689b ldr r3, [r3, #8] 8028c78: 613b str r3, [r7, #16] alen = a->lenstring.len; 8028c7a: 687b ldr r3, [r7, #4] 8028c7c: 685b ldr r3, [r3, #4] 8028c7e: 617b str r3, [r7, #20] } blen = strlen(bptr); 8028c80: 6838 ldr r0, [r7, #0] 8028c82: f7d7 fb8d bl 80003a0 8028c86: 4603 mov r3, r0 8028c88: 60fb str r3, [r7, #12] return (alen == blen) && (strncmp(aptr, bptr, alen) == 0); 8028c8a: 697a ldr r2, [r7, #20] 8028c8c: 68fb ldr r3, [r7, #12] 8028c8e: 429a cmp r2, r3 8028c90: d10a bne.n 8028ca8 8028c92: 697b ldr r3, [r7, #20] 8028c94: 461a mov r2, r3 8028c96: 6839 ldr r1, [r7, #0] 8028c98: 6938 ldr r0, [r7, #16] 8028c9a: f001 ff81 bl 802aba0 8028c9e: 4603 mov r3, r0 8028ca0: 2b00 cmp r3, #0 8028ca2: d101 bne.n 8028ca8 8028ca4: 2301 movs r3, #1 8028ca6: e000 b.n 8028caa 8028ca8: 2300 movs r3, #0 } 8028caa: 4618 mov r0, r3 8028cac: 3718 adds r7, #24 8028cae: 46bd mov sp, r7 8028cb0: bd80 pop {r7, pc} 08028cb2 : * @param topicName the topic name to be used in the publish * @param payloadlen the length of the payload to be sent * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_publishLength(int qos, MQTTString topicName, int payloadlen) { 8028cb2: b580 push {r7, lr} 8028cb4: b086 sub sp, #24 8028cb6: af00 add r7, sp, #0 8028cb8: 60f8 str r0, [r7, #12] 8028cba: 4638 mov r0, r7 8028cbc: e880 000e stmia.w r0, {r1, r2, r3} int len = 0; 8028cc0: 2300 movs r3, #0 8028cc2: 617b str r3, [r7, #20] len += 2 + MQTTstrlen(topicName) + payloadlen; 8028cc4: 463b mov r3, r7 8028cc6: e893 0007 ldmia.w r3, {r0, r1, r2} 8028cca: f7ff ffa2 bl 8028c12 8028cce: 4603 mov r3, r0 8028cd0: 1c9a adds r2, r3, #2 8028cd2: 6a3b ldr r3, [r7, #32] 8028cd4: 4413 add r3, r2 8028cd6: 697a ldr r2, [r7, #20] 8028cd8: 4413 add r3, r2 8028cda: 617b str r3, [r7, #20] if (qos > 0) 8028cdc: 68fb ldr r3, [r7, #12] 8028cde: 2b00 cmp r3, #0 8028ce0: dd02 ble.n 8028ce8 len += 2; /* packetid */ 8028ce2: 697b ldr r3, [r7, #20] 8028ce4: 3302 adds r3, #2 8028ce6: 617b str r3, [r7, #20] return len; 8028ce8: 697b ldr r3, [r7, #20] } 8028cea: 4618 mov r0, r3 8028cec: 3718 adds r7, #24 8028cee: 46bd mov sp, r7 8028cf0: bd80 pop {r7, pc} 08028cf2 : * @param payloadlen integer - the length of the MQTT payload * @return the length of the serialized data. <= 0 indicates error */ int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen) { 8028cf2: b580 push {r7, lr} 8028cf4: b08a sub sp, #40 @ 0x28 8028cf6: af02 add r7, sp, #8 8028cf8: 60f8 str r0, [r7, #12] 8028cfa: 60b9 str r1, [r7, #8] 8028cfc: 603b str r3, [r7, #0] 8028cfe: 4613 mov r3, r2 8028d00: 71fb strb r3, [r7, #7] unsigned char *ptr = buf; 8028d02: 68fb ldr r3, [r7, #12] 8028d04: 617b str r3, [r7, #20] MQTTHeader header = {0}; 8028d06: 2300 movs r3, #0 8028d08: 613b str r3, [r7, #16] int rem_len = 0; 8028d0a: 2300 movs r3, #0 8028d0c: 61bb str r3, [r7, #24] int rc = 0; 8028d0e: 2300 movs r3, #0 8028d10: 61fb str r3, [r7, #28] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen) 8028d12: 6c3b ldr r3, [r7, #64] @ 0x40 8028d14: 9300 str r3, [sp, #0] 8028d16: f107 0330 add.w r3, r7, #48 @ 0x30 8028d1a: cb0e ldmia r3, {r1, r2, r3} 8028d1c: 6838 ldr r0, [r7, #0] 8028d1e: f7ff ffc8 bl 8028cb2 8028d22: 61b8 str r0, [r7, #24] 8028d24: 69b8 ldr r0, [r7, #24] 8028d26: f7ff fe29 bl 802897c 8028d2a: 4602 mov r2, r0 8028d2c: 68bb ldr r3, [r7, #8] 8028d2e: 4293 cmp r3, r2 8028d30: da03 bge.n 8028d3a { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028d32: f06f 0301 mvn.w r3, #1 8028d36: 61fb str r3, [r7, #28] goto exit; 8028d38: e04c b.n 8028dd4 } header.bits.type = PUBLISH; 8028d3a: 7c3b ldrb r3, [r7, #16] 8028d3c: 2203 movs r2, #3 8028d3e: f362 1307 bfi r3, r2, #4, #4 8028d42: 743b strb r3, [r7, #16] header.bits.dup = dup; 8028d44: 79fb ldrb r3, [r7, #7] 8028d46: f003 0301 and.w r3, r3, #1 8028d4a: b2da uxtb r2, r3 8028d4c: 7c3b ldrb r3, [r7, #16] 8028d4e: f362 03c3 bfi r3, r2, #3, #1 8028d52: 743b strb r3, [r7, #16] header.bits.qos = qos; 8028d54: 683b ldr r3, [r7, #0] 8028d56: f003 0303 and.w r3, r3, #3 8028d5a: b2da uxtb r2, r3 8028d5c: 7c3b ldrb r3, [r7, #16] 8028d5e: f362 0342 bfi r3, r2, #1, #2 8028d62: 743b strb r3, [r7, #16] header.bits.retain = retained; 8028d64: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 8028d68: f003 0301 and.w r3, r3, #1 8028d6c: b2da uxtb r2, r3 8028d6e: 7c3b ldrb r3, [r7, #16] 8028d70: f362 0300 bfi r3, r2, #0, #1 8028d74: 743b strb r3, [r7, #16] writeChar(&ptr, header.byte); /* write header */ 8028d76: 7c3a ldrb r2, [r7, #16] 8028d78: f107 0314 add.w r3, r7, #20 8028d7c: 4611 mov r1, r2 8028d7e: 4618 mov r0, r3 8028d80: f7ff fe8b bl 8028a9a ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8028d84: 697b ldr r3, [r7, #20] 8028d86: 69b9 ldr r1, [r7, #24] 8028d88: 4618 mov r0, r3 8028d8a: f7ff fd8c bl 80288a6 8028d8e: 4602 mov r2, r0 8028d90: 697b ldr r3, [r7, #20] 8028d92: 4413 add r3, r2 8028d94: 617b str r3, [r7, #20] writeMQTTString(&ptr, topicName); 8028d96: f107 0014 add.w r0, r7, #20 8028d9a: f107 0330 add.w r3, r7, #48 @ 0x30 8028d9e: cb0e ldmia r3, {r1, r2, r3} 8028da0: f7ff fed8 bl 8028b54 if (qos > 0) 8028da4: 683b ldr r3, [r7, #0] 8028da6: 2b00 cmp r3, #0 8028da8: dd06 ble.n 8028db8 writeInt(&ptr, packetid); 8028daa: 8dba ldrh r2, [r7, #44] @ 0x2c 8028dac: f107 0314 add.w r3, r7, #20 8028db0: 4611 mov r1, r2 8028db2: 4618 mov r0, r3 8028db4: f7ff fe86 bl 8028ac4 memcpy(ptr, payload, payloadlen); 8028db8: 697b ldr r3, [r7, #20] 8028dba: 6c3a ldr r2, [r7, #64] @ 0x40 8028dbc: 6bf9 ldr r1, [r7, #60] @ 0x3c 8028dbe: 4618 mov r0, r3 8028dc0: f001 ffdd bl 802ad7e ptr += payloadlen; 8028dc4: 697a ldr r2, [r7, #20] 8028dc6: 6c3b ldr r3, [r7, #64] @ 0x40 8028dc8: 4413 add r3, r2 8028dca: 617b str r3, [r7, #20] rc = ptr - buf; 8028dcc: 697a ldr r2, [r7, #20] 8028dce: 68fb ldr r3, [r7, #12] 8028dd0: 1ad3 subs r3, r2, r3 8028dd2: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028dd4: 69fb ldr r3, [r7, #28] } 8028dd6: 4618 mov r0, r3 8028dd8: 3720 adds r7, #32 8028dda: 46bd mov sp, r7 8028ddc: bd80 pop {r7, pc} 08028dde : * @param dup the MQTT dup flag * @param packetid the MQTT packet identifier * @return serialized length, or error if 0 */ int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char packettype, unsigned char dup, unsigned short packetid) { 8028dde: b580 push {r7, lr} 8028de0: b088 sub sp, #32 8028de2: af00 add r7, sp, #0 8028de4: 60f8 str r0, [r7, #12] 8028de6: 60b9 str r1, [r7, #8] 8028de8: 4611 mov r1, r2 8028dea: 461a mov r2, r3 8028dec: 460b mov r3, r1 8028dee: 71fb strb r3, [r7, #7] 8028df0: 4613 mov r3, r2 8028df2: 71bb strb r3, [r7, #6] MQTTHeader header = {0}; 8028df4: 2300 movs r3, #0 8028df6: 61bb str r3, [r7, #24] int rc = 0; 8028df8: 2300 movs r3, #0 8028dfa: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 8028dfc: 68fb ldr r3, [r7, #12] 8028dfe: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 4) 8028e00: 68bb ldr r3, [r7, #8] 8028e02: 2b03 cmp r3, #3 8028e04: dc03 bgt.n 8028e0e { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028e06: f06f 0301 mvn.w r3, #1 8028e0a: 61fb str r3, [r7, #28] goto exit; 8028e0c: e037 b.n 8028e7e } header.bits.type = packettype; 8028e0e: 79fb ldrb r3, [r7, #7] 8028e10: f003 030f and.w r3, r3, #15 8028e14: b2da uxtb r2, r3 8028e16: 7e3b ldrb r3, [r7, #24] 8028e18: f362 1307 bfi r3, r2, #4, #4 8028e1c: 763b strb r3, [r7, #24] header.bits.dup = dup; 8028e1e: 79bb ldrb r3, [r7, #6] 8028e20: f003 0301 and.w r3, r3, #1 8028e24: b2da uxtb r2, r3 8028e26: 7e3b ldrb r3, [r7, #24] 8028e28: f362 03c3 bfi r3, r2, #3, #1 8028e2c: 763b strb r3, [r7, #24] header.bits.qos = (packettype == PUBREL) ? 1 : 0; 8028e2e: 79fb ldrb r3, [r7, #7] 8028e30: 2b06 cmp r3, #6 8028e32: bf0c ite eq 8028e34: 2301 moveq r3, #1 8028e36: 2300 movne r3, #0 8028e38: b2db uxtb r3, r3 8028e3a: f003 0303 and.w r3, r3, #3 8028e3e: b2da uxtb r2, r3 8028e40: 7e3b ldrb r3, [r7, #24] 8028e42: f362 0342 bfi r3, r2, #1, #2 8028e46: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 8028e48: 7e3a ldrb r2, [r7, #24] 8028e4a: f107 0314 add.w r3, r7, #20 8028e4e: 4611 mov r1, r2 8028e50: 4618 mov r0, r3 8028e52: f7ff fe22 bl 8028a9a ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */ 8028e56: 697b ldr r3, [r7, #20] 8028e58: 2102 movs r1, #2 8028e5a: 4618 mov r0, r3 8028e5c: f7ff fd23 bl 80288a6 8028e60: 4602 mov r2, r0 8028e62: 697b ldr r3, [r7, #20] 8028e64: 4413 add r3, r2 8028e66: 617b str r3, [r7, #20] writeInt(&ptr, packetid); 8028e68: 8d3a ldrh r2, [r7, #40] @ 0x28 8028e6a: f107 0314 add.w r3, r7, #20 8028e6e: 4611 mov r1, r2 8028e70: 4618 mov r0, r3 8028e72: f7ff fe27 bl 8028ac4 rc = ptr - buf; 8028e76: 697a ldr r2, [r7, #20] 8028e78: 68fb ldr r3, [r7, #12] 8028e7a: 1ad3 subs r3, r2, r3 8028e7c: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028e7e: 69fb ldr r3, [r7, #28] } 8028e80: 4618 mov r0, r3 8028e82: 3720 adds r7, #32 8028e84: 46bd mov sp, r7 8028e86: bd80 pop {r7, pc} 08028e88 : * @param count the number of topic filter strings in topicFilters * @param topicFilters the array of topic filter strings to be used in the publish * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_subscribeLength(int count, MQTTString topicFilters[]) { 8028e88: b580 push {r7, lr} 8028e8a: b084 sub sp, #16 8028e8c: af00 add r7, sp, #0 8028e8e: 6078 str r0, [r7, #4] 8028e90: 6039 str r1, [r7, #0] int i; int len = 2; /* packetid */ 8028e92: 2302 movs r3, #2 8028e94: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 8028e96: 2300 movs r3, #0 8028e98: 60fb str r3, [r7, #12] 8028e9a: e013 b.n 8028ec4 len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */ 8028e9c: 68fa ldr r2, [r7, #12] 8028e9e: 4613 mov r3, r2 8028ea0: 005b lsls r3, r3, #1 8028ea2: 4413 add r3, r2 8028ea4: 009b lsls r3, r3, #2 8028ea6: 461a mov r2, r3 8028ea8: 683b ldr r3, [r7, #0] 8028eaa: 4413 add r3, r2 8028eac: e893 0007 ldmia.w r3, {r0, r1, r2} 8028eb0: f7ff feaf bl 8028c12 8028eb4: 4603 mov r3, r0 8028eb6: 3303 adds r3, #3 8028eb8: 68ba ldr r2, [r7, #8] 8028eba: 4413 add r3, r2 8028ebc: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 8028ebe: 68fb ldr r3, [r7, #12] 8028ec0: 3301 adds r3, #1 8028ec2: 60fb str r3, [r7, #12] 8028ec4: 68fa ldr r2, [r7, #12] 8028ec6: 687b ldr r3, [r7, #4] 8028ec8: 429a cmp r2, r3 8028eca: dbe7 blt.n 8028e9c return len; 8028ecc: 68bb ldr r3, [r7, #8] } 8028ece: 4618 mov r0, r3 8028ed0: 3710 adds r7, #16 8028ed2: 46bd mov sp, r7 8028ed4: bd80 pop {r7, pc} 08028ed6 : * @param requestedQoSs - array of requested QoS * @return the length of the serialized data. <= 0 indicates error */ int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, int count, MQTTString topicFilters[], int requestedQoSs[]) { 8028ed6: b580 push {r7, lr} 8028ed8: b08a sub sp, #40 @ 0x28 8028eda: af00 add r7, sp, #0 8028edc: 60f8 str r0, [r7, #12] 8028ede: 60b9 str r1, [r7, #8] 8028ee0: 4611 mov r1, r2 8028ee2: 461a mov r2, r3 8028ee4: 460b mov r3, r1 8028ee6: 71fb strb r3, [r7, #7] 8028ee8: 4613 mov r3, r2 8028eea: 80bb strh r3, [r7, #4] unsigned char *ptr = buf; 8028eec: 68fb ldr r3, [r7, #12] 8028eee: 61bb str r3, [r7, #24] MQTTHeader header = {0}; 8028ef0: 2300 movs r3, #0 8028ef2: 617b str r3, [r7, #20] int rem_len = 0; 8028ef4: 2300 movs r3, #0 8028ef6: 61fb str r3, [r7, #28] int rc = 0; 8028ef8: 2300 movs r3, #0 8028efa: 627b str r3, [r7, #36] @ 0x24 int i = 0; 8028efc: 2300 movs r3, #0 8028efe: 623b str r3, [r7, #32] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen) 8028f00: 6b79 ldr r1, [r7, #52] @ 0x34 8028f02: 6b38 ldr r0, [r7, #48] @ 0x30 8028f04: f7ff ffc0 bl 8028e88 8028f08: 61f8 str r0, [r7, #28] 8028f0a: 69f8 ldr r0, [r7, #28] 8028f0c: f7ff fd36 bl 802897c 8028f10: 4602 mov r2, r0 8028f12: 68bb ldr r3, [r7, #8] 8028f14: 4293 cmp r3, r2 8028f16: da03 bge.n 8028f20 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028f18: f06f 0301 mvn.w r3, #1 8028f1c: 627b str r3, [r7, #36] @ 0x24 goto exit; 8028f1e: e051 b.n 8028fc4 } header.byte = 0; 8028f20: 2300 movs r3, #0 8028f22: 753b strb r3, [r7, #20] header.bits.type = SUBSCRIBE; 8028f24: 7d3b ldrb r3, [r7, #20] 8028f26: 2208 movs r2, #8 8028f28: f362 1307 bfi r3, r2, #4, #4 8028f2c: 753b strb r3, [r7, #20] header.bits.dup = dup; 8028f2e: 79fb ldrb r3, [r7, #7] 8028f30: f003 0301 and.w r3, r3, #1 8028f34: b2da uxtb r2, r3 8028f36: 7d3b ldrb r3, [r7, #20] 8028f38: f362 03c3 bfi r3, r2, #3, #1 8028f3c: 753b strb r3, [r7, #20] header.bits.qos = 1; 8028f3e: 7d3b ldrb r3, [r7, #20] 8028f40: 2201 movs r2, #1 8028f42: f362 0342 bfi r3, r2, #1, #2 8028f46: 753b strb r3, [r7, #20] writeChar(&ptr, header.byte); /* write header */ 8028f48: 7d3a ldrb r2, [r7, #20] 8028f4a: f107 0318 add.w r3, r7, #24 8028f4e: 4611 mov r1, r2 8028f50: 4618 mov r0, r3 8028f52: f7ff fda2 bl 8028a9a ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8028f56: 69bb ldr r3, [r7, #24] 8028f58: 69f9 ldr r1, [r7, #28] 8028f5a: 4618 mov r0, r3 8028f5c: f7ff fca3 bl 80288a6 8028f60: 4602 mov r2, r0 8028f62: 69bb ldr r3, [r7, #24] 8028f64: 4413 add r3, r2 8028f66: 61bb str r3, [r7, #24] writeInt(&ptr, packetid); 8028f68: 88ba ldrh r2, [r7, #4] 8028f6a: f107 0318 add.w r3, r7, #24 8028f6e: 4611 mov r1, r2 8028f70: 4618 mov r0, r3 8028f72: f7ff fda7 bl 8028ac4 for (i = 0; i < count; ++i) 8028f76: 2300 movs r3, #0 8028f78: 623b str r3, [r7, #32] 8028f7a: e01b b.n 8028fb4 { writeMQTTString(&ptr, topicFilters[i]); 8028f7c: 6a3a ldr r2, [r7, #32] 8028f7e: 4613 mov r3, r2 8028f80: 005b lsls r3, r3, #1 8028f82: 4413 add r3, r2 8028f84: 009b lsls r3, r3, #2 8028f86: 461a mov r2, r3 8028f88: 6b7b ldr r3, [r7, #52] @ 0x34 8028f8a: 4413 add r3, r2 8028f8c: f107 0018 add.w r0, r7, #24 8028f90: cb0e ldmia r3, {r1, r2, r3} 8028f92: f7ff fddf bl 8028b54 writeChar(&ptr, requestedQoSs[i]); 8028f96: 6a3b ldr r3, [r7, #32] 8028f98: 009b lsls r3, r3, #2 8028f9a: 6bba ldr r2, [r7, #56] @ 0x38 8028f9c: 4413 add r3, r2 8028f9e: 681b ldr r3, [r3, #0] 8028fa0: b2da uxtb r2, r3 8028fa2: f107 0318 add.w r3, r7, #24 8028fa6: 4611 mov r1, r2 8028fa8: 4618 mov r0, r3 8028faa: f7ff fd76 bl 8028a9a for (i = 0; i < count; ++i) 8028fae: 6a3b ldr r3, [r7, #32] 8028fb0: 3301 adds r3, #1 8028fb2: 623b str r3, [r7, #32] 8028fb4: 6a3a ldr r2, [r7, #32] 8028fb6: 6b3b ldr r3, [r7, #48] @ 0x30 8028fb8: 429a cmp r2, r3 8028fba: dbdf blt.n 8028f7c } rc = ptr - buf; 8028fbc: 69ba ldr r2, [r7, #24] 8028fbe: 68fb ldr r3, [r7, #12] 8028fc0: 1ad3 subs r3, r2, r3 8028fc2: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 8028fc4: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028fc6: 4618 mov r0, r3 8028fc8: 3728 adds r7, #40 @ 0x28 8028fca: 46bd mov sp, r7 8028fcc: bd80 pop {r7, pc} 08028fce : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen) { 8028fce: b580 push {r7, lr} 8028fd0: b08a sub sp, #40 @ 0x28 8028fd2: af00 add r7, sp, #0 8028fd4: 60f8 str r0, [r7, #12] 8028fd6: 60b9 str r1, [r7, #8] 8028fd8: 607a str r2, [r7, #4] 8028fda: 603b str r3, [r7, #0] MQTTHeader header = {0}; 8028fdc: 2300 movs r3, #0 8028fde: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028fe0: 6b3b ldr r3, [r7, #48] @ 0x30 8028fe2: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028fe4: 2300 movs r3, #0 8028fe6: 623b str r3, [r7, #32] int rc = 0; 8028fe8: 2300 movs r3, #0 8028fea: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 8028fec: f107 0318 add.w r3, r7, #24 8028ff0: 4618 mov r0, r3 8028ff2: f7ff fd3e bl 8028a72 8028ff6: 4603 mov r3, r0 8028ff8: 773b strb r3, [r7, #28] if (header.bits.type != SUBACK) 8028ffa: 7f3b ldrb r3, [r7, #28] 8028ffc: f023 030f bic.w r3, r3, #15 8029000: b2db uxtb r3, r3 8029002: 2b90 cmp r3, #144 @ 0x90 8029004: d142 bne.n 802908c goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8029006: 69bb ldr r3, [r7, #24] 8029008: f107 0214 add.w r2, r7, #20 802900c: 4611 mov r1, r2 802900e: 4618 mov r0, r3 8029010: f7ff fcfe bl 8028a10 8029014: 6278 str r0, [r7, #36] @ 0x24 8029016: 6a7a ldr r2, [r7, #36] @ 0x24 8029018: 69bb ldr r3, [r7, #24] 802901a: 4413 add r3, r2 802901c: 61bb str r3, [r7, #24] enddata = curdata + mylen; 802901e: 69bb ldr r3, [r7, #24] 8029020: 697a ldr r2, [r7, #20] 8029022: 4413 add r3, r2 8029024: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8029026: 69bb ldr r3, [r7, #24] 8029028: 6a3a ldr r2, [r7, #32] 802902a: 1ad3 subs r3, r2, r3 802902c: 2b01 cmp r3, #1 802902e: dd2f ble.n 8029090 goto exit; *packetid = readInt(&curdata); 8029030: f107 0318 add.w r3, r7, #24 8029034: 4618 mov r0, r3 8029036: f7ff fd01 bl 8028a3c 802903a: 4603 mov r3, r0 802903c: b29a uxth r2, r3 802903e: 68fb ldr r3, [r7, #12] 8029040: 801a strh r2, [r3, #0] *count = 0; 8029042: 687b ldr r3, [r7, #4] 8029044: 2200 movs r2, #0 8029046: 601a str r2, [r3, #0] while (curdata < enddata) 8029048: e019 b.n 802907e { if (*count > maxcount) 802904a: 687b ldr r3, [r7, #4] 802904c: 681b ldr r3, [r3, #0] 802904e: 68ba ldr r2, [r7, #8] 8029050: 429a cmp r2, r3 8029052: da03 bge.n 802905c { rc = -1; 8029054: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8029058: 627b str r3, [r7, #36] @ 0x24 goto exit; 802905a: e01a b.n 8029092 } grantedQoSs[(*count)++] = readChar(&curdata); 802905c: f107 0318 add.w r3, r7, #24 8029060: 4618 mov r0, r3 8029062: f7ff fd06 bl 8028a72 8029066: 4603 mov r3, r0 8029068: 4618 mov r0, r3 802906a: 687b ldr r3, [r7, #4] 802906c: 681b ldr r3, [r3, #0] 802906e: 1c59 adds r1, r3, #1 8029070: 687a ldr r2, [r7, #4] 8029072: 6011 str r1, [r2, #0] 8029074: 009b lsls r3, r3, #2 8029076: 683a ldr r2, [r7, #0] 8029078: 4413 add r3, r2 802907a: 4602 mov r2, r0 802907c: 601a str r2, [r3, #0] while (curdata < enddata) 802907e: 69bb ldr r3, [r7, #24] 8029080: 6a3a ldr r2, [r7, #32] 8029082: 429a cmp r2, r3 8029084: d8e1 bhi.n 802904a } rc = 1; 8029086: 2301 movs r3, #1 8029088: 627b str r3, [r7, #36] @ 0x24 802908a: e002 b.n 8029092 goto exit; 802908c: bf00 nop 802908e: e000 b.n 8029092 goto exit; 8029090: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 8029092: 6a7b ldr r3, [r7, #36] @ 0x24 } 8029094: 4618 mov r0, r3 8029096: 3728 adds r7, #40 @ 0x28 8029098: 46bd mov sp, r7 802909a: bd80 pop {r7, pc} 0802909c : 802909c: 4b02 ldr r3, [pc, #8] @ (80290a8 ) 802909e: 4601 mov r1, r0 80290a0: 6818 ldr r0, [r3, #0] 80290a2: f000 b82d b.w 8029100 <_malloc_r> 80290a6: bf00 nop 80290a8: 240001d4 .word 0x240001d4 080290ac : 80290ac: 4b02 ldr r3, [pc, #8] @ (80290b8 ) 80290ae: 4601 mov r1, r0 80290b0: 6818 ldr r0, [r3, #0] 80290b2: f002 bc7b b.w 802b9ac <_free_r> 80290b6: bf00 nop 80290b8: 240001d4 .word 0x240001d4 080290bc : 80290bc: b570 push {r4, r5, r6, lr} 80290be: 4e0f ldr r6, [pc, #60] @ (80290fc ) 80290c0: 460c mov r4, r1 80290c2: 6831 ldr r1, [r6, #0] 80290c4: 4605 mov r5, r0 80290c6: b911 cbnz r1, 80290ce 80290c8: f001 fe0a bl 802ace0 <_sbrk_r> 80290cc: 6030 str r0, [r6, #0] 80290ce: 4621 mov r1, r4 80290d0: 4628 mov r0, r5 80290d2: f001 fe05 bl 802ace0 <_sbrk_r> 80290d6: 1c43 adds r3, r0, #1 80290d8: d103 bne.n 80290e2 80290da: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 80290de: 4620 mov r0, r4 80290e0: bd70 pop {r4, r5, r6, pc} 80290e2: 1cc4 adds r4, r0, #3 80290e4: f024 0403 bic.w r4, r4, #3 80290e8: 42a0 cmp r0, r4 80290ea: d0f8 beq.n 80290de 80290ec: 1a21 subs r1, r4, r0 80290ee: 4628 mov r0, r5 80290f0: f001 fdf6 bl 802ace0 <_sbrk_r> 80290f4: 3001 adds r0, #1 80290f6: d1f2 bne.n 80290de 80290f8: e7ef b.n 80290da 80290fa: bf00 nop 80290fc: 2402b11c .word 0x2402b11c 08029100 <_malloc_r>: 8029100: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8029104: 1ccd adds r5, r1, #3 8029106: f025 0503 bic.w r5, r5, #3 802910a: 3508 adds r5, #8 802910c: 2d0c cmp r5, #12 802910e: bf38 it cc 8029110: 250c movcc r5, #12 8029112: 2d00 cmp r5, #0 8029114: 4606 mov r6, r0 8029116: db01 blt.n 802911c <_malloc_r+0x1c> 8029118: 42a9 cmp r1, r5 802911a: d904 bls.n 8029126 <_malloc_r+0x26> 802911c: 230c movs r3, #12 802911e: 6033 str r3, [r6, #0] 8029120: 2000 movs r0, #0 8029122: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8029126: f8df 80d4 ldr.w r8, [pc, #212] @ 80291fc <_malloc_r+0xfc> 802912a: f000 f869 bl 8029200 <__malloc_lock> 802912e: f8d8 3000 ldr.w r3, [r8] 8029132: 461c mov r4, r3 8029134: bb44 cbnz r4, 8029188 <_malloc_r+0x88> 8029136: 4629 mov r1, r5 8029138: 4630 mov r0, r6 802913a: f7ff ffbf bl 80290bc 802913e: 1c43 adds r3, r0, #1 8029140: 4604 mov r4, r0 8029142: d158 bne.n 80291f6 <_malloc_r+0xf6> 8029144: f8d8 4000 ldr.w r4, [r8] 8029148: 4627 mov r7, r4 802914a: 2f00 cmp r7, #0 802914c: d143 bne.n 80291d6 <_malloc_r+0xd6> 802914e: 2c00 cmp r4, #0 8029150: d04b beq.n 80291ea <_malloc_r+0xea> 8029152: 6823 ldr r3, [r4, #0] 8029154: 4639 mov r1, r7 8029156: 4630 mov r0, r6 8029158: eb04 0903 add.w r9, r4, r3 802915c: f001 fdc0 bl 802ace0 <_sbrk_r> 8029160: 4581 cmp r9, r0 8029162: d142 bne.n 80291ea <_malloc_r+0xea> 8029164: 6821 ldr r1, [r4, #0] 8029166: 1a6d subs r5, r5, r1 8029168: 4629 mov r1, r5 802916a: 4630 mov r0, r6 802916c: f7ff ffa6 bl 80290bc 8029170: 3001 adds r0, #1 8029172: d03a beq.n 80291ea <_malloc_r+0xea> 8029174: 6823 ldr r3, [r4, #0] 8029176: 442b add r3, r5 8029178: 6023 str r3, [r4, #0] 802917a: f8d8 3000 ldr.w r3, [r8] 802917e: 685a ldr r2, [r3, #4] 8029180: bb62 cbnz r2, 80291dc <_malloc_r+0xdc> 8029182: f8c8 7000 str.w r7, [r8] 8029186: e00f b.n 80291a8 <_malloc_r+0xa8> 8029188: 6822 ldr r2, [r4, #0] 802918a: 1b52 subs r2, r2, r5 802918c: d420 bmi.n 80291d0 <_malloc_r+0xd0> 802918e: 2a0b cmp r2, #11 8029190: d917 bls.n 80291c2 <_malloc_r+0xc2> 8029192: 1961 adds r1, r4, r5 8029194: 42a3 cmp r3, r4 8029196: 6025 str r5, [r4, #0] 8029198: bf18 it ne 802919a: 6059 strne r1, [r3, #4] 802919c: 6863 ldr r3, [r4, #4] 802919e: bf08 it eq 80291a0: f8c8 1000 streq.w r1, [r8] 80291a4: 5162 str r2, [r4, r5] 80291a6: 604b str r3, [r1, #4] 80291a8: 4630 mov r0, r6 80291aa: f000 f82f bl 802920c <__malloc_unlock> 80291ae: f104 000b add.w r0, r4, #11 80291b2: 1d23 adds r3, r4, #4 80291b4: f020 0007 bic.w r0, r0, #7 80291b8: 1ac2 subs r2, r0, r3 80291ba: bf1c itt ne 80291bc: 1a1b subne r3, r3, r0 80291be: 50a3 strne r3, [r4, r2] 80291c0: e7af b.n 8029122 <_malloc_r+0x22> 80291c2: 6862 ldr r2, [r4, #4] 80291c4: 42a3 cmp r3, r4 80291c6: bf0c ite eq 80291c8: f8c8 2000 streq.w r2, [r8] 80291cc: 605a strne r2, [r3, #4] 80291ce: e7eb b.n 80291a8 <_malloc_r+0xa8> 80291d0: 4623 mov r3, r4 80291d2: 6864 ldr r4, [r4, #4] 80291d4: e7ae b.n 8029134 <_malloc_r+0x34> 80291d6: 463c mov r4, r7 80291d8: 687f ldr r7, [r7, #4] 80291da: e7b6 b.n 802914a <_malloc_r+0x4a> 80291dc: 461a mov r2, r3 80291de: 685b ldr r3, [r3, #4] 80291e0: 42a3 cmp r3, r4 80291e2: d1fb bne.n 80291dc <_malloc_r+0xdc> 80291e4: 2300 movs r3, #0 80291e6: 6053 str r3, [r2, #4] 80291e8: e7de b.n 80291a8 <_malloc_r+0xa8> 80291ea: 230c movs r3, #12 80291ec: 6033 str r3, [r6, #0] 80291ee: 4630 mov r0, r6 80291f0: f000 f80c bl 802920c <__malloc_unlock> 80291f4: e794 b.n 8029120 <_malloc_r+0x20> 80291f6: 6005 str r5, [r0, #0] 80291f8: e7d6 b.n 80291a8 <_malloc_r+0xa8> 80291fa: bf00 nop 80291fc: 2402b120 .word 0x2402b120 08029200 <__malloc_lock>: 8029200: 4801 ldr r0, [pc, #4] @ (8029208 <__malloc_lock+0x8>) 8029202: f001 bdba b.w 802ad7a <__retarget_lock_acquire_recursive> 8029206: bf00 nop 8029208: 2402b264 .word 0x2402b264 0802920c <__malloc_unlock>: 802920c: 4801 ldr r0, [pc, #4] @ (8029214 <__malloc_unlock+0x8>) 802920e: f001 bdb5 b.w 802ad7c <__retarget_lock_release_recursive> 8029212: bf00 nop 8029214: 2402b264 .word 0x2402b264 08029218 : 8029218: 4b16 ldr r3, [pc, #88] @ (8029274 ) 802921a: b510 push {r4, lr} 802921c: 681c ldr r4, [r3, #0] 802921e: 6b23 ldr r3, [r4, #48] @ 0x30 8029220: b9b3 cbnz r3, 8029250 8029222: 2018 movs r0, #24 8029224: f7ff ff3a bl 802909c 8029228: 4602 mov r2, r0 802922a: 6320 str r0, [r4, #48] @ 0x30 802922c: b920 cbnz r0, 8029238 802922e: 4b12 ldr r3, [pc, #72] @ (8029278 ) 8029230: 4812 ldr r0, [pc, #72] @ (802927c ) 8029232: 2152 movs r1, #82 @ 0x52 8029234: f001 fdbc bl 802adb0 <__assert_func> 8029238: 4911 ldr r1, [pc, #68] @ (8029280 ) 802923a: 4b12 ldr r3, [pc, #72] @ (8029284 ) 802923c: e9c0 1300 strd r1, r3, [r0] 8029240: 4b11 ldr r3, [pc, #68] @ (8029288 ) 8029242: 6083 str r3, [r0, #8] 8029244: 230b movs r3, #11 8029246: 8183 strh r3, [r0, #12] 8029248: 2100 movs r1, #0 802924a: 2001 movs r0, #1 802924c: e9c2 0104 strd r0, r1, [r2, #16] 8029250: 6b21 ldr r1, [r4, #48] @ 0x30 8029252: 480e ldr r0, [pc, #56] @ (802928c ) 8029254: 690b ldr r3, [r1, #16] 8029256: 694c ldr r4, [r1, #20] 8029258: 4a0d ldr r2, [pc, #52] @ (8029290 ) 802925a: 4358 muls r0, r3 802925c: fb02 0004 mla r0, r2, r4, r0 8029260: fba3 3202 umull r3, r2, r3, r2 8029264: 3301 adds r3, #1 8029266: eb40 0002 adc.w r0, r0, r2 802926a: e9c1 3004 strd r3, r0, [r1, #16] 802926e: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000 8029272: bd10 pop {r4, pc} 8029274: 240001d4 .word 0x240001d4 8029278: 08031c8e .word 0x08031c8e 802927c: 08031ca5 .word 0x08031ca5 8029280: abcd330e .word 0xabcd330e 8029284: e66d1234 .word 0xe66d1234 8029288: 0005deec .word 0x0005deec 802928c: 5851f42d .word 0x5851f42d 8029290: 4c957f2d .word 0x4c957f2d 08029294 : 8029294: 4b02 ldr r3, [pc, #8] @ (80292a0 ) 8029296: 460a mov r2, r1 8029298: 4601 mov r1, r0 802929a: 6818 ldr r0, [r3, #0] 802929c: f000 b802 b.w 80292a4 <_realloc_r> 80292a0: 240001d4 .word 0x240001d4 080292a4 <_realloc_r>: 80292a4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80292a8: 4680 mov r8, r0 80292aa: 4615 mov r5, r2 80292ac: 460c mov r4, r1 80292ae: b921 cbnz r1, 80292ba <_realloc_r+0x16> 80292b0: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 80292b4: 4611 mov r1, r2 80292b6: f7ff bf23 b.w 8029100 <_malloc_r> 80292ba: b92a cbnz r2, 80292c8 <_realloc_r+0x24> 80292bc: f002 fb76 bl 802b9ac <_free_r> 80292c0: 2400 movs r4, #0 80292c2: 4620 mov r0, r4 80292c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80292c8: f003 fbb5 bl 802ca36 <_malloc_usable_size_r> 80292cc: 4285 cmp r5, r0 80292ce: 4606 mov r6, r0 80292d0: d802 bhi.n 80292d8 <_realloc_r+0x34> 80292d2: ebb5 0f50 cmp.w r5, r0, lsr #1 80292d6: d8f4 bhi.n 80292c2 <_realloc_r+0x1e> 80292d8: 4629 mov r1, r5 80292da: 4640 mov r0, r8 80292dc: f7ff ff10 bl 8029100 <_malloc_r> 80292e0: 4607 mov r7, r0 80292e2: 2800 cmp r0, #0 80292e4: d0ec beq.n 80292c0 <_realloc_r+0x1c> 80292e6: 42b5 cmp r5, r6 80292e8: 462a mov r2, r5 80292ea: 4621 mov r1, r4 80292ec: bf28 it cs 80292ee: 4632 movcs r2, r6 80292f0: f001 fd45 bl 802ad7e 80292f4: 4621 mov r1, r4 80292f6: 4640 mov r0, r8 80292f8: f002 fb58 bl 802b9ac <_free_r> 80292fc: 463c mov r4, r7 80292fe: e7e0 b.n 80292c2 <_realloc_r+0x1e> 08029300 : 8029300: b570 push {r4, r5, r6, lr} 8029302: 4604 mov r4, r0 8029304: 460d mov r5, r1 8029306: 4616 mov r6, r2 8029308: ec45 4b10 vmov d0, r4, r5 802930c: f003 fa58 bl 802c7c0 <__ulp> 8029310: b17e cbz r6, 8029332 8029312: f3c5 530a ubfx r3, r5, #20, #11 8029316: f1c3 036b rsb r3, r3, #107 @ 0x6b 802931a: 2b00 cmp r3, #0 802931c: dd09 ble.n 8029332 802931e: 051b lsls r3, r3, #20 8029320: f103 517f add.w r1, r3, #1069547520 @ 0x3fc00000 8029324: 2000 movs r0, #0 8029326: f501 1140 add.w r1, r1, #3145728 @ 0x300000 802932a: ec41 0b17 vmov d7, r0, r1 802932e: ee20 0b07 vmul.f64 d0, d0, d7 8029332: bd70 pop {r4, r5, r6, pc} 8029334: 0000 movs r0, r0 ... 08029338 <_strtod_l>: 8029338: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802933c: ed2d 8b0a vpush {d8-d12} 8029340: b097 sub sp, #92 @ 0x5c 8029342: 4688 mov r8, r1 8029344: 920e str r2, [sp, #56] @ 0x38 8029346: 2200 movs r2, #0 8029348: 9212 str r2, [sp, #72] @ 0x48 802934a: 9005 str r0, [sp, #20] 802934c: f04f 0a00 mov.w sl, #0 8029350: f04f 0b00 mov.w fp, #0 8029354: 460a mov r2, r1 8029356: 9211 str r2, [sp, #68] @ 0x44 8029358: 7811 ldrb r1, [r2, #0] 802935a: 292b cmp r1, #43 @ 0x2b 802935c: d04c beq.n 80293f8 <_strtod_l+0xc0> 802935e: d839 bhi.n 80293d4 <_strtod_l+0x9c> 8029360: 290d cmp r1, #13 8029362: d833 bhi.n 80293cc <_strtod_l+0x94> 8029364: 2908 cmp r1, #8 8029366: d833 bhi.n 80293d0 <_strtod_l+0x98> 8029368: 2900 cmp r1, #0 802936a: d03c beq.n 80293e6 <_strtod_l+0xae> 802936c: 2200 movs r2, #0 802936e: 9208 str r2, [sp, #32] 8029370: 9d11 ldr r5, [sp, #68] @ 0x44 8029372: 782a ldrb r2, [r5, #0] 8029374: 2a30 cmp r2, #48 @ 0x30 8029376: f040 80b5 bne.w 80294e4 <_strtod_l+0x1ac> 802937a: 786a ldrb r2, [r5, #1] 802937c: f002 02df and.w r2, r2, #223 @ 0xdf 8029380: 2a58 cmp r2, #88 @ 0x58 8029382: d170 bne.n 8029466 <_strtod_l+0x12e> 8029384: 9302 str r3, [sp, #8] 8029386: 9b08 ldr r3, [sp, #32] 8029388: 9301 str r3, [sp, #4] 802938a: ab12 add r3, sp, #72 @ 0x48 802938c: 9300 str r3, [sp, #0] 802938e: 4a8b ldr r2, [pc, #556] @ (80295bc <_strtod_l+0x284>) 8029390: 9805 ldr r0, [sp, #20] 8029392: ab13 add r3, sp, #76 @ 0x4c 8029394: a911 add r1, sp, #68 @ 0x44 8029396: f002 fbbb bl 802bb10 <__gethex> 802939a: f010 060f ands.w r6, r0, #15 802939e: 4604 mov r4, r0 80293a0: d005 beq.n 80293ae <_strtod_l+0x76> 80293a2: 2e06 cmp r6, #6 80293a4: d12a bne.n 80293fc <_strtod_l+0xc4> 80293a6: 3501 adds r5, #1 80293a8: 2300 movs r3, #0 80293aa: 9511 str r5, [sp, #68] @ 0x44 80293ac: 9308 str r3, [sp, #32] 80293ae: 9b0e ldr r3, [sp, #56] @ 0x38 80293b0: 2b00 cmp r3, #0 80293b2: f040 852f bne.w 8029e14 <_strtod_l+0xadc> 80293b6: 9b08 ldr r3, [sp, #32] 80293b8: ec4b ab10 vmov d0, sl, fp 80293bc: b1cb cbz r3, 80293f2 <_strtod_l+0xba> 80293be: eeb1 0b40 vneg.f64 d0, d0 80293c2: b017 add sp, #92 @ 0x5c 80293c4: ecbd 8b0a vpop {d8-d12} 80293c8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80293cc: 2920 cmp r1, #32 80293ce: d1cd bne.n 802936c <_strtod_l+0x34> 80293d0: 3201 adds r2, #1 80293d2: e7c0 b.n 8029356 <_strtod_l+0x1e> 80293d4: 292d cmp r1, #45 @ 0x2d 80293d6: d1c9 bne.n 802936c <_strtod_l+0x34> 80293d8: 2101 movs r1, #1 80293da: 9108 str r1, [sp, #32] 80293dc: 1c51 adds r1, r2, #1 80293de: 9111 str r1, [sp, #68] @ 0x44 80293e0: 7852 ldrb r2, [r2, #1] 80293e2: 2a00 cmp r2, #0 80293e4: d1c4 bne.n 8029370 <_strtod_l+0x38> 80293e6: 9b0e ldr r3, [sp, #56] @ 0x38 80293e8: f8cd 8044 str.w r8, [sp, #68] @ 0x44 80293ec: 2b00 cmp r3, #0 80293ee: f040 850f bne.w 8029e10 <_strtod_l+0xad8> 80293f2: ec4b ab10 vmov d0, sl, fp 80293f6: e7e4 b.n 80293c2 <_strtod_l+0x8a> 80293f8: 2100 movs r1, #0 80293fa: e7ee b.n 80293da <_strtod_l+0xa2> 80293fc: 9a12 ldr r2, [sp, #72] @ 0x48 80293fe: b13a cbz r2, 8029410 <_strtod_l+0xd8> 8029400: 2135 movs r1, #53 @ 0x35 8029402: a814 add r0, sp, #80 @ 0x50 8029404: f003 fad3 bl 802c9ae <__copybits> 8029408: 9912 ldr r1, [sp, #72] @ 0x48 802940a: 9805 ldr r0, [sp, #20] 802940c: f002 fea4 bl 802c158 <_Bfree> 8029410: 1e73 subs r3, r6, #1 8029412: 9a13 ldr r2, [sp, #76] @ 0x4c 8029414: 2b04 cmp r3, #4 8029416: d806 bhi.n 8029426 <_strtod_l+0xee> 8029418: e8df f003 tbb [pc, r3] 802941c: 201d0314 .word 0x201d0314 8029420: 14 .byte 0x14 8029421: 00 .byte 0x00 8029422: e9dd ab14 ldrd sl, fp, [sp, #80] @ 0x50 8029426: 05e3 lsls r3, r4, #23 8029428: bf48 it mi 802942a: f04b 4b00 orrmi.w fp, fp, #2147483648 @ 0x80000000 802942e: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029432: 0d1b lsrs r3, r3, #20 8029434: 051b lsls r3, r3, #20 8029436: 2b00 cmp r3, #0 8029438: d1b9 bne.n 80293ae <_strtod_l+0x76> 802943a: f001 fc73 bl 802ad24 <__errno> 802943e: 2322 movs r3, #34 @ 0x22 8029440: 6003 str r3, [r0, #0] 8029442: e7b4 b.n 80293ae <_strtod_l+0x76> 8029444: e9dd a314 ldrd sl, r3, [sp, #80] @ 0x50 8029448: f202 4233 addw r2, r2, #1075 @ 0x433 802944c: f423 1380 bic.w r3, r3, #1048576 @ 0x100000 8029450: ea43 5b02 orr.w fp, r3, r2, lsl #20 8029454: e7e7 b.n 8029426 <_strtod_l+0xee> 8029456: f8df b16c ldr.w fp, [pc, #364] @ 80295c4 <_strtod_l+0x28c> 802945a: e7e4 b.n 8029426 <_strtod_l+0xee> 802945c: f06f 4b00 mvn.w fp, #2147483648 @ 0x80000000 8029460: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029464: e7df b.n 8029426 <_strtod_l+0xee> 8029466: 9b11 ldr r3, [sp, #68] @ 0x44 8029468: 1c5a adds r2, r3, #1 802946a: 9211 str r2, [sp, #68] @ 0x44 802946c: 785b ldrb r3, [r3, #1] 802946e: 2b30 cmp r3, #48 @ 0x30 8029470: d0f9 beq.n 8029466 <_strtod_l+0x12e> 8029472: 2b00 cmp r3, #0 8029474: d09b beq.n 80293ae <_strtod_l+0x76> 8029476: 2301 movs r3, #1 8029478: 2600 movs r6, #0 802947a: 9307 str r3, [sp, #28] 802947c: 9b11 ldr r3, [sp, #68] @ 0x44 802947e: 930a str r3, [sp, #40] @ 0x28 8029480: 46b1 mov r9, r6 8029482: 4635 mov r5, r6 8029484: 220a movs r2, #10 8029486: 9811 ldr r0, [sp, #68] @ 0x44 8029488: 7804 ldrb r4, [r0, #0] 802948a: f1a4 0330 sub.w r3, r4, #48 @ 0x30 802948e: b2d9 uxtb r1, r3 8029490: 2909 cmp r1, #9 8029492: d929 bls.n 80294e8 <_strtod_l+0x1b0> 8029494: 494a ldr r1, [pc, #296] @ (80295c0 <_strtod_l+0x288>) 8029496: 2201 movs r2, #1 8029498: f001 fb82 bl 802aba0 802949c: b378 cbz r0, 80294fe <_strtod_l+0x1c6> 802949e: 2000 movs r0, #0 80294a0: 4622 mov r2, r4 80294a2: 462b mov r3, r5 80294a4: 4607 mov r7, r0 80294a6: 9006 str r0, [sp, #24] 80294a8: 2a65 cmp r2, #101 @ 0x65 80294aa: d001 beq.n 80294b0 <_strtod_l+0x178> 80294ac: 2a45 cmp r2, #69 @ 0x45 80294ae: d117 bne.n 80294e0 <_strtod_l+0x1a8> 80294b0: b91b cbnz r3, 80294ba <_strtod_l+0x182> 80294b2: 9b07 ldr r3, [sp, #28] 80294b4: 4303 orrs r3, r0 80294b6: d096 beq.n 80293e6 <_strtod_l+0xae> 80294b8: 2300 movs r3, #0 80294ba: f8dd 8044 ldr.w r8, [sp, #68] @ 0x44 80294be: f108 0201 add.w r2, r8, #1 80294c2: 9211 str r2, [sp, #68] @ 0x44 80294c4: f898 2001 ldrb.w r2, [r8, #1] 80294c8: 2a2b cmp r2, #43 @ 0x2b 80294ca: d06b beq.n 80295a4 <_strtod_l+0x26c> 80294cc: 2a2d cmp r2, #45 @ 0x2d 80294ce: d071 beq.n 80295b4 <_strtod_l+0x27c> 80294d0: f04f 0e00 mov.w lr, #0 80294d4: f1a2 0430 sub.w r4, r2, #48 @ 0x30 80294d8: 2c09 cmp r4, #9 80294da: d979 bls.n 80295d0 <_strtod_l+0x298> 80294dc: f8cd 8044 str.w r8, [sp, #68] @ 0x44 80294e0: 2400 movs r4, #0 80294e2: e094 b.n 802960e <_strtod_l+0x2d6> 80294e4: 2300 movs r3, #0 80294e6: e7c7 b.n 8029478 <_strtod_l+0x140> 80294e8: 2d08 cmp r5, #8 80294ea: f100 0001 add.w r0, r0, #1 80294ee: bfd4 ite le 80294f0: fb02 3909 mlale r9, r2, r9, r3 80294f4: fb02 3606 mlagt r6, r2, r6, r3 80294f8: 3501 adds r5, #1 80294fa: 9011 str r0, [sp, #68] @ 0x44 80294fc: e7c3 b.n 8029486 <_strtod_l+0x14e> 80294fe: 9b11 ldr r3, [sp, #68] @ 0x44 8029500: 1c5a adds r2, r3, #1 8029502: 9211 str r2, [sp, #68] @ 0x44 8029504: 785a ldrb r2, [r3, #1] 8029506: b375 cbz r5, 8029566 <_strtod_l+0x22e> 8029508: 4607 mov r7, r0 802950a: 462b mov r3, r5 802950c: f1a2 0130 sub.w r1, r2, #48 @ 0x30 8029510: 2909 cmp r1, #9 8029512: d913 bls.n 802953c <_strtod_l+0x204> 8029514: 2101 movs r1, #1 8029516: 9106 str r1, [sp, #24] 8029518: e7c6 b.n 80294a8 <_strtod_l+0x170> 802951a: 9b11 ldr r3, [sp, #68] @ 0x44 802951c: 1c5a adds r2, r3, #1 802951e: 9211 str r2, [sp, #68] @ 0x44 8029520: 785a ldrb r2, [r3, #1] 8029522: 3001 adds r0, #1 8029524: 2a30 cmp r2, #48 @ 0x30 8029526: d0f8 beq.n 802951a <_strtod_l+0x1e2> 8029528: f1a2 0331 sub.w r3, r2, #49 @ 0x31 802952c: 2b08 cmp r3, #8 802952e: f200 8476 bhi.w 8029e1e <_strtod_l+0xae6> 8029532: 9b11 ldr r3, [sp, #68] @ 0x44 8029534: 930a str r3, [sp, #40] @ 0x28 8029536: 4607 mov r7, r0 8029538: 2000 movs r0, #0 802953a: 4603 mov r3, r0 802953c: 3a30 subs r2, #48 @ 0x30 802953e: f100 0101 add.w r1, r0, #1 8029542: d023 beq.n 802958c <_strtod_l+0x254> 8029544: 440f add r7, r1 8029546: eb00 0c03 add.w ip, r0, r3 802954a: 4619 mov r1, r3 802954c: 240a movs r4, #10 802954e: 4561 cmp r1, ip 8029550: d10b bne.n 802956a <_strtod_l+0x232> 8029552: 1c5c adds r4, r3, #1 8029554: 4403 add r3, r0 8029556: 2b08 cmp r3, #8 8029558: 4404 add r4, r0 802955a: dc11 bgt.n 8029580 <_strtod_l+0x248> 802955c: 230a movs r3, #10 802955e: fb03 2909 mla r9, r3, r9, r2 8029562: 2100 movs r1, #0 8029564: e013 b.n 802958e <_strtod_l+0x256> 8029566: 4628 mov r0, r5 8029568: e7dc b.n 8029524 <_strtod_l+0x1ec> 802956a: 2908 cmp r1, #8 802956c: f101 0101 add.w r1, r1, #1 8029570: dc02 bgt.n 8029578 <_strtod_l+0x240> 8029572: fb04 f909 mul.w r9, r4, r9 8029576: e7ea b.n 802954e <_strtod_l+0x216> 8029578: 2910 cmp r1, #16 802957a: bfd8 it le 802957c: 4366 mulle r6, r4 802957e: e7e6 b.n 802954e <_strtod_l+0x216> 8029580: 2b0f cmp r3, #15 8029582: dcee bgt.n 8029562 <_strtod_l+0x22a> 8029584: 230a movs r3, #10 8029586: fb03 2606 mla r6, r3, r6, r2 802958a: e7ea b.n 8029562 <_strtod_l+0x22a> 802958c: 461c mov r4, r3 802958e: 9b11 ldr r3, [sp, #68] @ 0x44 8029590: 1c5a adds r2, r3, #1 8029592: 9211 str r2, [sp, #68] @ 0x44 8029594: 785a ldrb r2, [r3, #1] 8029596: 4608 mov r0, r1 8029598: 4623 mov r3, r4 802959a: e7b7 b.n 802950c <_strtod_l+0x1d4> 802959c: 2301 movs r3, #1 802959e: 2700 movs r7, #0 80295a0: 9306 str r3, [sp, #24] 80295a2: e786 b.n 80294b2 <_strtod_l+0x17a> 80295a4: f04f 0e00 mov.w lr, #0 80295a8: f108 0202 add.w r2, r8, #2 80295ac: 9211 str r2, [sp, #68] @ 0x44 80295ae: f898 2002 ldrb.w r2, [r8, #2] 80295b2: e78f b.n 80294d4 <_strtod_l+0x19c> 80295b4: f04f 0e01 mov.w lr, #1 80295b8: e7f6 b.n 80295a8 <_strtod_l+0x270> 80295ba: bf00 nop 80295bc: 08031d14 .word 0x08031d14 80295c0: 08031cfd .word 0x08031cfd 80295c4: 7ff00000 .word 0x7ff00000 80295c8: 9a11 ldr r2, [sp, #68] @ 0x44 80295ca: 1c54 adds r4, r2, #1 80295cc: 9411 str r4, [sp, #68] @ 0x44 80295ce: 7852 ldrb r2, [r2, #1] 80295d0: 2a30 cmp r2, #48 @ 0x30 80295d2: d0f9 beq.n 80295c8 <_strtod_l+0x290> 80295d4: f1a2 0431 sub.w r4, r2, #49 @ 0x31 80295d8: 2c08 cmp r4, #8 80295da: d881 bhi.n 80294e0 <_strtod_l+0x1a8> 80295dc: f1a2 0c30 sub.w ip, r2, #48 @ 0x30 80295e0: 9a11 ldr r2, [sp, #68] @ 0x44 80295e2: 9209 str r2, [sp, #36] @ 0x24 80295e4: 9a11 ldr r2, [sp, #68] @ 0x44 80295e6: 1c51 adds r1, r2, #1 80295e8: 9111 str r1, [sp, #68] @ 0x44 80295ea: 7852 ldrb r2, [r2, #1] 80295ec: f1a2 0430 sub.w r4, r2, #48 @ 0x30 80295f0: 2c09 cmp r4, #9 80295f2: d938 bls.n 8029666 <_strtod_l+0x32e> 80295f4: 9c09 ldr r4, [sp, #36] @ 0x24 80295f6: 1b0c subs r4, r1, r4 80295f8: 2c08 cmp r4, #8 80295fa: f644 641f movw r4, #19999 @ 0x4e1f 80295fe: dc02 bgt.n 8029606 <_strtod_l+0x2ce> 8029600: 4564 cmp r4, ip 8029602: bfa8 it ge 8029604: 4664 movge r4, ip 8029606: f1be 0f00 cmp.w lr, #0 802960a: d000 beq.n 802960e <_strtod_l+0x2d6> 802960c: 4264 negs r4, r4 802960e: 2b00 cmp r3, #0 8029610: d14e bne.n 80296b0 <_strtod_l+0x378> 8029612: 9b07 ldr r3, [sp, #28] 8029614: 4318 orrs r0, r3 8029616: f47f aeca bne.w 80293ae <_strtod_l+0x76> 802961a: 9b06 ldr r3, [sp, #24] 802961c: 2b00 cmp r3, #0 802961e: f47f aee2 bne.w 80293e6 <_strtod_l+0xae> 8029622: 2a69 cmp r2, #105 @ 0x69 8029624: d027 beq.n 8029676 <_strtod_l+0x33e> 8029626: dc24 bgt.n 8029672 <_strtod_l+0x33a> 8029628: 2a49 cmp r2, #73 @ 0x49 802962a: d024 beq.n 8029676 <_strtod_l+0x33e> 802962c: 2a4e cmp r2, #78 @ 0x4e 802962e: f47f aeda bne.w 80293e6 <_strtod_l+0xae> 8029632: 4997 ldr r1, [pc, #604] @ (8029890 <_strtod_l+0x558>) 8029634: a811 add r0, sp, #68 @ 0x44 8029636: f002 fc8d bl 802bf54 <__match> 802963a: 2800 cmp r0, #0 802963c: f43f aed3 beq.w 80293e6 <_strtod_l+0xae> 8029640: 9b11 ldr r3, [sp, #68] @ 0x44 8029642: 781b ldrb r3, [r3, #0] 8029644: 2b28 cmp r3, #40 @ 0x28 8029646: d12d bne.n 80296a4 <_strtod_l+0x36c> 8029648: 4992 ldr r1, [pc, #584] @ (8029894 <_strtod_l+0x55c>) 802964a: aa14 add r2, sp, #80 @ 0x50 802964c: a811 add r0, sp, #68 @ 0x44 802964e: f002 fc95 bl 802bf7c <__hexnan> 8029652: 2805 cmp r0, #5 8029654: d126 bne.n 80296a4 <_strtod_l+0x36c> 8029656: 9b15 ldr r3, [sp, #84] @ 0x54 8029658: f8dd a050 ldr.w sl, [sp, #80] @ 0x50 802965c: f043 4bff orr.w fp, r3, #2139095040 @ 0x7f800000 8029660: f44b 0be0 orr.w fp, fp, #7340032 @ 0x700000 8029664: e6a3 b.n 80293ae <_strtod_l+0x76> 8029666: 240a movs r4, #10 8029668: fb04 2c0c mla ip, r4, ip, r2 802966c: f1ac 0c30 sub.w ip, ip, #48 @ 0x30 8029670: e7b8 b.n 80295e4 <_strtod_l+0x2ac> 8029672: 2a6e cmp r2, #110 @ 0x6e 8029674: e7db b.n 802962e <_strtod_l+0x2f6> 8029676: 4988 ldr r1, [pc, #544] @ (8029898 <_strtod_l+0x560>) 8029678: a811 add r0, sp, #68 @ 0x44 802967a: f002 fc6b bl 802bf54 <__match> 802967e: 2800 cmp r0, #0 8029680: f43f aeb1 beq.w 80293e6 <_strtod_l+0xae> 8029684: 9b11 ldr r3, [sp, #68] @ 0x44 8029686: 4985 ldr r1, [pc, #532] @ (802989c <_strtod_l+0x564>) 8029688: 3b01 subs r3, #1 802968a: a811 add r0, sp, #68 @ 0x44 802968c: 9311 str r3, [sp, #68] @ 0x44 802968e: f002 fc61 bl 802bf54 <__match> 8029692: b910 cbnz r0, 802969a <_strtod_l+0x362> 8029694: 9b11 ldr r3, [sp, #68] @ 0x44 8029696: 3301 adds r3, #1 8029698: 9311 str r3, [sp, #68] @ 0x44 802969a: f8df b214 ldr.w fp, [pc, #532] @ 80298b0 <_strtod_l+0x578> 802969e: f04f 0a00 mov.w sl, #0 80296a2: e684 b.n 80293ae <_strtod_l+0x76> 80296a4: 487e ldr r0, [pc, #504] @ (80298a0 <_strtod_l+0x568>) 80296a6: f001 fb7b bl 802ada0 80296aa: ec5b ab10 vmov sl, fp, d0 80296ae: e67e b.n 80293ae <_strtod_l+0x76> 80296b0: ee07 9a90 vmov s15, r9 80296b4: 1be2 subs r2, r4, r7 80296b6: eeb8 7b67 vcvt.f64.u32 d7, s15 80296ba: 2d00 cmp r5, #0 80296bc: bf08 it eq 80296be: 461d moveq r5, r3 80296c0: 2b10 cmp r3, #16 80296c2: 9209 str r2, [sp, #36] @ 0x24 80296c4: 461a mov r2, r3 80296c6: bfa8 it ge 80296c8: 2210 movge r2, #16 80296ca: 2b09 cmp r3, #9 80296cc: ec5b ab17 vmov sl, fp, d7 80296d0: dc15 bgt.n 80296fe <_strtod_l+0x3c6> 80296d2: 1be1 subs r1, r4, r7 80296d4: 2900 cmp r1, #0 80296d6: f43f ae6a beq.w 80293ae <_strtod_l+0x76> 80296da: eba4 0107 sub.w r1, r4, r7 80296de: dd72 ble.n 80297c6 <_strtod_l+0x48e> 80296e0: 2916 cmp r1, #22 80296e2: dc59 bgt.n 8029798 <_strtod_l+0x460> 80296e4: 4b6f ldr r3, [pc, #444] @ (80298a4 <_strtod_l+0x56c>) 80296e6: 9a09 ldr r2, [sp, #36] @ 0x24 80296e8: eb03 03c2 add.w r3, r3, r2, lsl #3 80296ec: ed93 7b00 vldr d7, [r3] 80296f0: ec4b ab16 vmov d6, sl, fp 80296f4: ee27 7b06 vmul.f64 d7, d7, d6 80296f8: ec5b ab17 vmov sl, fp, d7 80296fc: e657 b.n 80293ae <_strtod_l+0x76> 80296fe: 4969 ldr r1, [pc, #420] @ (80298a4 <_strtod_l+0x56c>) 8029700: eb01 01c2 add.w r1, r1, r2, lsl #3 8029704: ed11 5b12 vldr d5, [r1, #-72] @ 0xffffffb8 8029708: ee06 6a90 vmov s13, r6 802970c: 2b0f cmp r3, #15 802970e: eeb8 6b66 vcvt.f64.u32 d6, s13 8029712: eea7 6b05 vfma.f64 d6, d7, d5 8029716: ec5b ab16 vmov sl, fp, d6 802971a: ddda ble.n 80296d2 <_strtod_l+0x39a> 802971c: 1a9a subs r2, r3, r2 802971e: 1be1 subs r1, r4, r7 8029720: 440a add r2, r1 8029722: 2a00 cmp r2, #0 8029724: f340 8094 ble.w 8029850 <_strtod_l+0x518> 8029728: f012 000f ands.w r0, r2, #15 802972c: d00a beq.n 8029744 <_strtod_l+0x40c> 802972e: 495d ldr r1, [pc, #372] @ (80298a4 <_strtod_l+0x56c>) 8029730: eb01 01c0 add.w r1, r1, r0, lsl #3 8029734: ed91 7b00 vldr d7, [r1] 8029738: ec4b ab16 vmov d6, sl, fp 802973c: ee27 7b06 vmul.f64 d7, d7, d6 8029740: ec5b ab17 vmov sl, fp, d7 8029744: f032 020f bics.w r2, r2, #15 8029748: d073 beq.n 8029832 <_strtod_l+0x4fa> 802974a: f5b2 7f9a cmp.w r2, #308 @ 0x134 802974e: dd47 ble.n 80297e0 <_strtod_l+0x4a8> 8029750: 2400 movs r4, #0 8029752: 4625 mov r5, r4 8029754: 9407 str r4, [sp, #28] 8029756: 4626 mov r6, r4 8029758: 9a05 ldr r2, [sp, #20] 802975a: f8df b154 ldr.w fp, [pc, #340] @ 80298b0 <_strtod_l+0x578> 802975e: 2322 movs r3, #34 @ 0x22 8029760: 6013 str r3, [r2, #0] 8029762: f04f 0a00 mov.w sl, #0 8029766: 9b07 ldr r3, [sp, #28] 8029768: 2b00 cmp r3, #0 802976a: f43f ae20 beq.w 80293ae <_strtod_l+0x76> 802976e: 9912 ldr r1, [sp, #72] @ 0x48 8029770: 9805 ldr r0, [sp, #20] 8029772: f002 fcf1 bl 802c158 <_Bfree> 8029776: 9805 ldr r0, [sp, #20] 8029778: 4631 mov r1, r6 802977a: f002 fced bl 802c158 <_Bfree> 802977e: 9805 ldr r0, [sp, #20] 8029780: 4629 mov r1, r5 8029782: f002 fce9 bl 802c158 <_Bfree> 8029786: 9907 ldr r1, [sp, #28] 8029788: 9805 ldr r0, [sp, #20] 802978a: f002 fce5 bl 802c158 <_Bfree> 802978e: 9805 ldr r0, [sp, #20] 8029790: 4621 mov r1, r4 8029792: f002 fce1 bl 802c158 <_Bfree> 8029796: e60a b.n 80293ae <_strtod_l+0x76> 8029798: f1c3 0125 rsb r1, r3, #37 @ 0x25 802979c: 1be0 subs r0, r4, r7 802979e: 4281 cmp r1, r0 80297a0: dbbc blt.n 802971c <_strtod_l+0x3e4> 80297a2: 4a40 ldr r2, [pc, #256] @ (80298a4 <_strtod_l+0x56c>) 80297a4: f1c3 030f rsb r3, r3, #15 80297a8: eb02 01c3 add.w r1, r2, r3, lsl #3 80297ac: ed91 7b00 vldr d7, [r1] 80297b0: 9909 ldr r1, [sp, #36] @ 0x24 80297b2: ec4b ab16 vmov d6, sl, fp 80297b6: 1acb subs r3, r1, r3 80297b8: eb02 02c3 add.w r2, r2, r3, lsl #3 80297bc: ee27 7b06 vmul.f64 d7, d7, d6 80297c0: ed92 6b00 vldr d6, [r2] 80297c4: e796 b.n 80296f4 <_strtod_l+0x3bc> 80297c6: 3116 adds r1, #22 80297c8: dba8 blt.n 802971c <_strtod_l+0x3e4> 80297ca: 4b36 ldr r3, [pc, #216] @ (80298a4 <_strtod_l+0x56c>) 80297cc: 1b3c subs r4, r7, r4 80297ce: eb03 04c4 add.w r4, r3, r4, lsl #3 80297d2: ed94 7b00 vldr d7, [r4] 80297d6: ec4b ab16 vmov d6, sl, fp 80297da: ee86 7b07 vdiv.f64 d7, d6, d7 80297de: e78b b.n 80296f8 <_strtod_l+0x3c0> 80297e0: 2000 movs r0, #0 80297e2: ec4b ab17 vmov d7, sl, fp 80297e6: 4e30 ldr r6, [pc, #192] @ (80298a8 <_strtod_l+0x570>) 80297e8: 1112 asrs r2, r2, #4 80297ea: 4601 mov r1, r0 80297ec: 2a01 cmp r2, #1 80297ee: dc23 bgt.n 8029838 <_strtod_l+0x500> 80297f0: b108 cbz r0, 80297f6 <_strtod_l+0x4be> 80297f2: ec5b ab17 vmov sl, fp, d7 80297f6: 4a2c ldr r2, [pc, #176] @ (80298a8 <_strtod_l+0x570>) 80297f8: 482c ldr r0, [pc, #176] @ (80298ac <_strtod_l+0x574>) 80297fa: eb02 02c1 add.w r2, r2, r1, lsl #3 80297fe: ed92 7b00 vldr d7, [r2] 8029802: f1ab 7b54 sub.w fp, fp, #55574528 @ 0x3500000 8029806: ec4b ab16 vmov d6, sl, fp 802980a: 4a29 ldr r2, [pc, #164] @ (80298b0 <_strtod_l+0x578>) 802980c: ee27 7b06 vmul.f64 d7, d7, d6 8029810: ee17 1a90 vmov r1, s15 8029814: 400a ands r2, r1 8029816: 4282 cmp r2, r0 8029818: ec5b ab17 vmov sl, fp, d7 802981c: d898 bhi.n 8029750 <_strtod_l+0x418> 802981e: f5a0 1080 sub.w r0, r0, #1048576 @ 0x100000 8029822: 4282 cmp r2, r0 8029824: bf86 itte hi 8029826: f8df b08c ldrhi.w fp, [pc, #140] @ 80298b4 <_strtod_l+0x57c> 802982a: f04f 3aff movhi.w sl, #4294967295 @ 0xffffffff 802982e: f101 7b54 addls.w fp, r1, #55574528 @ 0x3500000 8029832: 2200 movs r2, #0 8029834: 9206 str r2, [sp, #24] 8029836: e076 b.n 8029926 <_strtod_l+0x5ee> 8029838: f012 0f01 tst.w r2, #1 802983c: d004 beq.n 8029848 <_strtod_l+0x510> 802983e: ed96 6b00 vldr d6, [r6] 8029842: 2001 movs r0, #1 8029844: ee27 7b06 vmul.f64 d7, d7, d6 8029848: 3101 adds r1, #1 802984a: 1052 asrs r2, r2, #1 802984c: 3608 adds r6, #8 802984e: e7cd b.n 80297ec <_strtod_l+0x4b4> 8029850: d0ef beq.n 8029832 <_strtod_l+0x4fa> 8029852: 4252 negs r2, r2 8029854: f012 000f ands.w r0, r2, #15 8029858: d00a beq.n 8029870 <_strtod_l+0x538> 802985a: 4912 ldr r1, [pc, #72] @ (80298a4 <_strtod_l+0x56c>) 802985c: eb01 01c0 add.w r1, r1, r0, lsl #3 8029860: ed91 7b00 vldr d7, [r1] 8029864: ec4b ab16 vmov d6, sl, fp 8029868: ee86 7b07 vdiv.f64 d7, d6, d7 802986c: ec5b ab17 vmov sl, fp, d7 8029870: 1112 asrs r2, r2, #4 8029872: d0de beq.n 8029832 <_strtod_l+0x4fa> 8029874: 2a1f cmp r2, #31 8029876: dd1f ble.n 80298b8 <_strtod_l+0x580> 8029878: 2400 movs r4, #0 802987a: 4625 mov r5, r4 802987c: 9407 str r4, [sp, #28] 802987e: 4626 mov r6, r4 8029880: 9a05 ldr r2, [sp, #20] 8029882: 2322 movs r3, #34 @ 0x22 8029884: f04f 0a00 mov.w sl, #0 8029888: f04f 0b00 mov.w fp, #0 802988c: 6013 str r3, [r2, #0] 802988e: e76a b.n 8029766 <_strtod_l+0x42e> 8029890: 08031e5e .word 0x08031e5e 8029894: 08031d00 .word 0x08031d00 8029898: 08031e56 .word 0x08031e56 802989c: 08031ecc .word 0x08031ecc 80298a0: 08031ec8 .word 0x08031ec8 80298a4: 08032030 .word 0x08032030 80298a8: 08032008 .word 0x08032008 80298ac: 7ca00000 .word 0x7ca00000 80298b0: 7ff00000 .word 0x7ff00000 80298b4: 7fefffff .word 0x7fefffff 80298b8: f012 0110 ands.w r1, r2, #16 80298bc: bf18 it ne 80298be: 216a movne r1, #106 @ 0x6a 80298c0: 9106 str r1, [sp, #24] 80298c2: ec4b ab17 vmov d7, sl, fp 80298c6: 49b0 ldr r1, [pc, #704] @ (8029b88 <_strtod_l+0x850>) 80298c8: 2000 movs r0, #0 80298ca: 07d6 lsls r6, r2, #31 80298cc: d504 bpl.n 80298d8 <_strtod_l+0x5a0> 80298ce: ed91 6b00 vldr d6, [r1] 80298d2: 2001 movs r0, #1 80298d4: ee27 7b06 vmul.f64 d7, d7, d6 80298d8: 1052 asrs r2, r2, #1 80298da: f101 0108 add.w r1, r1, #8 80298de: d1f4 bne.n 80298ca <_strtod_l+0x592> 80298e0: b108 cbz r0, 80298e6 <_strtod_l+0x5ae> 80298e2: ec5b ab17 vmov sl, fp, d7 80298e6: 9a06 ldr r2, [sp, #24] 80298e8: b1b2 cbz r2, 8029918 <_strtod_l+0x5e0> 80298ea: f3cb 510a ubfx r1, fp, #20, #11 80298ee: f1c1 026b rsb r2, r1, #107 @ 0x6b 80298f2: 2a00 cmp r2, #0 80298f4: 4658 mov r0, fp 80298f6: dd0f ble.n 8029918 <_strtod_l+0x5e0> 80298f8: 2a1f cmp r2, #31 80298fa: dd55 ble.n 80299a8 <_strtod_l+0x670> 80298fc: 2a34 cmp r2, #52 @ 0x34 80298fe: bfde ittt le 8029900: f04f 32ff movle.w r2, #4294967295 @ 0xffffffff 8029904: f1c1 014b rsble r1, r1, #75 @ 0x4b 8029908: 408a lslle r2, r1 802990a: f04f 0a00 mov.w sl, #0 802990e: bfcc ite gt 8029910: f04f 7b5c movgt.w fp, #57671680 @ 0x3700000 8029914: ea02 0b00 andle.w fp, r2, r0 8029918: ec4b ab17 vmov d7, sl, fp 802991c: eeb5 7b40 vcmp.f64 d7, #0.0 8029920: eef1 fa10 vmrs APSR_nzcv, fpscr 8029924: d0a8 beq.n 8029878 <_strtod_l+0x540> 8029926: 990a ldr r1, [sp, #40] @ 0x28 8029928: 9805 ldr r0, [sp, #20] 802992a: f8cd 9000 str.w r9, [sp] 802992e: 462a mov r2, r5 8029930: f002 fc7a bl 802c228 <__s2b> 8029934: 9007 str r0, [sp, #28] 8029936: 2800 cmp r0, #0 8029938: f43f af0a beq.w 8029750 <_strtod_l+0x418> 802993c: 9b09 ldr r3, [sp, #36] @ 0x24 802993e: 1b3f subs r7, r7, r4 8029940: 2b00 cmp r3, #0 8029942: bfb4 ite lt 8029944: 463b movlt r3, r7 8029946: 2300 movge r3, #0 8029948: 930a str r3, [sp, #40] @ 0x28 802994a: 9b09 ldr r3, [sp, #36] @ 0x24 802994c: ed9f bb8a vldr d11, [pc, #552] @ 8029b78 <_strtod_l+0x840> 8029950: ea23 73e3 bic.w r3, r3, r3, asr #31 8029954: 2400 movs r4, #0 8029956: 930d str r3, [sp, #52] @ 0x34 8029958: 4625 mov r5, r4 802995a: 9b07 ldr r3, [sp, #28] 802995c: 9805 ldr r0, [sp, #20] 802995e: 6859 ldr r1, [r3, #4] 8029960: f002 fbba bl 802c0d8 <_Balloc> 8029964: 4606 mov r6, r0 8029966: 2800 cmp r0, #0 8029968: f43f aef6 beq.w 8029758 <_strtod_l+0x420> 802996c: 9b07 ldr r3, [sp, #28] 802996e: 691a ldr r2, [r3, #16] 8029970: ec4b ab19 vmov d9, sl, fp 8029974: 3202 adds r2, #2 8029976: f103 010c add.w r1, r3, #12 802997a: 0092 lsls r2, r2, #2 802997c: 300c adds r0, #12 802997e: f001 f9fe bl 802ad7e 8029982: eeb0 0b49 vmov.f64 d0, d9 8029986: 9805 ldr r0, [sp, #20] 8029988: aa14 add r2, sp, #80 @ 0x50 802998a: a913 add r1, sp, #76 @ 0x4c 802998c: f002 ff88 bl 802c8a0 <__d2b> 8029990: 9012 str r0, [sp, #72] @ 0x48 8029992: 2800 cmp r0, #0 8029994: f43f aee0 beq.w 8029758 <_strtod_l+0x420> 8029998: 9805 ldr r0, [sp, #20] 802999a: 2101 movs r1, #1 802999c: f002 fcda bl 802c354 <__i2b> 80299a0: 4605 mov r5, r0 80299a2: b940 cbnz r0, 80299b6 <_strtod_l+0x67e> 80299a4: 2500 movs r5, #0 80299a6: e6d7 b.n 8029758 <_strtod_l+0x420> 80299a8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80299ac: fa01 f202 lsl.w r2, r1, r2 80299b0: ea02 0a0a and.w sl, r2, sl 80299b4: e7b0 b.n 8029918 <_strtod_l+0x5e0> 80299b6: 9f13 ldr r7, [sp, #76] @ 0x4c 80299b8: 9a14 ldr r2, [sp, #80] @ 0x50 80299ba: 2f00 cmp r7, #0 80299bc: bfab itete ge 80299be: 9b0a ldrge r3, [sp, #40] @ 0x28 80299c0: 9b0d ldrlt r3, [sp, #52] @ 0x34 80299c2: f8dd 8034 ldrge.w r8, [sp, #52] @ 0x34 80299c6: f8dd 9028 ldrlt.w r9, [sp, #40] @ 0x28 80299ca: bfac ite ge 80299cc: eb07 0903 addge.w r9, r7, r3 80299d0: eba3 0807 sublt.w r8, r3, r7 80299d4: 9b06 ldr r3, [sp, #24] 80299d6: 1aff subs r7, r7, r3 80299d8: 4417 add r7, r2 80299da: f1c2 0336 rsb r3, r2, #54 @ 0x36 80299de: 4a6b ldr r2, [pc, #428] @ (8029b8c <_strtod_l+0x854>) 80299e0: 3f01 subs r7, #1 80299e2: 4297 cmp r7, r2 80299e4: da51 bge.n 8029a8a <_strtod_l+0x752> 80299e6: 1bd1 subs r1, r2, r7 80299e8: 291f cmp r1, #31 80299ea: eba3 0301 sub.w r3, r3, r1 80299ee: f04f 0201 mov.w r2, #1 80299f2: dc3e bgt.n 8029a72 <_strtod_l+0x73a> 80299f4: 408a lsls r2, r1 80299f6: 920c str r2, [sp, #48] @ 0x30 80299f8: 2200 movs r2, #0 80299fa: 920b str r2, [sp, #44] @ 0x2c 80299fc: eb09 0703 add.w r7, r9, r3 8029a00: 4498 add r8, r3 8029a02: 9b06 ldr r3, [sp, #24] 8029a04: 45b9 cmp r9, r7 8029a06: 4498 add r8, r3 8029a08: 464b mov r3, r9 8029a0a: bfa8 it ge 8029a0c: 463b movge r3, r7 8029a0e: 4543 cmp r3, r8 8029a10: bfa8 it ge 8029a12: 4643 movge r3, r8 8029a14: 2b00 cmp r3, #0 8029a16: bfc2 ittt gt 8029a18: 1aff subgt r7, r7, r3 8029a1a: eba8 0803 subgt.w r8, r8, r3 8029a1e: eba9 0903 subgt.w r9, r9, r3 8029a22: 9b0a ldr r3, [sp, #40] @ 0x28 8029a24: 2b00 cmp r3, #0 8029a26: dd16 ble.n 8029a56 <_strtod_l+0x71e> 8029a28: 4629 mov r1, r5 8029a2a: 9805 ldr r0, [sp, #20] 8029a2c: 461a mov r2, r3 8029a2e: f002 fd51 bl 802c4d4 <__pow5mult> 8029a32: 4605 mov r5, r0 8029a34: 2800 cmp r0, #0 8029a36: d0b5 beq.n 80299a4 <_strtod_l+0x66c> 8029a38: 4601 mov r1, r0 8029a3a: 9a12 ldr r2, [sp, #72] @ 0x48 8029a3c: 9805 ldr r0, [sp, #20] 8029a3e: f002 fc9f bl 802c380 <__multiply> 8029a42: 900f str r0, [sp, #60] @ 0x3c 8029a44: 2800 cmp r0, #0 8029a46: f43f ae87 beq.w 8029758 <_strtod_l+0x420> 8029a4a: 9912 ldr r1, [sp, #72] @ 0x48 8029a4c: 9805 ldr r0, [sp, #20] 8029a4e: f002 fb83 bl 802c158 <_Bfree> 8029a52: 9b0f ldr r3, [sp, #60] @ 0x3c 8029a54: 9312 str r3, [sp, #72] @ 0x48 8029a56: 2f00 cmp r7, #0 8029a58: dc1b bgt.n 8029a92 <_strtod_l+0x75a> 8029a5a: 9b09 ldr r3, [sp, #36] @ 0x24 8029a5c: 2b00 cmp r3, #0 8029a5e: dd21 ble.n 8029aa4 <_strtod_l+0x76c> 8029a60: 4631 mov r1, r6 8029a62: 9a0d ldr r2, [sp, #52] @ 0x34 8029a64: 9805 ldr r0, [sp, #20] 8029a66: f002 fd35 bl 802c4d4 <__pow5mult> 8029a6a: 4606 mov r6, r0 8029a6c: b9d0 cbnz r0, 8029aa4 <_strtod_l+0x76c> 8029a6e: 2600 movs r6, #0 8029a70: e672 b.n 8029758 <_strtod_l+0x420> 8029a72: f1c7 477f rsb r7, r7, #4278190080 @ 0xff000000 8029a76: f507 077f add.w r7, r7, #16711680 @ 0xff0000 8029a7a: f507 477b add.w r7, r7, #64256 @ 0xfb00 8029a7e: 37e2 adds r7, #226 @ 0xe2 8029a80: fa02 f107 lsl.w r1, r2, r7 8029a84: 910b str r1, [sp, #44] @ 0x2c 8029a86: 920c str r2, [sp, #48] @ 0x30 8029a88: e7b8 b.n 80299fc <_strtod_l+0x6c4> 8029a8a: 2200 movs r2, #0 8029a8c: 920b str r2, [sp, #44] @ 0x2c 8029a8e: 2201 movs r2, #1 8029a90: e7f9 b.n 8029a86 <_strtod_l+0x74e> 8029a92: 9912 ldr r1, [sp, #72] @ 0x48 8029a94: 9805 ldr r0, [sp, #20] 8029a96: 463a mov r2, r7 8029a98: f002 fd76 bl 802c588 <__lshift> 8029a9c: 9012 str r0, [sp, #72] @ 0x48 8029a9e: 2800 cmp r0, #0 8029aa0: d1db bne.n 8029a5a <_strtod_l+0x722> 8029aa2: e659 b.n 8029758 <_strtod_l+0x420> 8029aa4: f1b8 0f00 cmp.w r8, #0 8029aa8: dd07 ble.n 8029aba <_strtod_l+0x782> 8029aaa: 4631 mov r1, r6 8029aac: 9805 ldr r0, [sp, #20] 8029aae: 4642 mov r2, r8 8029ab0: f002 fd6a bl 802c588 <__lshift> 8029ab4: 4606 mov r6, r0 8029ab6: 2800 cmp r0, #0 8029ab8: d0d9 beq.n 8029a6e <_strtod_l+0x736> 8029aba: f1b9 0f00 cmp.w r9, #0 8029abe: dd08 ble.n 8029ad2 <_strtod_l+0x79a> 8029ac0: 4629 mov r1, r5 8029ac2: 9805 ldr r0, [sp, #20] 8029ac4: 464a mov r2, r9 8029ac6: f002 fd5f bl 802c588 <__lshift> 8029aca: 4605 mov r5, r0 8029acc: 2800 cmp r0, #0 8029ace: f43f ae43 beq.w 8029758 <_strtod_l+0x420> 8029ad2: 9912 ldr r1, [sp, #72] @ 0x48 8029ad4: 9805 ldr r0, [sp, #20] 8029ad6: 4632 mov r2, r6 8029ad8: f002 fdde bl 802c698 <__mdiff> 8029adc: 4604 mov r4, r0 8029ade: 2800 cmp r0, #0 8029ae0: f43f ae3a beq.w 8029758 <_strtod_l+0x420> 8029ae4: 2300 movs r3, #0 8029ae6: f8d0 800c ldr.w r8, [r0, #12] 8029aea: 60c3 str r3, [r0, #12] 8029aec: 4629 mov r1, r5 8029aee: f002 fdb7 bl 802c660 <__mcmp> 8029af2: 2800 cmp r0, #0 8029af4: da4e bge.n 8029b94 <_strtod_l+0x85c> 8029af6: ea58 080a orrs.w r8, r8, sl 8029afa: d174 bne.n 8029be6 <_strtod_l+0x8ae> 8029afc: f3cb 0313 ubfx r3, fp, #0, #20 8029b00: 2b00 cmp r3, #0 8029b02: d170 bne.n 8029be6 <_strtod_l+0x8ae> 8029b04: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029b08: 0d1b lsrs r3, r3, #20 8029b0a: 051b lsls r3, r3, #20 8029b0c: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8029b10: d969 bls.n 8029be6 <_strtod_l+0x8ae> 8029b12: 6963 ldr r3, [r4, #20] 8029b14: b913 cbnz r3, 8029b1c <_strtod_l+0x7e4> 8029b16: 6923 ldr r3, [r4, #16] 8029b18: 2b01 cmp r3, #1 8029b1a: dd64 ble.n 8029be6 <_strtod_l+0x8ae> 8029b1c: 4621 mov r1, r4 8029b1e: 2201 movs r2, #1 8029b20: 9805 ldr r0, [sp, #20] 8029b22: f002 fd31 bl 802c588 <__lshift> 8029b26: 4629 mov r1, r5 8029b28: 4604 mov r4, r0 8029b2a: f002 fd99 bl 802c660 <__mcmp> 8029b2e: 2800 cmp r0, #0 8029b30: dd59 ble.n 8029be6 <_strtod_l+0x8ae> 8029b32: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029b36: 9a06 ldr r2, [sp, #24] 8029b38: 0d1b lsrs r3, r3, #20 8029b3a: 051b lsls r3, r3, #20 8029b3c: 2a00 cmp r2, #0 8029b3e: d070 beq.n 8029c22 <_strtod_l+0x8ea> 8029b40: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8029b44: d86d bhi.n 8029c22 <_strtod_l+0x8ea> 8029b46: f1b3 7f5c cmp.w r3, #57671680 @ 0x3700000 8029b4a: f67f ae99 bls.w 8029880 <_strtod_l+0x548> 8029b4e: ed9f 7b0c vldr d7, [pc, #48] @ 8029b80 <_strtod_l+0x848> 8029b52: ec4b ab16 vmov d6, sl, fp 8029b56: 4b0e ldr r3, [pc, #56] @ (8029b90 <_strtod_l+0x858>) 8029b58: ee26 7b07 vmul.f64 d7, d6, d7 8029b5c: ee17 2a90 vmov r2, s15 8029b60: 4013 ands r3, r2 8029b62: ec5b ab17 vmov sl, fp, d7 8029b66: 2b00 cmp r3, #0 8029b68: f47f ae01 bne.w 802976e <_strtod_l+0x436> 8029b6c: 9a05 ldr r2, [sp, #20] 8029b6e: 2322 movs r3, #34 @ 0x22 8029b70: 6013 str r3, [r2, #0] 8029b72: e5fc b.n 802976e <_strtod_l+0x436> 8029b74: f3af 8000 nop.w 8029b78: ffc00000 .word 0xffc00000 8029b7c: 41dfffff .word 0x41dfffff 8029b80: 00000000 .word 0x00000000 8029b84: 39500000 .word 0x39500000 8029b88: 08031d28 .word 0x08031d28 8029b8c: fffffc02 .word 0xfffffc02 8029b90: 7ff00000 .word 0x7ff00000 8029b94: 46d9 mov r9, fp 8029b96: d15d bne.n 8029c54 <_strtod_l+0x91c> 8029b98: f3cb 0313 ubfx r3, fp, #0, #20 8029b9c: f1b8 0f00 cmp.w r8, #0 8029ba0: d02a beq.n 8029bf8 <_strtod_l+0x8c0> 8029ba2: 4aab ldr r2, [pc, #684] @ (8029e50 <_strtod_l+0xb18>) 8029ba4: 4293 cmp r3, r2 8029ba6: d12a bne.n 8029bfe <_strtod_l+0x8c6> 8029ba8: 9b06 ldr r3, [sp, #24] 8029baa: 4652 mov r2, sl 8029bac: b1fb cbz r3, 8029bee <_strtod_l+0x8b6> 8029bae: 4ba9 ldr r3, [pc, #676] @ (8029e54 <_strtod_l+0xb1c>) 8029bb0: ea0b 0303 and.w r3, fp, r3 8029bb4: f1b3 6fd4 cmp.w r3, #111149056 @ 0x6a00000 8029bb8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8029bbc: d81a bhi.n 8029bf4 <_strtod_l+0x8bc> 8029bbe: 0d1b lsrs r3, r3, #20 8029bc0: f1c3 036b rsb r3, r3, #107 @ 0x6b 8029bc4: fa01 f303 lsl.w r3, r1, r3 8029bc8: 429a cmp r2, r3 8029bca: d118 bne.n 8029bfe <_strtod_l+0x8c6> 8029bcc: 4ba2 ldr r3, [pc, #648] @ (8029e58 <_strtod_l+0xb20>) 8029bce: 4599 cmp r9, r3 8029bd0: d102 bne.n 8029bd8 <_strtod_l+0x8a0> 8029bd2: 3201 adds r2, #1 8029bd4: f43f adc0 beq.w 8029758 <_strtod_l+0x420> 8029bd8: 4b9e ldr r3, [pc, #632] @ (8029e54 <_strtod_l+0xb1c>) 8029bda: ea09 0303 and.w r3, r9, r3 8029bde: f503 1b80 add.w fp, r3, #1048576 @ 0x100000 8029be2: f04f 0a00 mov.w sl, #0 8029be6: 9b06 ldr r3, [sp, #24] 8029be8: 2b00 cmp r3, #0 8029bea: d1b0 bne.n 8029b4e <_strtod_l+0x816> 8029bec: e5bf b.n 802976e <_strtod_l+0x436> 8029bee: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8029bf2: e7e9 b.n 8029bc8 <_strtod_l+0x890> 8029bf4: 460b mov r3, r1 8029bf6: e7e7 b.n 8029bc8 <_strtod_l+0x890> 8029bf8: ea53 030a orrs.w r3, r3, sl 8029bfc: d099 beq.n 8029b32 <_strtod_l+0x7fa> 8029bfe: 9b0b ldr r3, [sp, #44] @ 0x2c 8029c00: b1c3 cbz r3, 8029c34 <_strtod_l+0x8fc> 8029c02: ea13 0f09 tst.w r3, r9 8029c06: d0ee beq.n 8029be6 <_strtod_l+0x8ae> 8029c08: 9a06 ldr r2, [sp, #24] 8029c0a: 4650 mov r0, sl 8029c0c: 4659 mov r1, fp 8029c0e: f1b8 0f00 cmp.w r8, #0 8029c12: d013 beq.n 8029c3c <_strtod_l+0x904> 8029c14: f7ff fb74 bl 8029300 8029c18: ee39 7b00 vadd.f64 d7, d9, d0 8029c1c: ec5b ab17 vmov sl, fp, d7 8029c20: e7e1 b.n 8029be6 <_strtod_l+0x8ae> 8029c22: f5a3 1380 sub.w r3, r3, #1048576 @ 0x100000 8029c26: ea6f 5b13 mvn.w fp, r3, lsr #20 8029c2a: ea6f 5b0b mvn.w fp, fp, lsl #20 8029c2e: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029c32: e7d8 b.n 8029be6 <_strtod_l+0x8ae> 8029c34: 9b0c ldr r3, [sp, #48] @ 0x30 8029c36: ea13 0f0a tst.w r3, sl 8029c3a: e7e4 b.n 8029c06 <_strtod_l+0x8ce> 8029c3c: f7ff fb60 bl 8029300 8029c40: ee39 0b40 vsub.f64 d0, d9, d0 8029c44: eeb5 0b40 vcmp.f64 d0, #0.0 8029c48: eef1 fa10 vmrs APSR_nzcv, fpscr 8029c4c: ec5b ab10 vmov sl, fp, d0 8029c50: d1c9 bne.n 8029be6 <_strtod_l+0x8ae> 8029c52: e615 b.n 8029880 <_strtod_l+0x548> 8029c54: 4629 mov r1, r5 8029c56: 4620 mov r0, r4 8029c58: f002 fe7a bl 802c950 <__ratio> 8029c5c: eeb0 7b00 vmov.f64 d7, #0 @ 0x40000000 2.0 8029c60: eeb4 0bc7 vcmpe.f64 d0, d7 8029c64: eef1 fa10 vmrs APSR_nzcv, fpscr 8029c68: d85d bhi.n 8029d26 <_strtod_l+0x9ee> 8029c6a: f1b8 0f00 cmp.w r8, #0 8029c6e: d164 bne.n 8029d3a <_strtod_l+0xa02> 8029c70: f1ba 0f00 cmp.w sl, #0 8029c74: d14b bne.n 8029d0e <_strtod_l+0x9d6> 8029c76: f3cb 0313 ubfx r3, fp, #0, #20 8029c7a: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8029c7e: 2b00 cmp r3, #0 8029c80: d160 bne.n 8029d44 <_strtod_l+0xa0c> 8029c82: eeb4 0bc8 vcmpe.f64 d0, d8 8029c86: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8029c8a: eef1 fa10 vmrs APSR_nzcv, fpscr 8029c8e: d401 bmi.n 8029c94 <_strtod_l+0x95c> 8029c90: ee20 8b08 vmul.f64 d8, d0, d8 8029c94: eeb1 ab48 vneg.f64 d10, d8 8029c98: 486e ldr r0, [pc, #440] @ (8029e54 <_strtod_l+0xb1c>) 8029c9a: 4970 ldr r1, [pc, #448] @ (8029e5c <_strtod_l+0xb24>) 8029c9c: ea09 0700 and.w r7, r9, r0 8029ca0: 428f cmp r7, r1 8029ca2: ec53 2b1a vmov r2, r3, d10 8029ca6: d17d bne.n 8029da4 <_strtod_l+0xa6c> 8029ca8: f1a9 7b54 sub.w fp, r9, #55574528 @ 0x3500000 8029cac: ec4b ab1c vmov d12, sl, fp 8029cb0: eeb0 0b4c vmov.f64 d0, d12 8029cb4: f002 fd84 bl 802c7c0 <__ulp> 8029cb8: 4866 ldr r0, [pc, #408] @ (8029e54 <_strtod_l+0xb1c>) 8029cba: eea0 cb0a vfma.f64 d12, d0, d10 8029cbe: ee1c 3a90 vmov r3, s25 8029cc2: 4a67 ldr r2, [pc, #412] @ (8029e60 <_strtod_l+0xb28>) 8029cc4: ea03 0100 and.w r1, r3, r0 8029cc8: 4291 cmp r1, r2 8029cca: ec5b ab1c vmov sl, fp, d12 8029cce: d93c bls.n 8029d4a <_strtod_l+0xa12> 8029cd0: ee19 2a90 vmov r2, s19 8029cd4: 4b60 ldr r3, [pc, #384] @ (8029e58 <_strtod_l+0xb20>) 8029cd6: 429a cmp r2, r3 8029cd8: d104 bne.n 8029ce4 <_strtod_l+0x9ac> 8029cda: ee19 3a10 vmov r3, s18 8029cde: 3301 adds r3, #1 8029ce0: f43f ad3a beq.w 8029758 <_strtod_l+0x420> 8029ce4: f8df b170 ldr.w fp, [pc, #368] @ 8029e58 <_strtod_l+0xb20> 8029ce8: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029cec: 9912 ldr r1, [sp, #72] @ 0x48 8029cee: 9805 ldr r0, [sp, #20] 8029cf0: f002 fa32 bl 802c158 <_Bfree> 8029cf4: 9805 ldr r0, [sp, #20] 8029cf6: 4631 mov r1, r6 8029cf8: f002 fa2e bl 802c158 <_Bfree> 8029cfc: 9805 ldr r0, [sp, #20] 8029cfe: 4629 mov r1, r5 8029d00: f002 fa2a bl 802c158 <_Bfree> 8029d04: 9805 ldr r0, [sp, #20] 8029d06: 4621 mov r1, r4 8029d08: f002 fa26 bl 802c158 <_Bfree> 8029d0c: e625 b.n 802995a <_strtod_l+0x622> 8029d0e: f1ba 0f01 cmp.w sl, #1 8029d12: d103 bne.n 8029d1c <_strtod_l+0x9e4> 8029d14: f1bb 0f00 cmp.w fp, #0 8029d18: f43f adb2 beq.w 8029880 <_strtod_l+0x548> 8029d1c: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8029d20: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8029d24: e7b8 b.n 8029c98 <_strtod_l+0x960> 8029d26: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8029d2a: ee20 8b08 vmul.f64 d8, d0, d8 8029d2e: f1b8 0f00 cmp.w r8, #0 8029d32: d0af beq.n 8029c94 <_strtod_l+0x95c> 8029d34: eeb0 ab48 vmov.f64 d10, d8 8029d38: e7ae b.n 8029c98 <_strtod_l+0x960> 8029d3a: eeb7 ab00 vmov.f64 d10, #112 @ 0x3f800000 1.0 8029d3e: eeb0 8b4a vmov.f64 d8, d10 8029d42: e7a9 b.n 8029c98 <_strtod_l+0x960> 8029d44: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8029d48: e7a6 b.n 8029c98 <_strtod_l+0x960> 8029d4a: f103 7b54 add.w fp, r3, #55574528 @ 0x3500000 8029d4e: 9b06 ldr r3, [sp, #24] 8029d50: 46d9 mov r9, fp 8029d52: 2b00 cmp r3, #0 8029d54: d1ca bne.n 8029cec <_strtod_l+0x9b4> 8029d56: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029d5a: 0d1b lsrs r3, r3, #20 8029d5c: 051b lsls r3, r3, #20 8029d5e: 429f cmp r7, r3 8029d60: d1c4 bne.n 8029cec <_strtod_l+0x9b4> 8029d62: ec51 0b18 vmov r0, r1, d8 8029d66: f7d6 fcf7 bl 8000758 <__aeabi_d2lz> 8029d6a: f7d6 fcaf bl 80006cc <__aeabi_l2d> 8029d6e: f3cb 0913 ubfx r9, fp, #0, #20 8029d72: ec41 0b17 vmov d7, r0, r1 8029d76: ea49 090a orr.w r9, r9, sl 8029d7a: ea59 0908 orrs.w r9, r9, r8 8029d7e: ee38 8b47 vsub.f64 d8, d8, d7 8029d82: d03c beq.n 8029dfe <_strtod_l+0xac6> 8029d84: ed9f 7b2c vldr d7, [pc, #176] @ 8029e38 <_strtod_l+0xb00> 8029d88: eeb4 8bc7 vcmpe.f64 d8, d7 8029d8c: eef1 fa10 vmrs APSR_nzcv, fpscr 8029d90: f53f aced bmi.w 802976e <_strtod_l+0x436> 8029d94: ed9f 7b2a vldr d7, [pc, #168] @ 8029e40 <_strtod_l+0xb08> 8029d98: eeb4 8bc7 vcmpe.f64 d8, d7 8029d9c: eef1 fa10 vmrs APSR_nzcv, fpscr 8029da0: dda4 ble.n 8029cec <_strtod_l+0x9b4> 8029da2: e4e4 b.n 802976e <_strtod_l+0x436> 8029da4: 9906 ldr r1, [sp, #24] 8029da6: b1e1 cbz r1, 8029de2 <_strtod_l+0xaaa> 8029da8: f1b7 6fd4 cmp.w r7, #111149056 @ 0x6a00000 8029dac: d819 bhi.n 8029de2 <_strtod_l+0xaaa> 8029dae: eeb4 8bcb vcmpe.f64 d8, d11 8029db2: eef1 fa10 vmrs APSR_nzcv, fpscr 8029db6: d811 bhi.n 8029ddc <_strtod_l+0xaa4> 8029db8: eebc 8bc8 vcvt.u32.f64 s16, d8 8029dbc: ee18 3a10 vmov r3, s16 8029dc0: 2b01 cmp r3, #1 8029dc2: bf38 it cc 8029dc4: 2301 movcc r3, #1 8029dc6: ee08 3a10 vmov s16, r3 8029dca: eeb8 8b48 vcvt.f64.u32 d8, s16 8029dce: f1b8 0f00 cmp.w r8, #0 8029dd2: d111 bne.n 8029df8 <_strtod_l+0xac0> 8029dd4: eeb1 7b48 vneg.f64 d7, d8 8029dd8: ec53 2b17 vmov r2, r3, d7 8029ddc: f103 61d6 add.w r1, r3, #112197632 @ 0x6b00000 8029de0: 1bcb subs r3, r1, r7 8029de2: eeb0 0b49 vmov.f64 d0, d9 8029de6: ec43 2b1a vmov d10, r2, r3 8029dea: f002 fce9 bl 802c7c0 <__ulp> 8029dee: eeaa 9b00 vfma.f64 d9, d10, d0 8029df2: ec5b ab19 vmov sl, fp, d9 8029df6: e7aa b.n 8029d4e <_strtod_l+0xa16> 8029df8: eeb0 7b48 vmov.f64 d7, d8 8029dfc: e7ec b.n 8029dd8 <_strtod_l+0xaa0> 8029dfe: ed9f 7b12 vldr d7, [pc, #72] @ 8029e48 <_strtod_l+0xb10> 8029e02: eeb4 8bc7 vcmpe.f64 d8, d7 8029e06: eef1 fa10 vmrs APSR_nzcv, fpscr 8029e0a: f57f af6f bpl.w 8029cec <_strtod_l+0x9b4> 8029e0e: e4ae b.n 802976e <_strtod_l+0x436> 8029e10: 2300 movs r3, #0 8029e12: 9308 str r3, [sp, #32] 8029e14: 9a0e ldr r2, [sp, #56] @ 0x38 8029e16: 9b11 ldr r3, [sp, #68] @ 0x44 8029e18: 6013 str r3, [r2, #0] 8029e1a: f7ff bacc b.w 80293b6 <_strtod_l+0x7e> 8029e1e: 2a65 cmp r2, #101 @ 0x65 8029e20: f43f abbc beq.w 802959c <_strtod_l+0x264> 8029e24: 2a45 cmp r2, #69 @ 0x45 8029e26: f43f abb9 beq.w 802959c <_strtod_l+0x264> 8029e2a: 2301 movs r3, #1 8029e2c: 9306 str r3, [sp, #24] 8029e2e: f7ff bbf0 b.w 8029612 <_strtod_l+0x2da> 8029e32: bf00 nop 8029e34: f3af 8000 nop.w 8029e38: 94a03595 .word 0x94a03595 8029e3c: 3fdfffff .word 0x3fdfffff 8029e40: 35afe535 .word 0x35afe535 8029e44: 3fe00000 .word 0x3fe00000 8029e48: 94a03595 .word 0x94a03595 8029e4c: 3fcfffff .word 0x3fcfffff 8029e50: 000fffff .word 0x000fffff 8029e54: 7ff00000 .word 0x7ff00000 8029e58: 7fefffff .word 0x7fefffff 8029e5c: 7fe00000 .word 0x7fe00000 8029e60: 7c9fffff .word 0x7c9fffff 08029e64 : 8029e64: 460a mov r2, r1 8029e66: 4601 mov r1, r0 8029e68: 4802 ldr r0, [pc, #8] @ (8029e74 ) 8029e6a: 4b03 ldr r3, [pc, #12] @ (8029e78 ) 8029e6c: 6800 ldr r0, [r0, #0] 8029e6e: f7ff ba63 b.w 8029338 <_strtod_l> 8029e72: bf00 nop 8029e74: 240001d4 .word 0x240001d4 8029e78: 24000068 .word 0x24000068 08029e7c <__cvt>: 8029e7c: b5f0 push {r4, r5, r6, r7, lr} 8029e7e: ed2d 8b02 vpush {d8} 8029e82: eeb0 8b40 vmov.f64 d8, d0 8029e86: b085 sub sp, #20 8029e88: 4617 mov r7, r2 8029e8a: 9d0d ldr r5, [sp, #52] @ 0x34 8029e8c: 9e0c ldr r6, [sp, #48] @ 0x30 8029e8e: ee18 2a90 vmov r2, s17 8029e92: f025 0520 bic.w r5, r5, #32 8029e96: 2a00 cmp r2, #0 8029e98: bfb6 itet lt 8029e9a: 222d movlt r2, #45 @ 0x2d 8029e9c: 2200 movge r2, #0 8029e9e: eeb1 8b40 vneglt.f64 d8, d0 8029ea2: 2d46 cmp r5, #70 @ 0x46 8029ea4: 460c mov r4, r1 8029ea6: 701a strb r2, [r3, #0] 8029ea8: d004 beq.n 8029eb4 <__cvt+0x38> 8029eaa: 2d45 cmp r5, #69 @ 0x45 8029eac: d100 bne.n 8029eb0 <__cvt+0x34> 8029eae: 3401 adds r4, #1 8029eb0: 2102 movs r1, #2 8029eb2: e000 b.n 8029eb6 <__cvt+0x3a> 8029eb4: 2103 movs r1, #3 8029eb6: ab03 add r3, sp, #12 8029eb8: 9301 str r3, [sp, #4] 8029eba: ab02 add r3, sp, #8 8029ebc: 9300 str r3, [sp, #0] 8029ebe: 4622 mov r2, r4 8029ec0: 4633 mov r3, r6 8029ec2: eeb0 0b48 vmov.f64 d0, d8 8029ec6: f001 f81b bl 802af00 <_dtoa_r> 8029eca: 2d47 cmp r5, #71 @ 0x47 8029ecc: d114 bne.n 8029ef8 <__cvt+0x7c> 8029ece: 07fb lsls r3, r7, #31 8029ed0: d50a bpl.n 8029ee8 <__cvt+0x6c> 8029ed2: 1902 adds r2, r0, r4 8029ed4: eeb5 8b40 vcmp.f64 d8, #0.0 8029ed8: eef1 fa10 vmrs APSR_nzcv, fpscr 8029edc: bf08 it eq 8029ede: 9203 streq r2, [sp, #12] 8029ee0: 2130 movs r1, #48 @ 0x30 8029ee2: 9b03 ldr r3, [sp, #12] 8029ee4: 4293 cmp r3, r2 8029ee6: d319 bcc.n 8029f1c <__cvt+0xa0> 8029ee8: 9b03 ldr r3, [sp, #12] 8029eea: 9a0e ldr r2, [sp, #56] @ 0x38 8029eec: 1a1b subs r3, r3, r0 8029eee: 6013 str r3, [r2, #0] 8029ef0: b005 add sp, #20 8029ef2: ecbd 8b02 vpop {d8} 8029ef6: bdf0 pop {r4, r5, r6, r7, pc} 8029ef8: 2d46 cmp r5, #70 @ 0x46 8029efa: eb00 0204 add.w r2, r0, r4 8029efe: d1e9 bne.n 8029ed4 <__cvt+0x58> 8029f00: 7803 ldrb r3, [r0, #0] 8029f02: 2b30 cmp r3, #48 @ 0x30 8029f04: d107 bne.n 8029f16 <__cvt+0x9a> 8029f06: eeb5 8b40 vcmp.f64 d8, #0.0 8029f0a: eef1 fa10 vmrs APSR_nzcv, fpscr 8029f0e: bf1c itt ne 8029f10: f1c4 0401 rsbne r4, r4, #1 8029f14: 6034 strne r4, [r6, #0] 8029f16: 6833 ldr r3, [r6, #0] 8029f18: 441a add r2, r3 8029f1a: e7db b.n 8029ed4 <__cvt+0x58> 8029f1c: 1c5c adds r4, r3, #1 8029f1e: 9403 str r4, [sp, #12] 8029f20: 7019 strb r1, [r3, #0] 8029f22: e7de b.n 8029ee2 <__cvt+0x66> 08029f24 <__exponent>: 8029f24: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8029f26: 2900 cmp r1, #0 8029f28: bfba itte lt 8029f2a: 4249 neglt r1, r1 8029f2c: 232d movlt r3, #45 @ 0x2d 8029f2e: 232b movge r3, #43 @ 0x2b 8029f30: 2909 cmp r1, #9 8029f32: 7002 strb r2, [r0, #0] 8029f34: 7043 strb r3, [r0, #1] 8029f36: dd29 ble.n 8029f8c <__exponent+0x68> 8029f38: f10d 0307 add.w r3, sp, #7 8029f3c: 461d mov r5, r3 8029f3e: 270a movs r7, #10 8029f40: 461a mov r2, r3 8029f42: fbb1 f6f7 udiv r6, r1, r7 8029f46: fb07 1416 mls r4, r7, r6, r1 8029f4a: 3430 adds r4, #48 @ 0x30 8029f4c: f802 4c01 strb.w r4, [r2, #-1] 8029f50: 460c mov r4, r1 8029f52: 2c63 cmp r4, #99 @ 0x63 8029f54: f103 33ff add.w r3, r3, #4294967295 @ 0xffffffff 8029f58: 4631 mov r1, r6 8029f5a: dcf1 bgt.n 8029f40 <__exponent+0x1c> 8029f5c: 3130 adds r1, #48 @ 0x30 8029f5e: 1e94 subs r4, r2, #2 8029f60: f803 1c01 strb.w r1, [r3, #-1] 8029f64: 1c41 adds r1, r0, #1 8029f66: 4623 mov r3, r4 8029f68: 42ab cmp r3, r5 8029f6a: d30a bcc.n 8029f82 <__exponent+0x5e> 8029f6c: f10d 0309 add.w r3, sp, #9 8029f70: 1a9b subs r3, r3, r2 8029f72: 42ac cmp r4, r5 8029f74: bf88 it hi 8029f76: 2300 movhi r3, #0 8029f78: 3302 adds r3, #2 8029f7a: 4403 add r3, r0 8029f7c: 1a18 subs r0, r3, r0 8029f7e: b003 add sp, #12 8029f80: bdf0 pop {r4, r5, r6, r7, pc} 8029f82: f813 6b01 ldrb.w r6, [r3], #1 8029f86: f801 6f01 strb.w r6, [r1, #1]! 8029f8a: e7ed b.n 8029f68 <__exponent+0x44> 8029f8c: 2330 movs r3, #48 @ 0x30 8029f8e: 3130 adds r1, #48 @ 0x30 8029f90: 7083 strb r3, [r0, #2] 8029f92: 70c1 strb r1, [r0, #3] 8029f94: 1d03 adds r3, r0, #4 8029f96: e7f1 b.n 8029f7c <__exponent+0x58> 08029f98 <_printf_float>: 8029f98: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029f9c: b08d sub sp, #52 @ 0x34 8029f9e: 460c mov r4, r1 8029fa0: f8dd 8058 ldr.w r8, [sp, #88] @ 0x58 8029fa4: 4616 mov r6, r2 8029fa6: 461f mov r7, r3 8029fa8: 4605 mov r5, r0 8029faa: f000 fe0b bl 802abc4 <_localeconv_r> 8029fae: f8d0 b000 ldr.w fp, [r0] 8029fb2: 4658 mov r0, fp 8029fb4: f7d6 f9f4 bl 80003a0 8029fb8: 2300 movs r3, #0 8029fba: 930a str r3, [sp, #40] @ 0x28 8029fbc: f8d8 3000 ldr.w r3, [r8] 8029fc0: f894 9018 ldrb.w r9, [r4, #24] 8029fc4: 6822 ldr r2, [r4, #0] 8029fc6: 9005 str r0, [sp, #20] 8029fc8: 3307 adds r3, #7 8029fca: f023 0307 bic.w r3, r3, #7 8029fce: f103 0108 add.w r1, r3, #8 8029fd2: f8c8 1000 str.w r1, [r8] 8029fd6: ed93 0b00 vldr d0, [r3] 8029fda: ed9f 6b97 vldr d6, [pc, #604] @ 802a238 <_printf_float+0x2a0> 8029fde: eeb0 7bc0 vabs.f64 d7, d0 8029fe2: eeb4 7b46 vcmp.f64 d7, d6 8029fe6: eef1 fa10 vmrs APSR_nzcv, fpscr 8029fea: ed84 0b12 vstr d0, [r4, #72] @ 0x48 8029fee: dd24 ble.n 802a03a <_printf_float+0xa2> 8029ff0: eeb5 0bc0 vcmpe.f64 d0, #0.0 8029ff4: eef1 fa10 vmrs APSR_nzcv, fpscr 8029ff8: d502 bpl.n 802a000 <_printf_float+0x68> 8029ffa: 232d movs r3, #45 @ 0x2d 8029ffc: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a000: 498f ldr r1, [pc, #572] @ (802a240 <_printf_float+0x2a8>) 802a002: 4b90 ldr r3, [pc, #576] @ (802a244 <_printf_float+0x2ac>) 802a004: f1b9 0f47 cmp.w r9, #71 @ 0x47 802a008: bf94 ite ls 802a00a: 4688 movls r8, r1 802a00c: 4698 movhi r8, r3 802a00e: f022 0204 bic.w r2, r2, #4 802a012: 2303 movs r3, #3 802a014: 6123 str r3, [r4, #16] 802a016: 6022 str r2, [r4, #0] 802a018: f04f 0a00 mov.w sl, #0 802a01c: 9700 str r7, [sp, #0] 802a01e: 4633 mov r3, r6 802a020: aa0b add r2, sp, #44 @ 0x2c 802a022: 4621 mov r1, r4 802a024: 4628 mov r0, r5 802a026: f000 f9d1 bl 802a3cc <_printf_common> 802a02a: 3001 adds r0, #1 802a02c: f040 8089 bne.w 802a142 <_printf_float+0x1aa> 802a030: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a034: b00d add sp, #52 @ 0x34 802a036: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802a03a: eeb4 0b40 vcmp.f64 d0, d0 802a03e: eef1 fa10 vmrs APSR_nzcv, fpscr 802a042: d709 bvc.n 802a058 <_printf_float+0xc0> 802a044: ee10 3a90 vmov r3, s1 802a048: 2b00 cmp r3, #0 802a04a: bfbc itt lt 802a04c: 232d movlt r3, #45 @ 0x2d 802a04e: f884 3043 strblt.w r3, [r4, #67] @ 0x43 802a052: 497d ldr r1, [pc, #500] @ (802a248 <_printf_float+0x2b0>) 802a054: 4b7d ldr r3, [pc, #500] @ (802a24c <_printf_float+0x2b4>) 802a056: e7d5 b.n 802a004 <_printf_float+0x6c> 802a058: 6863 ldr r3, [r4, #4] 802a05a: 1c59 adds r1, r3, #1 802a05c: f009 0adf and.w sl, r9, #223 @ 0xdf 802a060: d139 bne.n 802a0d6 <_printf_float+0x13e> 802a062: 2306 movs r3, #6 802a064: 6063 str r3, [r4, #4] 802a066: f442 6280 orr.w r2, r2, #1024 @ 0x400 802a06a: 2300 movs r3, #0 802a06c: 6022 str r2, [r4, #0] 802a06e: 9303 str r3, [sp, #12] 802a070: ab0a add r3, sp, #40 @ 0x28 802a072: e9cd 9301 strd r9, r3, [sp, #4] 802a076: ab09 add r3, sp, #36 @ 0x24 802a078: 9300 str r3, [sp, #0] 802a07a: 6861 ldr r1, [r4, #4] 802a07c: f10d 0323 add.w r3, sp, #35 @ 0x23 802a080: 4628 mov r0, r5 802a082: f7ff fefb bl 8029e7c <__cvt> 802a086: f1ba 0f47 cmp.w sl, #71 @ 0x47 802a08a: 9909 ldr r1, [sp, #36] @ 0x24 802a08c: 4680 mov r8, r0 802a08e: d129 bne.n 802a0e4 <_printf_float+0x14c> 802a090: 1cc8 adds r0, r1, #3 802a092: db02 blt.n 802a09a <_printf_float+0x102> 802a094: 6863 ldr r3, [r4, #4] 802a096: 4299 cmp r1, r3 802a098: dd41 ble.n 802a11e <_printf_float+0x186> 802a09a: f1a9 0902 sub.w r9, r9, #2 802a09e: fa5f f989 uxtb.w r9, r9 802a0a2: 3901 subs r1, #1 802a0a4: 464a mov r2, r9 802a0a6: f104 0050 add.w r0, r4, #80 @ 0x50 802a0aa: 9109 str r1, [sp, #36] @ 0x24 802a0ac: f7ff ff3a bl 8029f24 <__exponent> 802a0b0: 9a0a ldr r2, [sp, #40] @ 0x28 802a0b2: 1813 adds r3, r2, r0 802a0b4: 2a01 cmp r2, #1 802a0b6: 4682 mov sl, r0 802a0b8: 6123 str r3, [r4, #16] 802a0ba: dc02 bgt.n 802a0c2 <_printf_float+0x12a> 802a0bc: 6822 ldr r2, [r4, #0] 802a0be: 07d2 lsls r2, r2, #31 802a0c0: d501 bpl.n 802a0c6 <_printf_float+0x12e> 802a0c2: 3301 adds r3, #1 802a0c4: 6123 str r3, [r4, #16] 802a0c6: f89d 3023 ldrb.w r3, [sp, #35] @ 0x23 802a0ca: 2b00 cmp r3, #0 802a0cc: d0a6 beq.n 802a01c <_printf_float+0x84> 802a0ce: 232d movs r3, #45 @ 0x2d 802a0d0: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a0d4: e7a2 b.n 802a01c <_printf_float+0x84> 802a0d6: f1ba 0f47 cmp.w sl, #71 @ 0x47 802a0da: d1c4 bne.n 802a066 <_printf_float+0xce> 802a0dc: 2b00 cmp r3, #0 802a0de: d1c2 bne.n 802a066 <_printf_float+0xce> 802a0e0: 2301 movs r3, #1 802a0e2: e7bf b.n 802a064 <_printf_float+0xcc> 802a0e4: f1b9 0f65 cmp.w r9, #101 @ 0x65 802a0e8: d9db bls.n 802a0a2 <_printf_float+0x10a> 802a0ea: f1b9 0f66 cmp.w r9, #102 @ 0x66 802a0ee: d118 bne.n 802a122 <_printf_float+0x18a> 802a0f0: 2900 cmp r1, #0 802a0f2: 6863 ldr r3, [r4, #4] 802a0f4: dd0b ble.n 802a10e <_printf_float+0x176> 802a0f6: 6121 str r1, [r4, #16] 802a0f8: b913 cbnz r3, 802a100 <_printf_float+0x168> 802a0fa: 6822 ldr r2, [r4, #0] 802a0fc: 07d0 lsls r0, r2, #31 802a0fe: d502 bpl.n 802a106 <_printf_float+0x16e> 802a100: 3301 adds r3, #1 802a102: 440b add r3, r1 802a104: 6123 str r3, [r4, #16] 802a106: 65a1 str r1, [r4, #88] @ 0x58 802a108: f04f 0a00 mov.w sl, #0 802a10c: e7db b.n 802a0c6 <_printf_float+0x12e> 802a10e: b913 cbnz r3, 802a116 <_printf_float+0x17e> 802a110: 6822 ldr r2, [r4, #0] 802a112: 07d2 lsls r2, r2, #31 802a114: d501 bpl.n 802a11a <_printf_float+0x182> 802a116: 3302 adds r3, #2 802a118: e7f4 b.n 802a104 <_printf_float+0x16c> 802a11a: 2301 movs r3, #1 802a11c: e7f2 b.n 802a104 <_printf_float+0x16c> 802a11e: f04f 0967 mov.w r9, #103 @ 0x67 802a122: 9b0a ldr r3, [sp, #40] @ 0x28 802a124: 4299 cmp r1, r3 802a126: db05 blt.n 802a134 <_printf_float+0x19c> 802a128: 6823 ldr r3, [r4, #0] 802a12a: 6121 str r1, [r4, #16] 802a12c: 07d8 lsls r0, r3, #31 802a12e: d5ea bpl.n 802a106 <_printf_float+0x16e> 802a130: 1c4b adds r3, r1, #1 802a132: e7e7 b.n 802a104 <_printf_float+0x16c> 802a134: 2900 cmp r1, #0 802a136: bfd4 ite le 802a138: f1c1 0202 rsble r2, r1, #2 802a13c: 2201 movgt r2, #1 802a13e: 4413 add r3, r2 802a140: e7e0 b.n 802a104 <_printf_float+0x16c> 802a142: 6823 ldr r3, [r4, #0] 802a144: 055a lsls r2, r3, #21 802a146: d407 bmi.n 802a158 <_printf_float+0x1c0> 802a148: 6923 ldr r3, [r4, #16] 802a14a: 4642 mov r2, r8 802a14c: 4631 mov r1, r6 802a14e: 4628 mov r0, r5 802a150: 47b8 blx r7 802a152: 3001 adds r0, #1 802a154: d12a bne.n 802a1ac <_printf_float+0x214> 802a156: e76b b.n 802a030 <_printf_float+0x98> 802a158: f1b9 0f65 cmp.w r9, #101 @ 0x65 802a15c: f240 80e0 bls.w 802a320 <_printf_float+0x388> 802a160: ed94 7b12 vldr d7, [r4, #72] @ 0x48 802a164: eeb5 7b40 vcmp.f64 d7, #0.0 802a168: eef1 fa10 vmrs APSR_nzcv, fpscr 802a16c: d133 bne.n 802a1d6 <_printf_float+0x23e> 802a16e: 4a38 ldr r2, [pc, #224] @ (802a250 <_printf_float+0x2b8>) 802a170: 2301 movs r3, #1 802a172: 4631 mov r1, r6 802a174: 4628 mov r0, r5 802a176: 47b8 blx r7 802a178: 3001 adds r0, #1 802a17a: f43f af59 beq.w 802a030 <_printf_float+0x98> 802a17e: e9dd 3809 ldrd r3, r8, [sp, #36] @ 0x24 802a182: 4543 cmp r3, r8 802a184: db02 blt.n 802a18c <_printf_float+0x1f4> 802a186: 6823 ldr r3, [r4, #0] 802a188: 07d8 lsls r0, r3, #31 802a18a: d50f bpl.n 802a1ac <_printf_float+0x214> 802a18c: 9b05 ldr r3, [sp, #20] 802a18e: 465a mov r2, fp 802a190: 4631 mov r1, r6 802a192: 4628 mov r0, r5 802a194: 47b8 blx r7 802a196: 3001 adds r0, #1 802a198: f43f af4a beq.w 802a030 <_printf_float+0x98> 802a19c: f04f 0900 mov.w r9, #0 802a1a0: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 802a1a4: f104 0a1a add.w sl, r4, #26 802a1a8: 45c8 cmp r8, r9 802a1aa: dc09 bgt.n 802a1c0 <_printf_float+0x228> 802a1ac: 6823 ldr r3, [r4, #0] 802a1ae: 079b lsls r3, r3, #30 802a1b0: f100 8107 bmi.w 802a3c2 <_printf_float+0x42a> 802a1b4: 68e0 ldr r0, [r4, #12] 802a1b6: 9b0b ldr r3, [sp, #44] @ 0x2c 802a1b8: 4298 cmp r0, r3 802a1ba: bfb8 it lt 802a1bc: 4618 movlt r0, r3 802a1be: e739 b.n 802a034 <_printf_float+0x9c> 802a1c0: 2301 movs r3, #1 802a1c2: 4652 mov r2, sl 802a1c4: 4631 mov r1, r6 802a1c6: 4628 mov r0, r5 802a1c8: 47b8 blx r7 802a1ca: 3001 adds r0, #1 802a1cc: f43f af30 beq.w 802a030 <_printf_float+0x98> 802a1d0: f109 0901 add.w r9, r9, #1 802a1d4: e7e8 b.n 802a1a8 <_printf_float+0x210> 802a1d6: 9b09 ldr r3, [sp, #36] @ 0x24 802a1d8: 2b00 cmp r3, #0 802a1da: dc3b bgt.n 802a254 <_printf_float+0x2bc> 802a1dc: 4a1c ldr r2, [pc, #112] @ (802a250 <_printf_float+0x2b8>) 802a1de: 2301 movs r3, #1 802a1e0: 4631 mov r1, r6 802a1e2: 4628 mov r0, r5 802a1e4: 47b8 blx r7 802a1e6: 3001 adds r0, #1 802a1e8: f43f af22 beq.w 802a030 <_printf_float+0x98> 802a1ec: e9dd 3909 ldrd r3, r9, [sp, #36] @ 0x24 802a1f0: ea59 0303 orrs.w r3, r9, r3 802a1f4: d102 bne.n 802a1fc <_printf_float+0x264> 802a1f6: 6823 ldr r3, [r4, #0] 802a1f8: 07d9 lsls r1, r3, #31 802a1fa: d5d7 bpl.n 802a1ac <_printf_float+0x214> 802a1fc: 9b05 ldr r3, [sp, #20] 802a1fe: 465a mov r2, fp 802a200: 4631 mov r1, r6 802a202: 4628 mov r0, r5 802a204: 47b8 blx r7 802a206: 3001 adds r0, #1 802a208: f43f af12 beq.w 802a030 <_printf_float+0x98> 802a20c: f04f 0a00 mov.w sl, #0 802a210: f104 0b1a add.w fp, r4, #26 802a214: 9b09 ldr r3, [sp, #36] @ 0x24 802a216: 425b negs r3, r3 802a218: 4553 cmp r3, sl 802a21a: dc01 bgt.n 802a220 <_printf_float+0x288> 802a21c: 464b mov r3, r9 802a21e: e794 b.n 802a14a <_printf_float+0x1b2> 802a220: 2301 movs r3, #1 802a222: 465a mov r2, fp 802a224: 4631 mov r1, r6 802a226: 4628 mov r0, r5 802a228: 47b8 blx r7 802a22a: 3001 adds r0, #1 802a22c: f43f af00 beq.w 802a030 <_printf_float+0x98> 802a230: f10a 0a01 add.w sl, sl, #1 802a234: e7ee b.n 802a214 <_printf_float+0x27c> 802a236: bf00 nop 802a238: ffffffff .word 0xffffffff 802a23c: 7fefffff .word 0x7fefffff 802a240: 08031e51 .word 0x08031e51 802a244: 08031e55 .word 0x08031e55 802a248: 08031e59 .word 0x08031e59 802a24c: 08031e5d .word 0x08031e5d 802a250: 08031e61 .word 0x08031e61 802a254: 6da3 ldr r3, [r4, #88] @ 0x58 802a256: f8dd a028 ldr.w sl, [sp, #40] @ 0x28 802a25a: 4553 cmp r3, sl 802a25c: bfa8 it ge 802a25e: 4653 movge r3, sl 802a260: 2b00 cmp r3, #0 802a262: 4699 mov r9, r3 802a264: dc37 bgt.n 802a2d6 <_printf_float+0x33e> 802a266: 2300 movs r3, #0 802a268: 9307 str r3, [sp, #28] 802a26a: ea29 79e9 bic.w r9, r9, r9, asr #31 802a26e: f104 021a add.w r2, r4, #26 802a272: 6da3 ldr r3, [r4, #88] @ 0x58 802a274: 9907 ldr r1, [sp, #28] 802a276: 9306 str r3, [sp, #24] 802a278: eba3 0309 sub.w r3, r3, r9 802a27c: 428b cmp r3, r1 802a27e: dc31 bgt.n 802a2e4 <_printf_float+0x34c> 802a280: 9b09 ldr r3, [sp, #36] @ 0x24 802a282: 459a cmp sl, r3 802a284: dc3b bgt.n 802a2fe <_printf_float+0x366> 802a286: 6823 ldr r3, [r4, #0] 802a288: 07da lsls r2, r3, #31 802a28a: d438 bmi.n 802a2fe <_printf_float+0x366> 802a28c: 9b09 ldr r3, [sp, #36] @ 0x24 802a28e: ebaa 0903 sub.w r9, sl, r3 802a292: 9b06 ldr r3, [sp, #24] 802a294: ebaa 0303 sub.w r3, sl, r3 802a298: 4599 cmp r9, r3 802a29a: bfa8 it ge 802a29c: 4699 movge r9, r3 802a29e: f1b9 0f00 cmp.w r9, #0 802a2a2: dc34 bgt.n 802a30e <_printf_float+0x376> 802a2a4: f04f 0800 mov.w r8, #0 802a2a8: ea29 79e9 bic.w r9, r9, r9, asr #31 802a2ac: f104 0b1a add.w fp, r4, #26 802a2b0: 9b09 ldr r3, [sp, #36] @ 0x24 802a2b2: ebaa 0303 sub.w r3, sl, r3 802a2b6: eba3 0309 sub.w r3, r3, r9 802a2ba: 4543 cmp r3, r8 802a2bc: f77f af76 ble.w 802a1ac <_printf_float+0x214> 802a2c0: 2301 movs r3, #1 802a2c2: 465a mov r2, fp 802a2c4: 4631 mov r1, r6 802a2c6: 4628 mov r0, r5 802a2c8: 47b8 blx r7 802a2ca: 3001 adds r0, #1 802a2cc: f43f aeb0 beq.w 802a030 <_printf_float+0x98> 802a2d0: f108 0801 add.w r8, r8, #1 802a2d4: e7ec b.n 802a2b0 <_printf_float+0x318> 802a2d6: 4642 mov r2, r8 802a2d8: 4631 mov r1, r6 802a2da: 4628 mov r0, r5 802a2dc: 47b8 blx r7 802a2de: 3001 adds r0, #1 802a2e0: d1c1 bne.n 802a266 <_printf_float+0x2ce> 802a2e2: e6a5 b.n 802a030 <_printf_float+0x98> 802a2e4: 2301 movs r3, #1 802a2e6: 4631 mov r1, r6 802a2e8: 4628 mov r0, r5 802a2ea: 9206 str r2, [sp, #24] 802a2ec: 47b8 blx r7 802a2ee: 3001 adds r0, #1 802a2f0: f43f ae9e beq.w 802a030 <_printf_float+0x98> 802a2f4: 9b07 ldr r3, [sp, #28] 802a2f6: 9a06 ldr r2, [sp, #24] 802a2f8: 3301 adds r3, #1 802a2fa: 9307 str r3, [sp, #28] 802a2fc: e7b9 b.n 802a272 <_printf_float+0x2da> 802a2fe: 9b05 ldr r3, [sp, #20] 802a300: 465a mov r2, fp 802a302: 4631 mov r1, r6 802a304: 4628 mov r0, r5 802a306: 47b8 blx r7 802a308: 3001 adds r0, #1 802a30a: d1bf bne.n 802a28c <_printf_float+0x2f4> 802a30c: e690 b.n 802a030 <_printf_float+0x98> 802a30e: 9a06 ldr r2, [sp, #24] 802a310: 464b mov r3, r9 802a312: 4442 add r2, r8 802a314: 4631 mov r1, r6 802a316: 4628 mov r0, r5 802a318: 47b8 blx r7 802a31a: 3001 adds r0, #1 802a31c: d1c2 bne.n 802a2a4 <_printf_float+0x30c> 802a31e: e687 b.n 802a030 <_printf_float+0x98> 802a320: f8dd 9028 ldr.w r9, [sp, #40] @ 0x28 802a324: f1b9 0f01 cmp.w r9, #1 802a328: dc01 bgt.n 802a32e <_printf_float+0x396> 802a32a: 07db lsls r3, r3, #31 802a32c: d536 bpl.n 802a39c <_printf_float+0x404> 802a32e: 2301 movs r3, #1 802a330: 4642 mov r2, r8 802a332: 4631 mov r1, r6 802a334: 4628 mov r0, r5 802a336: 47b8 blx r7 802a338: 3001 adds r0, #1 802a33a: f43f ae79 beq.w 802a030 <_printf_float+0x98> 802a33e: 9b05 ldr r3, [sp, #20] 802a340: 465a mov r2, fp 802a342: 4631 mov r1, r6 802a344: 4628 mov r0, r5 802a346: 47b8 blx r7 802a348: 3001 adds r0, #1 802a34a: f43f ae71 beq.w 802a030 <_printf_float+0x98> 802a34e: ed94 7b12 vldr d7, [r4, #72] @ 0x48 802a352: eeb5 7b40 vcmp.f64 d7, #0.0 802a356: eef1 fa10 vmrs APSR_nzcv, fpscr 802a35a: f109 39ff add.w r9, r9, #4294967295 @ 0xffffffff 802a35e: d018 beq.n 802a392 <_printf_float+0x3fa> 802a360: 464b mov r3, r9 802a362: f108 0201 add.w r2, r8, #1 802a366: 4631 mov r1, r6 802a368: 4628 mov r0, r5 802a36a: 47b8 blx r7 802a36c: 3001 adds r0, #1 802a36e: d10c bne.n 802a38a <_printf_float+0x3f2> 802a370: e65e b.n 802a030 <_printf_float+0x98> 802a372: 2301 movs r3, #1 802a374: 465a mov r2, fp 802a376: 4631 mov r1, r6 802a378: 4628 mov r0, r5 802a37a: 47b8 blx r7 802a37c: 3001 adds r0, #1 802a37e: f43f ae57 beq.w 802a030 <_printf_float+0x98> 802a382: f108 0801 add.w r8, r8, #1 802a386: 45c8 cmp r8, r9 802a388: dbf3 blt.n 802a372 <_printf_float+0x3da> 802a38a: 4653 mov r3, sl 802a38c: f104 0250 add.w r2, r4, #80 @ 0x50 802a390: e6dc b.n 802a14c <_printf_float+0x1b4> 802a392: f04f 0800 mov.w r8, #0 802a396: f104 0b1a add.w fp, r4, #26 802a39a: e7f4 b.n 802a386 <_printf_float+0x3ee> 802a39c: 2301 movs r3, #1 802a39e: 4642 mov r2, r8 802a3a0: e7e1 b.n 802a366 <_printf_float+0x3ce> 802a3a2: 2301 movs r3, #1 802a3a4: 464a mov r2, r9 802a3a6: 4631 mov r1, r6 802a3a8: 4628 mov r0, r5 802a3aa: 47b8 blx r7 802a3ac: 3001 adds r0, #1 802a3ae: f43f ae3f beq.w 802a030 <_printf_float+0x98> 802a3b2: f108 0801 add.w r8, r8, #1 802a3b6: 68e3 ldr r3, [r4, #12] 802a3b8: 990b ldr r1, [sp, #44] @ 0x2c 802a3ba: 1a5b subs r3, r3, r1 802a3bc: 4543 cmp r3, r8 802a3be: dcf0 bgt.n 802a3a2 <_printf_float+0x40a> 802a3c0: e6f8 b.n 802a1b4 <_printf_float+0x21c> 802a3c2: f04f 0800 mov.w r8, #0 802a3c6: f104 0919 add.w r9, r4, #25 802a3ca: e7f4 b.n 802a3b6 <_printf_float+0x41e> 0802a3cc <_printf_common>: 802a3cc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802a3d0: 4616 mov r6, r2 802a3d2: 4698 mov r8, r3 802a3d4: 688a ldr r2, [r1, #8] 802a3d6: 690b ldr r3, [r1, #16] 802a3d8: f8dd 9020 ldr.w r9, [sp, #32] 802a3dc: 4293 cmp r3, r2 802a3de: bfb8 it lt 802a3e0: 4613 movlt r3, r2 802a3e2: 6033 str r3, [r6, #0] 802a3e4: f891 2043 ldrb.w r2, [r1, #67] @ 0x43 802a3e8: 4607 mov r7, r0 802a3ea: 460c mov r4, r1 802a3ec: b10a cbz r2, 802a3f2 <_printf_common+0x26> 802a3ee: 3301 adds r3, #1 802a3f0: 6033 str r3, [r6, #0] 802a3f2: 6823 ldr r3, [r4, #0] 802a3f4: 0699 lsls r1, r3, #26 802a3f6: bf42 ittt mi 802a3f8: 6833 ldrmi r3, [r6, #0] 802a3fa: 3302 addmi r3, #2 802a3fc: 6033 strmi r3, [r6, #0] 802a3fe: 6825 ldr r5, [r4, #0] 802a400: f015 0506 ands.w r5, r5, #6 802a404: d106 bne.n 802a414 <_printf_common+0x48> 802a406: f104 0a19 add.w sl, r4, #25 802a40a: 68e3 ldr r3, [r4, #12] 802a40c: 6832 ldr r2, [r6, #0] 802a40e: 1a9b subs r3, r3, r2 802a410: 42ab cmp r3, r5 802a412: dc26 bgt.n 802a462 <_printf_common+0x96> 802a414: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 802a418: 6822 ldr r2, [r4, #0] 802a41a: 3b00 subs r3, #0 802a41c: bf18 it ne 802a41e: 2301 movne r3, #1 802a420: 0692 lsls r2, r2, #26 802a422: d42b bmi.n 802a47c <_printf_common+0xb0> 802a424: f104 0243 add.w r2, r4, #67 @ 0x43 802a428: 4641 mov r1, r8 802a42a: 4638 mov r0, r7 802a42c: 47c8 blx r9 802a42e: 3001 adds r0, #1 802a430: d01e beq.n 802a470 <_printf_common+0xa4> 802a432: 6823 ldr r3, [r4, #0] 802a434: 6922 ldr r2, [r4, #16] 802a436: f003 0306 and.w r3, r3, #6 802a43a: 2b04 cmp r3, #4 802a43c: bf02 ittt eq 802a43e: 68e5 ldreq r5, [r4, #12] 802a440: 6833 ldreq r3, [r6, #0] 802a442: 1aed subeq r5, r5, r3 802a444: 68a3 ldr r3, [r4, #8] 802a446: bf0c ite eq 802a448: ea25 75e5 biceq.w r5, r5, r5, asr #31 802a44c: 2500 movne r5, #0 802a44e: 4293 cmp r3, r2 802a450: bfc4 itt gt 802a452: 1a9b subgt r3, r3, r2 802a454: 18ed addgt r5, r5, r3 802a456: 2600 movs r6, #0 802a458: 341a adds r4, #26 802a45a: 42b5 cmp r5, r6 802a45c: d11a bne.n 802a494 <_printf_common+0xc8> 802a45e: 2000 movs r0, #0 802a460: e008 b.n 802a474 <_printf_common+0xa8> 802a462: 2301 movs r3, #1 802a464: 4652 mov r2, sl 802a466: 4641 mov r1, r8 802a468: 4638 mov r0, r7 802a46a: 47c8 blx r9 802a46c: 3001 adds r0, #1 802a46e: d103 bne.n 802a478 <_printf_common+0xac> 802a470: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a474: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802a478: 3501 adds r5, #1 802a47a: e7c6 b.n 802a40a <_printf_common+0x3e> 802a47c: 18e1 adds r1, r4, r3 802a47e: 1c5a adds r2, r3, #1 802a480: 2030 movs r0, #48 @ 0x30 802a482: f881 0043 strb.w r0, [r1, #67] @ 0x43 802a486: 4422 add r2, r4 802a488: f894 1045 ldrb.w r1, [r4, #69] @ 0x45 802a48c: f882 1043 strb.w r1, [r2, #67] @ 0x43 802a490: 3302 adds r3, #2 802a492: e7c7 b.n 802a424 <_printf_common+0x58> 802a494: 2301 movs r3, #1 802a496: 4622 mov r2, r4 802a498: 4641 mov r1, r8 802a49a: 4638 mov r0, r7 802a49c: 47c8 blx r9 802a49e: 3001 adds r0, #1 802a4a0: d0e6 beq.n 802a470 <_printf_common+0xa4> 802a4a2: 3601 adds r6, #1 802a4a4: e7d9 b.n 802a45a <_printf_common+0x8e> ... 0802a4a8 <_printf_i>: 802a4a8: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 802a4ac: 7e0f ldrb r7, [r1, #24] 802a4ae: 9e0c ldr r6, [sp, #48] @ 0x30 802a4b0: 2f78 cmp r7, #120 @ 0x78 802a4b2: 4691 mov r9, r2 802a4b4: 4680 mov r8, r0 802a4b6: 460c mov r4, r1 802a4b8: 469a mov sl, r3 802a4ba: f101 0243 add.w r2, r1, #67 @ 0x43 802a4be: d807 bhi.n 802a4d0 <_printf_i+0x28> 802a4c0: 2f62 cmp r7, #98 @ 0x62 802a4c2: d80a bhi.n 802a4da <_printf_i+0x32> 802a4c4: 2f00 cmp r7, #0 802a4c6: f000 80d2 beq.w 802a66e <_printf_i+0x1c6> 802a4ca: 2f58 cmp r7, #88 @ 0x58 802a4cc: f000 80b9 beq.w 802a642 <_printf_i+0x19a> 802a4d0: f104 0642 add.w r6, r4, #66 @ 0x42 802a4d4: f884 7042 strb.w r7, [r4, #66] @ 0x42 802a4d8: e03a b.n 802a550 <_printf_i+0xa8> 802a4da: f1a7 0363 sub.w r3, r7, #99 @ 0x63 802a4de: 2b15 cmp r3, #21 802a4e0: d8f6 bhi.n 802a4d0 <_printf_i+0x28> 802a4e2: a101 add r1, pc, #4 @ (adr r1, 802a4e8 <_printf_i+0x40>) 802a4e4: f851 f023 ldr.w pc, [r1, r3, lsl #2] 802a4e8: 0802a541 .word 0x0802a541 802a4ec: 0802a555 .word 0x0802a555 802a4f0: 0802a4d1 .word 0x0802a4d1 802a4f4: 0802a4d1 .word 0x0802a4d1 802a4f8: 0802a4d1 .word 0x0802a4d1 802a4fc: 0802a4d1 .word 0x0802a4d1 802a500: 0802a555 .word 0x0802a555 802a504: 0802a4d1 .word 0x0802a4d1 802a508: 0802a4d1 .word 0x0802a4d1 802a50c: 0802a4d1 .word 0x0802a4d1 802a510: 0802a4d1 .word 0x0802a4d1 802a514: 0802a655 .word 0x0802a655 802a518: 0802a57f .word 0x0802a57f 802a51c: 0802a60f .word 0x0802a60f 802a520: 0802a4d1 .word 0x0802a4d1 802a524: 0802a4d1 .word 0x0802a4d1 802a528: 0802a677 .word 0x0802a677 802a52c: 0802a4d1 .word 0x0802a4d1 802a530: 0802a57f .word 0x0802a57f 802a534: 0802a4d1 .word 0x0802a4d1 802a538: 0802a4d1 .word 0x0802a4d1 802a53c: 0802a617 .word 0x0802a617 802a540: 6833 ldr r3, [r6, #0] 802a542: 1d1a adds r2, r3, #4 802a544: 681b ldr r3, [r3, #0] 802a546: 6032 str r2, [r6, #0] 802a548: f104 0642 add.w r6, r4, #66 @ 0x42 802a54c: f884 3042 strb.w r3, [r4, #66] @ 0x42 802a550: 2301 movs r3, #1 802a552: e09d b.n 802a690 <_printf_i+0x1e8> 802a554: 6833 ldr r3, [r6, #0] 802a556: 6820 ldr r0, [r4, #0] 802a558: 1d19 adds r1, r3, #4 802a55a: 6031 str r1, [r6, #0] 802a55c: 0606 lsls r6, r0, #24 802a55e: d501 bpl.n 802a564 <_printf_i+0xbc> 802a560: 681d ldr r5, [r3, #0] 802a562: e003 b.n 802a56c <_printf_i+0xc4> 802a564: 0645 lsls r5, r0, #25 802a566: d5fb bpl.n 802a560 <_printf_i+0xb8> 802a568: f9b3 5000 ldrsh.w r5, [r3] 802a56c: 2d00 cmp r5, #0 802a56e: da03 bge.n 802a578 <_printf_i+0xd0> 802a570: 232d movs r3, #45 @ 0x2d 802a572: 426d negs r5, r5 802a574: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a578: 4859 ldr r0, [pc, #356] @ (802a6e0 <_printf_i+0x238>) 802a57a: 230a movs r3, #10 802a57c: e011 b.n 802a5a2 <_printf_i+0xfa> 802a57e: 6821 ldr r1, [r4, #0] 802a580: 6833 ldr r3, [r6, #0] 802a582: 0608 lsls r0, r1, #24 802a584: f853 5b04 ldr.w r5, [r3], #4 802a588: d402 bmi.n 802a590 <_printf_i+0xe8> 802a58a: 0649 lsls r1, r1, #25 802a58c: bf48 it mi 802a58e: b2ad uxthmi r5, r5 802a590: 2f6f cmp r7, #111 @ 0x6f 802a592: 4853 ldr r0, [pc, #332] @ (802a6e0 <_printf_i+0x238>) 802a594: 6033 str r3, [r6, #0] 802a596: bf14 ite ne 802a598: 230a movne r3, #10 802a59a: 2308 moveq r3, #8 802a59c: 2100 movs r1, #0 802a59e: f884 1043 strb.w r1, [r4, #67] @ 0x43 802a5a2: 6866 ldr r6, [r4, #4] 802a5a4: 60a6 str r6, [r4, #8] 802a5a6: 2e00 cmp r6, #0 802a5a8: bfa2 ittt ge 802a5aa: 6821 ldrge r1, [r4, #0] 802a5ac: f021 0104 bicge.w r1, r1, #4 802a5b0: 6021 strge r1, [r4, #0] 802a5b2: b90d cbnz r5, 802a5b8 <_printf_i+0x110> 802a5b4: 2e00 cmp r6, #0 802a5b6: d04b beq.n 802a650 <_printf_i+0x1a8> 802a5b8: 4616 mov r6, r2 802a5ba: fbb5 f1f3 udiv r1, r5, r3 802a5be: fb03 5711 mls r7, r3, r1, r5 802a5c2: 5dc7 ldrb r7, [r0, r7] 802a5c4: f806 7d01 strb.w r7, [r6, #-1]! 802a5c8: 462f mov r7, r5 802a5ca: 42bb cmp r3, r7 802a5cc: 460d mov r5, r1 802a5ce: d9f4 bls.n 802a5ba <_printf_i+0x112> 802a5d0: 2b08 cmp r3, #8 802a5d2: d10b bne.n 802a5ec <_printf_i+0x144> 802a5d4: 6823 ldr r3, [r4, #0] 802a5d6: 07df lsls r7, r3, #31 802a5d8: d508 bpl.n 802a5ec <_printf_i+0x144> 802a5da: 6923 ldr r3, [r4, #16] 802a5dc: 6861 ldr r1, [r4, #4] 802a5de: 4299 cmp r1, r3 802a5e0: bfde ittt le 802a5e2: 2330 movle r3, #48 @ 0x30 802a5e4: f806 3c01 strble.w r3, [r6, #-1] 802a5e8: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff 802a5ec: 1b92 subs r2, r2, r6 802a5ee: 6122 str r2, [r4, #16] 802a5f0: f8cd a000 str.w sl, [sp] 802a5f4: 464b mov r3, r9 802a5f6: aa03 add r2, sp, #12 802a5f8: 4621 mov r1, r4 802a5fa: 4640 mov r0, r8 802a5fc: f7ff fee6 bl 802a3cc <_printf_common> 802a600: 3001 adds r0, #1 802a602: d14a bne.n 802a69a <_printf_i+0x1f2> 802a604: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a608: b004 add sp, #16 802a60a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802a60e: 6823 ldr r3, [r4, #0] 802a610: f043 0320 orr.w r3, r3, #32 802a614: 6023 str r3, [r4, #0] 802a616: 4833 ldr r0, [pc, #204] @ (802a6e4 <_printf_i+0x23c>) 802a618: 2778 movs r7, #120 @ 0x78 802a61a: f884 7045 strb.w r7, [r4, #69] @ 0x45 802a61e: 6823 ldr r3, [r4, #0] 802a620: 6831 ldr r1, [r6, #0] 802a622: 061f lsls r7, r3, #24 802a624: f851 5b04 ldr.w r5, [r1], #4 802a628: d402 bmi.n 802a630 <_printf_i+0x188> 802a62a: 065f lsls r7, r3, #25 802a62c: bf48 it mi 802a62e: b2ad uxthmi r5, r5 802a630: 6031 str r1, [r6, #0] 802a632: 07d9 lsls r1, r3, #31 802a634: bf44 itt mi 802a636: f043 0320 orrmi.w r3, r3, #32 802a63a: 6023 strmi r3, [r4, #0] 802a63c: b11d cbz r5, 802a646 <_printf_i+0x19e> 802a63e: 2310 movs r3, #16 802a640: e7ac b.n 802a59c <_printf_i+0xf4> 802a642: 4827 ldr r0, [pc, #156] @ (802a6e0 <_printf_i+0x238>) 802a644: e7e9 b.n 802a61a <_printf_i+0x172> 802a646: 6823 ldr r3, [r4, #0] 802a648: f023 0320 bic.w r3, r3, #32 802a64c: 6023 str r3, [r4, #0] 802a64e: e7f6 b.n 802a63e <_printf_i+0x196> 802a650: 4616 mov r6, r2 802a652: e7bd b.n 802a5d0 <_printf_i+0x128> 802a654: 6833 ldr r3, [r6, #0] 802a656: 6825 ldr r5, [r4, #0] 802a658: 6961 ldr r1, [r4, #20] 802a65a: 1d18 adds r0, r3, #4 802a65c: 6030 str r0, [r6, #0] 802a65e: 062e lsls r6, r5, #24 802a660: 681b ldr r3, [r3, #0] 802a662: d501 bpl.n 802a668 <_printf_i+0x1c0> 802a664: 6019 str r1, [r3, #0] 802a666: e002 b.n 802a66e <_printf_i+0x1c6> 802a668: 0668 lsls r0, r5, #25 802a66a: d5fb bpl.n 802a664 <_printf_i+0x1bc> 802a66c: 8019 strh r1, [r3, #0] 802a66e: 2300 movs r3, #0 802a670: 6123 str r3, [r4, #16] 802a672: 4616 mov r6, r2 802a674: e7bc b.n 802a5f0 <_printf_i+0x148> 802a676: 6833 ldr r3, [r6, #0] 802a678: 1d1a adds r2, r3, #4 802a67a: 6032 str r2, [r6, #0] 802a67c: 681e ldr r6, [r3, #0] 802a67e: 6862 ldr r2, [r4, #4] 802a680: 2100 movs r1, #0 802a682: 4630 mov r0, r6 802a684: f7d5 fe3c bl 8000300 802a688: b108 cbz r0, 802a68e <_printf_i+0x1e6> 802a68a: 1b80 subs r0, r0, r6 802a68c: 6060 str r0, [r4, #4] 802a68e: 6863 ldr r3, [r4, #4] 802a690: 6123 str r3, [r4, #16] 802a692: 2300 movs r3, #0 802a694: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a698: e7aa b.n 802a5f0 <_printf_i+0x148> 802a69a: 6923 ldr r3, [r4, #16] 802a69c: 4632 mov r2, r6 802a69e: 4649 mov r1, r9 802a6a0: 4640 mov r0, r8 802a6a2: 47d0 blx sl 802a6a4: 3001 adds r0, #1 802a6a6: d0ad beq.n 802a604 <_printf_i+0x15c> 802a6a8: 6823 ldr r3, [r4, #0] 802a6aa: 079b lsls r3, r3, #30 802a6ac: d413 bmi.n 802a6d6 <_printf_i+0x22e> 802a6ae: 68e0 ldr r0, [r4, #12] 802a6b0: 9b03 ldr r3, [sp, #12] 802a6b2: 4298 cmp r0, r3 802a6b4: bfb8 it lt 802a6b6: 4618 movlt r0, r3 802a6b8: e7a6 b.n 802a608 <_printf_i+0x160> 802a6ba: 2301 movs r3, #1 802a6bc: 4632 mov r2, r6 802a6be: 4649 mov r1, r9 802a6c0: 4640 mov r0, r8 802a6c2: 47d0 blx sl 802a6c4: 3001 adds r0, #1 802a6c6: d09d beq.n 802a604 <_printf_i+0x15c> 802a6c8: 3501 adds r5, #1 802a6ca: 68e3 ldr r3, [r4, #12] 802a6cc: 9903 ldr r1, [sp, #12] 802a6ce: 1a5b subs r3, r3, r1 802a6d0: 42ab cmp r3, r5 802a6d2: dcf2 bgt.n 802a6ba <_printf_i+0x212> 802a6d4: e7eb b.n 802a6ae <_printf_i+0x206> 802a6d6: 2500 movs r5, #0 802a6d8: f104 0619 add.w r6, r4, #25 802a6dc: e7f5 b.n 802a6ca <_printf_i+0x222> 802a6de: bf00 nop 802a6e0: 08031e63 .word 0x08031e63 802a6e4: 08031e74 .word 0x08031e74 0802a6e8 : 802a6e8: 2300 movs r3, #0 802a6ea: b510 push {r4, lr} 802a6ec: 4604 mov r4, r0 802a6ee: e9c0 3300 strd r3, r3, [r0] 802a6f2: e9c0 3304 strd r3, r3, [r0, #16] 802a6f6: 6083 str r3, [r0, #8] 802a6f8: 8181 strh r1, [r0, #12] 802a6fa: 6643 str r3, [r0, #100] @ 0x64 802a6fc: 81c2 strh r2, [r0, #14] 802a6fe: 6183 str r3, [r0, #24] 802a700: 4619 mov r1, r3 802a702: 2208 movs r2, #8 802a704: 305c adds r0, #92 @ 0x5c 802a706: f000 fa43 bl 802ab90 802a70a: 4b0d ldr r3, [pc, #52] @ (802a740 ) 802a70c: 6263 str r3, [r4, #36] @ 0x24 802a70e: 4b0d ldr r3, [pc, #52] @ (802a744 ) 802a710: 62a3 str r3, [r4, #40] @ 0x28 802a712: 4b0d ldr r3, [pc, #52] @ (802a748 ) 802a714: 62e3 str r3, [r4, #44] @ 0x2c 802a716: 4b0d ldr r3, [pc, #52] @ (802a74c ) 802a718: 6323 str r3, [r4, #48] @ 0x30 802a71a: 4b0d ldr r3, [pc, #52] @ (802a750 ) 802a71c: 6224 str r4, [r4, #32] 802a71e: 429c cmp r4, r3 802a720: d006 beq.n 802a730 802a722: f103 0268 add.w r2, r3, #104 @ 0x68 802a726: 4294 cmp r4, r2 802a728: d002 beq.n 802a730 802a72a: 33d0 adds r3, #208 @ 0xd0 802a72c: 429c cmp r4, r3 802a72e: d105 bne.n 802a73c 802a730: f104 0058 add.w r0, r4, #88 @ 0x58 802a734: e8bd 4010 ldmia.w sp!, {r4, lr} 802a738: f000 bb1e b.w 802ad78 <__retarget_lock_init_recursive> 802a73c: bd10 pop {r4, pc} 802a73e: bf00 nop 802a740: 0802a98d .word 0x0802a98d 802a744: 0802a9af .word 0x0802a9af 802a748: 0802a9e7 .word 0x0802a9e7 802a74c: 0802aa0b .word 0x0802aa0b 802a750: 2402b124 .word 0x2402b124 0802a754 : 802a754: 4a02 ldr r2, [pc, #8] @ (802a760 ) 802a756: 4903 ldr r1, [pc, #12] @ (802a764 ) 802a758: 4803 ldr r0, [pc, #12] @ (802a768 ) 802a75a: f000 b869 b.w 802a830 <_fwalk_sglue> 802a75e: bf00 nop 802a760: 2400005c .word 0x2400005c 802a764: 0802d09d .word 0x0802d09d 802a768: 240001d8 .word 0x240001d8 0802a76c : 802a76c: 6841 ldr r1, [r0, #4] 802a76e: 4b0c ldr r3, [pc, #48] @ (802a7a0 ) 802a770: 4299 cmp r1, r3 802a772: b510 push {r4, lr} 802a774: 4604 mov r4, r0 802a776: d001 beq.n 802a77c 802a778: f002 fc90 bl 802d09c <_fflush_r> 802a77c: 68a1 ldr r1, [r4, #8] 802a77e: 4b09 ldr r3, [pc, #36] @ (802a7a4 ) 802a780: 4299 cmp r1, r3 802a782: d002 beq.n 802a78a 802a784: 4620 mov r0, r4 802a786: f002 fc89 bl 802d09c <_fflush_r> 802a78a: 68e1 ldr r1, [r4, #12] 802a78c: 4b06 ldr r3, [pc, #24] @ (802a7a8 ) 802a78e: 4299 cmp r1, r3 802a790: d004 beq.n 802a79c 802a792: 4620 mov r0, r4 802a794: e8bd 4010 ldmia.w sp!, {r4, lr} 802a798: f002 bc80 b.w 802d09c <_fflush_r> 802a79c: bd10 pop {r4, pc} 802a79e: bf00 nop 802a7a0: 2402b124 .word 0x2402b124 802a7a4: 2402b18c .word 0x2402b18c 802a7a8: 2402b1f4 .word 0x2402b1f4 0802a7ac : 802a7ac: b510 push {r4, lr} 802a7ae: 4b0b ldr r3, [pc, #44] @ (802a7dc ) 802a7b0: 4c0b ldr r4, [pc, #44] @ (802a7e0 ) 802a7b2: 4a0c ldr r2, [pc, #48] @ (802a7e4 ) 802a7b4: 601a str r2, [r3, #0] 802a7b6: 4620 mov r0, r4 802a7b8: 2200 movs r2, #0 802a7ba: 2104 movs r1, #4 802a7bc: f7ff ff94 bl 802a6e8 802a7c0: f104 0068 add.w r0, r4, #104 @ 0x68 802a7c4: 2201 movs r2, #1 802a7c6: 2109 movs r1, #9 802a7c8: f7ff ff8e bl 802a6e8 802a7cc: f104 00d0 add.w r0, r4, #208 @ 0xd0 802a7d0: 2202 movs r2, #2 802a7d2: e8bd 4010 ldmia.w sp!, {r4, lr} 802a7d6: 2112 movs r1, #18 802a7d8: f7ff bf86 b.w 802a6e8 802a7dc: 2402b25c .word 0x2402b25c 802a7e0: 2402b124 .word 0x2402b124 802a7e4: 0802a755 .word 0x0802a755 0802a7e8 <__sfp_lock_acquire>: 802a7e8: 4801 ldr r0, [pc, #4] @ (802a7f0 <__sfp_lock_acquire+0x8>) 802a7ea: f000 bac6 b.w 802ad7a <__retarget_lock_acquire_recursive> 802a7ee: bf00 nop 802a7f0: 2402b265 .word 0x2402b265 0802a7f4 <__sfp_lock_release>: 802a7f4: 4801 ldr r0, [pc, #4] @ (802a7fc <__sfp_lock_release+0x8>) 802a7f6: f000 bac1 b.w 802ad7c <__retarget_lock_release_recursive> 802a7fa: bf00 nop 802a7fc: 2402b265 .word 0x2402b265 0802a800 <__sinit>: 802a800: b510 push {r4, lr} 802a802: 4604 mov r4, r0 802a804: f7ff fff0 bl 802a7e8 <__sfp_lock_acquire> 802a808: 6a23 ldr r3, [r4, #32] 802a80a: b11b cbz r3, 802a814 <__sinit+0x14> 802a80c: e8bd 4010 ldmia.w sp!, {r4, lr} 802a810: f7ff bff0 b.w 802a7f4 <__sfp_lock_release> 802a814: 4b04 ldr r3, [pc, #16] @ (802a828 <__sinit+0x28>) 802a816: 6223 str r3, [r4, #32] 802a818: 4b04 ldr r3, [pc, #16] @ (802a82c <__sinit+0x2c>) 802a81a: 681b ldr r3, [r3, #0] 802a81c: 2b00 cmp r3, #0 802a81e: d1f5 bne.n 802a80c <__sinit+0xc> 802a820: f7ff ffc4 bl 802a7ac 802a824: e7f2 b.n 802a80c <__sinit+0xc> 802a826: bf00 nop 802a828: 0802a76d .word 0x0802a76d 802a82c: 2402b25c .word 0x2402b25c 0802a830 <_fwalk_sglue>: 802a830: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802a834: 4607 mov r7, r0 802a836: 4688 mov r8, r1 802a838: 4614 mov r4, r2 802a83a: 2600 movs r6, #0 802a83c: e9d4 9501 ldrd r9, r5, [r4, #4] 802a840: f1b9 0901 subs.w r9, r9, #1 802a844: d505 bpl.n 802a852 <_fwalk_sglue+0x22> 802a846: 6824 ldr r4, [r4, #0] 802a848: 2c00 cmp r4, #0 802a84a: d1f7 bne.n 802a83c <_fwalk_sglue+0xc> 802a84c: 4630 mov r0, r6 802a84e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802a852: 89ab ldrh r3, [r5, #12] 802a854: 2b01 cmp r3, #1 802a856: d907 bls.n 802a868 <_fwalk_sglue+0x38> 802a858: f9b5 300e ldrsh.w r3, [r5, #14] 802a85c: 3301 adds r3, #1 802a85e: d003 beq.n 802a868 <_fwalk_sglue+0x38> 802a860: 4629 mov r1, r5 802a862: 4638 mov r0, r7 802a864: 47c0 blx r8 802a866: 4306 orrs r6, r0 802a868: 3568 adds r5, #104 @ 0x68 802a86a: e7e9 b.n 802a840 <_fwalk_sglue+0x10> 0802a86c : 802a86c: b40f push {r0, r1, r2, r3} 802a86e: b507 push {r0, r1, r2, lr} 802a870: 4906 ldr r1, [pc, #24] @ (802a88c ) 802a872: ab04 add r3, sp, #16 802a874: 6808 ldr r0, [r1, #0] 802a876: f853 2b04 ldr.w r2, [r3], #4 802a87a: 6881 ldr r1, [r0, #8] 802a87c: 9301 str r3, [sp, #4] 802a87e: f002 fa71 bl 802cd64 <_vfiprintf_r> 802a882: b003 add sp, #12 802a884: f85d eb04 ldr.w lr, [sp], #4 802a888: b004 add sp, #16 802a88a: 4770 bx lr 802a88c: 240001d4 .word 0x240001d4 0802a890 <_puts_r>: 802a890: 6a03 ldr r3, [r0, #32] 802a892: b570 push {r4, r5, r6, lr} 802a894: 6884 ldr r4, [r0, #8] 802a896: 4605 mov r5, r0 802a898: 460e mov r6, r1 802a89a: b90b cbnz r3, 802a8a0 <_puts_r+0x10> 802a89c: f7ff ffb0 bl 802a800 <__sinit> 802a8a0: 6e63 ldr r3, [r4, #100] @ 0x64 802a8a2: 07db lsls r3, r3, #31 802a8a4: d405 bmi.n 802a8b2 <_puts_r+0x22> 802a8a6: 89a3 ldrh r3, [r4, #12] 802a8a8: 0598 lsls r0, r3, #22 802a8aa: d402 bmi.n 802a8b2 <_puts_r+0x22> 802a8ac: 6da0 ldr r0, [r4, #88] @ 0x58 802a8ae: f000 fa64 bl 802ad7a <__retarget_lock_acquire_recursive> 802a8b2: 89a3 ldrh r3, [r4, #12] 802a8b4: 0719 lsls r1, r3, #28 802a8b6: d502 bpl.n 802a8be <_puts_r+0x2e> 802a8b8: 6923 ldr r3, [r4, #16] 802a8ba: 2b00 cmp r3, #0 802a8bc: d135 bne.n 802a92a <_puts_r+0x9a> 802a8be: 4621 mov r1, r4 802a8c0: 4628 mov r0, r5 802a8c2: f000 f8e5 bl 802aa90 <__swsetup_r> 802a8c6: b380 cbz r0, 802a92a <_puts_r+0x9a> 802a8c8: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 802a8cc: 6e63 ldr r3, [r4, #100] @ 0x64 802a8ce: 07da lsls r2, r3, #31 802a8d0: d405 bmi.n 802a8de <_puts_r+0x4e> 802a8d2: 89a3 ldrh r3, [r4, #12] 802a8d4: 059b lsls r3, r3, #22 802a8d6: d402 bmi.n 802a8de <_puts_r+0x4e> 802a8d8: 6da0 ldr r0, [r4, #88] @ 0x58 802a8da: f000 fa4f bl 802ad7c <__retarget_lock_release_recursive> 802a8de: 4628 mov r0, r5 802a8e0: bd70 pop {r4, r5, r6, pc} 802a8e2: 2b00 cmp r3, #0 802a8e4: da04 bge.n 802a8f0 <_puts_r+0x60> 802a8e6: 69a2 ldr r2, [r4, #24] 802a8e8: 429a cmp r2, r3 802a8ea: dc17 bgt.n 802a91c <_puts_r+0x8c> 802a8ec: 290a cmp r1, #10 802a8ee: d015 beq.n 802a91c <_puts_r+0x8c> 802a8f0: 6823 ldr r3, [r4, #0] 802a8f2: 1c5a adds r2, r3, #1 802a8f4: 6022 str r2, [r4, #0] 802a8f6: 7019 strb r1, [r3, #0] 802a8f8: 68a3 ldr r3, [r4, #8] 802a8fa: f816 1f01 ldrb.w r1, [r6, #1]! 802a8fe: 3b01 subs r3, #1 802a900: 60a3 str r3, [r4, #8] 802a902: 2900 cmp r1, #0 802a904: d1ed bne.n 802a8e2 <_puts_r+0x52> 802a906: 2b00 cmp r3, #0 802a908: da11 bge.n 802a92e <_puts_r+0x9e> 802a90a: 4622 mov r2, r4 802a90c: 210a movs r1, #10 802a90e: 4628 mov r0, r5 802a910: f000 f87f bl 802aa12 <__swbuf_r> 802a914: 3001 adds r0, #1 802a916: d0d7 beq.n 802a8c8 <_puts_r+0x38> 802a918: 250a movs r5, #10 802a91a: e7d7 b.n 802a8cc <_puts_r+0x3c> 802a91c: 4622 mov r2, r4 802a91e: 4628 mov r0, r5 802a920: f000 f877 bl 802aa12 <__swbuf_r> 802a924: 3001 adds r0, #1 802a926: d1e7 bne.n 802a8f8 <_puts_r+0x68> 802a928: e7ce b.n 802a8c8 <_puts_r+0x38> 802a92a: 3e01 subs r6, #1 802a92c: e7e4 b.n 802a8f8 <_puts_r+0x68> 802a92e: 6823 ldr r3, [r4, #0] 802a930: 1c5a adds r2, r3, #1 802a932: 6022 str r2, [r4, #0] 802a934: 220a movs r2, #10 802a936: 701a strb r2, [r3, #0] 802a938: e7ee b.n 802a918 <_puts_r+0x88> ... 0802a93c : 802a93c: 4b02 ldr r3, [pc, #8] @ (802a948 ) 802a93e: 4601 mov r1, r0 802a940: 6818 ldr r0, [r3, #0] 802a942: f7ff bfa5 b.w 802a890 <_puts_r> 802a946: bf00 nop 802a948: 240001d4 .word 0x240001d4 0802a94c : 802a94c: b40e push {r1, r2, r3} 802a94e: b500 push {lr} 802a950: b09c sub sp, #112 @ 0x70 802a952: ab1d add r3, sp, #116 @ 0x74 802a954: 9002 str r0, [sp, #8] 802a956: 9006 str r0, [sp, #24] 802a958: f06f 4100 mvn.w r1, #2147483648 @ 0x80000000 802a95c: 4809 ldr r0, [pc, #36] @ (802a984 ) 802a95e: 9107 str r1, [sp, #28] 802a960: 9104 str r1, [sp, #16] 802a962: 4909 ldr r1, [pc, #36] @ (802a988 ) 802a964: f853 2b04 ldr.w r2, [r3], #4 802a968: 9105 str r1, [sp, #20] 802a96a: 6800 ldr r0, [r0, #0] 802a96c: 9301 str r3, [sp, #4] 802a96e: a902 add r1, sp, #8 802a970: f002 f8d2 bl 802cb18 <_svfiprintf_r> 802a974: 9b02 ldr r3, [sp, #8] 802a976: 2200 movs r2, #0 802a978: 701a strb r2, [r3, #0] 802a97a: b01c add sp, #112 @ 0x70 802a97c: f85d eb04 ldr.w lr, [sp], #4 802a980: b003 add sp, #12 802a982: 4770 bx lr 802a984: 240001d4 .word 0x240001d4 802a988: ffff0208 .word 0xffff0208 0802a98c <__sread>: 802a98c: b510 push {r4, lr} 802a98e: 460c mov r4, r1 802a990: f9b1 100e ldrsh.w r1, [r1, #14] 802a994: f000 f992 bl 802acbc <_read_r> 802a998: 2800 cmp r0, #0 802a99a: bfab itete ge 802a99c: 6d63 ldrge r3, [r4, #84] @ 0x54 802a99e: 89a3 ldrhlt r3, [r4, #12] 802a9a0: 181b addge r3, r3, r0 802a9a2: f423 5380 biclt.w r3, r3, #4096 @ 0x1000 802a9a6: bfac ite ge 802a9a8: 6563 strge r3, [r4, #84] @ 0x54 802a9aa: 81a3 strhlt r3, [r4, #12] 802a9ac: bd10 pop {r4, pc} 0802a9ae <__swrite>: 802a9ae: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a9b2: 461f mov r7, r3 802a9b4: 898b ldrh r3, [r1, #12] 802a9b6: 05db lsls r3, r3, #23 802a9b8: 4605 mov r5, r0 802a9ba: 460c mov r4, r1 802a9bc: 4616 mov r6, r2 802a9be: d505 bpl.n 802a9cc <__swrite+0x1e> 802a9c0: f9b1 100e ldrsh.w r1, [r1, #14] 802a9c4: 2302 movs r3, #2 802a9c6: 2200 movs r2, #0 802a9c8: f000 f966 bl 802ac98 <_lseek_r> 802a9cc: 89a3 ldrh r3, [r4, #12] 802a9ce: f9b4 100e ldrsh.w r1, [r4, #14] 802a9d2: f423 5380 bic.w r3, r3, #4096 @ 0x1000 802a9d6: 81a3 strh r3, [r4, #12] 802a9d8: 4632 mov r2, r6 802a9da: 463b mov r3, r7 802a9dc: 4628 mov r0, r5 802a9de: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 802a9e2: f000 b98d b.w 802ad00 <_write_r> 0802a9e6 <__sseek>: 802a9e6: b510 push {r4, lr} 802a9e8: 460c mov r4, r1 802a9ea: f9b1 100e ldrsh.w r1, [r1, #14] 802a9ee: f000 f953 bl 802ac98 <_lseek_r> 802a9f2: 1c43 adds r3, r0, #1 802a9f4: 89a3 ldrh r3, [r4, #12] 802a9f6: bf15 itete ne 802a9f8: 6560 strne r0, [r4, #84] @ 0x54 802a9fa: f423 5380 biceq.w r3, r3, #4096 @ 0x1000 802a9fe: f443 5380 orrne.w r3, r3, #4096 @ 0x1000 802aa02: 81a3 strheq r3, [r4, #12] 802aa04: bf18 it ne 802aa06: 81a3 strhne r3, [r4, #12] 802aa08: bd10 pop {r4, pc} 0802aa0a <__sclose>: 802aa0a: f9b1 100e ldrsh.w r1, [r1, #14] 802aa0e: f000 b8dd b.w 802abcc <_close_r> 0802aa12 <__swbuf_r>: 802aa12: b5f8 push {r3, r4, r5, r6, r7, lr} 802aa14: 460e mov r6, r1 802aa16: 4614 mov r4, r2 802aa18: 4605 mov r5, r0 802aa1a: b118 cbz r0, 802aa24 <__swbuf_r+0x12> 802aa1c: 6a03 ldr r3, [r0, #32] 802aa1e: b90b cbnz r3, 802aa24 <__swbuf_r+0x12> 802aa20: f7ff feee bl 802a800 <__sinit> 802aa24: 69a3 ldr r3, [r4, #24] 802aa26: 60a3 str r3, [r4, #8] 802aa28: 89a3 ldrh r3, [r4, #12] 802aa2a: 071a lsls r2, r3, #28 802aa2c: d501 bpl.n 802aa32 <__swbuf_r+0x20> 802aa2e: 6923 ldr r3, [r4, #16] 802aa30: b943 cbnz r3, 802aa44 <__swbuf_r+0x32> 802aa32: 4621 mov r1, r4 802aa34: 4628 mov r0, r5 802aa36: f000 f82b bl 802aa90 <__swsetup_r> 802aa3a: b118 cbz r0, 802aa44 <__swbuf_r+0x32> 802aa3c: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 802aa40: 4638 mov r0, r7 802aa42: bdf8 pop {r3, r4, r5, r6, r7, pc} 802aa44: 6823 ldr r3, [r4, #0] 802aa46: 6922 ldr r2, [r4, #16] 802aa48: 1a98 subs r0, r3, r2 802aa4a: 6963 ldr r3, [r4, #20] 802aa4c: b2f6 uxtb r6, r6 802aa4e: 4283 cmp r3, r0 802aa50: 4637 mov r7, r6 802aa52: dc05 bgt.n 802aa60 <__swbuf_r+0x4e> 802aa54: 4621 mov r1, r4 802aa56: 4628 mov r0, r5 802aa58: f002 fb20 bl 802d09c <_fflush_r> 802aa5c: 2800 cmp r0, #0 802aa5e: d1ed bne.n 802aa3c <__swbuf_r+0x2a> 802aa60: 68a3 ldr r3, [r4, #8] 802aa62: 3b01 subs r3, #1 802aa64: 60a3 str r3, [r4, #8] 802aa66: 6823 ldr r3, [r4, #0] 802aa68: 1c5a adds r2, r3, #1 802aa6a: 6022 str r2, [r4, #0] 802aa6c: 701e strb r6, [r3, #0] 802aa6e: 6962 ldr r2, [r4, #20] 802aa70: 1c43 adds r3, r0, #1 802aa72: 429a cmp r2, r3 802aa74: d004 beq.n 802aa80 <__swbuf_r+0x6e> 802aa76: 89a3 ldrh r3, [r4, #12] 802aa78: 07db lsls r3, r3, #31 802aa7a: d5e1 bpl.n 802aa40 <__swbuf_r+0x2e> 802aa7c: 2e0a cmp r6, #10 802aa7e: d1df bne.n 802aa40 <__swbuf_r+0x2e> 802aa80: 4621 mov r1, r4 802aa82: 4628 mov r0, r5 802aa84: f002 fb0a bl 802d09c <_fflush_r> 802aa88: 2800 cmp r0, #0 802aa8a: d0d9 beq.n 802aa40 <__swbuf_r+0x2e> 802aa8c: e7d6 b.n 802aa3c <__swbuf_r+0x2a> ... 0802aa90 <__swsetup_r>: 802aa90: b538 push {r3, r4, r5, lr} 802aa92: 4b29 ldr r3, [pc, #164] @ (802ab38 <__swsetup_r+0xa8>) 802aa94: 4605 mov r5, r0 802aa96: 6818 ldr r0, [r3, #0] 802aa98: 460c mov r4, r1 802aa9a: b118 cbz r0, 802aaa4 <__swsetup_r+0x14> 802aa9c: 6a03 ldr r3, [r0, #32] 802aa9e: b90b cbnz r3, 802aaa4 <__swsetup_r+0x14> 802aaa0: f7ff feae bl 802a800 <__sinit> 802aaa4: f9b4 300c ldrsh.w r3, [r4, #12] 802aaa8: 0719 lsls r1, r3, #28 802aaaa: d422 bmi.n 802aaf2 <__swsetup_r+0x62> 802aaac: 06da lsls r2, r3, #27 802aaae: d407 bmi.n 802aac0 <__swsetup_r+0x30> 802aab0: 2209 movs r2, #9 802aab2: 602a str r2, [r5, #0] 802aab4: f043 0340 orr.w r3, r3, #64 @ 0x40 802aab8: 81a3 strh r3, [r4, #12] 802aaba: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802aabe: e033 b.n 802ab28 <__swsetup_r+0x98> 802aac0: 0758 lsls r0, r3, #29 802aac2: d512 bpl.n 802aaea <__swsetup_r+0x5a> 802aac4: 6b61 ldr r1, [r4, #52] @ 0x34 802aac6: b141 cbz r1, 802aada <__swsetup_r+0x4a> 802aac8: f104 0344 add.w r3, r4, #68 @ 0x44 802aacc: 4299 cmp r1, r3 802aace: d002 beq.n 802aad6 <__swsetup_r+0x46> 802aad0: 4628 mov r0, r5 802aad2: f000 ff6b bl 802b9ac <_free_r> 802aad6: 2300 movs r3, #0 802aad8: 6363 str r3, [r4, #52] @ 0x34 802aada: 89a3 ldrh r3, [r4, #12] 802aadc: f023 0324 bic.w r3, r3, #36 @ 0x24 802aae0: 81a3 strh r3, [r4, #12] 802aae2: 2300 movs r3, #0 802aae4: 6063 str r3, [r4, #4] 802aae6: 6923 ldr r3, [r4, #16] 802aae8: 6023 str r3, [r4, #0] 802aaea: 89a3 ldrh r3, [r4, #12] 802aaec: f043 0308 orr.w r3, r3, #8 802aaf0: 81a3 strh r3, [r4, #12] 802aaf2: 6923 ldr r3, [r4, #16] 802aaf4: b94b cbnz r3, 802ab0a <__swsetup_r+0x7a> 802aaf6: 89a3 ldrh r3, [r4, #12] 802aaf8: f403 7320 and.w r3, r3, #640 @ 0x280 802aafc: f5b3 7f00 cmp.w r3, #512 @ 0x200 802ab00: d003 beq.n 802ab0a <__swsetup_r+0x7a> 802ab02: 4621 mov r1, r4 802ab04: 4628 mov r0, r5 802ab06: f002 fb29 bl 802d15c <__smakebuf_r> 802ab0a: f9b4 300c ldrsh.w r3, [r4, #12] 802ab0e: f013 0201 ands.w r2, r3, #1 802ab12: d00a beq.n 802ab2a <__swsetup_r+0x9a> 802ab14: 2200 movs r2, #0 802ab16: 60a2 str r2, [r4, #8] 802ab18: 6962 ldr r2, [r4, #20] 802ab1a: 4252 negs r2, r2 802ab1c: 61a2 str r2, [r4, #24] 802ab1e: 6922 ldr r2, [r4, #16] 802ab20: b942 cbnz r2, 802ab34 <__swsetup_r+0xa4> 802ab22: f013 0080 ands.w r0, r3, #128 @ 0x80 802ab26: d1c5 bne.n 802aab4 <__swsetup_r+0x24> 802ab28: bd38 pop {r3, r4, r5, pc} 802ab2a: 0799 lsls r1, r3, #30 802ab2c: bf58 it pl 802ab2e: 6962 ldrpl r2, [r4, #20] 802ab30: 60a2 str r2, [r4, #8] 802ab32: e7f4 b.n 802ab1e <__swsetup_r+0x8e> 802ab34: 2000 movs r0, #0 802ab36: e7f7 b.n 802ab28 <__swsetup_r+0x98> 802ab38: 240001d4 .word 0x240001d4 0802ab3c : 802ab3c: b510 push {r4, lr} 802ab3e: 3901 subs r1, #1 802ab40: 4402 add r2, r0 802ab42: 4290 cmp r0, r2 802ab44: d101 bne.n 802ab4a 802ab46: 2000 movs r0, #0 802ab48: e005 b.n 802ab56 802ab4a: 7803 ldrb r3, [r0, #0] 802ab4c: f811 4f01 ldrb.w r4, [r1, #1]! 802ab50: 42a3 cmp r3, r4 802ab52: d001 beq.n 802ab58 802ab54: 1b18 subs r0, r3, r4 802ab56: bd10 pop {r4, pc} 802ab58: 3001 adds r0, #1 802ab5a: e7f2 b.n 802ab42 0802ab5c : 802ab5c: 4288 cmp r0, r1 802ab5e: b510 push {r4, lr} 802ab60: eb01 0402 add.w r4, r1, r2 802ab64: d902 bls.n 802ab6c 802ab66: 4284 cmp r4, r0 802ab68: 4623 mov r3, r4 802ab6a: d807 bhi.n 802ab7c 802ab6c: 1e43 subs r3, r0, #1 802ab6e: 42a1 cmp r1, r4 802ab70: d008 beq.n 802ab84 802ab72: f811 2b01 ldrb.w r2, [r1], #1 802ab76: f803 2f01 strb.w r2, [r3, #1]! 802ab7a: e7f8 b.n 802ab6e 802ab7c: 4402 add r2, r0 802ab7e: 4601 mov r1, r0 802ab80: 428a cmp r2, r1 802ab82: d100 bne.n 802ab86 802ab84: bd10 pop {r4, pc} 802ab86: f813 4d01 ldrb.w r4, [r3, #-1]! 802ab8a: f802 4d01 strb.w r4, [r2, #-1]! 802ab8e: e7f7 b.n 802ab80 0802ab90 : 802ab90: 4402 add r2, r0 802ab92: 4603 mov r3, r0 802ab94: 4293 cmp r3, r2 802ab96: d100 bne.n 802ab9a 802ab98: 4770 bx lr 802ab9a: f803 1b01 strb.w r1, [r3], #1 802ab9e: e7f9 b.n 802ab94 0802aba0 : 802aba0: b510 push {r4, lr} 802aba2: b16a cbz r2, 802abc0 802aba4: 3901 subs r1, #1 802aba6: 1884 adds r4, r0, r2 802aba8: f810 2b01 ldrb.w r2, [r0], #1 802abac: f811 3f01 ldrb.w r3, [r1, #1]! 802abb0: 429a cmp r2, r3 802abb2: d103 bne.n 802abbc 802abb4: 42a0 cmp r0, r4 802abb6: d001 beq.n 802abbc 802abb8: 2a00 cmp r2, #0 802abba: d1f5 bne.n 802aba8 802abbc: 1ad0 subs r0, r2, r3 802abbe: bd10 pop {r4, pc} 802abc0: 4610 mov r0, r2 802abc2: e7fc b.n 802abbe 0802abc4 <_localeconv_r>: 802abc4: 4800 ldr r0, [pc, #0] @ (802abc8 <_localeconv_r+0x4>) 802abc6: 4770 bx lr 802abc8: 24000158 .word 0x24000158 0802abcc <_close_r>: 802abcc: b538 push {r3, r4, r5, lr} 802abce: 4d06 ldr r5, [pc, #24] @ (802abe8 <_close_r+0x1c>) 802abd0: 2300 movs r3, #0 802abd2: 4604 mov r4, r0 802abd4: 4608 mov r0, r1 802abd6: 602b str r3, [r5, #0] 802abd8: f7d9 fb36 bl 8004248 <_close> 802abdc: 1c43 adds r3, r0, #1 802abde: d102 bne.n 802abe6 <_close_r+0x1a> 802abe0: 682b ldr r3, [r5, #0] 802abe2: b103 cbz r3, 802abe6 <_close_r+0x1a> 802abe4: 6023 str r3, [r4, #0] 802abe6: bd38 pop {r3, r4, r5, pc} 802abe8: 2402b260 .word 0x2402b260 0802abec <_reclaim_reent>: 802abec: 4b29 ldr r3, [pc, #164] @ (802ac94 <_reclaim_reent+0xa8>) 802abee: 681b ldr r3, [r3, #0] 802abf0: 4283 cmp r3, r0 802abf2: b570 push {r4, r5, r6, lr} 802abf4: 4604 mov r4, r0 802abf6: d04b beq.n 802ac90 <_reclaim_reent+0xa4> 802abf8: 69c3 ldr r3, [r0, #28] 802abfa: b1ab cbz r3, 802ac28 <_reclaim_reent+0x3c> 802abfc: 68db ldr r3, [r3, #12] 802abfe: b16b cbz r3, 802ac1c <_reclaim_reent+0x30> 802ac00: 2500 movs r5, #0 802ac02: 69e3 ldr r3, [r4, #28] 802ac04: 68db ldr r3, [r3, #12] 802ac06: 5959 ldr r1, [r3, r5] 802ac08: 2900 cmp r1, #0 802ac0a: d13b bne.n 802ac84 <_reclaim_reent+0x98> 802ac0c: 3504 adds r5, #4 802ac0e: 2d80 cmp r5, #128 @ 0x80 802ac10: d1f7 bne.n 802ac02 <_reclaim_reent+0x16> 802ac12: 69e3 ldr r3, [r4, #28] 802ac14: 4620 mov r0, r4 802ac16: 68d9 ldr r1, [r3, #12] 802ac18: f000 fec8 bl 802b9ac <_free_r> 802ac1c: 69e3 ldr r3, [r4, #28] 802ac1e: 6819 ldr r1, [r3, #0] 802ac20: b111 cbz r1, 802ac28 <_reclaim_reent+0x3c> 802ac22: 4620 mov r0, r4 802ac24: f000 fec2 bl 802b9ac <_free_r> 802ac28: 6961 ldr r1, [r4, #20] 802ac2a: b111 cbz r1, 802ac32 <_reclaim_reent+0x46> 802ac2c: 4620 mov r0, r4 802ac2e: f000 febd bl 802b9ac <_free_r> 802ac32: 69e1 ldr r1, [r4, #28] 802ac34: b111 cbz r1, 802ac3c <_reclaim_reent+0x50> 802ac36: 4620 mov r0, r4 802ac38: f000 feb8 bl 802b9ac <_free_r> 802ac3c: 6b21 ldr r1, [r4, #48] @ 0x30 802ac3e: b111 cbz r1, 802ac46 <_reclaim_reent+0x5a> 802ac40: 4620 mov r0, r4 802ac42: f000 feb3 bl 802b9ac <_free_r> 802ac46: 6b61 ldr r1, [r4, #52] @ 0x34 802ac48: b111 cbz r1, 802ac50 <_reclaim_reent+0x64> 802ac4a: 4620 mov r0, r4 802ac4c: f000 feae bl 802b9ac <_free_r> 802ac50: 6ba1 ldr r1, [r4, #56] @ 0x38 802ac52: b111 cbz r1, 802ac5a <_reclaim_reent+0x6e> 802ac54: 4620 mov r0, r4 802ac56: f000 fea9 bl 802b9ac <_free_r> 802ac5a: 6ca1 ldr r1, [r4, #72] @ 0x48 802ac5c: b111 cbz r1, 802ac64 <_reclaim_reent+0x78> 802ac5e: 4620 mov r0, r4 802ac60: f000 fea4 bl 802b9ac <_free_r> 802ac64: 6c61 ldr r1, [r4, #68] @ 0x44 802ac66: b111 cbz r1, 802ac6e <_reclaim_reent+0x82> 802ac68: 4620 mov r0, r4 802ac6a: f000 fe9f bl 802b9ac <_free_r> 802ac6e: 6ae1 ldr r1, [r4, #44] @ 0x2c 802ac70: b111 cbz r1, 802ac78 <_reclaim_reent+0x8c> 802ac72: 4620 mov r0, r4 802ac74: f000 fe9a bl 802b9ac <_free_r> 802ac78: 6a23 ldr r3, [r4, #32] 802ac7a: b14b cbz r3, 802ac90 <_reclaim_reent+0xa4> 802ac7c: 4620 mov r0, r4 802ac7e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} 802ac82: 4718 bx r3 802ac84: 680e ldr r6, [r1, #0] 802ac86: 4620 mov r0, r4 802ac88: f000 fe90 bl 802b9ac <_free_r> 802ac8c: 4631 mov r1, r6 802ac8e: e7bb b.n 802ac08 <_reclaim_reent+0x1c> 802ac90: bd70 pop {r4, r5, r6, pc} 802ac92: bf00 nop 802ac94: 240001d4 .word 0x240001d4 0802ac98 <_lseek_r>: 802ac98: b538 push {r3, r4, r5, lr} 802ac9a: 4d07 ldr r5, [pc, #28] @ (802acb8 <_lseek_r+0x20>) 802ac9c: 4604 mov r4, r0 802ac9e: 4608 mov r0, r1 802aca0: 4611 mov r1, r2 802aca2: 2200 movs r2, #0 802aca4: 602a str r2, [r5, #0] 802aca6: 461a mov r2, r3 802aca8: f7d9 faf5 bl 8004296 <_lseek> 802acac: 1c43 adds r3, r0, #1 802acae: d102 bne.n 802acb6 <_lseek_r+0x1e> 802acb0: 682b ldr r3, [r5, #0] 802acb2: b103 cbz r3, 802acb6 <_lseek_r+0x1e> 802acb4: 6023 str r3, [r4, #0] 802acb6: bd38 pop {r3, r4, r5, pc} 802acb8: 2402b260 .word 0x2402b260 0802acbc <_read_r>: 802acbc: b538 push {r3, r4, r5, lr} 802acbe: 4d07 ldr r5, [pc, #28] @ (802acdc <_read_r+0x20>) 802acc0: 4604 mov r4, r0 802acc2: 4608 mov r0, r1 802acc4: 4611 mov r1, r2 802acc6: 2200 movs r2, #0 802acc8: 602a str r2, [r5, #0] 802acca: 461a mov r2, r3 802accc: f7d9 fa83 bl 80041d6 <_read> 802acd0: 1c43 adds r3, r0, #1 802acd2: d102 bne.n 802acda <_read_r+0x1e> 802acd4: 682b ldr r3, [r5, #0] 802acd6: b103 cbz r3, 802acda <_read_r+0x1e> 802acd8: 6023 str r3, [r4, #0] 802acda: bd38 pop {r3, r4, r5, pc} 802acdc: 2402b260 .word 0x2402b260 0802ace0 <_sbrk_r>: 802ace0: b538 push {r3, r4, r5, lr} 802ace2: 4d06 ldr r5, [pc, #24] @ (802acfc <_sbrk_r+0x1c>) 802ace4: 2300 movs r3, #0 802ace6: 4604 mov r4, r0 802ace8: 4608 mov r0, r1 802acea: 602b str r3, [r5, #0] 802acec: f7d9 fae0 bl 80042b0 <_sbrk> 802acf0: 1c43 adds r3, r0, #1 802acf2: d102 bne.n 802acfa <_sbrk_r+0x1a> 802acf4: 682b ldr r3, [r5, #0] 802acf6: b103 cbz r3, 802acfa <_sbrk_r+0x1a> 802acf8: 6023 str r3, [r4, #0] 802acfa: bd38 pop {r3, r4, r5, pc} 802acfc: 2402b260 .word 0x2402b260 0802ad00 <_write_r>: 802ad00: b538 push {r3, r4, r5, lr} 802ad02: 4d07 ldr r5, [pc, #28] @ (802ad20 <_write_r+0x20>) 802ad04: 4604 mov r4, r0 802ad06: 4608 mov r0, r1 802ad08: 4611 mov r1, r2 802ad0a: 2200 movs r2, #0 802ad0c: 602a str r2, [r5, #0] 802ad0e: 461a mov r2, r3 802ad10: f7d9 fa7e bl 8004210 <_write> 802ad14: 1c43 adds r3, r0, #1 802ad16: d102 bne.n 802ad1e <_write_r+0x1e> 802ad18: 682b ldr r3, [r5, #0] 802ad1a: b103 cbz r3, 802ad1e <_write_r+0x1e> 802ad1c: 6023 str r3, [r4, #0] 802ad1e: bd38 pop {r3, r4, r5, pc} 802ad20: 2402b260 .word 0x2402b260 0802ad24 <__errno>: 802ad24: 4b01 ldr r3, [pc, #4] @ (802ad2c <__errno+0x8>) 802ad26: 6818 ldr r0, [r3, #0] 802ad28: 4770 bx lr 802ad2a: bf00 nop 802ad2c: 240001d4 .word 0x240001d4 0802ad30 <__libc_init_array>: 802ad30: b570 push {r4, r5, r6, lr} 802ad32: 4d0d ldr r5, [pc, #52] @ (802ad68 <__libc_init_array+0x38>) 802ad34: 4c0d ldr r4, [pc, #52] @ (802ad6c <__libc_init_array+0x3c>) 802ad36: 1b64 subs r4, r4, r5 802ad38: 10a4 asrs r4, r4, #2 802ad3a: 2600 movs r6, #0 802ad3c: 42a6 cmp r6, r4 802ad3e: d109 bne.n 802ad54 <__libc_init_array+0x24> 802ad40: 4d0b ldr r5, [pc, #44] @ (802ad70 <__libc_init_array+0x40>) 802ad42: 4c0c ldr r4, [pc, #48] @ (802ad74 <__libc_init_array+0x44>) 802ad44: f002 fac8 bl 802d2d8 <_init> 802ad48: 1b64 subs r4, r4, r5 802ad4a: 10a4 asrs r4, r4, #2 802ad4c: 2600 movs r6, #0 802ad4e: 42a6 cmp r6, r4 802ad50: d105 bne.n 802ad5e <__libc_init_array+0x2e> 802ad52: bd70 pop {r4, r5, r6, pc} 802ad54: f855 3b04 ldr.w r3, [r5], #4 802ad58: 4798 blx r3 802ad5a: 3601 adds r6, #1 802ad5c: e7ee b.n 802ad3c <__libc_init_array+0xc> 802ad5e: f855 3b04 ldr.w r3, [r5], #4 802ad62: 4798 blx r3 802ad64: 3601 adds r6, #1 802ad66: e7f2 b.n 802ad4e <__libc_init_array+0x1e> 802ad68: 08032114 .word 0x08032114 802ad6c: 08032114 .word 0x08032114 802ad70: 08032114 .word 0x08032114 802ad74: 08032118 .word 0x08032118 0802ad78 <__retarget_lock_init_recursive>: 802ad78: 4770 bx lr 0802ad7a <__retarget_lock_acquire_recursive>: 802ad7a: 4770 bx lr 0802ad7c <__retarget_lock_release_recursive>: 802ad7c: 4770 bx lr 0802ad7e : 802ad7e: 440a add r2, r1 802ad80: 4291 cmp r1, r2 802ad82: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff 802ad86: d100 bne.n 802ad8a 802ad88: 4770 bx lr 802ad8a: b510 push {r4, lr} 802ad8c: f811 4b01 ldrb.w r4, [r1], #1 802ad90: f803 4f01 strb.w r4, [r3, #1]! 802ad94: 4291 cmp r1, r2 802ad96: d1f9 bne.n 802ad8c 802ad98: bd10 pop {r4, pc} 802ad9a: 0000 movs r0, r0 802ad9c: 0000 movs r0, r0 ... 0802ada0 : 802ada0: ed9f 0b01 vldr d0, [pc, #4] @ 802ada8 802ada4: 4770 bx lr 802ada6: bf00 nop 802ada8: 00000000 .word 0x00000000 802adac: 7ff80000 .word 0x7ff80000 0802adb0 <__assert_func>: 802adb0: b51f push {r0, r1, r2, r3, r4, lr} 802adb2: 4614 mov r4, r2 802adb4: 461a mov r2, r3 802adb6: 4b09 ldr r3, [pc, #36] @ (802addc <__assert_func+0x2c>) 802adb8: 681b ldr r3, [r3, #0] 802adba: 4605 mov r5, r0 802adbc: 68d8 ldr r0, [r3, #12] 802adbe: b954 cbnz r4, 802add6 <__assert_func+0x26> 802adc0: 4b07 ldr r3, [pc, #28] @ (802ade0 <__assert_func+0x30>) 802adc2: 461c mov r4, r3 802adc4: e9cd 3401 strd r3, r4, [sp, #4] 802adc8: 9100 str r1, [sp, #0] 802adca: 462b mov r3, r5 802adcc: 4905 ldr r1, [pc, #20] @ (802ade4 <__assert_func+0x34>) 802adce: f002 f98d bl 802d0ec 802add2: f002 fa21 bl 802d218 802add6: 4b04 ldr r3, [pc, #16] @ (802ade8 <__assert_func+0x38>) 802add8: e7f4 b.n 802adc4 <__assert_func+0x14> 802adda: bf00 nop 802addc: 240001d4 .word 0x240001d4 802ade0: 08031ec8 .word 0x08031ec8 802ade4: 08031e9a .word 0x08031e9a 802ade8: 08031e8d .word 0x08031e8d 0802adec : 802adec: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802adf0: 6903 ldr r3, [r0, #16] 802adf2: 690c ldr r4, [r1, #16] 802adf4: 42a3 cmp r3, r4 802adf6: 4607 mov r7, r0 802adf8: db7e blt.n 802aef8 802adfa: 3c01 subs r4, #1 802adfc: f101 0814 add.w r8, r1, #20 802ae00: 00a3 lsls r3, r4, #2 802ae02: f100 0514 add.w r5, r0, #20 802ae06: 9300 str r3, [sp, #0] 802ae08: eb05 0384 add.w r3, r5, r4, lsl #2 802ae0c: 9301 str r3, [sp, #4] 802ae0e: f858 3024 ldr.w r3, [r8, r4, lsl #2] 802ae12: f855 2024 ldr.w r2, [r5, r4, lsl #2] 802ae16: 3301 adds r3, #1 802ae18: 429a cmp r2, r3 802ae1a: eb08 0984 add.w r9, r8, r4, lsl #2 802ae1e: fbb2 f6f3 udiv r6, r2, r3 802ae22: d32e bcc.n 802ae82 802ae24: f04f 0a00 mov.w sl, #0 802ae28: 46c4 mov ip, r8 802ae2a: 46ae mov lr, r5 802ae2c: 46d3 mov fp, sl 802ae2e: f85c 3b04 ldr.w r3, [ip], #4 802ae32: b298 uxth r0, r3 802ae34: fb06 a000 mla r0, r6, r0, sl 802ae38: 0c02 lsrs r2, r0, #16 802ae3a: 0c1b lsrs r3, r3, #16 802ae3c: fb06 2303 mla r3, r6, r3, r2 802ae40: f8de 2000 ldr.w r2, [lr] 802ae44: b280 uxth r0, r0 802ae46: b292 uxth r2, r2 802ae48: 1a12 subs r2, r2, r0 802ae4a: 445a add r2, fp 802ae4c: f8de 0000 ldr.w r0, [lr] 802ae50: ea4f 4a13 mov.w sl, r3, lsr #16 802ae54: b29b uxth r3, r3 802ae56: ebc3 4322 rsb r3, r3, r2, asr #16 802ae5a: eb03 4310 add.w r3, r3, r0, lsr #16 802ae5e: b292 uxth r2, r2 802ae60: ea42 4203 orr.w r2, r2, r3, lsl #16 802ae64: 45e1 cmp r9, ip 802ae66: f84e 2b04 str.w r2, [lr], #4 802ae6a: ea4f 4b23 mov.w fp, r3, asr #16 802ae6e: d2de bcs.n 802ae2e 802ae70: 9b00 ldr r3, [sp, #0] 802ae72: 58eb ldr r3, [r5, r3] 802ae74: b92b cbnz r3, 802ae82 802ae76: 9b01 ldr r3, [sp, #4] 802ae78: 3b04 subs r3, #4 802ae7a: 429d cmp r5, r3 802ae7c: 461a mov r2, r3 802ae7e: d32f bcc.n 802aee0 802ae80: 613c str r4, [r7, #16] 802ae82: 4638 mov r0, r7 802ae84: f001 fbec bl 802c660 <__mcmp> 802ae88: 2800 cmp r0, #0 802ae8a: db25 blt.n 802aed8 802ae8c: 4629 mov r1, r5 802ae8e: 2000 movs r0, #0 802ae90: f858 2b04 ldr.w r2, [r8], #4 802ae94: f8d1 c000 ldr.w ip, [r1] 802ae98: fa1f fe82 uxth.w lr, r2 802ae9c: fa1f f38c uxth.w r3, ip 802aea0: eba3 030e sub.w r3, r3, lr 802aea4: 4403 add r3, r0 802aea6: 0c12 lsrs r2, r2, #16 802aea8: ebc2 4223 rsb r2, r2, r3, asr #16 802aeac: eb02 421c add.w r2, r2, ip, lsr #16 802aeb0: b29b uxth r3, r3 802aeb2: ea43 4302 orr.w r3, r3, r2, lsl #16 802aeb6: 45c1 cmp r9, r8 802aeb8: f841 3b04 str.w r3, [r1], #4 802aebc: ea4f 4022 mov.w r0, r2, asr #16 802aec0: d2e6 bcs.n 802ae90 802aec2: f855 2024 ldr.w r2, [r5, r4, lsl #2] 802aec6: eb05 0384 add.w r3, r5, r4, lsl #2 802aeca: b922 cbnz r2, 802aed6 802aecc: 3b04 subs r3, #4 802aece: 429d cmp r5, r3 802aed0: 461a mov r2, r3 802aed2: d30b bcc.n 802aeec 802aed4: 613c str r4, [r7, #16] 802aed6: 3601 adds r6, #1 802aed8: 4630 mov r0, r6 802aeda: b003 add sp, #12 802aedc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802aee0: 6812 ldr r2, [r2, #0] 802aee2: 3b04 subs r3, #4 802aee4: 2a00 cmp r2, #0 802aee6: d1cb bne.n 802ae80 802aee8: 3c01 subs r4, #1 802aeea: e7c6 b.n 802ae7a 802aeec: 6812 ldr r2, [r2, #0] 802aeee: 3b04 subs r3, #4 802aef0: 2a00 cmp r2, #0 802aef2: d1ef bne.n 802aed4 802aef4: 3c01 subs r4, #1 802aef6: e7ea b.n 802aece 802aef8: 2000 movs r0, #0 802aefa: e7ee b.n 802aeda 802aefc: 0000 movs r0, r0 ... 0802af00 <_dtoa_r>: 802af00: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802af04: ed2d 8b02 vpush {d8} 802af08: 69c7 ldr r7, [r0, #28] 802af0a: b091 sub sp, #68 @ 0x44 802af0c: ed8d 0b02 vstr d0, [sp, #8] 802af10: ec55 4b10 vmov r4, r5, d0 802af14: 9e1c ldr r6, [sp, #112] @ 0x70 802af16: 9107 str r1, [sp, #28] 802af18: 4681 mov r9, r0 802af1a: 9209 str r2, [sp, #36] @ 0x24 802af1c: 930d str r3, [sp, #52] @ 0x34 802af1e: b97f cbnz r7, 802af40 <_dtoa_r+0x40> 802af20: 2010 movs r0, #16 802af22: f7fe f8bb bl 802909c 802af26: 4602 mov r2, r0 802af28: f8c9 001c str.w r0, [r9, #28] 802af2c: b920 cbnz r0, 802af38 <_dtoa_r+0x38> 802af2e: 4ba0 ldr r3, [pc, #640] @ (802b1b0 <_dtoa_r+0x2b0>) 802af30: 21ef movs r1, #239 @ 0xef 802af32: 48a0 ldr r0, [pc, #640] @ (802b1b4 <_dtoa_r+0x2b4>) 802af34: f7ff ff3c bl 802adb0 <__assert_func> 802af38: e9c0 7701 strd r7, r7, [r0, #4] 802af3c: 6007 str r7, [r0, #0] 802af3e: 60c7 str r7, [r0, #12] 802af40: f8d9 301c ldr.w r3, [r9, #28] 802af44: 6819 ldr r1, [r3, #0] 802af46: b159 cbz r1, 802af60 <_dtoa_r+0x60> 802af48: 685a ldr r2, [r3, #4] 802af4a: 604a str r2, [r1, #4] 802af4c: 2301 movs r3, #1 802af4e: 4093 lsls r3, r2 802af50: 608b str r3, [r1, #8] 802af52: 4648 mov r0, r9 802af54: f001 f900 bl 802c158 <_Bfree> 802af58: f8d9 301c ldr.w r3, [r9, #28] 802af5c: 2200 movs r2, #0 802af5e: 601a str r2, [r3, #0] 802af60: 1e2b subs r3, r5, #0 802af62: bfbb ittet lt 802af64: f023 4300 biclt.w r3, r3, #2147483648 @ 0x80000000 802af68: 9303 strlt r3, [sp, #12] 802af6a: 2300 movge r3, #0 802af6c: 2201 movlt r2, #1 802af6e: bfac ite ge 802af70: 6033 strge r3, [r6, #0] 802af72: 6032 strlt r2, [r6, #0] 802af74: 4b90 ldr r3, [pc, #576] @ (802b1b8 <_dtoa_r+0x2b8>) 802af76: 9e03 ldr r6, [sp, #12] 802af78: 43b3 bics r3, r6 802af7a: d110 bne.n 802af9e <_dtoa_r+0x9e> 802af7c: 9a0d ldr r2, [sp, #52] @ 0x34 802af7e: f242 730f movw r3, #9999 @ 0x270f 802af82: 6013 str r3, [r2, #0] 802af84: f3c6 0313 ubfx r3, r6, #0, #20 802af88: 4323 orrs r3, r4 802af8a: f000 84de beq.w 802b94a <_dtoa_r+0xa4a> 802af8e: 9b1d ldr r3, [sp, #116] @ 0x74 802af90: 4f8a ldr r7, [pc, #552] @ (802b1bc <_dtoa_r+0x2bc>) 802af92: 2b00 cmp r3, #0 802af94: f000 84e0 beq.w 802b958 <_dtoa_r+0xa58> 802af98: 1cfb adds r3, r7, #3 802af9a: f000 bcdb b.w 802b954 <_dtoa_r+0xa54> 802af9e: ed9d 8b02 vldr d8, [sp, #8] 802afa2: eeb5 8b40 vcmp.f64 d8, #0.0 802afa6: eef1 fa10 vmrs APSR_nzcv, fpscr 802afaa: d10a bne.n 802afc2 <_dtoa_r+0xc2> 802afac: 9a0d ldr r2, [sp, #52] @ 0x34 802afae: 2301 movs r3, #1 802afb0: 6013 str r3, [r2, #0] 802afb2: 9b1d ldr r3, [sp, #116] @ 0x74 802afb4: b113 cbz r3, 802afbc <_dtoa_r+0xbc> 802afb6: 9a1d ldr r2, [sp, #116] @ 0x74 802afb8: 4b81 ldr r3, [pc, #516] @ (802b1c0 <_dtoa_r+0x2c0>) 802afba: 6013 str r3, [r2, #0] 802afbc: 4f81 ldr r7, [pc, #516] @ (802b1c4 <_dtoa_r+0x2c4>) 802afbe: f000 bccb b.w 802b958 <_dtoa_r+0xa58> 802afc2: aa0e add r2, sp, #56 @ 0x38 802afc4: a90f add r1, sp, #60 @ 0x3c 802afc6: 4648 mov r0, r9 802afc8: eeb0 0b48 vmov.f64 d0, d8 802afcc: f001 fc68 bl 802c8a0 <__d2b> 802afd0: f3c6 530a ubfx r3, r6, #20, #11 802afd4: 9a0e ldr r2, [sp, #56] @ 0x38 802afd6: 9001 str r0, [sp, #4] 802afd8: 2b00 cmp r3, #0 802afda: d045 beq.n 802b068 <_dtoa_r+0x168> 802afdc: eeb0 7b48 vmov.f64 d7, d8 802afe0: ee18 1a90 vmov r1, s17 802afe4: f3c1 0113 ubfx r1, r1, #0, #20 802afe8: f041 517f orr.w r1, r1, #1069547520 @ 0x3fc00000 802afec: f441 1140 orr.w r1, r1, #3145728 @ 0x300000 802aff0: f2a3 33ff subw r3, r3, #1023 @ 0x3ff 802aff4: 2500 movs r5, #0 802aff6: ee07 1a90 vmov s15, r1 802affa: eeb7 6b08 vmov.f64 d6, #120 @ 0x3fc00000 1.5 802affe: ed9f 5b66 vldr d5, [pc, #408] @ 802b198 <_dtoa_r+0x298> 802b002: ee37 7b46 vsub.f64 d7, d7, d6 802b006: ed9f 6b66 vldr d6, [pc, #408] @ 802b1a0 <_dtoa_r+0x2a0> 802b00a: eea7 6b05 vfma.f64 d6, d7, d5 802b00e: ed9f 5b66 vldr d5, [pc, #408] @ 802b1a8 <_dtoa_r+0x2a8> 802b012: ee07 3a90 vmov s15, r3 802b016: eeb8 4be7 vcvt.f64.s32 d4, s15 802b01a: eeb0 7b46 vmov.f64 d7, d6 802b01e: eea4 7b05 vfma.f64 d7, d4, d5 802b022: eefd 6bc7 vcvt.s32.f64 s13, d7 802b026: eeb5 7bc0 vcmpe.f64 d7, #0.0 802b02a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b02e: ee16 8a90 vmov r8, s13 802b032: d508 bpl.n 802b046 <_dtoa_r+0x146> 802b034: eeb8 6be6 vcvt.f64.s32 d6, s13 802b038: eeb4 6b47 vcmp.f64 d6, d7 802b03c: eef1 fa10 vmrs APSR_nzcv, fpscr 802b040: bf18 it ne 802b042: f108 38ff addne.w r8, r8, #4294967295 @ 0xffffffff 802b046: f1b8 0f16 cmp.w r8, #22 802b04a: d82b bhi.n 802b0a4 <_dtoa_r+0x1a4> 802b04c: 495e ldr r1, [pc, #376] @ (802b1c8 <_dtoa_r+0x2c8>) 802b04e: eb01 01c8 add.w r1, r1, r8, lsl #3 802b052: ed91 7b00 vldr d7, [r1] 802b056: eeb4 8bc7 vcmpe.f64 d8, d7 802b05a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b05e: d501 bpl.n 802b064 <_dtoa_r+0x164> 802b060: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 802b064: 2100 movs r1, #0 802b066: e01e b.n 802b0a6 <_dtoa_r+0x1a6> 802b068: 9b0f ldr r3, [sp, #60] @ 0x3c 802b06a: 4413 add r3, r2 802b06c: f203 4132 addw r1, r3, #1074 @ 0x432 802b070: 2920 cmp r1, #32 802b072: bfc1 itttt gt 802b074: f1c1 0140 rsbgt r1, r1, #64 @ 0x40 802b078: 408e lslgt r6, r1 802b07a: f203 4112 addwgt r1, r3, #1042 @ 0x412 802b07e: fa24 f101 lsrgt.w r1, r4, r1 802b082: bfd6 itet le 802b084: f1c1 0120 rsble r1, r1, #32 802b088: 4331 orrgt r1, r6 802b08a: fa04 f101 lslle.w r1, r4, r1 802b08e: ee07 1a90 vmov s15, r1 802b092: eeb8 7b67 vcvt.f64.u32 d7, s15 802b096: 3b01 subs r3, #1 802b098: ee17 1a90 vmov r1, s15 802b09c: 2501 movs r5, #1 802b09e: f1a1 71f8 sub.w r1, r1, #32505856 @ 0x1f00000 802b0a2: e7a8 b.n 802aff6 <_dtoa_r+0xf6> 802b0a4: 2101 movs r1, #1 802b0a6: 1ad2 subs r2, r2, r3 802b0a8: 1e53 subs r3, r2, #1 802b0aa: 9306 str r3, [sp, #24] 802b0ac: bf45 ittet mi 802b0ae: f1c2 0301 rsbmi r3, r2, #1 802b0b2: 9305 strmi r3, [sp, #20] 802b0b4: 2300 movpl r3, #0 802b0b6: 2300 movmi r3, #0 802b0b8: bf4c ite mi 802b0ba: 9306 strmi r3, [sp, #24] 802b0bc: 9305 strpl r3, [sp, #20] 802b0be: f1b8 0f00 cmp.w r8, #0 802b0c2: 910c str r1, [sp, #48] @ 0x30 802b0c4: db18 blt.n 802b0f8 <_dtoa_r+0x1f8> 802b0c6: 9b06 ldr r3, [sp, #24] 802b0c8: f8cd 8028 str.w r8, [sp, #40] @ 0x28 802b0cc: 4443 add r3, r8 802b0ce: 9306 str r3, [sp, #24] 802b0d0: 2300 movs r3, #0 802b0d2: 9a07 ldr r2, [sp, #28] 802b0d4: 2a09 cmp r2, #9 802b0d6: d849 bhi.n 802b16c <_dtoa_r+0x26c> 802b0d8: 2a05 cmp r2, #5 802b0da: bfc4 itt gt 802b0dc: 3a04 subgt r2, #4 802b0de: 9207 strgt r2, [sp, #28] 802b0e0: 9a07 ldr r2, [sp, #28] 802b0e2: f1a2 0202 sub.w r2, r2, #2 802b0e6: bfcc ite gt 802b0e8: 2400 movgt r4, #0 802b0ea: 2401 movle r4, #1 802b0ec: 2a03 cmp r2, #3 802b0ee: d848 bhi.n 802b182 <_dtoa_r+0x282> 802b0f0: e8df f002 tbb [pc, r2] 802b0f4: 3a2c2e0b .word 0x3a2c2e0b 802b0f8: 9b05 ldr r3, [sp, #20] 802b0fa: 2200 movs r2, #0 802b0fc: eba3 0308 sub.w r3, r3, r8 802b100: 9305 str r3, [sp, #20] 802b102: 920a str r2, [sp, #40] @ 0x28 802b104: f1c8 0300 rsb r3, r8, #0 802b108: e7e3 b.n 802b0d2 <_dtoa_r+0x1d2> 802b10a: 2200 movs r2, #0 802b10c: 9208 str r2, [sp, #32] 802b10e: 9a09 ldr r2, [sp, #36] @ 0x24 802b110: 2a00 cmp r2, #0 802b112: dc39 bgt.n 802b188 <_dtoa_r+0x288> 802b114: f04f 0b01 mov.w fp, #1 802b118: 46da mov sl, fp 802b11a: 465a mov r2, fp 802b11c: f8cd b024 str.w fp, [sp, #36] @ 0x24 802b120: f8d9 701c ldr.w r7, [r9, #28] 802b124: 2100 movs r1, #0 802b126: 2004 movs r0, #4 802b128: f100 0614 add.w r6, r0, #20 802b12c: 4296 cmp r6, r2 802b12e: d930 bls.n 802b192 <_dtoa_r+0x292> 802b130: 6079 str r1, [r7, #4] 802b132: 4648 mov r0, r9 802b134: 9304 str r3, [sp, #16] 802b136: f000 ffcf bl 802c0d8 <_Balloc> 802b13a: 9b04 ldr r3, [sp, #16] 802b13c: 4607 mov r7, r0 802b13e: 2800 cmp r0, #0 802b140: d146 bne.n 802b1d0 <_dtoa_r+0x2d0> 802b142: 4b22 ldr r3, [pc, #136] @ (802b1cc <_dtoa_r+0x2cc>) 802b144: 4602 mov r2, r0 802b146: f240 11af movw r1, #431 @ 0x1af 802b14a: e6f2 b.n 802af32 <_dtoa_r+0x32> 802b14c: 2201 movs r2, #1 802b14e: e7dd b.n 802b10c <_dtoa_r+0x20c> 802b150: 2200 movs r2, #0 802b152: 9208 str r2, [sp, #32] 802b154: 9a09 ldr r2, [sp, #36] @ 0x24 802b156: eb08 0b02 add.w fp, r8, r2 802b15a: f10b 0a01 add.w sl, fp, #1 802b15e: 4652 mov r2, sl 802b160: 2a01 cmp r2, #1 802b162: bfb8 it lt 802b164: 2201 movlt r2, #1 802b166: e7db b.n 802b120 <_dtoa_r+0x220> 802b168: 2201 movs r2, #1 802b16a: e7f2 b.n 802b152 <_dtoa_r+0x252> 802b16c: 2401 movs r4, #1 802b16e: 2200 movs r2, #0 802b170: e9cd 2407 strd r2, r4, [sp, #28] 802b174: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff 802b178: 2100 movs r1, #0 802b17a: 46da mov sl, fp 802b17c: 2212 movs r2, #18 802b17e: 9109 str r1, [sp, #36] @ 0x24 802b180: e7ce b.n 802b120 <_dtoa_r+0x220> 802b182: 2201 movs r2, #1 802b184: 9208 str r2, [sp, #32] 802b186: e7f5 b.n 802b174 <_dtoa_r+0x274> 802b188: f8dd b024 ldr.w fp, [sp, #36] @ 0x24 802b18c: 46da mov sl, fp 802b18e: 465a mov r2, fp 802b190: e7c6 b.n 802b120 <_dtoa_r+0x220> 802b192: 3101 adds r1, #1 802b194: 0040 lsls r0, r0, #1 802b196: e7c7 b.n 802b128 <_dtoa_r+0x228> 802b198: 636f4361 .word 0x636f4361 802b19c: 3fd287a7 .word 0x3fd287a7 802b1a0: 8b60c8b3 .word 0x8b60c8b3 802b1a4: 3fc68a28 .word 0x3fc68a28 802b1a8: 509f79fb .word 0x509f79fb 802b1ac: 3fd34413 .word 0x3fd34413 802b1b0: 08031c8e .word 0x08031c8e 802b1b4: 08031ed6 .word 0x08031ed6 802b1b8: 7ff00000 .word 0x7ff00000 802b1bc: 08031ed2 .word 0x08031ed2 802b1c0: 08031e62 .word 0x08031e62 802b1c4: 08031e61 .word 0x08031e61 802b1c8: 08032030 .word 0x08032030 802b1cc: 08031f2e .word 0x08031f2e 802b1d0: f8d9 201c ldr.w r2, [r9, #28] 802b1d4: f1ba 0f0e cmp.w sl, #14 802b1d8: 6010 str r0, [r2, #0] 802b1da: d86f bhi.n 802b2bc <_dtoa_r+0x3bc> 802b1dc: 2c00 cmp r4, #0 802b1de: d06d beq.n 802b2bc <_dtoa_r+0x3bc> 802b1e0: f1b8 0f00 cmp.w r8, #0 802b1e4: f340 80c2 ble.w 802b36c <_dtoa_r+0x46c> 802b1e8: 4aca ldr r2, [pc, #808] @ (802b514 <_dtoa_r+0x614>) 802b1ea: f008 010f and.w r1, r8, #15 802b1ee: eb02 02c1 add.w r2, r2, r1, lsl #3 802b1f2: f418 7f80 tst.w r8, #256 @ 0x100 802b1f6: ed92 7b00 vldr d7, [r2] 802b1fa: ea4f 1128 mov.w r1, r8, asr #4 802b1fe: f000 80a9 beq.w 802b354 <_dtoa_r+0x454> 802b202: 4ac5 ldr r2, [pc, #788] @ (802b518 <_dtoa_r+0x618>) 802b204: ed92 6b08 vldr d6, [r2, #32] 802b208: ee88 6b06 vdiv.f64 d6, d8, d6 802b20c: ed8d 6b02 vstr d6, [sp, #8] 802b210: f001 010f and.w r1, r1, #15 802b214: 2203 movs r2, #3 802b216: 48c0 ldr r0, [pc, #768] @ (802b518 <_dtoa_r+0x618>) 802b218: 2900 cmp r1, #0 802b21a: f040 809d bne.w 802b358 <_dtoa_r+0x458> 802b21e: ed9d 6b02 vldr d6, [sp, #8] 802b222: ee86 7b07 vdiv.f64 d7, d6, d7 802b226: ed8d 7b02 vstr d7, [sp, #8] 802b22a: 990c ldr r1, [sp, #48] @ 0x30 802b22c: ed9d 7b02 vldr d7, [sp, #8] 802b230: 2900 cmp r1, #0 802b232: f000 80c1 beq.w 802b3b8 <_dtoa_r+0x4b8> 802b236: eeb7 6b00 vmov.f64 d6, #112 @ 0x3f800000 1.0 802b23a: eeb4 7bc6 vcmpe.f64 d7, d6 802b23e: eef1 fa10 vmrs APSR_nzcv, fpscr 802b242: f140 80b9 bpl.w 802b3b8 <_dtoa_r+0x4b8> 802b246: f1ba 0f00 cmp.w sl, #0 802b24a: f000 80b5 beq.w 802b3b8 <_dtoa_r+0x4b8> 802b24e: f1bb 0f00 cmp.w fp, #0 802b252: dd31 ble.n 802b2b8 <_dtoa_r+0x3b8> 802b254: eeb2 6b04 vmov.f64 d6, #36 @ 0x41200000 10.0 802b258: ee27 7b06 vmul.f64 d7, d7, d6 802b25c: ed8d 7b02 vstr d7, [sp, #8] 802b260: f108 31ff add.w r1, r8, #4294967295 @ 0xffffffff 802b264: 9104 str r1, [sp, #16] 802b266: 3201 adds r2, #1 802b268: 465c mov r4, fp 802b26a: ed9d 6b02 vldr d6, [sp, #8] 802b26e: eeb1 5b0c vmov.f64 d5, #28 @ 0x40e00000 7.0 802b272: ee07 2a90 vmov s15, r2 802b276: eeb8 7be7 vcvt.f64.s32 d7, s15 802b27a: eea7 5b06 vfma.f64 d5, d7, d6 802b27e: ee15 2a90 vmov r2, s11 802b282: ec51 0b15 vmov r0, r1, d5 802b286: f1a2 7150 sub.w r1, r2, #54525952 @ 0x3400000 802b28a: 2c00 cmp r4, #0 802b28c: f040 8098 bne.w 802b3c0 <_dtoa_r+0x4c0> 802b290: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802b294: ee36 6b47 vsub.f64 d6, d6, d7 802b298: ec41 0b17 vmov d7, r0, r1 802b29c: eeb4 6bc7 vcmpe.f64 d6, d7 802b2a0: eef1 fa10 vmrs APSR_nzcv, fpscr 802b2a4: f300 8261 bgt.w 802b76a <_dtoa_r+0x86a> 802b2a8: eeb1 7b47 vneg.f64 d7, d7 802b2ac: eeb4 6bc7 vcmpe.f64 d6, d7 802b2b0: eef1 fa10 vmrs APSR_nzcv, fpscr 802b2b4: f100 80f5 bmi.w 802b4a2 <_dtoa_r+0x5a2> 802b2b8: ed8d 8b02 vstr d8, [sp, #8] 802b2bc: 9a0f ldr r2, [sp, #60] @ 0x3c 802b2be: 2a00 cmp r2, #0 802b2c0: f2c0 812c blt.w 802b51c <_dtoa_r+0x61c> 802b2c4: f1b8 0f0e cmp.w r8, #14 802b2c8: f300 8128 bgt.w 802b51c <_dtoa_r+0x61c> 802b2cc: 4b91 ldr r3, [pc, #580] @ (802b514 <_dtoa_r+0x614>) 802b2ce: eb03 03c8 add.w r3, r3, r8, lsl #3 802b2d2: ed93 6b00 vldr d6, [r3] 802b2d6: 9b09 ldr r3, [sp, #36] @ 0x24 802b2d8: 2b00 cmp r3, #0 802b2da: da03 bge.n 802b2e4 <_dtoa_r+0x3e4> 802b2dc: f1ba 0f00 cmp.w sl, #0 802b2e0: f340 80d2 ble.w 802b488 <_dtoa_r+0x588> 802b2e4: eeb2 4b04 vmov.f64 d4, #36 @ 0x41200000 10.0 802b2e8: ed9d 7b02 vldr d7, [sp, #8] 802b2ec: 463e mov r6, r7 802b2ee: ee87 5b06 vdiv.f64 d5, d7, d6 802b2f2: eebd 5bc5 vcvt.s32.f64 s10, d5 802b2f6: ee15 3a10 vmov r3, s10 802b2fa: 3330 adds r3, #48 @ 0x30 802b2fc: f806 3b01 strb.w r3, [r6], #1 802b300: 1bf3 subs r3, r6, r7 802b302: 459a cmp sl, r3 802b304: eeb8 3bc5 vcvt.f64.s32 d3, s10 802b308: eea3 7b46 vfms.f64 d7, d3, d6 802b30c: f040 80f8 bne.w 802b500 <_dtoa_r+0x600> 802b310: ee37 7b07 vadd.f64 d7, d7, d7 802b314: eeb4 7bc6 vcmpe.f64 d7, d6 802b318: eef1 fa10 vmrs APSR_nzcv, fpscr 802b31c: f300 80dd bgt.w 802b4da <_dtoa_r+0x5da> 802b320: eeb4 7b46 vcmp.f64 d7, d6 802b324: eef1 fa10 vmrs APSR_nzcv, fpscr 802b328: d104 bne.n 802b334 <_dtoa_r+0x434> 802b32a: ee15 3a10 vmov r3, s10 802b32e: 07db lsls r3, r3, #31 802b330: f100 80d3 bmi.w 802b4da <_dtoa_r+0x5da> 802b334: 9901 ldr r1, [sp, #4] 802b336: 4648 mov r0, r9 802b338: f000 ff0e bl 802c158 <_Bfree> 802b33c: 2300 movs r3, #0 802b33e: 9a0d ldr r2, [sp, #52] @ 0x34 802b340: 7033 strb r3, [r6, #0] 802b342: f108 0301 add.w r3, r8, #1 802b346: 6013 str r3, [r2, #0] 802b348: 9b1d ldr r3, [sp, #116] @ 0x74 802b34a: 2b00 cmp r3, #0 802b34c: f000 8304 beq.w 802b958 <_dtoa_r+0xa58> 802b350: 601e str r6, [r3, #0] 802b352: e301 b.n 802b958 <_dtoa_r+0xa58> 802b354: 2202 movs r2, #2 802b356: e75e b.n 802b216 <_dtoa_r+0x316> 802b358: 07cc lsls r4, r1, #31 802b35a: d504 bpl.n 802b366 <_dtoa_r+0x466> 802b35c: ed90 6b00 vldr d6, [r0] 802b360: 3201 adds r2, #1 802b362: ee27 7b06 vmul.f64 d7, d7, d6 802b366: 1049 asrs r1, r1, #1 802b368: 3008 adds r0, #8 802b36a: e755 b.n 802b218 <_dtoa_r+0x318> 802b36c: d022 beq.n 802b3b4 <_dtoa_r+0x4b4> 802b36e: f1c8 0100 rsb r1, r8, #0 802b372: 4a68 ldr r2, [pc, #416] @ (802b514 <_dtoa_r+0x614>) 802b374: f001 000f and.w r0, r1, #15 802b378: eb02 02c0 add.w r2, r2, r0, lsl #3 802b37c: ed92 7b00 vldr d7, [r2] 802b380: ee28 7b07 vmul.f64 d7, d8, d7 802b384: ed8d 7b02 vstr d7, [sp, #8] 802b388: 4863 ldr r0, [pc, #396] @ (802b518 <_dtoa_r+0x618>) 802b38a: 1109 asrs r1, r1, #4 802b38c: 2400 movs r4, #0 802b38e: 2202 movs r2, #2 802b390: b929 cbnz r1, 802b39e <_dtoa_r+0x49e> 802b392: 2c00 cmp r4, #0 802b394: f43f af49 beq.w 802b22a <_dtoa_r+0x32a> 802b398: ed8d 7b02 vstr d7, [sp, #8] 802b39c: e745 b.n 802b22a <_dtoa_r+0x32a> 802b39e: 07ce lsls r6, r1, #31 802b3a0: d505 bpl.n 802b3ae <_dtoa_r+0x4ae> 802b3a2: ed90 6b00 vldr d6, [r0] 802b3a6: 3201 adds r2, #1 802b3a8: 2401 movs r4, #1 802b3aa: ee27 7b06 vmul.f64 d7, d7, d6 802b3ae: 1049 asrs r1, r1, #1 802b3b0: 3008 adds r0, #8 802b3b2: e7ed b.n 802b390 <_dtoa_r+0x490> 802b3b4: 2202 movs r2, #2 802b3b6: e738 b.n 802b22a <_dtoa_r+0x32a> 802b3b8: f8cd 8010 str.w r8, [sp, #16] 802b3bc: 4654 mov r4, sl 802b3be: e754 b.n 802b26a <_dtoa_r+0x36a> 802b3c0: 4a54 ldr r2, [pc, #336] @ (802b514 <_dtoa_r+0x614>) 802b3c2: eb02 02c4 add.w r2, r2, r4, lsl #3 802b3c6: ed12 4b02 vldr d4, [r2, #-8] 802b3ca: 9a08 ldr r2, [sp, #32] 802b3cc: ec41 0b17 vmov d7, r0, r1 802b3d0: 443c add r4, r7 802b3d2: b34a cbz r2, 802b428 <_dtoa_r+0x528> 802b3d4: eeb6 3b00 vmov.f64 d3, #96 @ 0x3f000000 0.5 802b3d8: eeb7 2b00 vmov.f64 d2, #112 @ 0x3f800000 1.0 802b3dc: 463e mov r6, r7 802b3de: ee83 5b04 vdiv.f64 d5, d3, d4 802b3e2: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802b3e6: ee35 7b47 vsub.f64 d7, d5, d7 802b3ea: eefd 4bc6 vcvt.s32.f64 s9, d6 802b3ee: ee14 2a90 vmov r2, s9 802b3f2: eeb8 5be4 vcvt.f64.s32 d5, s9 802b3f6: 3230 adds r2, #48 @ 0x30 802b3f8: ee36 6b45 vsub.f64 d6, d6, d5 802b3fc: eeb4 6bc7 vcmpe.f64 d6, d7 802b400: eef1 fa10 vmrs APSR_nzcv, fpscr 802b404: f806 2b01 strb.w r2, [r6], #1 802b408: d438 bmi.n 802b47c <_dtoa_r+0x57c> 802b40a: ee32 5b46 vsub.f64 d5, d2, d6 802b40e: eeb4 5bc7 vcmpe.f64 d5, d7 802b412: eef1 fa10 vmrs APSR_nzcv, fpscr 802b416: d462 bmi.n 802b4de <_dtoa_r+0x5de> 802b418: 42a6 cmp r6, r4 802b41a: f43f af4d beq.w 802b2b8 <_dtoa_r+0x3b8> 802b41e: ee27 7b03 vmul.f64 d7, d7, d3 802b422: ee26 6b03 vmul.f64 d6, d6, d3 802b426: e7e0 b.n 802b3ea <_dtoa_r+0x4ea> 802b428: 4621 mov r1, r4 802b42a: 463e mov r6, r7 802b42c: ee27 7b04 vmul.f64 d7, d7, d4 802b430: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802b434: eefd 4bc6 vcvt.s32.f64 s9, d6 802b438: ee14 2a90 vmov r2, s9 802b43c: 3230 adds r2, #48 @ 0x30 802b43e: f806 2b01 strb.w r2, [r6], #1 802b442: 42a6 cmp r6, r4 802b444: eeb8 5be4 vcvt.f64.s32 d5, s9 802b448: ee36 6b45 vsub.f64 d6, d6, d5 802b44c: d119 bne.n 802b482 <_dtoa_r+0x582> 802b44e: eeb6 5b00 vmov.f64 d5, #96 @ 0x3f000000 0.5 802b452: ee37 4b05 vadd.f64 d4, d7, d5 802b456: eeb4 6bc4 vcmpe.f64 d6, d4 802b45a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b45e: dc3e bgt.n 802b4de <_dtoa_r+0x5de> 802b460: ee35 5b47 vsub.f64 d5, d5, d7 802b464: eeb4 6bc5 vcmpe.f64 d6, d5 802b468: eef1 fa10 vmrs APSR_nzcv, fpscr 802b46c: f57f af24 bpl.w 802b2b8 <_dtoa_r+0x3b8> 802b470: 460e mov r6, r1 802b472: 3901 subs r1, #1 802b474: f816 3c01 ldrb.w r3, [r6, #-1] 802b478: 2b30 cmp r3, #48 @ 0x30 802b47a: d0f9 beq.n 802b470 <_dtoa_r+0x570> 802b47c: f8dd 8010 ldr.w r8, [sp, #16] 802b480: e758 b.n 802b334 <_dtoa_r+0x434> 802b482: ee26 6b03 vmul.f64 d6, d6, d3 802b486: e7d5 b.n 802b434 <_dtoa_r+0x534> 802b488: d10b bne.n 802b4a2 <_dtoa_r+0x5a2> 802b48a: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802b48e: ee26 6b07 vmul.f64 d6, d6, d7 802b492: ed9d 7b02 vldr d7, [sp, #8] 802b496: eeb4 6bc7 vcmpe.f64 d6, d7 802b49a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b49e: f2c0 8161 blt.w 802b764 <_dtoa_r+0x864> 802b4a2: 2400 movs r4, #0 802b4a4: 4625 mov r5, r4 802b4a6: 9b09 ldr r3, [sp, #36] @ 0x24 802b4a8: 43db mvns r3, r3 802b4aa: 9304 str r3, [sp, #16] 802b4ac: 463e mov r6, r7 802b4ae: f04f 0800 mov.w r8, #0 802b4b2: 4621 mov r1, r4 802b4b4: 4648 mov r0, r9 802b4b6: f000 fe4f bl 802c158 <_Bfree> 802b4ba: 2d00 cmp r5, #0 802b4bc: d0de beq.n 802b47c <_dtoa_r+0x57c> 802b4be: f1b8 0f00 cmp.w r8, #0 802b4c2: d005 beq.n 802b4d0 <_dtoa_r+0x5d0> 802b4c4: 45a8 cmp r8, r5 802b4c6: d003 beq.n 802b4d0 <_dtoa_r+0x5d0> 802b4c8: 4641 mov r1, r8 802b4ca: 4648 mov r0, r9 802b4cc: f000 fe44 bl 802c158 <_Bfree> 802b4d0: 4629 mov r1, r5 802b4d2: 4648 mov r0, r9 802b4d4: f000 fe40 bl 802c158 <_Bfree> 802b4d8: e7d0 b.n 802b47c <_dtoa_r+0x57c> 802b4da: f8cd 8010 str.w r8, [sp, #16] 802b4de: 4633 mov r3, r6 802b4e0: 461e mov r6, r3 802b4e2: f813 2d01 ldrb.w r2, [r3, #-1]! 802b4e6: 2a39 cmp r2, #57 @ 0x39 802b4e8: d106 bne.n 802b4f8 <_dtoa_r+0x5f8> 802b4ea: 429f cmp r7, r3 802b4ec: d1f8 bne.n 802b4e0 <_dtoa_r+0x5e0> 802b4ee: 9a04 ldr r2, [sp, #16] 802b4f0: 3201 adds r2, #1 802b4f2: 9204 str r2, [sp, #16] 802b4f4: 2230 movs r2, #48 @ 0x30 802b4f6: 703a strb r2, [r7, #0] 802b4f8: 781a ldrb r2, [r3, #0] 802b4fa: 3201 adds r2, #1 802b4fc: 701a strb r2, [r3, #0] 802b4fe: e7bd b.n 802b47c <_dtoa_r+0x57c> 802b500: ee27 7b04 vmul.f64 d7, d7, d4 802b504: eeb5 7b40 vcmp.f64 d7, #0.0 802b508: eef1 fa10 vmrs APSR_nzcv, fpscr 802b50c: f47f aeef bne.w 802b2ee <_dtoa_r+0x3ee> 802b510: e710 b.n 802b334 <_dtoa_r+0x434> 802b512: bf00 nop 802b514: 08032030 .word 0x08032030 802b518: 08032008 .word 0x08032008 802b51c: 9908 ldr r1, [sp, #32] 802b51e: 2900 cmp r1, #0 802b520: f000 80e3 beq.w 802b6ea <_dtoa_r+0x7ea> 802b524: 9907 ldr r1, [sp, #28] 802b526: 2901 cmp r1, #1 802b528: f300 80c8 bgt.w 802b6bc <_dtoa_r+0x7bc> 802b52c: 2d00 cmp r5, #0 802b52e: f000 80c1 beq.w 802b6b4 <_dtoa_r+0x7b4> 802b532: f202 4233 addw r2, r2, #1075 @ 0x433 802b536: 9e05 ldr r6, [sp, #20] 802b538: 461c mov r4, r3 802b53a: 9304 str r3, [sp, #16] 802b53c: 9b05 ldr r3, [sp, #20] 802b53e: 4413 add r3, r2 802b540: 9305 str r3, [sp, #20] 802b542: 9b06 ldr r3, [sp, #24] 802b544: 2101 movs r1, #1 802b546: 4413 add r3, r2 802b548: 4648 mov r0, r9 802b54a: 9306 str r3, [sp, #24] 802b54c: f000 ff02 bl 802c354 <__i2b> 802b550: 9b04 ldr r3, [sp, #16] 802b552: 4605 mov r5, r0 802b554: b166 cbz r6, 802b570 <_dtoa_r+0x670> 802b556: 9a06 ldr r2, [sp, #24] 802b558: 2a00 cmp r2, #0 802b55a: dd09 ble.n 802b570 <_dtoa_r+0x670> 802b55c: 42b2 cmp r2, r6 802b55e: 9905 ldr r1, [sp, #20] 802b560: bfa8 it ge 802b562: 4632 movge r2, r6 802b564: 1a89 subs r1, r1, r2 802b566: 9105 str r1, [sp, #20] 802b568: 9906 ldr r1, [sp, #24] 802b56a: 1ab6 subs r6, r6, r2 802b56c: 1a8a subs r2, r1, r2 802b56e: 9206 str r2, [sp, #24] 802b570: b1fb cbz r3, 802b5b2 <_dtoa_r+0x6b2> 802b572: 9a08 ldr r2, [sp, #32] 802b574: 2a00 cmp r2, #0 802b576: f000 80bc beq.w 802b6f2 <_dtoa_r+0x7f2> 802b57a: b19c cbz r4, 802b5a4 <_dtoa_r+0x6a4> 802b57c: 4629 mov r1, r5 802b57e: 4622 mov r2, r4 802b580: 4648 mov r0, r9 802b582: 930b str r3, [sp, #44] @ 0x2c 802b584: f000 ffa6 bl 802c4d4 <__pow5mult> 802b588: 9a01 ldr r2, [sp, #4] 802b58a: 4601 mov r1, r0 802b58c: 4605 mov r5, r0 802b58e: 4648 mov r0, r9 802b590: f000 fef6 bl 802c380 <__multiply> 802b594: 9901 ldr r1, [sp, #4] 802b596: 9004 str r0, [sp, #16] 802b598: 4648 mov r0, r9 802b59a: f000 fddd bl 802c158 <_Bfree> 802b59e: 9a04 ldr r2, [sp, #16] 802b5a0: 9b0b ldr r3, [sp, #44] @ 0x2c 802b5a2: 9201 str r2, [sp, #4] 802b5a4: 1b1a subs r2, r3, r4 802b5a6: d004 beq.n 802b5b2 <_dtoa_r+0x6b2> 802b5a8: 9901 ldr r1, [sp, #4] 802b5aa: 4648 mov r0, r9 802b5ac: f000 ff92 bl 802c4d4 <__pow5mult> 802b5b0: 9001 str r0, [sp, #4] 802b5b2: 2101 movs r1, #1 802b5b4: 4648 mov r0, r9 802b5b6: f000 fecd bl 802c354 <__i2b> 802b5ba: 9b0a ldr r3, [sp, #40] @ 0x28 802b5bc: 4604 mov r4, r0 802b5be: 2b00 cmp r3, #0 802b5c0: f000 81d0 beq.w 802b964 <_dtoa_r+0xa64> 802b5c4: 461a mov r2, r3 802b5c6: 4601 mov r1, r0 802b5c8: 4648 mov r0, r9 802b5ca: f000 ff83 bl 802c4d4 <__pow5mult> 802b5ce: 9b07 ldr r3, [sp, #28] 802b5d0: 2b01 cmp r3, #1 802b5d2: 4604 mov r4, r0 802b5d4: f300 8095 bgt.w 802b702 <_dtoa_r+0x802> 802b5d8: 9b02 ldr r3, [sp, #8] 802b5da: 2b00 cmp r3, #0 802b5dc: f040 808b bne.w 802b6f6 <_dtoa_r+0x7f6> 802b5e0: 9b03 ldr r3, [sp, #12] 802b5e2: f3c3 0213 ubfx r2, r3, #0, #20 802b5e6: 2a00 cmp r2, #0 802b5e8: f040 8087 bne.w 802b6fa <_dtoa_r+0x7fa> 802b5ec: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 802b5f0: 0d12 lsrs r2, r2, #20 802b5f2: 0512 lsls r2, r2, #20 802b5f4: 2a00 cmp r2, #0 802b5f6: f000 8082 beq.w 802b6fe <_dtoa_r+0x7fe> 802b5fa: 9b05 ldr r3, [sp, #20] 802b5fc: 3301 adds r3, #1 802b5fe: 9305 str r3, [sp, #20] 802b600: 9b06 ldr r3, [sp, #24] 802b602: 3301 adds r3, #1 802b604: 9306 str r3, [sp, #24] 802b606: 2301 movs r3, #1 802b608: 930b str r3, [sp, #44] @ 0x2c 802b60a: 9b0a ldr r3, [sp, #40] @ 0x28 802b60c: 2b00 cmp r3, #0 802b60e: f000 81af beq.w 802b970 <_dtoa_r+0xa70> 802b612: 6922 ldr r2, [r4, #16] 802b614: eb04 0282 add.w r2, r4, r2, lsl #2 802b618: 6910 ldr r0, [r2, #16] 802b61a: f000 fe4f bl 802c2bc <__hi0bits> 802b61e: f1c0 0020 rsb r0, r0, #32 802b622: 9b06 ldr r3, [sp, #24] 802b624: 4418 add r0, r3 802b626: f010 001f ands.w r0, r0, #31 802b62a: d076 beq.n 802b71a <_dtoa_r+0x81a> 802b62c: f1c0 0220 rsb r2, r0, #32 802b630: 2a04 cmp r2, #4 802b632: dd69 ble.n 802b708 <_dtoa_r+0x808> 802b634: 9b05 ldr r3, [sp, #20] 802b636: f1c0 001c rsb r0, r0, #28 802b63a: 4403 add r3, r0 802b63c: 9305 str r3, [sp, #20] 802b63e: 9b06 ldr r3, [sp, #24] 802b640: 4406 add r6, r0 802b642: 4403 add r3, r0 802b644: 9306 str r3, [sp, #24] 802b646: 9b05 ldr r3, [sp, #20] 802b648: 2b00 cmp r3, #0 802b64a: dd05 ble.n 802b658 <_dtoa_r+0x758> 802b64c: 9901 ldr r1, [sp, #4] 802b64e: 461a mov r2, r3 802b650: 4648 mov r0, r9 802b652: f000 ff99 bl 802c588 <__lshift> 802b656: 9001 str r0, [sp, #4] 802b658: 9b06 ldr r3, [sp, #24] 802b65a: 2b00 cmp r3, #0 802b65c: dd05 ble.n 802b66a <_dtoa_r+0x76a> 802b65e: 4621 mov r1, r4 802b660: 461a mov r2, r3 802b662: 4648 mov r0, r9 802b664: f000 ff90 bl 802c588 <__lshift> 802b668: 4604 mov r4, r0 802b66a: 9b0c ldr r3, [sp, #48] @ 0x30 802b66c: 2b00 cmp r3, #0 802b66e: d056 beq.n 802b71e <_dtoa_r+0x81e> 802b670: 9801 ldr r0, [sp, #4] 802b672: 4621 mov r1, r4 802b674: f000 fff4 bl 802c660 <__mcmp> 802b678: 2800 cmp r0, #0 802b67a: da50 bge.n 802b71e <_dtoa_r+0x81e> 802b67c: f108 33ff add.w r3, r8, #4294967295 @ 0xffffffff 802b680: 9304 str r3, [sp, #16] 802b682: 9901 ldr r1, [sp, #4] 802b684: 2300 movs r3, #0 802b686: 220a movs r2, #10 802b688: 4648 mov r0, r9 802b68a: f000 fd87 bl 802c19c <__multadd> 802b68e: 9b08 ldr r3, [sp, #32] 802b690: 9001 str r0, [sp, #4] 802b692: 2b00 cmp r3, #0 802b694: f000 816e beq.w 802b974 <_dtoa_r+0xa74> 802b698: 4629 mov r1, r5 802b69a: 2300 movs r3, #0 802b69c: 220a movs r2, #10 802b69e: 4648 mov r0, r9 802b6a0: f000 fd7c bl 802c19c <__multadd> 802b6a4: f1bb 0f00 cmp.w fp, #0 802b6a8: 4605 mov r5, r0 802b6aa: dc64 bgt.n 802b776 <_dtoa_r+0x876> 802b6ac: 9b07 ldr r3, [sp, #28] 802b6ae: 2b02 cmp r3, #2 802b6b0: dc3e bgt.n 802b730 <_dtoa_r+0x830> 802b6b2: e060 b.n 802b776 <_dtoa_r+0x876> 802b6b4: 9a0e ldr r2, [sp, #56] @ 0x38 802b6b6: f1c2 0236 rsb r2, r2, #54 @ 0x36 802b6ba: e73c b.n 802b536 <_dtoa_r+0x636> 802b6bc: f10a 34ff add.w r4, sl, #4294967295 @ 0xffffffff 802b6c0: 42a3 cmp r3, r4 802b6c2: bfbf itttt lt 802b6c4: 1ae2 sublt r2, r4, r3 802b6c6: 9b0a ldrlt r3, [sp, #40] @ 0x28 802b6c8: 189b addlt r3, r3, r2 802b6ca: 930a strlt r3, [sp, #40] @ 0x28 802b6cc: bfae itee ge 802b6ce: 1b1c subge r4, r3, r4 802b6d0: 4623 movlt r3, r4 802b6d2: 2400 movlt r4, #0 802b6d4: f1ba 0f00 cmp.w sl, #0 802b6d8: bfb5 itete lt 802b6da: 9a05 ldrlt r2, [sp, #20] 802b6dc: 9e05 ldrge r6, [sp, #20] 802b6de: eba2 060a sublt.w r6, r2, sl 802b6e2: 4652 movge r2, sl 802b6e4: bfb8 it lt 802b6e6: 2200 movlt r2, #0 802b6e8: e727 b.n 802b53a <_dtoa_r+0x63a> 802b6ea: 9e05 ldr r6, [sp, #20] 802b6ec: 9d08 ldr r5, [sp, #32] 802b6ee: 461c mov r4, r3 802b6f0: e730 b.n 802b554 <_dtoa_r+0x654> 802b6f2: 461a mov r2, r3 802b6f4: e758 b.n 802b5a8 <_dtoa_r+0x6a8> 802b6f6: 2300 movs r3, #0 802b6f8: e786 b.n 802b608 <_dtoa_r+0x708> 802b6fa: 9b02 ldr r3, [sp, #8] 802b6fc: e784 b.n 802b608 <_dtoa_r+0x708> 802b6fe: 920b str r2, [sp, #44] @ 0x2c 802b700: e783 b.n 802b60a <_dtoa_r+0x70a> 802b702: 2300 movs r3, #0 802b704: 930b str r3, [sp, #44] @ 0x2c 802b706: e784 b.n 802b612 <_dtoa_r+0x712> 802b708: d09d beq.n 802b646 <_dtoa_r+0x746> 802b70a: 9b05 ldr r3, [sp, #20] 802b70c: 321c adds r2, #28 802b70e: 4413 add r3, r2 802b710: 9305 str r3, [sp, #20] 802b712: 9b06 ldr r3, [sp, #24] 802b714: 4416 add r6, r2 802b716: 4413 add r3, r2 802b718: e794 b.n 802b644 <_dtoa_r+0x744> 802b71a: 4602 mov r2, r0 802b71c: e7f5 b.n 802b70a <_dtoa_r+0x80a> 802b71e: f1ba 0f00 cmp.w sl, #0 802b722: f8cd 8010 str.w r8, [sp, #16] 802b726: 46d3 mov fp, sl 802b728: dc21 bgt.n 802b76e <_dtoa_r+0x86e> 802b72a: 9b07 ldr r3, [sp, #28] 802b72c: 2b02 cmp r3, #2 802b72e: dd1e ble.n 802b76e <_dtoa_r+0x86e> 802b730: f1bb 0f00 cmp.w fp, #0 802b734: f47f aeb7 bne.w 802b4a6 <_dtoa_r+0x5a6> 802b738: 4621 mov r1, r4 802b73a: 465b mov r3, fp 802b73c: 2205 movs r2, #5 802b73e: 4648 mov r0, r9 802b740: f000 fd2c bl 802c19c <__multadd> 802b744: 4601 mov r1, r0 802b746: 4604 mov r4, r0 802b748: 9801 ldr r0, [sp, #4] 802b74a: f000 ff89 bl 802c660 <__mcmp> 802b74e: 2800 cmp r0, #0 802b750: f77f aea9 ble.w 802b4a6 <_dtoa_r+0x5a6> 802b754: 463e mov r6, r7 802b756: 2331 movs r3, #49 @ 0x31 802b758: f806 3b01 strb.w r3, [r6], #1 802b75c: 9b04 ldr r3, [sp, #16] 802b75e: 3301 adds r3, #1 802b760: 9304 str r3, [sp, #16] 802b762: e6a4 b.n 802b4ae <_dtoa_r+0x5ae> 802b764: f8cd 8010 str.w r8, [sp, #16] 802b768: 4654 mov r4, sl 802b76a: 4625 mov r5, r4 802b76c: e7f2 b.n 802b754 <_dtoa_r+0x854> 802b76e: 9b08 ldr r3, [sp, #32] 802b770: 2b00 cmp r3, #0 802b772: f000 8103 beq.w 802b97c <_dtoa_r+0xa7c> 802b776: 2e00 cmp r6, #0 802b778: dd05 ble.n 802b786 <_dtoa_r+0x886> 802b77a: 4629 mov r1, r5 802b77c: 4632 mov r2, r6 802b77e: 4648 mov r0, r9 802b780: f000 ff02 bl 802c588 <__lshift> 802b784: 4605 mov r5, r0 802b786: 9b0b ldr r3, [sp, #44] @ 0x2c 802b788: 2b00 cmp r3, #0 802b78a: d058 beq.n 802b83e <_dtoa_r+0x93e> 802b78c: 6869 ldr r1, [r5, #4] 802b78e: 4648 mov r0, r9 802b790: f000 fca2 bl 802c0d8 <_Balloc> 802b794: 4606 mov r6, r0 802b796: b928 cbnz r0, 802b7a4 <_dtoa_r+0x8a4> 802b798: 4b82 ldr r3, [pc, #520] @ (802b9a4 <_dtoa_r+0xaa4>) 802b79a: 4602 mov r2, r0 802b79c: f240 21ef movw r1, #751 @ 0x2ef 802b7a0: f7ff bbc7 b.w 802af32 <_dtoa_r+0x32> 802b7a4: 692a ldr r2, [r5, #16] 802b7a6: 3202 adds r2, #2 802b7a8: 0092 lsls r2, r2, #2 802b7aa: f105 010c add.w r1, r5, #12 802b7ae: 300c adds r0, #12 802b7b0: f7ff fae5 bl 802ad7e 802b7b4: 2201 movs r2, #1 802b7b6: 4631 mov r1, r6 802b7b8: 4648 mov r0, r9 802b7ba: f000 fee5 bl 802c588 <__lshift> 802b7be: 1c7b adds r3, r7, #1 802b7c0: 9305 str r3, [sp, #20] 802b7c2: eb07 030b add.w r3, r7, fp 802b7c6: 9309 str r3, [sp, #36] @ 0x24 802b7c8: 9b02 ldr r3, [sp, #8] 802b7ca: f003 0301 and.w r3, r3, #1 802b7ce: 46a8 mov r8, r5 802b7d0: 9308 str r3, [sp, #32] 802b7d2: 4605 mov r5, r0 802b7d4: 9b05 ldr r3, [sp, #20] 802b7d6: 9801 ldr r0, [sp, #4] 802b7d8: 4621 mov r1, r4 802b7da: f103 3bff add.w fp, r3, #4294967295 @ 0xffffffff 802b7de: f7ff fb05 bl 802adec 802b7e2: 4641 mov r1, r8 802b7e4: 9002 str r0, [sp, #8] 802b7e6: f100 0a30 add.w sl, r0, #48 @ 0x30 802b7ea: 9801 ldr r0, [sp, #4] 802b7ec: f000 ff38 bl 802c660 <__mcmp> 802b7f0: 462a mov r2, r5 802b7f2: 9006 str r0, [sp, #24] 802b7f4: 4621 mov r1, r4 802b7f6: 4648 mov r0, r9 802b7f8: f000 ff4e bl 802c698 <__mdiff> 802b7fc: 68c2 ldr r2, [r0, #12] 802b7fe: 4606 mov r6, r0 802b800: b9fa cbnz r2, 802b842 <_dtoa_r+0x942> 802b802: 4601 mov r1, r0 802b804: 9801 ldr r0, [sp, #4] 802b806: f000 ff2b bl 802c660 <__mcmp> 802b80a: 4602 mov r2, r0 802b80c: 4631 mov r1, r6 802b80e: 4648 mov r0, r9 802b810: 920a str r2, [sp, #40] @ 0x28 802b812: f000 fca1 bl 802c158 <_Bfree> 802b816: 9b07 ldr r3, [sp, #28] 802b818: 9a0a ldr r2, [sp, #40] @ 0x28 802b81a: 9e05 ldr r6, [sp, #20] 802b81c: ea43 0102 orr.w r1, r3, r2 802b820: 9b08 ldr r3, [sp, #32] 802b822: 4319 orrs r1, r3 802b824: d10f bne.n 802b846 <_dtoa_r+0x946> 802b826: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b82a: d028 beq.n 802b87e <_dtoa_r+0x97e> 802b82c: 9b06 ldr r3, [sp, #24] 802b82e: 2b00 cmp r3, #0 802b830: dd02 ble.n 802b838 <_dtoa_r+0x938> 802b832: 9b02 ldr r3, [sp, #8] 802b834: f103 0a31 add.w sl, r3, #49 @ 0x31 802b838: f88b a000 strb.w sl, [fp] 802b83c: e639 b.n 802b4b2 <_dtoa_r+0x5b2> 802b83e: 4628 mov r0, r5 802b840: e7bd b.n 802b7be <_dtoa_r+0x8be> 802b842: 2201 movs r2, #1 802b844: e7e2 b.n 802b80c <_dtoa_r+0x90c> 802b846: 9b06 ldr r3, [sp, #24] 802b848: 2b00 cmp r3, #0 802b84a: db04 blt.n 802b856 <_dtoa_r+0x956> 802b84c: 9907 ldr r1, [sp, #28] 802b84e: 430b orrs r3, r1 802b850: 9908 ldr r1, [sp, #32] 802b852: 430b orrs r3, r1 802b854: d120 bne.n 802b898 <_dtoa_r+0x998> 802b856: 2a00 cmp r2, #0 802b858: ddee ble.n 802b838 <_dtoa_r+0x938> 802b85a: 9901 ldr r1, [sp, #4] 802b85c: 2201 movs r2, #1 802b85e: 4648 mov r0, r9 802b860: f000 fe92 bl 802c588 <__lshift> 802b864: 4621 mov r1, r4 802b866: 9001 str r0, [sp, #4] 802b868: f000 fefa bl 802c660 <__mcmp> 802b86c: 2800 cmp r0, #0 802b86e: dc03 bgt.n 802b878 <_dtoa_r+0x978> 802b870: d1e2 bne.n 802b838 <_dtoa_r+0x938> 802b872: f01a 0f01 tst.w sl, #1 802b876: d0df beq.n 802b838 <_dtoa_r+0x938> 802b878: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b87c: d1d9 bne.n 802b832 <_dtoa_r+0x932> 802b87e: 2339 movs r3, #57 @ 0x39 802b880: f88b 3000 strb.w r3, [fp] 802b884: 4633 mov r3, r6 802b886: 461e mov r6, r3 802b888: 3b01 subs r3, #1 802b88a: f816 2c01 ldrb.w r2, [r6, #-1] 802b88e: 2a39 cmp r2, #57 @ 0x39 802b890: d053 beq.n 802b93a <_dtoa_r+0xa3a> 802b892: 3201 adds r2, #1 802b894: 701a strb r2, [r3, #0] 802b896: e60c b.n 802b4b2 <_dtoa_r+0x5b2> 802b898: 2a00 cmp r2, #0 802b89a: dd07 ble.n 802b8ac <_dtoa_r+0x9ac> 802b89c: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b8a0: d0ed beq.n 802b87e <_dtoa_r+0x97e> 802b8a2: f10a 0301 add.w r3, sl, #1 802b8a6: f88b 3000 strb.w r3, [fp] 802b8aa: e602 b.n 802b4b2 <_dtoa_r+0x5b2> 802b8ac: 9b05 ldr r3, [sp, #20] 802b8ae: 9a05 ldr r2, [sp, #20] 802b8b0: f803 ac01 strb.w sl, [r3, #-1] 802b8b4: 9b09 ldr r3, [sp, #36] @ 0x24 802b8b6: 4293 cmp r3, r2 802b8b8: d029 beq.n 802b90e <_dtoa_r+0xa0e> 802b8ba: 9901 ldr r1, [sp, #4] 802b8bc: 2300 movs r3, #0 802b8be: 220a movs r2, #10 802b8c0: 4648 mov r0, r9 802b8c2: f000 fc6b bl 802c19c <__multadd> 802b8c6: 45a8 cmp r8, r5 802b8c8: 9001 str r0, [sp, #4] 802b8ca: f04f 0300 mov.w r3, #0 802b8ce: f04f 020a mov.w r2, #10 802b8d2: 4641 mov r1, r8 802b8d4: 4648 mov r0, r9 802b8d6: d107 bne.n 802b8e8 <_dtoa_r+0x9e8> 802b8d8: f000 fc60 bl 802c19c <__multadd> 802b8dc: 4680 mov r8, r0 802b8de: 4605 mov r5, r0 802b8e0: 9b05 ldr r3, [sp, #20] 802b8e2: 3301 adds r3, #1 802b8e4: 9305 str r3, [sp, #20] 802b8e6: e775 b.n 802b7d4 <_dtoa_r+0x8d4> 802b8e8: f000 fc58 bl 802c19c <__multadd> 802b8ec: 4629 mov r1, r5 802b8ee: 4680 mov r8, r0 802b8f0: 2300 movs r3, #0 802b8f2: 220a movs r2, #10 802b8f4: 4648 mov r0, r9 802b8f6: f000 fc51 bl 802c19c <__multadd> 802b8fa: 4605 mov r5, r0 802b8fc: e7f0 b.n 802b8e0 <_dtoa_r+0x9e0> 802b8fe: f1bb 0f00 cmp.w fp, #0 802b902: bfcc ite gt 802b904: 465e movgt r6, fp 802b906: 2601 movle r6, #1 802b908: 443e add r6, r7 802b90a: f04f 0800 mov.w r8, #0 802b90e: 9901 ldr r1, [sp, #4] 802b910: 2201 movs r2, #1 802b912: 4648 mov r0, r9 802b914: f000 fe38 bl 802c588 <__lshift> 802b918: 4621 mov r1, r4 802b91a: 9001 str r0, [sp, #4] 802b91c: f000 fea0 bl 802c660 <__mcmp> 802b920: 2800 cmp r0, #0 802b922: dcaf bgt.n 802b884 <_dtoa_r+0x984> 802b924: d102 bne.n 802b92c <_dtoa_r+0xa2c> 802b926: f01a 0f01 tst.w sl, #1 802b92a: d1ab bne.n 802b884 <_dtoa_r+0x984> 802b92c: 4633 mov r3, r6 802b92e: 461e mov r6, r3 802b930: f813 2d01 ldrb.w r2, [r3, #-1]! 802b934: 2a30 cmp r2, #48 @ 0x30 802b936: d0fa beq.n 802b92e <_dtoa_r+0xa2e> 802b938: e5bb b.n 802b4b2 <_dtoa_r+0x5b2> 802b93a: 429f cmp r7, r3 802b93c: d1a3 bne.n 802b886 <_dtoa_r+0x986> 802b93e: 9b04 ldr r3, [sp, #16] 802b940: 3301 adds r3, #1 802b942: 9304 str r3, [sp, #16] 802b944: 2331 movs r3, #49 @ 0x31 802b946: 703b strb r3, [r7, #0] 802b948: e5b3 b.n 802b4b2 <_dtoa_r+0x5b2> 802b94a: 9b1d ldr r3, [sp, #116] @ 0x74 802b94c: 4f16 ldr r7, [pc, #88] @ (802b9a8 <_dtoa_r+0xaa8>) 802b94e: b11b cbz r3, 802b958 <_dtoa_r+0xa58> 802b950: f107 0308 add.w r3, r7, #8 802b954: 9a1d ldr r2, [sp, #116] @ 0x74 802b956: 6013 str r3, [r2, #0] 802b958: 4638 mov r0, r7 802b95a: b011 add sp, #68 @ 0x44 802b95c: ecbd 8b02 vpop {d8} 802b960: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b964: 9b07 ldr r3, [sp, #28] 802b966: 2b01 cmp r3, #1 802b968: f77f ae36 ble.w 802b5d8 <_dtoa_r+0x6d8> 802b96c: 9b0a ldr r3, [sp, #40] @ 0x28 802b96e: 930b str r3, [sp, #44] @ 0x2c 802b970: 2001 movs r0, #1 802b972: e656 b.n 802b622 <_dtoa_r+0x722> 802b974: f1bb 0f00 cmp.w fp, #0 802b978: f77f aed7 ble.w 802b72a <_dtoa_r+0x82a> 802b97c: 463e mov r6, r7 802b97e: 9801 ldr r0, [sp, #4] 802b980: 4621 mov r1, r4 802b982: f7ff fa33 bl 802adec 802b986: f100 0a30 add.w sl, r0, #48 @ 0x30 802b98a: f806 ab01 strb.w sl, [r6], #1 802b98e: 1bf2 subs r2, r6, r7 802b990: 4593 cmp fp, r2 802b992: ddb4 ble.n 802b8fe <_dtoa_r+0x9fe> 802b994: 9901 ldr r1, [sp, #4] 802b996: 2300 movs r3, #0 802b998: 220a movs r2, #10 802b99a: 4648 mov r0, r9 802b99c: f000 fbfe bl 802c19c <__multadd> 802b9a0: 9001 str r0, [sp, #4] 802b9a2: e7ec b.n 802b97e <_dtoa_r+0xa7e> 802b9a4: 08031f2e .word 0x08031f2e 802b9a8: 08031ec9 .word 0x08031ec9 0802b9ac <_free_r>: 802b9ac: b538 push {r3, r4, r5, lr} 802b9ae: 4605 mov r5, r0 802b9b0: 2900 cmp r1, #0 802b9b2: d041 beq.n 802ba38 <_free_r+0x8c> 802b9b4: f851 3c04 ldr.w r3, [r1, #-4] 802b9b8: 1f0c subs r4, r1, #4 802b9ba: 2b00 cmp r3, #0 802b9bc: bfb8 it lt 802b9be: 18e4 addlt r4, r4, r3 802b9c0: f7fd fc1e bl 8029200 <__malloc_lock> 802b9c4: 4a1d ldr r2, [pc, #116] @ (802ba3c <_free_r+0x90>) 802b9c6: 6813 ldr r3, [r2, #0] 802b9c8: b933 cbnz r3, 802b9d8 <_free_r+0x2c> 802b9ca: 6063 str r3, [r4, #4] 802b9cc: 6014 str r4, [r2, #0] 802b9ce: 4628 mov r0, r5 802b9d0: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802b9d4: f7fd bc1a b.w 802920c <__malloc_unlock> 802b9d8: 42a3 cmp r3, r4 802b9da: d908 bls.n 802b9ee <_free_r+0x42> 802b9dc: 6820 ldr r0, [r4, #0] 802b9de: 1821 adds r1, r4, r0 802b9e0: 428b cmp r3, r1 802b9e2: bf01 itttt eq 802b9e4: 6819 ldreq r1, [r3, #0] 802b9e6: 685b ldreq r3, [r3, #4] 802b9e8: 1809 addeq r1, r1, r0 802b9ea: 6021 streq r1, [r4, #0] 802b9ec: e7ed b.n 802b9ca <_free_r+0x1e> 802b9ee: 461a mov r2, r3 802b9f0: 685b ldr r3, [r3, #4] 802b9f2: b10b cbz r3, 802b9f8 <_free_r+0x4c> 802b9f4: 42a3 cmp r3, r4 802b9f6: d9fa bls.n 802b9ee <_free_r+0x42> 802b9f8: 6811 ldr r1, [r2, #0] 802b9fa: 1850 adds r0, r2, r1 802b9fc: 42a0 cmp r0, r4 802b9fe: d10b bne.n 802ba18 <_free_r+0x6c> 802ba00: 6820 ldr r0, [r4, #0] 802ba02: 4401 add r1, r0 802ba04: 1850 adds r0, r2, r1 802ba06: 4283 cmp r3, r0 802ba08: 6011 str r1, [r2, #0] 802ba0a: d1e0 bne.n 802b9ce <_free_r+0x22> 802ba0c: 6818 ldr r0, [r3, #0] 802ba0e: 685b ldr r3, [r3, #4] 802ba10: 6053 str r3, [r2, #4] 802ba12: 4408 add r0, r1 802ba14: 6010 str r0, [r2, #0] 802ba16: e7da b.n 802b9ce <_free_r+0x22> 802ba18: d902 bls.n 802ba20 <_free_r+0x74> 802ba1a: 230c movs r3, #12 802ba1c: 602b str r3, [r5, #0] 802ba1e: e7d6 b.n 802b9ce <_free_r+0x22> 802ba20: 6820 ldr r0, [r4, #0] 802ba22: 1821 adds r1, r4, r0 802ba24: 428b cmp r3, r1 802ba26: bf04 itt eq 802ba28: 6819 ldreq r1, [r3, #0] 802ba2a: 685b ldreq r3, [r3, #4] 802ba2c: 6063 str r3, [r4, #4] 802ba2e: bf04 itt eq 802ba30: 1809 addeq r1, r1, r0 802ba32: 6021 streq r1, [r4, #0] 802ba34: 6054 str r4, [r2, #4] 802ba36: e7ca b.n 802b9ce <_free_r+0x22> 802ba38: bd38 pop {r3, r4, r5, pc} 802ba3a: bf00 nop 802ba3c: 2402b120 .word 0x2402b120 0802ba40 : 802ba40: 6903 ldr r3, [r0, #16] 802ba42: ebb3 1f61 cmp.w r3, r1, asr #5 802ba46: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802ba4a: ea4f 1261 mov.w r2, r1, asr #5 802ba4e: f100 0414 add.w r4, r0, #20 802ba52: dd45 ble.n 802bae0 802ba54: f011 011f ands.w r1, r1, #31 802ba58: eb04 0683 add.w r6, r4, r3, lsl #2 802ba5c: eb04 0582 add.w r5, r4, r2, lsl #2 802ba60: d10c bne.n 802ba7c 802ba62: f100 0710 add.w r7, r0, #16 802ba66: 4629 mov r1, r5 802ba68: 42b1 cmp r1, r6 802ba6a: d334 bcc.n 802bad6 802ba6c: 1a9b subs r3, r3, r2 802ba6e: 009b lsls r3, r3, #2 802ba70: 1eea subs r2, r5, #3 802ba72: 4296 cmp r6, r2 802ba74: bf38 it cc 802ba76: 2300 movcc r3, #0 802ba78: 4423 add r3, r4 802ba7a: e015 b.n 802baa8 802ba7c: f854 7022 ldr.w r7, [r4, r2, lsl #2] 802ba80: f1c1 0820 rsb r8, r1, #32 802ba84: 40cf lsrs r7, r1 802ba86: f105 0e04 add.w lr, r5, #4 802ba8a: 46a1 mov r9, r4 802ba8c: 4576 cmp r6, lr 802ba8e: 46f4 mov ip, lr 802ba90: d815 bhi.n 802babe 802ba92: 1a9a subs r2, r3, r2 802ba94: 0092 lsls r2, r2, #2 802ba96: 3a04 subs r2, #4 802ba98: 3501 adds r5, #1 802ba9a: 42ae cmp r6, r5 802ba9c: bf38 it cc 802ba9e: 2200 movcc r2, #0 802baa0: 18a3 adds r3, r4, r2 802baa2: 50a7 str r7, [r4, r2] 802baa4: b107 cbz r7, 802baa8 802baa6: 3304 adds r3, #4 802baa8: 1b1a subs r2, r3, r4 802baaa: 42a3 cmp r3, r4 802baac: ea4f 02a2 mov.w r2, r2, asr #2 802bab0: bf08 it eq 802bab2: 2300 moveq r3, #0 802bab4: 6102 str r2, [r0, #16] 802bab6: bf08 it eq 802bab8: 6143 streq r3, [r0, #20] 802baba: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802babe: f8dc c000 ldr.w ip, [ip] 802bac2: fa0c fc08 lsl.w ip, ip, r8 802bac6: ea4c 0707 orr.w r7, ip, r7 802baca: f849 7b04 str.w r7, [r9], #4 802bace: f85e 7b04 ldr.w r7, [lr], #4 802bad2: 40cf lsrs r7, r1 802bad4: e7da b.n 802ba8c 802bad6: f851 cb04 ldr.w ip, [r1], #4 802bada: f847 cf04 str.w ip, [r7, #4]! 802bade: e7c3 b.n 802ba68 802bae0: 4623 mov r3, r4 802bae2: e7e1 b.n 802baa8 0802bae4 <__hexdig_fun>: 802bae4: f1a0 0330 sub.w r3, r0, #48 @ 0x30 802bae8: 2b09 cmp r3, #9 802baea: d802 bhi.n 802baf2 <__hexdig_fun+0xe> 802baec: 3820 subs r0, #32 802baee: b2c0 uxtb r0, r0 802baf0: 4770 bx lr 802baf2: f1a0 0361 sub.w r3, r0, #97 @ 0x61 802baf6: 2b05 cmp r3, #5 802baf8: d801 bhi.n 802bafe <__hexdig_fun+0x1a> 802bafa: 3847 subs r0, #71 @ 0x47 802bafc: e7f7 b.n 802baee <__hexdig_fun+0xa> 802bafe: f1a0 0341 sub.w r3, r0, #65 @ 0x41 802bb02: 2b05 cmp r3, #5 802bb04: d801 bhi.n 802bb0a <__hexdig_fun+0x26> 802bb06: 3827 subs r0, #39 @ 0x27 802bb08: e7f1 b.n 802baee <__hexdig_fun+0xa> 802bb0a: 2000 movs r0, #0 802bb0c: 4770 bx lr ... 0802bb10 <__gethex>: 802bb10: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bb14: b085 sub sp, #20 802bb16: 468a mov sl, r1 802bb18: 9302 str r3, [sp, #8] 802bb1a: 680b ldr r3, [r1, #0] 802bb1c: 9001 str r0, [sp, #4] 802bb1e: 4690 mov r8, r2 802bb20: 1c9c adds r4, r3, #2 802bb22: 46a1 mov r9, r4 802bb24: f814 0b01 ldrb.w r0, [r4], #1 802bb28: 2830 cmp r0, #48 @ 0x30 802bb2a: d0fa beq.n 802bb22 <__gethex+0x12> 802bb2c: eba9 0303 sub.w r3, r9, r3 802bb30: f1a3 0b02 sub.w fp, r3, #2 802bb34: f7ff ffd6 bl 802bae4 <__hexdig_fun> 802bb38: 4605 mov r5, r0 802bb3a: 2800 cmp r0, #0 802bb3c: d168 bne.n 802bc10 <__gethex+0x100> 802bb3e: 49a0 ldr r1, [pc, #640] @ (802bdc0 <__gethex+0x2b0>) 802bb40: 2201 movs r2, #1 802bb42: 4648 mov r0, r9 802bb44: f7ff f82c bl 802aba0 802bb48: 4607 mov r7, r0 802bb4a: 2800 cmp r0, #0 802bb4c: d167 bne.n 802bc1e <__gethex+0x10e> 802bb4e: f899 0001 ldrb.w r0, [r9, #1] 802bb52: 4626 mov r6, r4 802bb54: f7ff ffc6 bl 802bae4 <__hexdig_fun> 802bb58: 2800 cmp r0, #0 802bb5a: d062 beq.n 802bc22 <__gethex+0x112> 802bb5c: 4623 mov r3, r4 802bb5e: 7818 ldrb r0, [r3, #0] 802bb60: 2830 cmp r0, #48 @ 0x30 802bb62: 4699 mov r9, r3 802bb64: f103 0301 add.w r3, r3, #1 802bb68: d0f9 beq.n 802bb5e <__gethex+0x4e> 802bb6a: f7ff ffbb bl 802bae4 <__hexdig_fun> 802bb6e: fab0 f580 clz r5, r0 802bb72: 096d lsrs r5, r5, #5 802bb74: f04f 0b01 mov.w fp, #1 802bb78: 464a mov r2, r9 802bb7a: 4616 mov r6, r2 802bb7c: 3201 adds r2, #1 802bb7e: 7830 ldrb r0, [r6, #0] 802bb80: f7ff ffb0 bl 802bae4 <__hexdig_fun> 802bb84: 2800 cmp r0, #0 802bb86: d1f8 bne.n 802bb7a <__gethex+0x6a> 802bb88: 498d ldr r1, [pc, #564] @ (802bdc0 <__gethex+0x2b0>) 802bb8a: 2201 movs r2, #1 802bb8c: 4630 mov r0, r6 802bb8e: f7ff f807 bl 802aba0 802bb92: 2800 cmp r0, #0 802bb94: d13f bne.n 802bc16 <__gethex+0x106> 802bb96: b944 cbnz r4, 802bbaa <__gethex+0x9a> 802bb98: 1c74 adds r4, r6, #1 802bb9a: 4622 mov r2, r4 802bb9c: 4616 mov r6, r2 802bb9e: 3201 adds r2, #1 802bba0: 7830 ldrb r0, [r6, #0] 802bba2: f7ff ff9f bl 802bae4 <__hexdig_fun> 802bba6: 2800 cmp r0, #0 802bba8: d1f8 bne.n 802bb9c <__gethex+0x8c> 802bbaa: 1ba4 subs r4, r4, r6 802bbac: 00a7 lsls r7, r4, #2 802bbae: 7833 ldrb r3, [r6, #0] 802bbb0: f003 03df and.w r3, r3, #223 @ 0xdf 802bbb4: 2b50 cmp r3, #80 @ 0x50 802bbb6: d13e bne.n 802bc36 <__gethex+0x126> 802bbb8: 7873 ldrb r3, [r6, #1] 802bbba: 2b2b cmp r3, #43 @ 0x2b 802bbbc: d033 beq.n 802bc26 <__gethex+0x116> 802bbbe: 2b2d cmp r3, #45 @ 0x2d 802bbc0: d034 beq.n 802bc2c <__gethex+0x11c> 802bbc2: 1c71 adds r1, r6, #1 802bbc4: 2400 movs r4, #0 802bbc6: 7808 ldrb r0, [r1, #0] 802bbc8: f7ff ff8c bl 802bae4 <__hexdig_fun> 802bbcc: 1e43 subs r3, r0, #1 802bbce: b2db uxtb r3, r3 802bbd0: 2b18 cmp r3, #24 802bbd2: d830 bhi.n 802bc36 <__gethex+0x126> 802bbd4: f1a0 0210 sub.w r2, r0, #16 802bbd8: f811 0f01 ldrb.w r0, [r1, #1]! 802bbdc: f7ff ff82 bl 802bae4 <__hexdig_fun> 802bbe0: f100 3cff add.w ip, r0, #4294967295 @ 0xffffffff 802bbe4: fa5f fc8c uxtb.w ip, ip 802bbe8: f1bc 0f18 cmp.w ip, #24 802bbec: f04f 030a mov.w r3, #10 802bbf0: d91e bls.n 802bc30 <__gethex+0x120> 802bbf2: b104 cbz r4, 802bbf6 <__gethex+0xe6> 802bbf4: 4252 negs r2, r2 802bbf6: 4417 add r7, r2 802bbf8: f8ca 1000 str.w r1, [sl] 802bbfc: b1ed cbz r5, 802bc3a <__gethex+0x12a> 802bbfe: f1bb 0f00 cmp.w fp, #0 802bc02: bf0c ite eq 802bc04: 2506 moveq r5, #6 802bc06: 2500 movne r5, #0 802bc08: 4628 mov r0, r5 802bc0a: b005 add sp, #20 802bc0c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802bc10: 2500 movs r5, #0 802bc12: 462c mov r4, r5 802bc14: e7b0 b.n 802bb78 <__gethex+0x68> 802bc16: 2c00 cmp r4, #0 802bc18: d1c7 bne.n 802bbaa <__gethex+0x9a> 802bc1a: 4627 mov r7, r4 802bc1c: e7c7 b.n 802bbae <__gethex+0x9e> 802bc1e: 464e mov r6, r9 802bc20: 462f mov r7, r5 802bc22: 2501 movs r5, #1 802bc24: e7c3 b.n 802bbae <__gethex+0x9e> 802bc26: 2400 movs r4, #0 802bc28: 1cb1 adds r1, r6, #2 802bc2a: e7cc b.n 802bbc6 <__gethex+0xb6> 802bc2c: 2401 movs r4, #1 802bc2e: e7fb b.n 802bc28 <__gethex+0x118> 802bc30: fb03 0002 mla r0, r3, r2, r0 802bc34: e7ce b.n 802bbd4 <__gethex+0xc4> 802bc36: 4631 mov r1, r6 802bc38: e7de b.n 802bbf8 <__gethex+0xe8> 802bc3a: eba6 0309 sub.w r3, r6, r9 802bc3e: 3b01 subs r3, #1 802bc40: 4629 mov r1, r5 802bc42: 2b07 cmp r3, #7 802bc44: dc0a bgt.n 802bc5c <__gethex+0x14c> 802bc46: 9801 ldr r0, [sp, #4] 802bc48: f000 fa46 bl 802c0d8 <_Balloc> 802bc4c: 4604 mov r4, r0 802bc4e: b940 cbnz r0, 802bc62 <__gethex+0x152> 802bc50: 4b5c ldr r3, [pc, #368] @ (802bdc4 <__gethex+0x2b4>) 802bc52: 4602 mov r2, r0 802bc54: 21e4 movs r1, #228 @ 0xe4 802bc56: 485c ldr r0, [pc, #368] @ (802bdc8 <__gethex+0x2b8>) 802bc58: f7ff f8aa bl 802adb0 <__assert_func> 802bc5c: 3101 adds r1, #1 802bc5e: 105b asrs r3, r3, #1 802bc60: e7ef b.n 802bc42 <__gethex+0x132> 802bc62: f100 0a14 add.w sl, r0, #20 802bc66: 2300 movs r3, #0 802bc68: 4655 mov r5, sl 802bc6a: 469b mov fp, r3 802bc6c: 45b1 cmp r9, r6 802bc6e: d337 bcc.n 802bce0 <__gethex+0x1d0> 802bc70: f845 bb04 str.w fp, [r5], #4 802bc74: eba5 050a sub.w r5, r5, sl 802bc78: 10ad asrs r5, r5, #2 802bc7a: 6125 str r5, [r4, #16] 802bc7c: 4658 mov r0, fp 802bc7e: f000 fb1d bl 802c2bc <__hi0bits> 802bc82: 016d lsls r5, r5, #5 802bc84: f8d8 6000 ldr.w r6, [r8] 802bc88: 1a2d subs r5, r5, r0 802bc8a: 42b5 cmp r5, r6 802bc8c: dd54 ble.n 802bd38 <__gethex+0x228> 802bc8e: 1bad subs r5, r5, r6 802bc90: 4629 mov r1, r5 802bc92: 4620 mov r0, r4 802bc94: f000 feae bl 802c9f4 <__any_on> 802bc98: 4681 mov r9, r0 802bc9a: b178 cbz r0, 802bcbc <__gethex+0x1ac> 802bc9c: 1e6b subs r3, r5, #1 802bc9e: 1159 asrs r1, r3, #5 802bca0: f003 021f and.w r2, r3, #31 802bca4: f85a 1021 ldr.w r1, [sl, r1, lsl #2] 802bca8: f04f 0901 mov.w r9, #1 802bcac: fa09 f202 lsl.w r2, r9, r2 802bcb0: 420a tst r2, r1 802bcb2: d003 beq.n 802bcbc <__gethex+0x1ac> 802bcb4: 454b cmp r3, r9 802bcb6: dc36 bgt.n 802bd26 <__gethex+0x216> 802bcb8: f04f 0902 mov.w r9, #2 802bcbc: 4629 mov r1, r5 802bcbe: 4620 mov r0, r4 802bcc0: f7ff febe bl 802ba40 802bcc4: 442f add r7, r5 802bcc6: f8d8 3008 ldr.w r3, [r8, #8] 802bcca: 42bb cmp r3, r7 802bccc: da42 bge.n 802bd54 <__gethex+0x244> 802bcce: 9801 ldr r0, [sp, #4] 802bcd0: 4621 mov r1, r4 802bcd2: f000 fa41 bl 802c158 <_Bfree> 802bcd6: 9a0e ldr r2, [sp, #56] @ 0x38 802bcd8: 2300 movs r3, #0 802bcda: 6013 str r3, [r2, #0] 802bcdc: 25a3 movs r5, #163 @ 0xa3 802bcde: e793 b.n 802bc08 <__gethex+0xf8> 802bce0: f816 2d01 ldrb.w r2, [r6, #-1]! 802bce4: 2a2e cmp r2, #46 @ 0x2e 802bce6: d012 beq.n 802bd0e <__gethex+0x1fe> 802bce8: 2b20 cmp r3, #32 802bcea: d104 bne.n 802bcf6 <__gethex+0x1e6> 802bcec: f845 bb04 str.w fp, [r5], #4 802bcf0: f04f 0b00 mov.w fp, #0 802bcf4: 465b mov r3, fp 802bcf6: 7830 ldrb r0, [r6, #0] 802bcf8: 9303 str r3, [sp, #12] 802bcfa: f7ff fef3 bl 802bae4 <__hexdig_fun> 802bcfe: 9b03 ldr r3, [sp, #12] 802bd00: f000 000f and.w r0, r0, #15 802bd04: 4098 lsls r0, r3 802bd06: ea4b 0b00 orr.w fp, fp, r0 802bd0a: 3304 adds r3, #4 802bd0c: e7ae b.n 802bc6c <__gethex+0x15c> 802bd0e: 45b1 cmp r9, r6 802bd10: d8ea bhi.n 802bce8 <__gethex+0x1d8> 802bd12: 492b ldr r1, [pc, #172] @ (802bdc0 <__gethex+0x2b0>) 802bd14: 9303 str r3, [sp, #12] 802bd16: 2201 movs r2, #1 802bd18: 4630 mov r0, r6 802bd1a: f7fe ff41 bl 802aba0 802bd1e: 9b03 ldr r3, [sp, #12] 802bd20: 2800 cmp r0, #0 802bd22: d1e1 bne.n 802bce8 <__gethex+0x1d8> 802bd24: e7a2 b.n 802bc6c <__gethex+0x15c> 802bd26: 1ea9 subs r1, r5, #2 802bd28: 4620 mov r0, r4 802bd2a: f000 fe63 bl 802c9f4 <__any_on> 802bd2e: 2800 cmp r0, #0 802bd30: d0c2 beq.n 802bcb8 <__gethex+0x1a8> 802bd32: f04f 0903 mov.w r9, #3 802bd36: e7c1 b.n 802bcbc <__gethex+0x1ac> 802bd38: da09 bge.n 802bd4e <__gethex+0x23e> 802bd3a: 1b75 subs r5, r6, r5 802bd3c: 4621 mov r1, r4 802bd3e: 9801 ldr r0, [sp, #4] 802bd40: 462a mov r2, r5 802bd42: f000 fc21 bl 802c588 <__lshift> 802bd46: 1b7f subs r7, r7, r5 802bd48: 4604 mov r4, r0 802bd4a: f100 0a14 add.w sl, r0, #20 802bd4e: f04f 0900 mov.w r9, #0 802bd52: e7b8 b.n 802bcc6 <__gethex+0x1b6> 802bd54: f8d8 5004 ldr.w r5, [r8, #4] 802bd58: 42bd cmp r5, r7 802bd5a: dd6f ble.n 802be3c <__gethex+0x32c> 802bd5c: 1bed subs r5, r5, r7 802bd5e: 42ae cmp r6, r5 802bd60: dc34 bgt.n 802bdcc <__gethex+0x2bc> 802bd62: f8d8 300c ldr.w r3, [r8, #12] 802bd66: 2b02 cmp r3, #2 802bd68: d022 beq.n 802bdb0 <__gethex+0x2a0> 802bd6a: 2b03 cmp r3, #3 802bd6c: d024 beq.n 802bdb8 <__gethex+0x2a8> 802bd6e: 2b01 cmp r3, #1 802bd70: d115 bne.n 802bd9e <__gethex+0x28e> 802bd72: 42ae cmp r6, r5 802bd74: d113 bne.n 802bd9e <__gethex+0x28e> 802bd76: 2e01 cmp r6, #1 802bd78: d10b bne.n 802bd92 <__gethex+0x282> 802bd7a: 9a02 ldr r2, [sp, #8] 802bd7c: f8d8 3004 ldr.w r3, [r8, #4] 802bd80: 6013 str r3, [r2, #0] 802bd82: 2301 movs r3, #1 802bd84: 6123 str r3, [r4, #16] 802bd86: f8ca 3000 str.w r3, [sl] 802bd8a: 9b0e ldr r3, [sp, #56] @ 0x38 802bd8c: 2562 movs r5, #98 @ 0x62 802bd8e: 601c str r4, [r3, #0] 802bd90: e73a b.n 802bc08 <__gethex+0xf8> 802bd92: 1e71 subs r1, r6, #1 802bd94: 4620 mov r0, r4 802bd96: f000 fe2d bl 802c9f4 <__any_on> 802bd9a: 2800 cmp r0, #0 802bd9c: d1ed bne.n 802bd7a <__gethex+0x26a> 802bd9e: 9801 ldr r0, [sp, #4] 802bda0: 4621 mov r1, r4 802bda2: f000 f9d9 bl 802c158 <_Bfree> 802bda6: 9a0e ldr r2, [sp, #56] @ 0x38 802bda8: 2300 movs r3, #0 802bdaa: 6013 str r3, [r2, #0] 802bdac: 2550 movs r5, #80 @ 0x50 802bdae: e72b b.n 802bc08 <__gethex+0xf8> 802bdb0: 9b0f ldr r3, [sp, #60] @ 0x3c 802bdb2: 2b00 cmp r3, #0 802bdb4: d1f3 bne.n 802bd9e <__gethex+0x28e> 802bdb6: e7e0 b.n 802bd7a <__gethex+0x26a> 802bdb8: 9b0f ldr r3, [sp, #60] @ 0x3c 802bdba: 2b00 cmp r3, #0 802bdbc: d1dd bne.n 802bd7a <__gethex+0x26a> 802bdbe: e7ee b.n 802bd9e <__gethex+0x28e> 802bdc0: 08031cfd .word 0x08031cfd 802bdc4: 08031f2e .word 0x08031f2e 802bdc8: 08031f3f .word 0x08031f3f 802bdcc: 1e6f subs r7, r5, #1 802bdce: f1b9 0f00 cmp.w r9, #0 802bdd2: d130 bne.n 802be36 <__gethex+0x326> 802bdd4: b127 cbz r7, 802bde0 <__gethex+0x2d0> 802bdd6: 4639 mov r1, r7 802bdd8: 4620 mov r0, r4 802bdda: f000 fe0b bl 802c9f4 <__any_on> 802bdde: 4681 mov r9, r0 802bde0: 117a asrs r2, r7, #5 802bde2: 2301 movs r3, #1 802bde4: f85a 2022 ldr.w r2, [sl, r2, lsl #2] 802bde8: f007 071f and.w r7, r7, #31 802bdec: 40bb lsls r3, r7 802bdee: 4213 tst r3, r2 802bdf0: 4629 mov r1, r5 802bdf2: 4620 mov r0, r4 802bdf4: bf18 it ne 802bdf6: f049 0902 orrne.w r9, r9, #2 802bdfa: f7ff fe21 bl 802ba40 802bdfe: f8d8 7004 ldr.w r7, [r8, #4] 802be02: 1b76 subs r6, r6, r5 802be04: 2502 movs r5, #2 802be06: f1b9 0f00 cmp.w r9, #0 802be0a: d047 beq.n 802be9c <__gethex+0x38c> 802be0c: f8d8 300c ldr.w r3, [r8, #12] 802be10: 2b02 cmp r3, #2 802be12: d015 beq.n 802be40 <__gethex+0x330> 802be14: 2b03 cmp r3, #3 802be16: d017 beq.n 802be48 <__gethex+0x338> 802be18: 2b01 cmp r3, #1 802be1a: d109 bne.n 802be30 <__gethex+0x320> 802be1c: f019 0f02 tst.w r9, #2 802be20: d006 beq.n 802be30 <__gethex+0x320> 802be22: f8da 3000 ldr.w r3, [sl] 802be26: ea49 0903 orr.w r9, r9, r3 802be2a: f019 0f01 tst.w r9, #1 802be2e: d10e bne.n 802be4e <__gethex+0x33e> 802be30: f045 0510 orr.w r5, r5, #16 802be34: e032 b.n 802be9c <__gethex+0x38c> 802be36: f04f 0901 mov.w r9, #1 802be3a: e7d1 b.n 802bde0 <__gethex+0x2d0> 802be3c: 2501 movs r5, #1 802be3e: e7e2 b.n 802be06 <__gethex+0x2f6> 802be40: 9b0f ldr r3, [sp, #60] @ 0x3c 802be42: f1c3 0301 rsb r3, r3, #1 802be46: 930f str r3, [sp, #60] @ 0x3c 802be48: 9b0f ldr r3, [sp, #60] @ 0x3c 802be4a: 2b00 cmp r3, #0 802be4c: d0f0 beq.n 802be30 <__gethex+0x320> 802be4e: f8d4 b010 ldr.w fp, [r4, #16] 802be52: f104 0314 add.w r3, r4, #20 802be56: ea4f 0a8b mov.w sl, fp, lsl #2 802be5a: eb03 018b add.w r1, r3, fp, lsl #2 802be5e: f04f 0c00 mov.w ip, #0 802be62: 4618 mov r0, r3 802be64: f853 2b04 ldr.w r2, [r3], #4 802be68: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 802be6c: d01b beq.n 802bea6 <__gethex+0x396> 802be6e: 3201 adds r2, #1 802be70: 6002 str r2, [r0, #0] 802be72: 2d02 cmp r5, #2 802be74: f104 0314 add.w r3, r4, #20 802be78: d13c bne.n 802bef4 <__gethex+0x3e4> 802be7a: f8d8 2000 ldr.w r2, [r8] 802be7e: 3a01 subs r2, #1 802be80: 42b2 cmp r2, r6 802be82: d109 bne.n 802be98 <__gethex+0x388> 802be84: 1171 asrs r1, r6, #5 802be86: 2201 movs r2, #1 802be88: f853 3021 ldr.w r3, [r3, r1, lsl #2] 802be8c: f006 061f and.w r6, r6, #31 802be90: fa02 f606 lsl.w r6, r2, r6 802be94: 421e tst r6, r3 802be96: d13a bne.n 802bf0e <__gethex+0x3fe> 802be98: f045 0520 orr.w r5, r5, #32 802be9c: 9b0e ldr r3, [sp, #56] @ 0x38 802be9e: 601c str r4, [r3, #0] 802bea0: 9b02 ldr r3, [sp, #8] 802bea2: 601f str r7, [r3, #0] 802bea4: e6b0 b.n 802bc08 <__gethex+0xf8> 802bea6: 4299 cmp r1, r3 802bea8: f843 cc04 str.w ip, [r3, #-4] 802beac: d8d9 bhi.n 802be62 <__gethex+0x352> 802beae: 68a3 ldr r3, [r4, #8] 802beb0: 459b cmp fp, r3 802beb2: db17 blt.n 802bee4 <__gethex+0x3d4> 802beb4: 6861 ldr r1, [r4, #4] 802beb6: 9801 ldr r0, [sp, #4] 802beb8: 3101 adds r1, #1 802beba: f000 f90d bl 802c0d8 <_Balloc> 802bebe: 4681 mov r9, r0 802bec0: b918 cbnz r0, 802beca <__gethex+0x3ba> 802bec2: 4b1a ldr r3, [pc, #104] @ (802bf2c <__gethex+0x41c>) 802bec4: 4602 mov r2, r0 802bec6: 2184 movs r1, #132 @ 0x84 802bec8: e6c5 b.n 802bc56 <__gethex+0x146> 802beca: 6922 ldr r2, [r4, #16] 802becc: 3202 adds r2, #2 802bece: f104 010c add.w r1, r4, #12 802bed2: 0092 lsls r2, r2, #2 802bed4: 300c adds r0, #12 802bed6: f7fe ff52 bl 802ad7e 802beda: 4621 mov r1, r4 802bedc: 9801 ldr r0, [sp, #4] 802bede: f000 f93b bl 802c158 <_Bfree> 802bee2: 464c mov r4, r9 802bee4: 6923 ldr r3, [r4, #16] 802bee6: 1c5a adds r2, r3, #1 802bee8: eb04 0383 add.w r3, r4, r3, lsl #2 802beec: 6122 str r2, [r4, #16] 802beee: 2201 movs r2, #1 802bef0: 615a str r2, [r3, #20] 802bef2: e7be b.n 802be72 <__gethex+0x362> 802bef4: 6922 ldr r2, [r4, #16] 802bef6: 455a cmp r2, fp 802bef8: dd0b ble.n 802bf12 <__gethex+0x402> 802befa: 2101 movs r1, #1 802befc: 4620 mov r0, r4 802befe: f7ff fd9f bl 802ba40 802bf02: f8d8 3008 ldr.w r3, [r8, #8] 802bf06: 3701 adds r7, #1 802bf08: 42bb cmp r3, r7 802bf0a: f6ff aee0 blt.w 802bcce <__gethex+0x1be> 802bf0e: 2501 movs r5, #1 802bf10: e7c2 b.n 802be98 <__gethex+0x388> 802bf12: f016 061f ands.w r6, r6, #31 802bf16: d0fa beq.n 802bf0e <__gethex+0x3fe> 802bf18: 4453 add r3, sl 802bf1a: f1c6 0620 rsb r6, r6, #32 802bf1e: f853 0c04 ldr.w r0, [r3, #-4] 802bf22: f000 f9cb bl 802c2bc <__hi0bits> 802bf26: 42b0 cmp r0, r6 802bf28: dbe7 blt.n 802befa <__gethex+0x3ea> 802bf2a: e7f0 b.n 802bf0e <__gethex+0x3fe> 802bf2c: 08031f2e .word 0x08031f2e 0802bf30 : 802bf30: f1c2 0208 rsb r2, r2, #8 802bf34: 0092 lsls r2, r2, #2 802bf36: b570 push {r4, r5, r6, lr} 802bf38: f1c2 0620 rsb r6, r2, #32 802bf3c: 6843 ldr r3, [r0, #4] 802bf3e: 6804 ldr r4, [r0, #0] 802bf40: fa03 f506 lsl.w r5, r3, r6 802bf44: 432c orrs r4, r5 802bf46: 40d3 lsrs r3, r2 802bf48: 6004 str r4, [r0, #0] 802bf4a: f840 3f04 str.w r3, [r0, #4]! 802bf4e: 4288 cmp r0, r1 802bf50: d3f4 bcc.n 802bf3c 802bf52: bd70 pop {r4, r5, r6, pc} 0802bf54 <__match>: 802bf54: b530 push {r4, r5, lr} 802bf56: 6803 ldr r3, [r0, #0] 802bf58: 3301 adds r3, #1 802bf5a: f811 4b01 ldrb.w r4, [r1], #1 802bf5e: b914 cbnz r4, 802bf66 <__match+0x12> 802bf60: 6003 str r3, [r0, #0] 802bf62: 2001 movs r0, #1 802bf64: bd30 pop {r4, r5, pc} 802bf66: f813 2b01 ldrb.w r2, [r3], #1 802bf6a: f1a2 0541 sub.w r5, r2, #65 @ 0x41 802bf6e: 2d19 cmp r5, #25 802bf70: bf98 it ls 802bf72: 3220 addls r2, #32 802bf74: 42a2 cmp r2, r4 802bf76: d0f0 beq.n 802bf5a <__match+0x6> 802bf78: 2000 movs r0, #0 802bf7a: e7f3 b.n 802bf64 <__match+0x10> 0802bf7c <__hexnan>: 802bf7c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bf80: 680b ldr r3, [r1, #0] 802bf82: 6801 ldr r1, [r0, #0] 802bf84: 115e asrs r6, r3, #5 802bf86: eb02 0686 add.w r6, r2, r6, lsl #2 802bf8a: f013 031f ands.w r3, r3, #31 802bf8e: b087 sub sp, #28 802bf90: bf18 it ne 802bf92: 3604 addne r6, #4 802bf94: 2500 movs r5, #0 802bf96: 1f37 subs r7, r6, #4 802bf98: 4682 mov sl, r0 802bf9a: 4690 mov r8, r2 802bf9c: 9301 str r3, [sp, #4] 802bf9e: f846 5c04 str.w r5, [r6, #-4] 802bfa2: 46b9 mov r9, r7 802bfa4: 463c mov r4, r7 802bfa6: 9502 str r5, [sp, #8] 802bfa8: 46ab mov fp, r5 802bfaa: 784a ldrb r2, [r1, #1] 802bfac: 1c4b adds r3, r1, #1 802bfae: 9303 str r3, [sp, #12] 802bfb0: b342 cbz r2, 802c004 <__hexnan+0x88> 802bfb2: 4610 mov r0, r2 802bfb4: 9105 str r1, [sp, #20] 802bfb6: 9204 str r2, [sp, #16] 802bfb8: f7ff fd94 bl 802bae4 <__hexdig_fun> 802bfbc: 2800 cmp r0, #0 802bfbe: d151 bne.n 802c064 <__hexnan+0xe8> 802bfc0: 9a04 ldr r2, [sp, #16] 802bfc2: 9905 ldr r1, [sp, #20] 802bfc4: 2a20 cmp r2, #32 802bfc6: d818 bhi.n 802bffa <__hexnan+0x7e> 802bfc8: 9b02 ldr r3, [sp, #8] 802bfca: 459b cmp fp, r3 802bfcc: dd13 ble.n 802bff6 <__hexnan+0x7a> 802bfce: 454c cmp r4, r9 802bfd0: d206 bcs.n 802bfe0 <__hexnan+0x64> 802bfd2: 2d07 cmp r5, #7 802bfd4: dc04 bgt.n 802bfe0 <__hexnan+0x64> 802bfd6: 462a mov r2, r5 802bfd8: 4649 mov r1, r9 802bfda: 4620 mov r0, r4 802bfdc: f7ff ffa8 bl 802bf30 802bfe0: 4544 cmp r4, r8 802bfe2: d952 bls.n 802c08a <__hexnan+0x10e> 802bfe4: 2300 movs r3, #0 802bfe6: f1a4 0904 sub.w r9, r4, #4 802bfea: f844 3c04 str.w r3, [r4, #-4] 802bfee: f8cd b008 str.w fp, [sp, #8] 802bff2: 464c mov r4, r9 802bff4: 461d mov r5, r3 802bff6: 9903 ldr r1, [sp, #12] 802bff8: e7d7 b.n 802bfaa <__hexnan+0x2e> 802bffa: 2a29 cmp r2, #41 @ 0x29 802bffc: d157 bne.n 802c0ae <__hexnan+0x132> 802bffe: 3102 adds r1, #2 802c000: f8ca 1000 str.w r1, [sl] 802c004: f1bb 0f00 cmp.w fp, #0 802c008: d051 beq.n 802c0ae <__hexnan+0x132> 802c00a: 454c cmp r4, r9 802c00c: d206 bcs.n 802c01c <__hexnan+0xa0> 802c00e: 2d07 cmp r5, #7 802c010: dc04 bgt.n 802c01c <__hexnan+0xa0> 802c012: 462a mov r2, r5 802c014: 4649 mov r1, r9 802c016: 4620 mov r0, r4 802c018: f7ff ff8a bl 802bf30 802c01c: 4544 cmp r4, r8 802c01e: d936 bls.n 802c08e <__hexnan+0x112> 802c020: f1a8 0204 sub.w r2, r8, #4 802c024: 4623 mov r3, r4 802c026: f853 1b04 ldr.w r1, [r3], #4 802c02a: f842 1f04 str.w r1, [r2, #4]! 802c02e: 429f cmp r7, r3 802c030: d2f9 bcs.n 802c026 <__hexnan+0xaa> 802c032: 1b3b subs r3, r7, r4 802c034: f023 0303 bic.w r3, r3, #3 802c038: 3304 adds r3, #4 802c03a: 3401 adds r4, #1 802c03c: 3e03 subs r6, #3 802c03e: 42b4 cmp r4, r6 802c040: bf88 it hi 802c042: 2304 movhi r3, #4 802c044: 4443 add r3, r8 802c046: 2200 movs r2, #0 802c048: f843 2b04 str.w r2, [r3], #4 802c04c: 429f cmp r7, r3 802c04e: d2fb bcs.n 802c048 <__hexnan+0xcc> 802c050: 683b ldr r3, [r7, #0] 802c052: b91b cbnz r3, 802c05c <__hexnan+0xe0> 802c054: 4547 cmp r7, r8 802c056: d128 bne.n 802c0aa <__hexnan+0x12e> 802c058: 2301 movs r3, #1 802c05a: 603b str r3, [r7, #0] 802c05c: 2005 movs r0, #5 802c05e: b007 add sp, #28 802c060: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c064: 3501 adds r5, #1 802c066: 2d08 cmp r5, #8 802c068: f10b 0b01 add.w fp, fp, #1 802c06c: dd06 ble.n 802c07c <__hexnan+0x100> 802c06e: 4544 cmp r4, r8 802c070: d9c1 bls.n 802bff6 <__hexnan+0x7a> 802c072: 2300 movs r3, #0 802c074: f844 3c04 str.w r3, [r4, #-4] 802c078: 2501 movs r5, #1 802c07a: 3c04 subs r4, #4 802c07c: 6822 ldr r2, [r4, #0] 802c07e: f000 000f and.w r0, r0, #15 802c082: ea40 1002 orr.w r0, r0, r2, lsl #4 802c086: 6020 str r0, [r4, #0] 802c088: e7b5 b.n 802bff6 <__hexnan+0x7a> 802c08a: 2508 movs r5, #8 802c08c: e7b3 b.n 802bff6 <__hexnan+0x7a> 802c08e: 9b01 ldr r3, [sp, #4] 802c090: 2b00 cmp r3, #0 802c092: d0dd beq.n 802c050 <__hexnan+0xd4> 802c094: f1c3 0320 rsb r3, r3, #32 802c098: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802c09c: 40da lsrs r2, r3 802c09e: f856 3c04 ldr.w r3, [r6, #-4] 802c0a2: 4013 ands r3, r2 802c0a4: f846 3c04 str.w r3, [r6, #-4] 802c0a8: e7d2 b.n 802c050 <__hexnan+0xd4> 802c0aa: 3f04 subs r7, #4 802c0ac: e7d0 b.n 802c050 <__hexnan+0xd4> 802c0ae: 2004 movs r0, #4 802c0b0: e7d5 b.n 802c05e <__hexnan+0xe2> 0802c0b2 <__ascii_mbtowc>: 802c0b2: b082 sub sp, #8 802c0b4: b901 cbnz r1, 802c0b8 <__ascii_mbtowc+0x6> 802c0b6: a901 add r1, sp, #4 802c0b8: b142 cbz r2, 802c0cc <__ascii_mbtowc+0x1a> 802c0ba: b14b cbz r3, 802c0d0 <__ascii_mbtowc+0x1e> 802c0bc: 7813 ldrb r3, [r2, #0] 802c0be: 600b str r3, [r1, #0] 802c0c0: 7812 ldrb r2, [r2, #0] 802c0c2: 1e10 subs r0, r2, #0 802c0c4: bf18 it ne 802c0c6: 2001 movne r0, #1 802c0c8: b002 add sp, #8 802c0ca: 4770 bx lr 802c0cc: 4610 mov r0, r2 802c0ce: e7fb b.n 802c0c8 <__ascii_mbtowc+0x16> 802c0d0: f06f 0001 mvn.w r0, #1 802c0d4: e7f8 b.n 802c0c8 <__ascii_mbtowc+0x16> ... 0802c0d8 <_Balloc>: 802c0d8: b570 push {r4, r5, r6, lr} 802c0da: 69c6 ldr r6, [r0, #28] 802c0dc: 4604 mov r4, r0 802c0de: 460d mov r5, r1 802c0e0: b976 cbnz r6, 802c100 <_Balloc+0x28> 802c0e2: 2010 movs r0, #16 802c0e4: f7fc ffda bl 802909c 802c0e8: 4602 mov r2, r0 802c0ea: 61e0 str r0, [r4, #28] 802c0ec: b920 cbnz r0, 802c0f8 <_Balloc+0x20> 802c0ee: 4b18 ldr r3, [pc, #96] @ (802c150 <_Balloc+0x78>) 802c0f0: 4818 ldr r0, [pc, #96] @ (802c154 <_Balloc+0x7c>) 802c0f2: 216b movs r1, #107 @ 0x6b 802c0f4: f7fe fe5c bl 802adb0 <__assert_func> 802c0f8: e9c0 6601 strd r6, r6, [r0, #4] 802c0fc: 6006 str r6, [r0, #0] 802c0fe: 60c6 str r6, [r0, #12] 802c100: 69e6 ldr r6, [r4, #28] 802c102: 68f3 ldr r3, [r6, #12] 802c104: b183 cbz r3, 802c128 <_Balloc+0x50> 802c106: 69e3 ldr r3, [r4, #28] 802c108: 68db ldr r3, [r3, #12] 802c10a: f853 0025 ldr.w r0, [r3, r5, lsl #2] 802c10e: b9b8 cbnz r0, 802c140 <_Balloc+0x68> 802c110: 2101 movs r1, #1 802c112: fa01 f605 lsl.w r6, r1, r5 802c116: 1d72 adds r2, r6, #5 802c118: 0092 lsls r2, r2, #2 802c11a: 4620 mov r0, r4 802c11c: f001 f883 bl 802d226 <_calloc_r> 802c120: b160 cbz r0, 802c13c <_Balloc+0x64> 802c122: e9c0 5601 strd r5, r6, [r0, #4] 802c126: e00e b.n 802c146 <_Balloc+0x6e> 802c128: 2221 movs r2, #33 @ 0x21 802c12a: 2104 movs r1, #4 802c12c: 4620 mov r0, r4 802c12e: f001 f87a bl 802d226 <_calloc_r> 802c132: 69e3 ldr r3, [r4, #28] 802c134: 60f0 str r0, [r6, #12] 802c136: 68db ldr r3, [r3, #12] 802c138: 2b00 cmp r3, #0 802c13a: d1e4 bne.n 802c106 <_Balloc+0x2e> 802c13c: 2000 movs r0, #0 802c13e: bd70 pop {r4, r5, r6, pc} 802c140: 6802 ldr r2, [r0, #0] 802c142: f843 2025 str.w r2, [r3, r5, lsl #2] 802c146: 2300 movs r3, #0 802c148: e9c0 3303 strd r3, r3, [r0, #12] 802c14c: e7f7 b.n 802c13e <_Balloc+0x66> 802c14e: bf00 nop 802c150: 08031c8e .word 0x08031c8e 802c154: 08031f9f .word 0x08031f9f 0802c158 <_Bfree>: 802c158: b570 push {r4, r5, r6, lr} 802c15a: 69c6 ldr r6, [r0, #28] 802c15c: 4605 mov r5, r0 802c15e: 460c mov r4, r1 802c160: b976 cbnz r6, 802c180 <_Bfree+0x28> 802c162: 2010 movs r0, #16 802c164: f7fc ff9a bl 802909c 802c168: 4602 mov r2, r0 802c16a: 61e8 str r0, [r5, #28] 802c16c: b920 cbnz r0, 802c178 <_Bfree+0x20> 802c16e: 4b09 ldr r3, [pc, #36] @ (802c194 <_Bfree+0x3c>) 802c170: 4809 ldr r0, [pc, #36] @ (802c198 <_Bfree+0x40>) 802c172: 218f movs r1, #143 @ 0x8f 802c174: f7fe fe1c bl 802adb0 <__assert_func> 802c178: e9c0 6601 strd r6, r6, [r0, #4] 802c17c: 6006 str r6, [r0, #0] 802c17e: 60c6 str r6, [r0, #12] 802c180: b13c cbz r4, 802c192 <_Bfree+0x3a> 802c182: 69eb ldr r3, [r5, #28] 802c184: 6862 ldr r2, [r4, #4] 802c186: 68db ldr r3, [r3, #12] 802c188: f853 1022 ldr.w r1, [r3, r2, lsl #2] 802c18c: 6021 str r1, [r4, #0] 802c18e: f843 4022 str.w r4, [r3, r2, lsl #2] 802c192: bd70 pop {r4, r5, r6, pc} 802c194: 08031c8e .word 0x08031c8e 802c198: 08031f9f .word 0x08031f9f 0802c19c <__multadd>: 802c19c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c1a0: 690d ldr r5, [r1, #16] 802c1a2: 4607 mov r7, r0 802c1a4: 460c mov r4, r1 802c1a6: 461e mov r6, r3 802c1a8: f101 0c14 add.w ip, r1, #20 802c1ac: 2000 movs r0, #0 802c1ae: f8dc 3000 ldr.w r3, [ip] 802c1b2: b299 uxth r1, r3 802c1b4: fb02 6101 mla r1, r2, r1, r6 802c1b8: 0c1e lsrs r6, r3, #16 802c1ba: 0c0b lsrs r3, r1, #16 802c1bc: fb02 3306 mla r3, r2, r6, r3 802c1c0: b289 uxth r1, r1 802c1c2: 3001 adds r0, #1 802c1c4: eb01 4103 add.w r1, r1, r3, lsl #16 802c1c8: 4285 cmp r5, r0 802c1ca: f84c 1b04 str.w r1, [ip], #4 802c1ce: ea4f 4613 mov.w r6, r3, lsr #16 802c1d2: dcec bgt.n 802c1ae <__multadd+0x12> 802c1d4: b30e cbz r6, 802c21a <__multadd+0x7e> 802c1d6: 68a3 ldr r3, [r4, #8] 802c1d8: 42ab cmp r3, r5 802c1da: dc19 bgt.n 802c210 <__multadd+0x74> 802c1dc: 6861 ldr r1, [r4, #4] 802c1de: 4638 mov r0, r7 802c1e0: 3101 adds r1, #1 802c1e2: f7ff ff79 bl 802c0d8 <_Balloc> 802c1e6: 4680 mov r8, r0 802c1e8: b928 cbnz r0, 802c1f6 <__multadd+0x5a> 802c1ea: 4602 mov r2, r0 802c1ec: 4b0c ldr r3, [pc, #48] @ (802c220 <__multadd+0x84>) 802c1ee: 480d ldr r0, [pc, #52] @ (802c224 <__multadd+0x88>) 802c1f0: 21ba movs r1, #186 @ 0xba 802c1f2: f7fe fddd bl 802adb0 <__assert_func> 802c1f6: 6922 ldr r2, [r4, #16] 802c1f8: 3202 adds r2, #2 802c1fa: f104 010c add.w r1, r4, #12 802c1fe: 0092 lsls r2, r2, #2 802c200: 300c adds r0, #12 802c202: f7fe fdbc bl 802ad7e 802c206: 4621 mov r1, r4 802c208: 4638 mov r0, r7 802c20a: f7ff ffa5 bl 802c158 <_Bfree> 802c20e: 4644 mov r4, r8 802c210: eb04 0385 add.w r3, r4, r5, lsl #2 802c214: 3501 adds r5, #1 802c216: 615e str r6, [r3, #20] 802c218: 6125 str r5, [r4, #16] 802c21a: 4620 mov r0, r4 802c21c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c220: 08031f2e .word 0x08031f2e 802c224: 08031f9f .word 0x08031f9f 0802c228 <__s2b>: 802c228: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802c22c: 460c mov r4, r1 802c22e: 4615 mov r5, r2 802c230: 461f mov r7, r3 802c232: 2209 movs r2, #9 802c234: 3308 adds r3, #8 802c236: 4606 mov r6, r0 802c238: fb93 f3f2 sdiv r3, r3, r2 802c23c: 2100 movs r1, #0 802c23e: 2201 movs r2, #1 802c240: 429a cmp r2, r3 802c242: db09 blt.n 802c258 <__s2b+0x30> 802c244: 4630 mov r0, r6 802c246: f7ff ff47 bl 802c0d8 <_Balloc> 802c24a: b940 cbnz r0, 802c25e <__s2b+0x36> 802c24c: 4602 mov r2, r0 802c24e: 4b19 ldr r3, [pc, #100] @ (802c2b4 <__s2b+0x8c>) 802c250: 4819 ldr r0, [pc, #100] @ (802c2b8 <__s2b+0x90>) 802c252: 21d3 movs r1, #211 @ 0xd3 802c254: f7fe fdac bl 802adb0 <__assert_func> 802c258: 0052 lsls r2, r2, #1 802c25a: 3101 adds r1, #1 802c25c: e7f0 b.n 802c240 <__s2b+0x18> 802c25e: 9b08 ldr r3, [sp, #32] 802c260: 6143 str r3, [r0, #20] 802c262: 2d09 cmp r5, #9 802c264: f04f 0301 mov.w r3, #1 802c268: 6103 str r3, [r0, #16] 802c26a: dd16 ble.n 802c29a <__s2b+0x72> 802c26c: f104 0909 add.w r9, r4, #9 802c270: 46c8 mov r8, r9 802c272: 442c add r4, r5 802c274: f818 3b01 ldrb.w r3, [r8], #1 802c278: 4601 mov r1, r0 802c27a: 3b30 subs r3, #48 @ 0x30 802c27c: 220a movs r2, #10 802c27e: 4630 mov r0, r6 802c280: f7ff ff8c bl 802c19c <__multadd> 802c284: 45a0 cmp r8, r4 802c286: d1f5 bne.n 802c274 <__s2b+0x4c> 802c288: f1a5 0408 sub.w r4, r5, #8 802c28c: 444c add r4, r9 802c28e: 1b2d subs r5, r5, r4 802c290: 1963 adds r3, r4, r5 802c292: 42bb cmp r3, r7 802c294: db04 blt.n 802c2a0 <__s2b+0x78> 802c296: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802c29a: 340a adds r4, #10 802c29c: 2509 movs r5, #9 802c29e: e7f6 b.n 802c28e <__s2b+0x66> 802c2a0: f814 3b01 ldrb.w r3, [r4], #1 802c2a4: 4601 mov r1, r0 802c2a6: 3b30 subs r3, #48 @ 0x30 802c2a8: 220a movs r2, #10 802c2aa: 4630 mov r0, r6 802c2ac: f7ff ff76 bl 802c19c <__multadd> 802c2b0: e7ee b.n 802c290 <__s2b+0x68> 802c2b2: bf00 nop 802c2b4: 08031f2e .word 0x08031f2e 802c2b8: 08031f9f .word 0x08031f9f 0802c2bc <__hi0bits>: 802c2bc: f5b0 3f80 cmp.w r0, #65536 @ 0x10000 802c2c0: 4603 mov r3, r0 802c2c2: bf36 itet cc 802c2c4: 0403 lslcc r3, r0, #16 802c2c6: 2000 movcs r0, #0 802c2c8: 2010 movcc r0, #16 802c2ca: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 802c2ce: bf3c itt cc 802c2d0: 021b lslcc r3, r3, #8 802c2d2: 3008 addcc r0, #8 802c2d4: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 802c2d8: bf3c itt cc 802c2da: 011b lslcc r3, r3, #4 802c2dc: 3004 addcc r0, #4 802c2de: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 802c2e2: bf3c itt cc 802c2e4: 009b lslcc r3, r3, #2 802c2e6: 3002 addcc r0, #2 802c2e8: 2b00 cmp r3, #0 802c2ea: db05 blt.n 802c2f8 <__hi0bits+0x3c> 802c2ec: f013 4f80 tst.w r3, #1073741824 @ 0x40000000 802c2f0: f100 0001 add.w r0, r0, #1 802c2f4: bf08 it eq 802c2f6: 2020 moveq r0, #32 802c2f8: 4770 bx lr 0802c2fa <__lo0bits>: 802c2fa: 6803 ldr r3, [r0, #0] 802c2fc: 4602 mov r2, r0 802c2fe: f013 0007 ands.w r0, r3, #7 802c302: d00b beq.n 802c31c <__lo0bits+0x22> 802c304: 07d9 lsls r1, r3, #31 802c306: d421 bmi.n 802c34c <__lo0bits+0x52> 802c308: 0798 lsls r0, r3, #30 802c30a: bf49 itett mi 802c30c: 085b lsrmi r3, r3, #1 802c30e: 089b lsrpl r3, r3, #2 802c310: 2001 movmi r0, #1 802c312: 6013 strmi r3, [r2, #0] 802c314: bf5c itt pl 802c316: 6013 strpl r3, [r2, #0] 802c318: 2002 movpl r0, #2 802c31a: 4770 bx lr 802c31c: b299 uxth r1, r3 802c31e: b909 cbnz r1, 802c324 <__lo0bits+0x2a> 802c320: 0c1b lsrs r3, r3, #16 802c322: 2010 movs r0, #16 802c324: b2d9 uxtb r1, r3 802c326: b909 cbnz r1, 802c32c <__lo0bits+0x32> 802c328: 3008 adds r0, #8 802c32a: 0a1b lsrs r3, r3, #8 802c32c: 0719 lsls r1, r3, #28 802c32e: bf04 itt eq 802c330: 091b lsreq r3, r3, #4 802c332: 3004 addeq r0, #4 802c334: 0799 lsls r1, r3, #30 802c336: bf04 itt eq 802c338: 089b lsreq r3, r3, #2 802c33a: 3002 addeq r0, #2 802c33c: 07d9 lsls r1, r3, #31 802c33e: d403 bmi.n 802c348 <__lo0bits+0x4e> 802c340: 085b lsrs r3, r3, #1 802c342: f100 0001 add.w r0, r0, #1 802c346: d003 beq.n 802c350 <__lo0bits+0x56> 802c348: 6013 str r3, [r2, #0] 802c34a: 4770 bx lr 802c34c: 2000 movs r0, #0 802c34e: 4770 bx lr 802c350: 2020 movs r0, #32 802c352: 4770 bx lr 0802c354 <__i2b>: 802c354: b510 push {r4, lr} 802c356: 460c mov r4, r1 802c358: 2101 movs r1, #1 802c35a: f7ff febd bl 802c0d8 <_Balloc> 802c35e: 4602 mov r2, r0 802c360: b928 cbnz r0, 802c36e <__i2b+0x1a> 802c362: 4b05 ldr r3, [pc, #20] @ (802c378 <__i2b+0x24>) 802c364: 4805 ldr r0, [pc, #20] @ (802c37c <__i2b+0x28>) 802c366: f240 1145 movw r1, #325 @ 0x145 802c36a: f7fe fd21 bl 802adb0 <__assert_func> 802c36e: 2301 movs r3, #1 802c370: 6144 str r4, [r0, #20] 802c372: 6103 str r3, [r0, #16] 802c374: bd10 pop {r4, pc} 802c376: bf00 nop 802c378: 08031f2e .word 0x08031f2e 802c37c: 08031f9f .word 0x08031f9f 0802c380 <__multiply>: 802c380: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c384: 4614 mov r4, r2 802c386: 690a ldr r2, [r1, #16] 802c388: 6923 ldr r3, [r4, #16] 802c38a: 429a cmp r2, r3 802c38c: bfa8 it ge 802c38e: 4623 movge r3, r4 802c390: 460f mov r7, r1 802c392: bfa4 itt ge 802c394: 460c movge r4, r1 802c396: 461f movge r7, r3 802c398: f8d4 a010 ldr.w sl, [r4, #16] 802c39c: f8d7 9010 ldr.w r9, [r7, #16] 802c3a0: 68a3 ldr r3, [r4, #8] 802c3a2: 6861 ldr r1, [r4, #4] 802c3a4: eb0a 0609 add.w r6, sl, r9 802c3a8: 42b3 cmp r3, r6 802c3aa: b085 sub sp, #20 802c3ac: bfb8 it lt 802c3ae: 3101 addlt r1, #1 802c3b0: f7ff fe92 bl 802c0d8 <_Balloc> 802c3b4: b930 cbnz r0, 802c3c4 <__multiply+0x44> 802c3b6: 4602 mov r2, r0 802c3b8: 4b44 ldr r3, [pc, #272] @ (802c4cc <__multiply+0x14c>) 802c3ba: 4845 ldr r0, [pc, #276] @ (802c4d0 <__multiply+0x150>) 802c3bc: f44f 71b1 mov.w r1, #354 @ 0x162 802c3c0: f7fe fcf6 bl 802adb0 <__assert_func> 802c3c4: f100 0514 add.w r5, r0, #20 802c3c8: eb05 0886 add.w r8, r5, r6, lsl #2 802c3cc: 462b mov r3, r5 802c3ce: 2200 movs r2, #0 802c3d0: 4543 cmp r3, r8 802c3d2: d321 bcc.n 802c418 <__multiply+0x98> 802c3d4: f107 0114 add.w r1, r7, #20 802c3d8: f104 0214 add.w r2, r4, #20 802c3dc: eb02 028a add.w r2, r2, sl, lsl #2 802c3e0: eb01 0389 add.w r3, r1, r9, lsl #2 802c3e4: 9302 str r3, [sp, #8] 802c3e6: 1b13 subs r3, r2, r4 802c3e8: 3b15 subs r3, #21 802c3ea: f023 0303 bic.w r3, r3, #3 802c3ee: 3304 adds r3, #4 802c3f0: f104 0715 add.w r7, r4, #21 802c3f4: 42ba cmp r2, r7 802c3f6: bf38 it cc 802c3f8: 2304 movcc r3, #4 802c3fa: 9301 str r3, [sp, #4] 802c3fc: 9b02 ldr r3, [sp, #8] 802c3fe: 9103 str r1, [sp, #12] 802c400: 428b cmp r3, r1 802c402: d80c bhi.n 802c41e <__multiply+0x9e> 802c404: 2e00 cmp r6, #0 802c406: dd03 ble.n 802c410 <__multiply+0x90> 802c408: f858 3d04 ldr.w r3, [r8, #-4]! 802c40c: 2b00 cmp r3, #0 802c40e: d05b beq.n 802c4c8 <__multiply+0x148> 802c410: 6106 str r6, [r0, #16] 802c412: b005 add sp, #20 802c414: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c418: f843 2b04 str.w r2, [r3], #4 802c41c: e7d8 b.n 802c3d0 <__multiply+0x50> 802c41e: f8b1 a000 ldrh.w sl, [r1] 802c422: f1ba 0f00 cmp.w sl, #0 802c426: d024 beq.n 802c472 <__multiply+0xf2> 802c428: f104 0e14 add.w lr, r4, #20 802c42c: 46a9 mov r9, r5 802c42e: f04f 0c00 mov.w ip, #0 802c432: f85e 7b04 ldr.w r7, [lr], #4 802c436: f8d9 3000 ldr.w r3, [r9] 802c43a: fa1f fb87 uxth.w fp, r7 802c43e: b29b uxth r3, r3 802c440: fb0a 330b mla r3, sl, fp, r3 802c444: ea4f 4b17 mov.w fp, r7, lsr #16 802c448: f8d9 7000 ldr.w r7, [r9] 802c44c: 4463 add r3, ip 802c44e: ea4f 4c17 mov.w ip, r7, lsr #16 802c452: fb0a c70b mla r7, sl, fp, ip 802c456: eb07 4713 add.w r7, r7, r3, lsr #16 802c45a: b29b uxth r3, r3 802c45c: ea43 4307 orr.w r3, r3, r7, lsl #16 802c460: 4572 cmp r2, lr 802c462: f849 3b04 str.w r3, [r9], #4 802c466: ea4f 4c17 mov.w ip, r7, lsr #16 802c46a: d8e2 bhi.n 802c432 <__multiply+0xb2> 802c46c: 9b01 ldr r3, [sp, #4] 802c46e: f845 c003 str.w ip, [r5, r3] 802c472: 9b03 ldr r3, [sp, #12] 802c474: f8b3 9002 ldrh.w r9, [r3, #2] 802c478: 3104 adds r1, #4 802c47a: f1b9 0f00 cmp.w r9, #0 802c47e: d021 beq.n 802c4c4 <__multiply+0x144> 802c480: 682b ldr r3, [r5, #0] 802c482: f104 0c14 add.w ip, r4, #20 802c486: 46ae mov lr, r5 802c488: f04f 0a00 mov.w sl, #0 802c48c: f8bc b000 ldrh.w fp, [ip] 802c490: f8be 7002 ldrh.w r7, [lr, #2] 802c494: fb09 770b mla r7, r9, fp, r7 802c498: 4457 add r7, sl 802c49a: b29b uxth r3, r3 802c49c: ea43 4307 orr.w r3, r3, r7, lsl #16 802c4a0: f84e 3b04 str.w r3, [lr], #4 802c4a4: f85c 3b04 ldr.w r3, [ip], #4 802c4a8: ea4f 4a13 mov.w sl, r3, lsr #16 802c4ac: f8be 3000 ldrh.w r3, [lr] 802c4b0: fb09 330a mla r3, r9, sl, r3 802c4b4: eb03 4317 add.w r3, r3, r7, lsr #16 802c4b8: 4562 cmp r2, ip 802c4ba: ea4f 4a13 mov.w sl, r3, lsr #16 802c4be: d8e5 bhi.n 802c48c <__multiply+0x10c> 802c4c0: 9f01 ldr r7, [sp, #4] 802c4c2: 51eb str r3, [r5, r7] 802c4c4: 3504 adds r5, #4 802c4c6: e799 b.n 802c3fc <__multiply+0x7c> 802c4c8: 3e01 subs r6, #1 802c4ca: e79b b.n 802c404 <__multiply+0x84> 802c4cc: 08031f2e .word 0x08031f2e 802c4d0: 08031f9f .word 0x08031f9f 0802c4d4 <__pow5mult>: 802c4d4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802c4d8: 4615 mov r5, r2 802c4da: f012 0203 ands.w r2, r2, #3 802c4de: 4607 mov r7, r0 802c4e0: 460e mov r6, r1 802c4e2: d007 beq.n 802c4f4 <__pow5mult+0x20> 802c4e4: 4c25 ldr r4, [pc, #148] @ (802c57c <__pow5mult+0xa8>) 802c4e6: 3a01 subs r2, #1 802c4e8: 2300 movs r3, #0 802c4ea: f854 2022 ldr.w r2, [r4, r2, lsl #2] 802c4ee: f7ff fe55 bl 802c19c <__multadd> 802c4f2: 4606 mov r6, r0 802c4f4: 10ad asrs r5, r5, #2 802c4f6: d03d beq.n 802c574 <__pow5mult+0xa0> 802c4f8: 69fc ldr r4, [r7, #28] 802c4fa: b97c cbnz r4, 802c51c <__pow5mult+0x48> 802c4fc: 2010 movs r0, #16 802c4fe: f7fc fdcd bl 802909c 802c502: 4602 mov r2, r0 802c504: 61f8 str r0, [r7, #28] 802c506: b928 cbnz r0, 802c514 <__pow5mult+0x40> 802c508: 4b1d ldr r3, [pc, #116] @ (802c580 <__pow5mult+0xac>) 802c50a: 481e ldr r0, [pc, #120] @ (802c584 <__pow5mult+0xb0>) 802c50c: f240 11b3 movw r1, #435 @ 0x1b3 802c510: f7fe fc4e bl 802adb0 <__assert_func> 802c514: e9c0 4401 strd r4, r4, [r0, #4] 802c518: 6004 str r4, [r0, #0] 802c51a: 60c4 str r4, [r0, #12] 802c51c: f8d7 801c ldr.w r8, [r7, #28] 802c520: f8d8 4008 ldr.w r4, [r8, #8] 802c524: b94c cbnz r4, 802c53a <__pow5mult+0x66> 802c526: f240 2171 movw r1, #625 @ 0x271 802c52a: 4638 mov r0, r7 802c52c: f7ff ff12 bl 802c354 <__i2b> 802c530: 2300 movs r3, #0 802c532: f8c8 0008 str.w r0, [r8, #8] 802c536: 4604 mov r4, r0 802c538: 6003 str r3, [r0, #0] 802c53a: f04f 0900 mov.w r9, #0 802c53e: 07eb lsls r3, r5, #31 802c540: d50a bpl.n 802c558 <__pow5mult+0x84> 802c542: 4631 mov r1, r6 802c544: 4622 mov r2, r4 802c546: 4638 mov r0, r7 802c548: f7ff ff1a bl 802c380 <__multiply> 802c54c: 4631 mov r1, r6 802c54e: 4680 mov r8, r0 802c550: 4638 mov r0, r7 802c552: f7ff fe01 bl 802c158 <_Bfree> 802c556: 4646 mov r6, r8 802c558: 106d asrs r5, r5, #1 802c55a: d00b beq.n 802c574 <__pow5mult+0xa0> 802c55c: 6820 ldr r0, [r4, #0] 802c55e: b938 cbnz r0, 802c570 <__pow5mult+0x9c> 802c560: 4622 mov r2, r4 802c562: 4621 mov r1, r4 802c564: 4638 mov r0, r7 802c566: f7ff ff0b bl 802c380 <__multiply> 802c56a: 6020 str r0, [r4, #0] 802c56c: f8c0 9000 str.w r9, [r0] 802c570: 4604 mov r4, r0 802c572: e7e4 b.n 802c53e <__pow5mult+0x6a> 802c574: 4630 mov r0, r6 802c576: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802c57a: bf00 nop 802c57c: 08031ff8 .word 0x08031ff8 802c580: 08031c8e .word 0x08031c8e 802c584: 08031f9f .word 0x08031f9f 0802c588 <__lshift>: 802c588: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802c58c: 460c mov r4, r1 802c58e: 6849 ldr r1, [r1, #4] 802c590: 6923 ldr r3, [r4, #16] 802c592: eb03 1862 add.w r8, r3, r2, asr #5 802c596: 68a3 ldr r3, [r4, #8] 802c598: 4607 mov r7, r0 802c59a: 4691 mov r9, r2 802c59c: ea4f 1a62 mov.w sl, r2, asr #5 802c5a0: f108 0601 add.w r6, r8, #1 802c5a4: 42b3 cmp r3, r6 802c5a6: db0b blt.n 802c5c0 <__lshift+0x38> 802c5a8: 4638 mov r0, r7 802c5aa: f7ff fd95 bl 802c0d8 <_Balloc> 802c5ae: 4605 mov r5, r0 802c5b0: b948 cbnz r0, 802c5c6 <__lshift+0x3e> 802c5b2: 4602 mov r2, r0 802c5b4: 4b28 ldr r3, [pc, #160] @ (802c658 <__lshift+0xd0>) 802c5b6: 4829 ldr r0, [pc, #164] @ (802c65c <__lshift+0xd4>) 802c5b8: f44f 71ef mov.w r1, #478 @ 0x1de 802c5bc: f7fe fbf8 bl 802adb0 <__assert_func> 802c5c0: 3101 adds r1, #1 802c5c2: 005b lsls r3, r3, #1 802c5c4: e7ee b.n 802c5a4 <__lshift+0x1c> 802c5c6: 2300 movs r3, #0 802c5c8: f100 0114 add.w r1, r0, #20 802c5cc: f100 0210 add.w r2, r0, #16 802c5d0: 4618 mov r0, r3 802c5d2: 4553 cmp r3, sl 802c5d4: db33 blt.n 802c63e <__lshift+0xb6> 802c5d6: 6920 ldr r0, [r4, #16] 802c5d8: ea2a 7aea bic.w sl, sl, sl, asr #31 802c5dc: f104 0314 add.w r3, r4, #20 802c5e0: f019 091f ands.w r9, r9, #31 802c5e4: eb01 018a add.w r1, r1, sl, lsl #2 802c5e8: eb03 0c80 add.w ip, r3, r0, lsl #2 802c5ec: d02b beq.n 802c646 <__lshift+0xbe> 802c5ee: f1c9 0e20 rsb lr, r9, #32 802c5f2: 468a mov sl, r1 802c5f4: 2200 movs r2, #0 802c5f6: 6818 ldr r0, [r3, #0] 802c5f8: fa00 f009 lsl.w r0, r0, r9 802c5fc: 4310 orrs r0, r2 802c5fe: f84a 0b04 str.w r0, [sl], #4 802c602: f853 2b04 ldr.w r2, [r3], #4 802c606: 459c cmp ip, r3 802c608: fa22 f20e lsr.w r2, r2, lr 802c60c: d8f3 bhi.n 802c5f6 <__lshift+0x6e> 802c60e: ebac 0304 sub.w r3, ip, r4 802c612: 3b15 subs r3, #21 802c614: f023 0303 bic.w r3, r3, #3 802c618: 3304 adds r3, #4 802c61a: f104 0015 add.w r0, r4, #21 802c61e: 4584 cmp ip, r0 802c620: bf38 it cc 802c622: 2304 movcc r3, #4 802c624: 50ca str r2, [r1, r3] 802c626: b10a cbz r2, 802c62c <__lshift+0xa4> 802c628: f108 0602 add.w r6, r8, #2 802c62c: 3e01 subs r6, #1 802c62e: 4638 mov r0, r7 802c630: 612e str r6, [r5, #16] 802c632: 4621 mov r1, r4 802c634: f7ff fd90 bl 802c158 <_Bfree> 802c638: 4628 mov r0, r5 802c63a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802c63e: f842 0f04 str.w r0, [r2, #4]! 802c642: 3301 adds r3, #1 802c644: e7c5 b.n 802c5d2 <__lshift+0x4a> 802c646: 3904 subs r1, #4 802c648: f853 2b04 ldr.w r2, [r3], #4 802c64c: f841 2f04 str.w r2, [r1, #4]! 802c650: 459c cmp ip, r3 802c652: d8f9 bhi.n 802c648 <__lshift+0xc0> 802c654: e7ea b.n 802c62c <__lshift+0xa4> 802c656: bf00 nop 802c658: 08031f2e .word 0x08031f2e 802c65c: 08031f9f .word 0x08031f9f 0802c660 <__mcmp>: 802c660: 690a ldr r2, [r1, #16] 802c662: 4603 mov r3, r0 802c664: 6900 ldr r0, [r0, #16] 802c666: 1a80 subs r0, r0, r2 802c668: b530 push {r4, r5, lr} 802c66a: d10e bne.n 802c68a <__mcmp+0x2a> 802c66c: 3314 adds r3, #20 802c66e: 3114 adds r1, #20 802c670: eb03 0482 add.w r4, r3, r2, lsl #2 802c674: eb01 0182 add.w r1, r1, r2, lsl #2 802c678: f854 5d04 ldr.w r5, [r4, #-4]! 802c67c: f851 2d04 ldr.w r2, [r1, #-4]! 802c680: 4295 cmp r5, r2 802c682: d003 beq.n 802c68c <__mcmp+0x2c> 802c684: d205 bcs.n 802c692 <__mcmp+0x32> 802c686: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802c68a: bd30 pop {r4, r5, pc} 802c68c: 42a3 cmp r3, r4 802c68e: d3f3 bcc.n 802c678 <__mcmp+0x18> 802c690: e7fb b.n 802c68a <__mcmp+0x2a> 802c692: 2001 movs r0, #1 802c694: e7f9 b.n 802c68a <__mcmp+0x2a> ... 0802c698 <__mdiff>: 802c698: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c69c: 4689 mov r9, r1 802c69e: 4606 mov r6, r0 802c6a0: 4611 mov r1, r2 802c6a2: 4648 mov r0, r9 802c6a4: 4614 mov r4, r2 802c6a6: f7ff ffdb bl 802c660 <__mcmp> 802c6aa: 1e05 subs r5, r0, #0 802c6ac: d112 bne.n 802c6d4 <__mdiff+0x3c> 802c6ae: 4629 mov r1, r5 802c6b0: 4630 mov r0, r6 802c6b2: f7ff fd11 bl 802c0d8 <_Balloc> 802c6b6: 4602 mov r2, r0 802c6b8: b928 cbnz r0, 802c6c6 <__mdiff+0x2e> 802c6ba: 4b3f ldr r3, [pc, #252] @ (802c7b8 <__mdiff+0x120>) 802c6bc: f240 2137 movw r1, #567 @ 0x237 802c6c0: 483e ldr r0, [pc, #248] @ (802c7bc <__mdiff+0x124>) 802c6c2: f7fe fb75 bl 802adb0 <__assert_func> 802c6c6: 2301 movs r3, #1 802c6c8: e9c0 3504 strd r3, r5, [r0, #16] 802c6cc: 4610 mov r0, r2 802c6ce: b003 add sp, #12 802c6d0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c6d4: bfbc itt lt 802c6d6: 464b movlt r3, r9 802c6d8: 46a1 movlt r9, r4 802c6da: 4630 mov r0, r6 802c6dc: f8d9 1004 ldr.w r1, [r9, #4] 802c6e0: bfba itte lt 802c6e2: 461c movlt r4, r3 802c6e4: 2501 movlt r5, #1 802c6e6: 2500 movge r5, #0 802c6e8: f7ff fcf6 bl 802c0d8 <_Balloc> 802c6ec: 4602 mov r2, r0 802c6ee: b918 cbnz r0, 802c6f8 <__mdiff+0x60> 802c6f0: 4b31 ldr r3, [pc, #196] @ (802c7b8 <__mdiff+0x120>) 802c6f2: f240 2145 movw r1, #581 @ 0x245 802c6f6: e7e3 b.n 802c6c0 <__mdiff+0x28> 802c6f8: f8d9 7010 ldr.w r7, [r9, #16] 802c6fc: 6926 ldr r6, [r4, #16] 802c6fe: 60c5 str r5, [r0, #12] 802c700: f109 0310 add.w r3, r9, #16 802c704: f109 0514 add.w r5, r9, #20 802c708: f104 0e14 add.w lr, r4, #20 802c70c: f100 0b14 add.w fp, r0, #20 802c710: eb05 0887 add.w r8, r5, r7, lsl #2 802c714: eb0e 0686 add.w r6, lr, r6, lsl #2 802c718: 9301 str r3, [sp, #4] 802c71a: 46d9 mov r9, fp 802c71c: f04f 0c00 mov.w ip, #0 802c720: 9b01 ldr r3, [sp, #4] 802c722: f85e 0b04 ldr.w r0, [lr], #4 802c726: f853 af04 ldr.w sl, [r3, #4]! 802c72a: 9301 str r3, [sp, #4] 802c72c: fa1f f38a uxth.w r3, sl 802c730: 4619 mov r1, r3 802c732: b283 uxth r3, r0 802c734: 1acb subs r3, r1, r3 802c736: 0c00 lsrs r0, r0, #16 802c738: 4463 add r3, ip 802c73a: ebc0 401a rsb r0, r0, sl, lsr #16 802c73e: eb00 4023 add.w r0, r0, r3, asr #16 802c742: b29b uxth r3, r3 802c744: ea43 4300 orr.w r3, r3, r0, lsl #16 802c748: 4576 cmp r6, lr 802c74a: f849 3b04 str.w r3, [r9], #4 802c74e: ea4f 4c20 mov.w ip, r0, asr #16 802c752: d8e5 bhi.n 802c720 <__mdiff+0x88> 802c754: 1b33 subs r3, r6, r4 802c756: 3b15 subs r3, #21 802c758: f023 0303 bic.w r3, r3, #3 802c75c: 3415 adds r4, #21 802c75e: 3304 adds r3, #4 802c760: 42a6 cmp r6, r4 802c762: bf38 it cc 802c764: 2304 movcc r3, #4 802c766: 441d add r5, r3 802c768: 445b add r3, fp 802c76a: 461e mov r6, r3 802c76c: 462c mov r4, r5 802c76e: 4544 cmp r4, r8 802c770: d30e bcc.n 802c790 <__mdiff+0xf8> 802c772: f108 0103 add.w r1, r8, #3 802c776: 1b49 subs r1, r1, r5 802c778: f021 0103 bic.w r1, r1, #3 802c77c: 3d03 subs r5, #3 802c77e: 45a8 cmp r8, r5 802c780: bf38 it cc 802c782: 2100 movcc r1, #0 802c784: 440b add r3, r1 802c786: f853 1d04 ldr.w r1, [r3, #-4]! 802c78a: b191 cbz r1, 802c7b2 <__mdiff+0x11a> 802c78c: 6117 str r7, [r2, #16] 802c78e: e79d b.n 802c6cc <__mdiff+0x34> 802c790: f854 1b04 ldr.w r1, [r4], #4 802c794: 46e6 mov lr, ip 802c796: 0c08 lsrs r0, r1, #16 802c798: fa1c fc81 uxtah ip, ip, r1 802c79c: 4471 add r1, lr 802c79e: eb00 402c add.w r0, r0, ip, asr #16 802c7a2: b289 uxth r1, r1 802c7a4: ea41 4100 orr.w r1, r1, r0, lsl #16 802c7a8: f846 1b04 str.w r1, [r6], #4 802c7ac: ea4f 4c20 mov.w ip, r0, asr #16 802c7b0: e7dd b.n 802c76e <__mdiff+0xd6> 802c7b2: 3f01 subs r7, #1 802c7b4: e7e7 b.n 802c786 <__mdiff+0xee> 802c7b6: bf00 nop 802c7b8: 08031f2e .word 0x08031f2e 802c7bc: 08031f9f .word 0x08031f9f 0802c7c0 <__ulp>: 802c7c0: b082 sub sp, #8 802c7c2: ed8d 0b00 vstr d0, [sp] 802c7c6: 9a01 ldr r2, [sp, #4] 802c7c8: 4b0f ldr r3, [pc, #60] @ (802c808 <__ulp+0x48>) 802c7ca: 4013 ands r3, r2 802c7cc: f1a3 7350 sub.w r3, r3, #54525952 @ 0x3400000 802c7d0: 2b00 cmp r3, #0 802c7d2: dc08 bgt.n 802c7e6 <__ulp+0x26> 802c7d4: 425b negs r3, r3 802c7d6: f1b3 7fa0 cmp.w r3, #20971520 @ 0x1400000 802c7da: ea4f 5223 mov.w r2, r3, asr #20 802c7de: da04 bge.n 802c7ea <__ulp+0x2a> 802c7e0: f44f 2300 mov.w r3, #524288 @ 0x80000 802c7e4: 4113 asrs r3, r2 802c7e6: 2200 movs r2, #0 802c7e8: e008 b.n 802c7fc <__ulp+0x3c> 802c7ea: f1a2 0314 sub.w r3, r2, #20 802c7ee: 2b1e cmp r3, #30 802c7f0: bfda itte le 802c7f2: f04f 4200 movle.w r2, #2147483648 @ 0x80000000 802c7f6: 40da lsrle r2, r3 802c7f8: 2201 movgt r2, #1 802c7fa: 2300 movs r3, #0 802c7fc: 4619 mov r1, r3 802c7fe: 4610 mov r0, r2 802c800: ec41 0b10 vmov d0, r0, r1 802c804: b002 add sp, #8 802c806: 4770 bx lr 802c808: 7ff00000 .word 0x7ff00000 0802c80c <__b2d>: 802c80c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c810: 6906 ldr r6, [r0, #16] 802c812: f100 0814 add.w r8, r0, #20 802c816: eb08 0686 add.w r6, r8, r6, lsl #2 802c81a: 1f37 subs r7, r6, #4 802c81c: f856 2c04 ldr.w r2, [r6, #-4] 802c820: 4610 mov r0, r2 802c822: f7ff fd4b bl 802c2bc <__hi0bits> 802c826: f1c0 0320 rsb r3, r0, #32 802c82a: 280a cmp r0, #10 802c82c: 600b str r3, [r1, #0] 802c82e: 491b ldr r1, [pc, #108] @ (802c89c <__b2d+0x90>) 802c830: dc15 bgt.n 802c85e <__b2d+0x52> 802c832: f1c0 0c0b rsb ip, r0, #11 802c836: fa22 f30c lsr.w r3, r2, ip 802c83a: 45b8 cmp r8, r7 802c83c: ea43 0501 orr.w r5, r3, r1 802c840: bf34 ite cc 802c842: f856 3c08 ldrcc.w r3, [r6, #-8] 802c846: 2300 movcs r3, #0 802c848: 3015 adds r0, #21 802c84a: fa02 f000 lsl.w r0, r2, r0 802c84e: fa23 f30c lsr.w r3, r3, ip 802c852: 4303 orrs r3, r0 802c854: 461c mov r4, r3 802c856: ec45 4b10 vmov d0, r4, r5 802c85a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c85e: 45b8 cmp r8, r7 802c860: bf3a itte cc 802c862: f856 3c08 ldrcc.w r3, [r6, #-8] 802c866: f1a6 0708 subcc.w r7, r6, #8 802c86a: 2300 movcs r3, #0 802c86c: 380b subs r0, #11 802c86e: d012 beq.n 802c896 <__b2d+0x8a> 802c870: f1c0 0120 rsb r1, r0, #32 802c874: fa23 f401 lsr.w r4, r3, r1 802c878: 4082 lsls r2, r0 802c87a: 4322 orrs r2, r4 802c87c: 4547 cmp r7, r8 802c87e: f042 557f orr.w r5, r2, #1069547520 @ 0x3fc00000 802c882: bf8c ite hi 802c884: f857 2c04 ldrhi.w r2, [r7, #-4] 802c888: 2200 movls r2, #0 802c88a: 4083 lsls r3, r0 802c88c: 40ca lsrs r2, r1 802c88e: f445 1540 orr.w r5, r5, #3145728 @ 0x300000 802c892: 4313 orrs r3, r2 802c894: e7de b.n 802c854 <__b2d+0x48> 802c896: ea42 0501 orr.w r5, r2, r1 802c89a: e7db b.n 802c854 <__b2d+0x48> 802c89c: 3ff00000 .word 0x3ff00000 0802c8a0 <__d2b>: 802c8a0: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 802c8a4: 460f mov r7, r1 802c8a6: 2101 movs r1, #1 802c8a8: ec59 8b10 vmov r8, r9, d0 802c8ac: 4616 mov r6, r2 802c8ae: f7ff fc13 bl 802c0d8 <_Balloc> 802c8b2: 4604 mov r4, r0 802c8b4: b930 cbnz r0, 802c8c4 <__d2b+0x24> 802c8b6: 4602 mov r2, r0 802c8b8: 4b23 ldr r3, [pc, #140] @ (802c948 <__d2b+0xa8>) 802c8ba: 4824 ldr r0, [pc, #144] @ (802c94c <__d2b+0xac>) 802c8bc: f240 310f movw r1, #783 @ 0x30f 802c8c0: f7fe fa76 bl 802adb0 <__assert_func> 802c8c4: f3c9 550a ubfx r5, r9, #20, #11 802c8c8: f3c9 0313 ubfx r3, r9, #0, #20 802c8cc: b10d cbz r5, 802c8d2 <__d2b+0x32> 802c8ce: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 802c8d2: 9301 str r3, [sp, #4] 802c8d4: f1b8 0300 subs.w r3, r8, #0 802c8d8: d023 beq.n 802c922 <__d2b+0x82> 802c8da: 4668 mov r0, sp 802c8dc: 9300 str r3, [sp, #0] 802c8de: f7ff fd0c bl 802c2fa <__lo0bits> 802c8e2: e9dd 1200 ldrd r1, r2, [sp] 802c8e6: b1d0 cbz r0, 802c91e <__d2b+0x7e> 802c8e8: f1c0 0320 rsb r3, r0, #32 802c8ec: fa02 f303 lsl.w r3, r2, r3 802c8f0: 430b orrs r3, r1 802c8f2: 40c2 lsrs r2, r0 802c8f4: 6163 str r3, [r4, #20] 802c8f6: 9201 str r2, [sp, #4] 802c8f8: 9b01 ldr r3, [sp, #4] 802c8fa: 61a3 str r3, [r4, #24] 802c8fc: 2b00 cmp r3, #0 802c8fe: bf0c ite eq 802c900: 2201 moveq r2, #1 802c902: 2202 movne r2, #2 802c904: 6122 str r2, [r4, #16] 802c906: b1a5 cbz r5, 802c932 <__d2b+0x92> 802c908: f2a5 4533 subw r5, r5, #1075 @ 0x433 802c90c: 4405 add r5, r0 802c90e: 603d str r5, [r7, #0] 802c910: f1c0 0035 rsb r0, r0, #53 @ 0x35 802c914: 6030 str r0, [r6, #0] 802c916: 4620 mov r0, r4 802c918: b003 add sp, #12 802c91a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802c91e: 6161 str r1, [r4, #20] 802c920: e7ea b.n 802c8f8 <__d2b+0x58> 802c922: a801 add r0, sp, #4 802c924: f7ff fce9 bl 802c2fa <__lo0bits> 802c928: 9b01 ldr r3, [sp, #4] 802c92a: 6163 str r3, [r4, #20] 802c92c: 3020 adds r0, #32 802c92e: 2201 movs r2, #1 802c930: e7e8 b.n 802c904 <__d2b+0x64> 802c932: eb04 0382 add.w r3, r4, r2, lsl #2 802c936: f2a0 4032 subw r0, r0, #1074 @ 0x432 802c93a: 6038 str r0, [r7, #0] 802c93c: 6918 ldr r0, [r3, #16] 802c93e: f7ff fcbd bl 802c2bc <__hi0bits> 802c942: ebc0 1042 rsb r0, r0, r2, lsl #5 802c946: e7e5 b.n 802c914 <__d2b+0x74> 802c948: 08031f2e .word 0x08031f2e 802c94c: 08031f9f .word 0x08031f9f 0802c950 <__ratio>: 802c950: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c954: 4688 mov r8, r1 802c956: 4669 mov r1, sp 802c958: 4681 mov r9, r0 802c95a: f7ff ff57 bl 802c80c <__b2d> 802c95e: a901 add r1, sp, #4 802c960: 4640 mov r0, r8 802c962: ec55 4b10 vmov r4, r5, d0 802c966: f7ff ff51 bl 802c80c <__b2d> 802c96a: f8d8 3010 ldr.w r3, [r8, #16] 802c96e: f8d9 2010 ldr.w r2, [r9, #16] 802c972: 1ad2 subs r2, r2, r3 802c974: e9dd 3100 ldrd r3, r1, [sp] 802c978: 1a5b subs r3, r3, r1 802c97a: eb03 1342 add.w r3, r3, r2, lsl #5 802c97e: ec57 6b10 vmov r6, r7, d0 802c982: 2b00 cmp r3, #0 802c984: bfd6 itet le 802c986: ebc3 3303 rsble r3, r3, r3, lsl #12 802c98a: 462a movgt r2, r5 802c98c: 463a movle r2, r7 802c98e: 46ab mov fp, r5 802c990: 46a2 mov sl, r4 802c992: bfce itee gt 802c994: eb02 5b03 addgt.w fp, r2, r3, lsl #20 802c998: eb02 5303 addle.w r3, r2, r3, lsl #20 802c99c: ee00 3a90 vmovle s1, r3 802c9a0: ec4b ab17 vmov d7, sl, fp 802c9a4: ee87 0b00 vdiv.f64 d0, d7, d0 802c9a8: b003 add sp, #12 802c9aa: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802c9ae <__copybits>: 802c9ae: 3901 subs r1, #1 802c9b0: b570 push {r4, r5, r6, lr} 802c9b2: 1149 asrs r1, r1, #5 802c9b4: 6914 ldr r4, [r2, #16] 802c9b6: 3101 adds r1, #1 802c9b8: f102 0314 add.w r3, r2, #20 802c9bc: eb00 0181 add.w r1, r0, r1, lsl #2 802c9c0: eb03 0484 add.w r4, r3, r4, lsl #2 802c9c4: 1f05 subs r5, r0, #4 802c9c6: 42a3 cmp r3, r4 802c9c8: d30c bcc.n 802c9e4 <__copybits+0x36> 802c9ca: 1aa3 subs r3, r4, r2 802c9cc: 3b11 subs r3, #17 802c9ce: f023 0303 bic.w r3, r3, #3 802c9d2: 3211 adds r2, #17 802c9d4: 42a2 cmp r2, r4 802c9d6: bf88 it hi 802c9d8: 2300 movhi r3, #0 802c9da: 4418 add r0, r3 802c9dc: 2300 movs r3, #0 802c9de: 4288 cmp r0, r1 802c9e0: d305 bcc.n 802c9ee <__copybits+0x40> 802c9e2: bd70 pop {r4, r5, r6, pc} 802c9e4: f853 6b04 ldr.w r6, [r3], #4 802c9e8: f845 6f04 str.w r6, [r5, #4]! 802c9ec: e7eb b.n 802c9c6 <__copybits+0x18> 802c9ee: f840 3b04 str.w r3, [r0], #4 802c9f2: e7f4 b.n 802c9de <__copybits+0x30> 0802c9f4 <__any_on>: 802c9f4: f100 0214 add.w r2, r0, #20 802c9f8: 6900 ldr r0, [r0, #16] 802c9fa: 114b asrs r3, r1, #5 802c9fc: 4298 cmp r0, r3 802c9fe: b510 push {r4, lr} 802ca00: db11 blt.n 802ca26 <__any_on+0x32> 802ca02: dd0a ble.n 802ca1a <__any_on+0x26> 802ca04: f011 011f ands.w r1, r1, #31 802ca08: d007 beq.n 802ca1a <__any_on+0x26> 802ca0a: f852 4023 ldr.w r4, [r2, r3, lsl #2] 802ca0e: fa24 f001 lsr.w r0, r4, r1 802ca12: fa00 f101 lsl.w r1, r0, r1 802ca16: 428c cmp r4, r1 802ca18: d10b bne.n 802ca32 <__any_on+0x3e> 802ca1a: eb02 0383 add.w r3, r2, r3, lsl #2 802ca1e: 4293 cmp r3, r2 802ca20: d803 bhi.n 802ca2a <__any_on+0x36> 802ca22: 2000 movs r0, #0 802ca24: bd10 pop {r4, pc} 802ca26: 4603 mov r3, r0 802ca28: e7f7 b.n 802ca1a <__any_on+0x26> 802ca2a: f853 1d04 ldr.w r1, [r3, #-4]! 802ca2e: 2900 cmp r1, #0 802ca30: d0f5 beq.n 802ca1e <__any_on+0x2a> 802ca32: 2001 movs r0, #1 802ca34: e7f6 b.n 802ca24 <__any_on+0x30> 0802ca36 <_malloc_usable_size_r>: 802ca36: f851 3c04 ldr.w r3, [r1, #-4] 802ca3a: 1f18 subs r0, r3, #4 802ca3c: 2b00 cmp r3, #0 802ca3e: bfbc itt lt 802ca40: 580b ldrlt r3, [r1, r0] 802ca42: 18c0 addlt r0, r0, r3 802ca44: 4770 bx lr 0802ca46 <__ascii_wctomb>: 802ca46: 4603 mov r3, r0 802ca48: 4608 mov r0, r1 802ca4a: b141 cbz r1, 802ca5e <__ascii_wctomb+0x18> 802ca4c: 2aff cmp r2, #255 @ 0xff 802ca4e: d904 bls.n 802ca5a <__ascii_wctomb+0x14> 802ca50: 228a movs r2, #138 @ 0x8a 802ca52: 601a str r2, [r3, #0] 802ca54: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802ca58: 4770 bx lr 802ca5a: 700a strb r2, [r1, #0] 802ca5c: 2001 movs r0, #1 802ca5e: 4770 bx lr 0802ca60 <__ssputs_r>: 802ca60: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802ca64: 688e ldr r6, [r1, #8] 802ca66: 461f mov r7, r3 802ca68: 42be cmp r6, r7 802ca6a: 680b ldr r3, [r1, #0] 802ca6c: 4682 mov sl, r0 802ca6e: 460c mov r4, r1 802ca70: 4690 mov r8, r2 802ca72: d82d bhi.n 802cad0 <__ssputs_r+0x70> 802ca74: f9b1 200c ldrsh.w r2, [r1, #12] 802ca78: f412 6f90 tst.w r2, #1152 @ 0x480 802ca7c: d026 beq.n 802cacc <__ssputs_r+0x6c> 802ca7e: 6965 ldr r5, [r4, #20] 802ca80: 6909 ldr r1, [r1, #16] 802ca82: eb05 0545 add.w r5, r5, r5, lsl #1 802ca86: eba3 0901 sub.w r9, r3, r1 802ca8a: eb05 75d5 add.w r5, r5, r5, lsr #31 802ca8e: 1c7b adds r3, r7, #1 802ca90: 444b add r3, r9 802ca92: 106d asrs r5, r5, #1 802ca94: 429d cmp r5, r3 802ca96: bf38 it cc 802ca98: 461d movcc r5, r3 802ca9a: 0553 lsls r3, r2, #21 802ca9c: d527 bpl.n 802caee <__ssputs_r+0x8e> 802ca9e: 4629 mov r1, r5 802caa0: f7fc fb2e bl 8029100 <_malloc_r> 802caa4: 4606 mov r6, r0 802caa6: b360 cbz r0, 802cb02 <__ssputs_r+0xa2> 802caa8: 6921 ldr r1, [r4, #16] 802caaa: 464a mov r2, r9 802caac: f7fe f967 bl 802ad7e 802cab0: 89a3 ldrh r3, [r4, #12] 802cab2: f423 6390 bic.w r3, r3, #1152 @ 0x480 802cab6: f043 0380 orr.w r3, r3, #128 @ 0x80 802caba: 81a3 strh r3, [r4, #12] 802cabc: 6126 str r6, [r4, #16] 802cabe: 6165 str r5, [r4, #20] 802cac0: 444e add r6, r9 802cac2: eba5 0509 sub.w r5, r5, r9 802cac6: 6026 str r6, [r4, #0] 802cac8: 60a5 str r5, [r4, #8] 802caca: 463e mov r6, r7 802cacc: 42be cmp r6, r7 802cace: d900 bls.n 802cad2 <__ssputs_r+0x72> 802cad0: 463e mov r6, r7 802cad2: 6820 ldr r0, [r4, #0] 802cad4: 4632 mov r2, r6 802cad6: 4641 mov r1, r8 802cad8: f7fe f840 bl 802ab5c 802cadc: 68a3 ldr r3, [r4, #8] 802cade: 1b9b subs r3, r3, r6 802cae0: 60a3 str r3, [r4, #8] 802cae2: 6823 ldr r3, [r4, #0] 802cae4: 4433 add r3, r6 802cae6: 6023 str r3, [r4, #0] 802cae8: 2000 movs r0, #0 802caea: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802caee: 462a mov r2, r5 802caf0: f7fc fbd8 bl 80292a4 <_realloc_r> 802caf4: 4606 mov r6, r0 802caf6: 2800 cmp r0, #0 802caf8: d1e0 bne.n 802cabc <__ssputs_r+0x5c> 802cafa: 6921 ldr r1, [r4, #16] 802cafc: 4650 mov r0, sl 802cafe: f7fe ff55 bl 802b9ac <_free_r> 802cb02: 230c movs r3, #12 802cb04: f8ca 3000 str.w r3, [sl] 802cb08: 89a3 ldrh r3, [r4, #12] 802cb0a: f043 0340 orr.w r3, r3, #64 @ 0x40 802cb0e: 81a3 strh r3, [r4, #12] 802cb10: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cb14: e7e9 b.n 802caea <__ssputs_r+0x8a> ... 0802cb18 <_svfiprintf_r>: 802cb18: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cb1c: 4698 mov r8, r3 802cb1e: 898b ldrh r3, [r1, #12] 802cb20: 061b lsls r3, r3, #24 802cb22: b09d sub sp, #116 @ 0x74 802cb24: 4607 mov r7, r0 802cb26: 460d mov r5, r1 802cb28: 4614 mov r4, r2 802cb2a: d510 bpl.n 802cb4e <_svfiprintf_r+0x36> 802cb2c: 690b ldr r3, [r1, #16] 802cb2e: b973 cbnz r3, 802cb4e <_svfiprintf_r+0x36> 802cb30: 2140 movs r1, #64 @ 0x40 802cb32: f7fc fae5 bl 8029100 <_malloc_r> 802cb36: 6028 str r0, [r5, #0] 802cb38: 6128 str r0, [r5, #16] 802cb3a: b930 cbnz r0, 802cb4a <_svfiprintf_r+0x32> 802cb3c: 230c movs r3, #12 802cb3e: 603b str r3, [r7, #0] 802cb40: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cb44: b01d add sp, #116 @ 0x74 802cb46: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802cb4a: 2340 movs r3, #64 @ 0x40 802cb4c: 616b str r3, [r5, #20] 802cb4e: 2300 movs r3, #0 802cb50: 9309 str r3, [sp, #36] @ 0x24 802cb52: 2320 movs r3, #32 802cb54: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802cb58: f8cd 800c str.w r8, [sp, #12] 802cb5c: 2330 movs r3, #48 @ 0x30 802cb5e: f8df 819c ldr.w r8, [pc, #412] @ 802ccfc <_svfiprintf_r+0x1e4> 802cb62: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802cb66: f04f 0901 mov.w r9, #1 802cb6a: 4623 mov r3, r4 802cb6c: 469a mov sl, r3 802cb6e: f813 2b01 ldrb.w r2, [r3], #1 802cb72: b10a cbz r2, 802cb78 <_svfiprintf_r+0x60> 802cb74: 2a25 cmp r2, #37 @ 0x25 802cb76: d1f9 bne.n 802cb6c <_svfiprintf_r+0x54> 802cb78: ebba 0b04 subs.w fp, sl, r4 802cb7c: d00b beq.n 802cb96 <_svfiprintf_r+0x7e> 802cb7e: 465b mov r3, fp 802cb80: 4622 mov r2, r4 802cb82: 4629 mov r1, r5 802cb84: 4638 mov r0, r7 802cb86: f7ff ff6b bl 802ca60 <__ssputs_r> 802cb8a: 3001 adds r0, #1 802cb8c: f000 80a7 beq.w 802ccde <_svfiprintf_r+0x1c6> 802cb90: 9a09 ldr r2, [sp, #36] @ 0x24 802cb92: 445a add r2, fp 802cb94: 9209 str r2, [sp, #36] @ 0x24 802cb96: f89a 3000 ldrb.w r3, [sl] 802cb9a: 2b00 cmp r3, #0 802cb9c: f000 809f beq.w 802ccde <_svfiprintf_r+0x1c6> 802cba0: 2300 movs r3, #0 802cba2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802cba6: e9cd 2305 strd r2, r3, [sp, #20] 802cbaa: f10a 0a01 add.w sl, sl, #1 802cbae: 9304 str r3, [sp, #16] 802cbb0: 9307 str r3, [sp, #28] 802cbb2: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802cbb6: 931a str r3, [sp, #104] @ 0x68 802cbb8: 4654 mov r4, sl 802cbba: 2205 movs r2, #5 802cbbc: f814 1b01 ldrb.w r1, [r4], #1 802cbc0: 484e ldr r0, [pc, #312] @ (802ccfc <_svfiprintf_r+0x1e4>) 802cbc2: f7d3 fb9d bl 8000300 802cbc6: 9a04 ldr r2, [sp, #16] 802cbc8: b9d8 cbnz r0, 802cc02 <_svfiprintf_r+0xea> 802cbca: 06d0 lsls r0, r2, #27 802cbcc: bf44 itt mi 802cbce: 2320 movmi r3, #32 802cbd0: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802cbd4: 0711 lsls r1, r2, #28 802cbd6: bf44 itt mi 802cbd8: 232b movmi r3, #43 @ 0x2b 802cbda: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802cbde: f89a 3000 ldrb.w r3, [sl] 802cbe2: 2b2a cmp r3, #42 @ 0x2a 802cbe4: d015 beq.n 802cc12 <_svfiprintf_r+0xfa> 802cbe6: 9a07 ldr r2, [sp, #28] 802cbe8: 4654 mov r4, sl 802cbea: 2000 movs r0, #0 802cbec: f04f 0c0a mov.w ip, #10 802cbf0: 4621 mov r1, r4 802cbf2: f811 3b01 ldrb.w r3, [r1], #1 802cbf6: 3b30 subs r3, #48 @ 0x30 802cbf8: 2b09 cmp r3, #9 802cbfa: d94b bls.n 802cc94 <_svfiprintf_r+0x17c> 802cbfc: b1b0 cbz r0, 802cc2c <_svfiprintf_r+0x114> 802cbfe: 9207 str r2, [sp, #28] 802cc00: e014 b.n 802cc2c <_svfiprintf_r+0x114> 802cc02: eba0 0308 sub.w r3, r0, r8 802cc06: fa09 f303 lsl.w r3, r9, r3 802cc0a: 4313 orrs r3, r2 802cc0c: 9304 str r3, [sp, #16] 802cc0e: 46a2 mov sl, r4 802cc10: e7d2 b.n 802cbb8 <_svfiprintf_r+0xa0> 802cc12: 9b03 ldr r3, [sp, #12] 802cc14: 1d19 adds r1, r3, #4 802cc16: 681b ldr r3, [r3, #0] 802cc18: 9103 str r1, [sp, #12] 802cc1a: 2b00 cmp r3, #0 802cc1c: bfbb ittet lt 802cc1e: 425b neglt r3, r3 802cc20: f042 0202 orrlt.w r2, r2, #2 802cc24: 9307 strge r3, [sp, #28] 802cc26: 9307 strlt r3, [sp, #28] 802cc28: bfb8 it lt 802cc2a: 9204 strlt r2, [sp, #16] 802cc2c: 7823 ldrb r3, [r4, #0] 802cc2e: 2b2e cmp r3, #46 @ 0x2e 802cc30: d10a bne.n 802cc48 <_svfiprintf_r+0x130> 802cc32: 7863 ldrb r3, [r4, #1] 802cc34: 2b2a cmp r3, #42 @ 0x2a 802cc36: d132 bne.n 802cc9e <_svfiprintf_r+0x186> 802cc38: 9b03 ldr r3, [sp, #12] 802cc3a: 1d1a adds r2, r3, #4 802cc3c: 681b ldr r3, [r3, #0] 802cc3e: 9203 str r2, [sp, #12] 802cc40: ea43 73e3 orr.w r3, r3, r3, asr #31 802cc44: 3402 adds r4, #2 802cc46: 9305 str r3, [sp, #20] 802cc48: f8df a0c0 ldr.w sl, [pc, #192] @ 802cd0c <_svfiprintf_r+0x1f4> 802cc4c: 7821 ldrb r1, [r4, #0] 802cc4e: 2203 movs r2, #3 802cc50: 4650 mov r0, sl 802cc52: f7d3 fb55 bl 8000300 802cc56: b138 cbz r0, 802cc68 <_svfiprintf_r+0x150> 802cc58: 9b04 ldr r3, [sp, #16] 802cc5a: eba0 000a sub.w r0, r0, sl 802cc5e: 2240 movs r2, #64 @ 0x40 802cc60: 4082 lsls r2, r0 802cc62: 4313 orrs r3, r2 802cc64: 3401 adds r4, #1 802cc66: 9304 str r3, [sp, #16] 802cc68: f814 1b01 ldrb.w r1, [r4], #1 802cc6c: 4824 ldr r0, [pc, #144] @ (802cd00 <_svfiprintf_r+0x1e8>) 802cc6e: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802cc72: 2206 movs r2, #6 802cc74: f7d3 fb44 bl 8000300 802cc78: 2800 cmp r0, #0 802cc7a: d036 beq.n 802ccea <_svfiprintf_r+0x1d2> 802cc7c: 4b21 ldr r3, [pc, #132] @ (802cd04 <_svfiprintf_r+0x1ec>) 802cc7e: bb1b cbnz r3, 802ccc8 <_svfiprintf_r+0x1b0> 802cc80: 9b03 ldr r3, [sp, #12] 802cc82: 3307 adds r3, #7 802cc84: f023 0307 bic.w r3, r3, #7 802cc88: 3308 adds r3, #8 802cc8a: 9303 str r3, [sp, #12] 802cc8c: 9b09 ldr r3, [sp, #36] @ 0x24 802cc8e: 4433 add r3, r6 802cc90: 9309 str r3, [sp, #36] @ 0x24 802cc92: e76a b.n 802cb6a <_svfiprintf_r+0x52> 802cc94: fb0c 3202 mla r2, ip, r2, r3 802cc98: 460c mov r4, r1 802cc9a: 2001 movs r0, #1 802cc9c: e7a8 b.n 802cbf0 <_svfiprintf_r+0xd8> 802cc9e: 2300 movs r3, #0 802cca0: 3401 adds r4, #1 802cca2: 9305 str r3, [sp, #20] 802cca4: 4619 mov r1, r3 802cca6: f04f 0c0a mov.w ip, #10 802ccaa: 4620 mov r0, r4 802ccac: f810 2b01 ldrb.w r2, [r0], #1 802ccb0: 3a30 subs r2, #48 @ 0x30 802ccb2: 2a09 cmp r2, #9 802ccb4: d903 bls.n 802ccbe <_svfiprintf_r+0x1a6> 802ccb6: 2b00 cmp r3, #0 802ccb8: d0c6 beq.n 802cc48 <_svfiprintf_r+0x130> 802ccba: 9105 str r1, [sp, #20] 802ccbc: e7c4 b.n 802cc48 <_svfiprintf_r+0x130> 802ccbe: fb0c 2101 mla r1, ip, r1, r2 802ccc2: 4604 mov r4, r0 802ccc4: 2301 movs r3, #1 802ccc6: e7f0 b.n 802ccaa <_svfiprintf_r+0x192> 802ccc8: ab03 add r3, sp, #12 802ccca: 9300 str r3, [sp, #0] 802cccc: 462a mov r2, r5 802ccce: 4b0e ldr r3, [pc, #56] @ (802cd08 <_svfiprintf_r+0x1f0>) 802ccd0: a904 add r1, sp, #16 802ccd2: 4638 mov r0, r7 802ccd4: f7fd f960 bl 8029f98 <_printf_float> 802ccd8: 1c42 adds r2, r0, #1 802ccda: 4606 mov r6, r0 802ccdc: d1d6 bne.n 802cc8c <_svfiprintf_r+0x174> 802ccde: 89ab ldrh r3, [r5, #12] 802cce0: 065b lsls r3, r3, #25 802cce2: f53f af2d bmi.w 802cb40 <_svfiprintf_r+0x28> 802cce6: 9809 ldr r0, [sp, #36] @ 0x24 802cce8: e72c b.n 802cb44 <_svfiprintf_r+0x2c> 802ccea: ab03 add r3, sp, #12 802ccec: 9300 str r3, [sp, #0] 802ccee: 462a mov r2, r5 802ccf0: 4b05 ldr r3, [pc, #20] @ (802cd08 <_svfiprintf_r+0x1f0>) 802ccf2: a904 add r1, sp, #16 802ccf4: 4638 mov r0, r7 802ccf6: f7fd fbd7 bl 802a4a8 <_printf_i> 802ccfa: e7ed b.n 802ccd8 <_svfiprintf_r+0x1c0> 802ccfc: 080320f8 .word 0x080320f8 802cd00: 08032102 .word 0x08032102 802cd04: 08029f99 .word 0x08029f99 802cd08: 0802ca61 .word 0x0802ca61 802cd0c: 080320fe .word 0x080320fe 0802cd10 <__sfputc_r>: 802cd10: 6893 ldr r3, [r2, #8] 802cd12: 3b01 subs r3, #1 802cd14: 2b00 cmp r3, #0 802cd16: b410 push {r4} 802cd18: 6093 str r3, [r2, #8] 802cd1a: da08 bge.n 802cd2e <__sfputc_r+0x1e> 802cd1c: 6994 ldr r4, [r2, #24] 802cd1e: 42a3 cmp r3, r4 802cd20: db01 blt.n 802cd26 <__sfputc_r+0x16> 802cd22: 290a cmp r1, #10 802cd24: d103 bne.n 802cd2e <__sfputc_r+0x1e> 802cd26: f85d 4b04 ldr.w r4, [sp], #4 802cd2a: f7fd be72 b.w 802aa12 <__swbuf_r> 802cd2e: 6813 ldr r3, [r2, #0] 802cd30: 1c58 adds r0, r3, #1 802cd32: 6010 str r0, [r2, #0] 802cd34: 7019 strb r1, [r3, #0] 802cd36: 4608 mov r0, r1 802cd38: f85d 4b04 ldr.w r4, [sp], #4 802cd3c: 4770 bx lr 0802cd3e <__sfputs_r>: 802cd3e: b5f8 push {r3, r4, r5, r6, r7, lr} 802cd40: 4606 mov r6, r0 802cd42: 460f mov r7, r1 802cd44: 4614 mov r4, r2 802cd46: 18d5 adds r5, r2, r3 802cd48: 42ac cmp r4, r5 802cd4a: d101 bne.n 802cd50 <__sfputs_r+0x12> 802cd4c: 2000 movs r0, #0 802cd4e: e007 b.n 802cd60 <__sfputs_r+0x22> 802cd50: f814 1b01 ldrb.w r1, [r4], #1 802cd54: 463a mov r2, r7 802cd56: 4630 mov r0, r6 802cd58: f7ff ffda bl 802cd10 <__sfputc_r> 802cd5c: 1c43 adds r3, r0, #1 802cd5e: d1f3 bne.n 802cd48 <__sfputs_r+0xa> 802cd60: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 0802cd64 <_vfiprintf_r>: 802cd64: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cd68: 460d mov r5, r1 802cd6a: b09d sub sp, #116 @ 0x74 802cd6c: 4614 mov r4, r2 802cd6e: 4698 mov r8, r3 802cd70: 4606 mov r6, r0 802cd72: b118 cbz r0, 802cd7c <_vfiprintf_r+0x18> 802cd74: 6a03 ldr r3, [r0, #32] 802cd76: b90b cbnz r3, 802cd7c <_vfiprintf_r+0x18> 802cd78: f7fd fd42 bl 802a800 <__sinit> 802cd7c: 6e6b ldr r3, [r5, #100] @ 0x64 802cd7e: 07d9 lsls r1, r3, #31 802cd80: d405 bmi.n 802cd8e <_vfiprintf_r+0x2a> 802cd82: 89ab ldrh r3, [r5, #12] 802cd84: 059a lsls r2, r3, #22 802cd86: d402 bmi.n 802cd8e <_vfiprintf_r+0x2a> 802cd88: 6da8 ldr r0, [r5, #88] @ 0x58 802cd8a: f7fd fff6 bl 802ad7a <__retarget_lock_acquire_recursive> 802cd8e: 89ab ldrh r3, [r5, #12] 802cd90: 071b lsls r3, r3, #28 802cd92: d501 bpl.n 802cd98 <_vfiprintf_r+0x34> 802cd94: 692b ldr r3, [r5, #16] 802cd96: b99b cbnz r3, 802cdc0 <_vfiprintf_r+0x5c> 802cd98: 4629 mov r1, r5 802cd9a: 4630 mov r0, r6 802cd9c: f7fd fe78 bl 802aa90 <__swsetup_r> 802cda0: b170 cbz r0, 802cdc0 <_vfiprintf_r+0x5c> 802cda2: 6e6b ldr r3, [r5, #100] @ 0x64 802cda4: 07dc lsls r4, r3, #31 802cda6: d504 bpl.n 802cdb2 <_vfiprintf_r+0x4e> 802cda8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cdac: b01d add sp, #116 @ 0x74 802cdae: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802cdb2: 89ab ldrh r3, [r5, #12] 802cdb4: 0598 lsls r0, r3, #22 802cdb6: d4f7 bmi.n 802cda8 <_vfiprintf_r+0x44> 802cdb8: 6da8 ldr r0, [r5, #88] @ 0x58 802cdba: f7fd ffdf bl 802ad7c <__retarget_lock_release_recursive> 802cdbe: e7f3 b.n 802cda8 <_vfiprintf_r+0x44> 802cdc0: 2300 movs r3, #0 802cdc2: 9309 str r3, [sp, #36] @ 0x24 802cdc4: 2320 movs r3, #32 802cdc6: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802cdca: f8cd 800c str.w r8, [sp, #12] 802cdce: 2330 movs r3, #48 @ 0x30 802cdd0: f8df 81ac ldr.w r8, [pc, #428] @ 802cf80 <_vfiprintf_r+0x21c> 802cdd4: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802cdd8: f04f 0901 mov.w r9, #1 802cddc: 4623 mov r3, r4 802cdde: 469a mov sl, r3 802cde0: f813 2b01 ldrb.w r2, [r3], #1 802cde4: b10a cbz r2, 802cdea <_vfiprintf_r+0x86> 802cde6: 2a25 cmp r2, #37 @ 0x25 802cde8: d1f9 bne.n 802cdde <_vfiprintf_r+0x7a> 802cdea: ebba 0b04 subs.w fp, sl, r4 802cdee: d00b beq.n 802ce08 <_vfiprintf_r+0xa4> 802cdf0: 465b mov r3, fp 802cdf2: 4622 mov r2, r4 802cdf4: 4629 mov r1, r5 802cdf6: 4630 mov r0, r6 802cdf8: f7ff ffa1 bl 802cd3e <__sfputs_r> 802cdfc: 3001 adds r0, #1 802cdfe: f000 80a7 beq.w 802cf50 <_vfiprintf_r+0x1ec> 802ce02: 9a09 ldr r2, [sp, #36] @ 0x24 802ce04: 445a add r2, fp 802ce06: 9209 str r2, [sp, #36] @ 0x24 802ce08: f89a 3000 ldrb.w r3, [sl] 802ce0c: 2b00 cmp r3, #0 802ce0e: f000 809f beq.w 802cf50 <_vfiprintf_r+0x1ec> 802ce12: 2300 movs r3, #0 802ce14: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802ce18: e9cd 2305 strd r2, r3, [sp, #20] 802ce1c: f10a 0a01 add.w sl, sl, #1 802ce20: 9304 str r3, [sp, #16] 802ce22: 9307 str r3, [sp, #28] 802ce24: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802ce28: 931a str r3, [sp, #104] @ 0x68 802ce2a: 4654 mov r4, sl 802ce2c: 2205 movs r2, #5 802ce2e: f814 1b01 ldrb.w r1, [r4], #1 802ce32: 4853 ldr r0, [pc, #332] @ (802cf80 <_vfiprintf_r+0x21c>) 802ce34: f7d3 fa64 bl 8000300 802ce38: 9a04 ldr r2, [sp, #16] 802ce3a: b9d8 cbnz r0, 802ce74 <_vfiprintf_r+0x110> 802ce3c: 06d1 lsls r1, r2, #27 802ce3e: bf44 itt mi 802ce40: 2320 movmi r3, #32 802ce42: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802ce46: 0713 lsls r3, r2, #28 802ce48: bf44 itt mi 802ce4a: 232b movmi r3, #43 @ 0x2b 802ce4c: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802ce50: f89a 3000 ldrb.w r3, [sl] 802ce54: 2b2a cmp r3, #42 @ 0x2a 802ce56: d015 beq.n 802ce84 <_vfiprintf_r+0x120> 802ce58: 9a07 ldr r2, [sp, #28] 802ce5a: 4654 mov r4, sl 802ce5c: 2000 movs r0, #0 802ce5e: f04f 0c0a mov.w ip, #10 802ce62: 4621 mov r1, r4 802ce64: f811 3b01 ldrb.w r3, [r1], #1 802ce68: 3b30 subs r3, #48 @ 0x30 802ce6a: 2b09 cmp r3, #9 802ce6c: d94b bls.n 802cf06 <_vfiprintf_r+0x1a2> 802ce6e: b1b0 cbz r0, 802ce9e <_vfiprintf_r+0x13a> 802ce70: 9207 str r2, [sp, #28] 802ce72: e014 b.n 802ce9e <_vfiprintf_r+0x13a> 802ce74: eba0 0308 sub.w r3, r0, r8 802ce78: fa09 f303 lsl.w r3, r9, r3 802ce7c: 4313 orrs r3, r2 802ce7e: 9304 str r3, [sp, #16] 802ce80: 46a2 mov sl, r4 802ce82: e7d2 b.n 802ce2a <_vfiprintf_r+0xc6> 802ce84: 9b03 ldr r3, [sp, #12] 802ce86: 1d19 adds r1, r3, #4 802ce88: 681b ldr r3, [r3, #0] 802ce8a: 9103 str r1, [sp, #12] 802ce8c: 2b00 cmp r3, #0 802ce8e: bfbb ittet lt 802ce90: 425b neglt r3, r3 802ce92: f042 0202 orrlt.w r2, r2, #2 802ce96: 9307 strge r3, [sp, #28] 802ce98: 9307 strlt r3, [sp, #28] 802ce9a: bfb8 it lt 802ce9c: 9204 strlt r2, [sp, #16] 802ce9e: 7823 ldrb r3, [r4, #0] 802cea0: 2b2e cmp r3, #46 @ 0x2e 802cea2: d10a bne.n 802ceba <_vfiprintf_r+0x156> 802cea4: 7863 ldrb r3, [r4, #1] 802cea6: 2b2a cmp r3, #42 @ 0x2a 802cea8: d132 bne.n 802cf10 <_vfiprintf_r+0x1ac> 802ceaa: 9b03 ldr r3, [sp, #12] 802ceac: 1d1a adds r2, r3, #4 802ceae: 681b ldr r3, [r3, #0] 802ceb0: 9203 str r2, [sp, #12] 802ceb2: ea43 73e3 orr.w r3, r3, r3, asr #31 802ceb6: 3402 adds r4, #2 802ceb8: 9305 str r3, [sp, #20] 802ceba: f8df a0d4 ldr.w sl, [pc, #212] @ 802cf90 <_vfiprintf_r+0x22c> 802cebe: 7821 ldrb r1, [r4, #0] 802cec0: 2203 movs r2, #3 802cec2: 4650 mov r0, sl 802cec4: f7d3 fa1c bl 8000300 802cec8: b138 cbz r0, 802ceda <_vfiprintf_r+0x176> 802ceca: 9b04 ldr r3, [sp, #16] 802cecc: eba0 000a sub.w r0, r0, sl 802ced0: 2240 movs r2, #64 @ 0x40 802ced2: 4082 lsls r2, r0 802ced4: 4313 orrs r3, r2 802ced6: 3401 adds r4, #1 802ced8: 9304 str r3, [sp, #16] 802ceda: f814 1b01 ldrb.w r1, [r4], #1 802cede: 4829 ldr r0, [pc, #164] @ (802cf84 <_vfiprintf_r+0x220>) 802cee0: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802cee4: 2206 movs r2, #6 802cee6: f7d3 fa0b bl 8000300 802ceea: 2800 cmp r0, #0 802ceec: d03f beq.n 802cf6e <_vfiprintf_r+0x20a> 802ceee: 4b26 ldr r3, [pc, #152] @ (802cf88 <_vfiprintf_r+0x224>) 802cef0: bb1b cbnz r3, 802cf3a <_vfiprintf_r+0x1d6> 802cef2: 9b03 ldr r3, [sp, #12] 802cef4: 3307 adds r3, #7 802cef6: f023 0307 bic.w r3, r3, #7 802cefa: 3308 adds r3, #8 802cefc: 9303 str r3, [sp, #12] 802cefe: 9b09 ldr r3, [sp, #36] @ 0x24 802cf00: 443b add r3, r7 802cf02: 9309 str r3, [sp, #36] @ 0x24 802cf04: e76a b.n 802cddc <_vfiprintf_r+0x78> 802cf06: fb0c 3202 mla r2, ip, r2, r3 802cf0a: 460c mov r4, r1 802cf0c: 2001 movs r0, #1 802cf0e: e7a8 b.n 802ce62 <_vfiprintf_r+0xfe> 802cf10: 2300 movs r3, #0 802cf12: 3401 adds r4, #1 802cf14: 9305 str r3, [sp, #20] 802cf16: 4619 mov r1, r3 802cf18: f04f 0c0a mov.w ip, #10 802cf1c: 4620 mov r0, r4 802cf1e: f810 2b01 ldrb.w r2, [r0], #1 802cf22: 3a30 subs r2, #48 @ 0x30 802cf24: 2a09 cmp r2, #9 802cf26: d903 bls.n 802cf30 <_vfiprintf_r+0x1cc> 802cf28: 2b00 cmp r3, #0 802cf2a: d0c6 beq.n 802ceba <_vfiprintf_r+0x156> 802cf2c: 9105 str r1, [sp, #20] 802cf2e: e7c4 b.n 802ceba <_vfiprintf_r+0x156> 802cf30: fb0c 2101 mla r1, ip, r1, r2 802cf34: 4604 mov r4, r0 802cf36: 2301 movs r3, #1 802cf38: e7f0 b.n 802cf1c <_vfiprintf_r+0x1b8> 802cf3a: ab03 add r3, sp, #12 802cf3c: 9300 str r3, [sp, #0] 802cf3e: 462a mov r2, r5 802cf40: 4b12 ldr r3, [pc, #72] @ (802cf8c <_vfiprintf_r+0x228>) 802cf42: a904 add r1, sp, #16 802cf44: 4630 mov r0, r6 802cf46: f7fd f827 bl 8029f98 <_printf_float> 802cf4a: 4607 mov r7, r0 802cf4c: 1c78 adds r0, r7, #1 802cf4e: d1d6 bne.n 802cefe <_vfiprintf_r+0x19a> 802cf50: 6e6b ldr r3, [r5, #100] @ 0x64 802cf52: 07d9 lsls r1, r3, #31 802cf54: d405 bmi.n 802cf62 <_vfiprintf_r+0x1fe> 802cf56: 89ab ldrh r3, [r5, #12] 802cf58: 059a lsls r2, r3, #22 802cf5a: d402 bmi.n 802cf62 <_vfiprintf_r+0x1fe> 802cf5c: 6da8 ldr r0, [r5, #88] @ 0x58 802cf5e: f7fd ff0d bl 802ad7c <__retarget_lock_release_recursive> 802cf62: 89ab ldrh r3, [r5, #12] 802cf64: 065b lsls r3, r3, #25 802cf66: f53f af1f bmi.w 802cda8 <_vfiprintf_r+0x44> 802cf6a: 9809 ldr r0, [sp, #36] @ 0x24 802cf6c: e71e b.n 802cdac <_vfiprintf_r+0x48> 802cf6e: ab03 add r3, sp, #12 802cf70: 9300 str r3, [sp, #0] 802cf72: 462a mov r2, r5 802cf74: 4b05 ldr r3, [pc, #20] @ (802cf8c <_vfiprintf_r+0x228>) 802cf76: a904 add r1, sp, #16 802cf78: 4630 mov r0, r6 802cf7a: f7fd fa95 bl 802a4a8 <_printf_i> 802cf7e: e7e4 b.n 802cf4a <_vfiprintf_r+0x1e6> 802cf80: 080320f8 .word 0x080320f8 802cf84: 08032102 .word 0x08032102 802cf88: 08029f99 .word 0x08029f99 802cf8c: 0802cd3f .word 0x0802cd3f 802cf90: 080320fe .word 0x080320fe 0802cf94 <__sflush_r>: 802cf94: f9b1 200c ldrsh.w r2, [r1, #12] 802cf98: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cf9c: 0716 lsls r6, r2, #28 802cf9e: 4605 mov r5, r0 802cfa0: 460c mov r4, r1 802cfa2: d454 bmi.n 802d04e <__sflush_r+0xba> 802cfa4: 684b ldr r3, [r1, #4] 802cfa6: 2b00 cmp r3, #0 802cfa8: dc02 bgt.n 802cfb0 <__sflush_r+0x1c> 802cfaa: 6c0b ldr r3, [r1, #64] @ 0x40 802cfac: 2b00 cmp r3, #0 802cfae: dd48 ble.n 802d042 <__sflush_r+0xae> 802cfb0: 6ae6 ldr r6, [r4, #44] @ 0x2c 802cfb2: 2e00 cmp r6, #0 802cfb4: d045 beq.n 802d042 <__sflush_r+0xae> 802cfb6: 2300 movs r3, #0 802cfb8: f412 5280 ands.w r2, r2, #4096 @ 0x1000 802cfbc: 682f ldr r7, [r5, #0] 802cfbe: 6a21 ldr r1, [r4, #32] 802cfc0: 602b str r3, [r5, #0] 802cfc2: d030 beq.n 802d026 <__sflush_r+0x92> 802cfc4: 6d62 ldr r2, [r4, #84] @ 0x54 802cfc6: 89a3 ldrh r3, [r4, #12] 802cfc8: 0759 lsls r1, r3, #29 802cfca: d505 bpl.n 802cfd8 <__sflush_r+0x44> 802cfcc: 6863 ldr r3, [r4, #4] 802cfce: 1ad2 subs r2, r2, r3 802cfd0: 6b63 ldr r3, [r4, #52] @ 0x34 802cfd2: b10b cbz r3, 802cfd8 <__sflush_r+0x44> 802cfd4: 6c23 ldr r3, [r4, #64] @ 0x40 802cfd6: 1ad2 subs r2, r2, r3 802cfd8: 2300 movs r3, #0 802cfda: 6ae6 ldr r6, [r4, #44] @ 0x2c 802cfdc: 6a21 ldr r1, [r4, #32] 802cfde: 4628 mov r0, r5 802cfe0: 47b0 blx r6 802cfe2: 1c43 adds r3, r0, #1 802cfe4: 89a3 ldrh r3, [r4, #12] 802cfe6: d106 bne.n 802cff6 <__sflush_r+0x62> 802cfe8: 6829 ldr r1, [r5, #0] 802cfea: 291d cmp r1, #29 802cfec: d82b bhi.n 802d046 <__sflush_r+0xb2> 802cfee: 4a2a ldr r2, [pc, #168] @ (802d098 <__sflush_r+0x104>) 802cff0: 410a asrs r2, r1 802cff2: 07d6 lsls r6, r2, #31 802cff4: d427 bmi.n 802d046 <__sflush_r+0xb2> 802cff6: 2200 movs r2, #0 802cff8: 6062 str r2, [r4, #4] 802cffa: 04d9 lsls r1, r3, #19 802cffc: 6922 ldr r2, [r4, #16] 802cffe: 6022 str r2, [r4, #0] 802d000: d504 bpl.n 802d00c <__sflush_r+0x78> 802d002: 1c42 adds r2, r0, #1 802d004: d101 bne.n 802d00a <__sflush_r+0x76> 802d006: 682b ldr r3, [r5, #0] 802d008: b903 cbnz r3, 802d00c <__sflush_r+0x78> 802d00a: 6560 str r0, [r4, #84] @ 0x54 802d00c: 6b61 ldr r1, [r4, #52] @ 0x34 802d00e: 602f str r7, [r5, #0] 802d010: b1b9 cbz r1, 802d042 <__sflush_r+0xae> 802d012: f104 0344 add.w r3, r4, #68 @ 0x44 802d016: 4299 cmp r1, r3 802d018: d002 beq.n 802d020 <__sflush_r+0x8c> 802d01a: 4628 mov r0, r5 802d01c: f7fe fcc6 bl 802b9ac <_free_r> 802d020: 2300 movs r3, #0 802d022: 6363 str r3, [r4, #52] @ 0x34 802d024: e00d b.n 802d042 <__sflush_r+0xae> 802d026: 2301 movs r3, #1 802d028: 4628 mov r0, r5 802d02a: 47b0 blx r6 802d02c: 4602 mov r2, r0 802d02e: 1c50 adds r0, r2, #1 802d030: d1c9 bne.n 802cfc6 <__sflush_r+0x32> 802d032: 682b ldr r3, [r5, #0] 802d034: 2b00 cmp r3, #0 802d036: d0c6 beq.n 802cfc6 <__sflush_r+0x32> 802d038: 2b1d cmp r3, #29 802d03a: d001 beq.n 802d040 <__sflush_r+0xac> 802d03c: 2b16 cmp r3, #22 802d03e: d11e bne.n 802d07e <__sflush_r+0xea> 802d040: 602f str r7, [r5, #0] 802d042: 2000 movs r0, #0 802d044: e022 b.n 802d08c <__sflush_r+0xf8> 802d046: f043 0340 orr.w r3, r3, #64 @ 0x40 802d04a: b21b sxth r3, r3 802d04c: e01b b.n 802d086 <__sflush_r+0xf2> 802d04e: 690f ldr r7, [r1, #16] 802d050: 2f00 cmp r7, #0 802d052: d0f6 beq.n 802d042 <__sflush_r+0xae> 802d054: 0793 lsls r3, r2, #30 802d056: 680e ldr r6, [r1, #0] 802d058: bf08 it eq 802d05a: 694b ldreq r3, [r1, #20] 802d05c: 600f str r7, [r1, #0] 802d05e: bf18 it ne 802d060: 2300 movne r3, #0 802d062: eba6 0807 sub.w r8, r6, r7 802d066: 608b str r3, [r1, #8] 802d068: f1b8 0f00 cmp.w r8, #0 802d06c: dde9 ble.n 802d042 <__sflush_r+0xae> 802d06e: 6a21 ldr r1, [r4, #32] 802d070: 6aa6 ldr r6, [r4, #40] @ 0x28 802d072: 4643 mov r3, r8 802d074: 463a mov r2, r7 802d076: 4628 mov r0, r5 802d078: 47b0 blx r6 802d07a: 2800 cmp r0, #0 802d07c: dc08 bgt.n 802d090 <__sflush_r+0xfc> 802d07e: f9b4 300c ldrsh.w r3, [r4, #12] 802d082: f043 0340 orr.w r3, r3, #64 @ 0x40 802d086: 81a3 strh r3, [r4, #12] 802d088: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802d08c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d090: 4407 add r7, r0 802d092: eba8 0800 sub.w r8, r8, r0 802d096: e7e7 b.n 802d068 <__sflush_r+0xd4> 802d098: dfbffffe .word 0xdfbffffe 0802d09c <_fflush_r>: 802d09c: b538 push {r3, r4, r5, lr} 802d09e: 690b ldr r3, [r1, #16] 802d0a0: 4605 mov r5, r0 802d0a2: 460c mov r4, r1 802d0a4: b913 cbnz r3, 802d0ac <_fflush_r+0x10> 802d0a6: 2500 movs r5, #0 802d0a8: 4628 mov r0, r5 802d0aa: bd38 pop {r3, r4, r5, pc} 802d0ac: b118 cbz r0, 802d0b6 <_fflush_r+0x1a> 802d0ae: 6a03 ldr r3, [r0, #32] 802d0b0: b90b cbnz r3, 802d0b6 <_fflush_r+0x1a> 802d0b2: f7fd fba5 bl 802a800 <__sinit> 802d0b6: f9b4 300c ldrsh.w r3, [r4, #12] 802d0ba: 2b00 cmp r3, #0 802d0bc: d0f3 beq.n 802d0a6 <_fflush_r+0xa> 802d0be: 6e62 ldr r2, [r4, #100] @ 0x64 802d0c0: 07d0 lsls r0, r2, #31 802d0c2: d404 bmi.n 802d0ce <_fflush_r+0x32> 802d0c4: 0599 lsls r1, r3, #22 802d0c6: d402 bmi.n 802d0ce <_fflush_r+0x32> 802d0c8: 6da0 ldr r0, [r4, #88] @ 0x58 802d0ca: f7fd fe56 bl 802ad7a <__retarget_lock_acquire_recursive> 802d0ce: 4628 mov r0, r5 802d0d0: 4621 mov r1, r4 802d0d2: f7ff ff5f bl 802cf94 <__sflush_r> 802d0d6: 6e63 ldr r3, [r4, #100] @ 0x64 802d0d8: 07da lsls r2, r3, #31 802d0da: 4605 mov r5, r0 802d0dc: d4e4 bmi.n 802d0a8 <_fflush_r+0xc> 802d0de: 89a3 ldrh r3, [r4, #12] 802d0e0: 059b lsls r3, r3, #22 802d0e2: d4e1 bmi.n 802d0a8 <_fflush_r+0xc> 802d0e4: 6da0 ldr r0, [r4, #88] @ 0x58 802d0e6: f7fd fe49 bl 802ad7c <__retarget_lock_release_recursive> 802d0ea: e7dd b.n 802d0a8 <_fflush_r+0xc> 0802d0ec : 802d0ec: b40e push {r1, r2, r3} 802d0ee: b503 push {r0, r1, lr} 802d0f0: 4601 mov r1, r0 802d0f2: ab03 add r3, sp, #12 802d0f4: 4805 ldr r0, [pc, #20] @ (802d10c ) 802d0f6: f853 2b04 ldr.w r2, [r3], #4 802d0fa: 6800 ldr r0, [r0, #0] 802d0fc: 9301 str r3, [sp, #4] 802d0fe: f7ff fe31 bl 802cd64 <_vfiprintf_r> 802d102: b002 add sp, #8 802d104: f85d eb04 ldr.w lr, [sp], #4 802d108: b003 add sp, #12 802d10a: 4770 bx lr 802d10c: 240001d4 .word 0x240001d4 0802d110 <__swhatbuf_r>: 802d110: b570 push {r4, r5, r6, lr} 802d112: 460c mov r4, r1 802d114: f9b1 100e ldrsh.w r1, [r1, #14] 802d118: 2900 cmp r1, #0 802d11a: b096 sub sp, #88 @ 0x58 802d11c: 4615 mov r5, r2 802d11e: 461e mov r6, r3 802d120: da0d bge.n 802d13e <__swhatbuf_r+0x2e> 802d122: 89a3 ldrh r3, [r4, #12] 802d124: f013 0f80 tst.w r3, #128 @ 0x80 802d128: f04f 0100 mov.w r1, #0 802d12c: bf14 ite ne 802d12e: 2340 movne r3, #64 @ 0x40 802d130: f44f 6380 moveq.w r3, #1024 @ 0x400 802d134: 2000 movs r0, #0 802d136: 6031 str r1, [r6, #0] 802d138: 602b str r3, [r5, #0] 802d13a: b016 add sp, #88 @ 0x58 802d13c: bd70 pop {r4, r5, r6, pc} 802d13e: 466a mov r2, sp 802d140: f000 f848 bl 802d1d4 <_fstat_r> 802d144: 2800 cmp r0, #0 802d146: dbec blt.n 802d122 <__swhatbuf_r+0x12> 802d148: 9901 ldr r1, [sp, #4] 802d14a: f401 4170 and.w r1, r1, #61440 @ 0xf000 802d14e: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000 802d152: 4259 negs r1, r3 802d154: 4159 adcs r1, r3 802d156: f44f 6380 mov.w r3, #1024 @ 0x400 802d15a: e7eb b.n 802d134 <__swhatbuf_r+0x24> 0802d15c <__smakebuf_r>: 802d15c: 898b ldrh r3, [r1, #12] 802d15e: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802d160: 079d lsls r5, r3, #30 802d162: 4606 mov r6, r0 802d164: 460c mov r4, r1 802d166: d507 bpl.n 802d178 <__smakebuf_r+0x1c> 802d168: f104 0347 add.w r3, r4, #71 @ 0x47 802d16c: 6023 str r3, [r4, #0] 802d16e: 6123 str r3, [r4, #16] 802d170: 2301 movs r3, #1 802d172: 6163 str r3, [r4, #20] 802d174: b003 add sp, #12 802d176: bdf0 pop {r4, r5, r6, r7, pc} 802d178: ab01 add r3, sp, #4 802d17a: 466a mov r2, sp 802d17c: f7ff ffc8 bl 802d110 <__swhatbuf_r> 802d180: 9f00 ldr r7, [sp, #0] 802d182: 4605 mov r5, r0 802d184: 4639 mov r1, r7 802d186: 4630 mov r0, r6 802d188: f7fb ffba bl 8029100 <_malloc_r> 802d18c: b948 cbnz r0, 802d1a2 <__smakebuf_r+0x46> 802d18e: f9b4 300c ldrsh.w r3, [r4, #12] 802d192: 059a lsls r2, r3, #22 802d194: d4ee bmi.n 802d174 <__smakebuf_r+0x18> 802d196: f023 0303 bic.w r3, r3, #3 802d19a: f043 0302 orr.w r3, r3, #2 802d19e: 81a3 strh r3, [r4, #12] 802d1a0: e7e2 b.n 802d168 <__smakebuf_r+0xc> 802d1a2: 89a3 ldrh r3, [r4, #12] 802d1a4: 6020 str r0, [r4, #0] 802d1a6: f043 0380 orr.w r3, r3, #128 @ 0x80 802d1aa: 81a3 strh r3, [r4, #12] 802d1ac: 9b01 ldr r3, [sp, #4] 802d1ae: e9c4 0704 strd r0, r7, [r4, #16] 802d1b2: b15b cbz r3, 802d1cc <__smakebuf_r+0x70> 802d1b4: f9b4 100e ldrsh.w r1, [r4, #14] 802d1b8: 4630 mov r0, r6 802d1ba: f000 f81d bl 802d1f8 <_isatty_r> 802d1be: b128 cbz r0, 802d1cc <__smakebuf_r+0x70> 802d1c0: 89a3 ldrh r3, [r4, #12] 802d1c2: f023 0303 bic.w r3, r3, #3 802d1c6: f043 0301 orr.w r3, r3, #1 802d1ca: 81a3 strh r3, [r4, #12] 802d1cc: 89a3 ldrh r3, [r4, #12] 802d1ce: 431d orrs r5, r3 802d1d0: 81a5 strh r5, [r4, #12] 802d1d2: e7cf b.n 802d174 <__smakebuf_r+0x18> 0802d1d4 <_fstat_r>: 802d1d4: b538 push {r3, r4, r5, lr} 802d1d6: 4d07 ldr r5, [pc, #28] @ (802d1f4 <_fstat_r+0x20>) 802d1d8: 2300 movs r3, #0 802d1da: 4604 mov r4, r0 802d1dc: 4608 mov r0, r1 802d1de: 4611 mov r1, r2 802d1e0: 602b str r3, [r5, #0] 802d1e2: f7d7 f83d bl 8004260 <_fstat> 802d1e6: 1c43 adds r3, r0, #1 802d1e8: d102 bne.n 802d1f0 <_fstat_r+0x1c> 802d1ea: 682b ldr r3, [r5, #0] 802d1ec: b103 cbz r3, 802d1f0 <_fstat_r+0x1c> 802d1ee: 6023 str r3, [r4, #0] 802d1f0: bd38 pop {r3, r4, r5, pc} 802d1f2: bf00 nop 802d1f4: 2402b260 .word 0x2402b260 0802d1f8 <_isatty_r>: 802d1f8: b538 push {r3, r4, r5, lr} 802d1fa: 4d06 ldr r5, [pc, #24] @ (802d214 <_isatty_r+0x1c>) 802d1fc: 2300 movs r3, #0 802d1fe: 4604 mov r4, r0 802d200: 4608 mov r0, r1 802d202: 602b str r3, [r5, #0] 802d204: f7d7 f83c bl 8004280 <_isatty> 802d208: 1c43 adds r3, r0, #1 802d20a: d102 bne.n 802d212 <_isatty_r+0x1a> 802d20c: 682b ldr r3, [r5, #0] 802d20e: b103 cbz r3, 802d212 <_isatty_r+0x1a> 802d210: 6023 str r3, [r4, #0] 802d212: bd38 pop {r3, r4, r5, pc} 802d214: 2402b260 .word 0x2402b260 0802d218 : 802d218: b508 push {r3, lr} 802d21a: 2006 movs r0, #6 802d21c: f000 f840 bl 802d2a0 802d220: 2001 movs r0, #1 802d222: f7d6 ffcd bl 80041c0 <_exit> 0802d226 <_calloc_r>: 802d226: b570 push {r4, r5, r6, lr} 802d228: fba1 5402 umull r5, r4, r1, r2 802d22c: b93c cbnz r4, 802d23e <_calloc_r+0x18> 802d22e: 4629 mov r1, r5 802d230: f7fb ff66 bl 8029100 <_malloc_r> 802d234: 4606 mov r6, r0 802d236: b928 cbnz r0, 802d244 <_calloc_r+0x1e> 802d238: 2600 movs r6, #0 802d23a: 4630 mov r0, r6 802d23c: bd70 pop {r4, r5, r6, pc} 802d23e: 220c movs r2, #12 802d240: 6002 str r2, [r0, #0] 802d242: e7f9 b.n 802d238 <_calloc_r+0x12> 802d244: 462a mov r2, r5 802d246: 4621 mov r1, r4 802d248: f7fd fca2 bl 802ab90 802d24c: e7f5 b.n 802d23a <_calloc_r+0x14> 0802d24e <_raise_r>: 802d24e: 291f cmp r1, #31 802d250: b538 push {r3, r4, r5, lr} 802d252: 4605 mov r5, r0 802d254: 460c mov r4, r1 802d256: d904 bls.n 802d262 <_raise_r+0x14> 802d258: 2316 movs r3, #22 802d25a: 6003 str r3, [r0, #0] 802d25c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802d260: bd38 pop {r3, r4, r5, pc} 802d262: 6bc2 ldr r2, [r0, #60] @ 0x3c 802d264: b112 cbz r2, 802d26c <_raise_r+0x1e> 802d266: f852 3021 ldr.w r3, [r2, r1, lsl #2] 802d26a: b94b cbnz r3, 802d280 <_raise_r+0x32> 802d26c: 4628 mov r0, r5 802d26e: f000 f831 bl 802d2d4 <_getpid_r> 802d272: 4622 mov r2, r4 802d274: 4601 mov r1, r0 802d276: 4628 mov r0, r5 802d278: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802d27c: f000 b818 b.w 802d2b0 <_kill_r> 802d280: 2b01 cmp r3, #1 802d282: d00a beq.n 802d29a <_raise_r+0x4c> 802d284: 1c59 adds r1, r3, #1 802d286: d103 bne.n 802d290 <_raise_r+0x42> 802d288: 2316 movs r3, #22 802d28a: 6003 str r3, [r0, #0] 802d28c: 2001 movs r0, #1 802d28e: e7e7 b.n 802d260 <_raise_r+0x12> 802d290: 2100 movs r1, #0 802d292: f842 1024 str.w r1, [r2, r4, lsl #2] 802d296: 4620 mov r0, r4 802d298: 4798 blx r3 802d29a: 2000 movs r0, #0 802d29c: e7e0 b.n 802d260 <_raise_r+0x12> ... 0802d2a0 : 802d2a0: 4b02 ldr r3, [pc, #8] @ (802d2ac ) 802d2a2: 4601 mov r1, r0 802d2a4: 6818 ldr r0, [r3, #0] 802d2a6: f7ff bfd2 b.w 802d24e <_raise_r> 802d2aa: bf00 nop 802d2ac: 240001d4 .word 0x240001d4 0802d2b0 <_kill_r>: 802d2b0: b538 push {r3, r4, r5, lr} 802d2b2: 4d07 ldr r5, [pc, #28] @ (802d2d0 <_kill_r+0x20>) 802d2b4: 2300 movs r3, #0 802d2b6: 4604 mov r4, r0 802d2b8: 4608 mov r0, r1 802d2ba: 4611 mov r1, r2 802d2bc: 602b str r3, [r5, #0] 802d2be: f7d6 ff6d bl 800419c <_kill> 802d2c2: 1c43 adds r3, r0, #1 802d2c4: d102 bne.n 802d2cc <_kill_r+0x1c> 802d2c6: 682b ldr r3, [r5, #0] 802d2c8: b103 cbz r3, 802d2cc <_kill_r+0x1c> 802d2ca: 6023 str r3, [r4, #0] 802d2cc: bd38 pop {r3, r4, r5, pc} 802d2ce: bf00 nop 802d2d0: 2402b260 .word 0x2402b260 0802d2d4 <_getpid_r>: 802d2d4: f7d6 bf5a b.w 800418c <_getpid> 0802d2d8 <_init>: 802d2d8: b5f8 push {r3, r4, r5, r6, r7, lr} 802d2da: bf00 nop 802d2dc: bcf8 pop {r3, r4, r5, r6, r7} 802d2de: bc08 pop {r3} 802d2e0: 469e mov lr, r3 802d2e2: 4770 bx lr 0802d2e4 <_fini>: 802d2e4: b5f8 push {r3, r4, r5, r6, r7, lr} 802d2e6: bf00 nop 802d2e8: bcf8 pop {r3, r4, r5, r6, r7} 802d2ea: bc08 pop {r3} 802d2ec: 469e mov lr, r3 802d2ee: 4770 bx lr